Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rs-cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周健威
rs-cloud-platform
Commits
37b9519d
Commit
37b9519d
authored
Dec 27, 2021
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
0bec694d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
RscpImageDataTotalController.java
...form/rs/datacenter/rest/RscpImageDataTotalController.java
+11
-1
UploadService.java
...m/upyuns/platform/rs/universal/service/UploadService.java
+2
-2
No files found.
rs-datacenter/rs-datacenter-server/src/main/java/com/upyuns/platform/rs/datacenter/rest/RscpImageDataTotalController.java
View file @
37b9519d
...
@@ -118,13 +118,23 @@ public class RscpImageDataTotalController extends BaseController<RscpImageDataTo
...
@@ -118,13 +118,23 @@ public class RscpImageDataTotalController extends BaseController<RscpImageDataTo
//shp 转 geom
//shp 转 geom
// String shpPath = redisTemplate.opsForValue().get(dto.getShpKey());
// String shpPath = redisTemplate.opsForValue().get(dto.getShpKey());
// dto.setGeom(ShpToGeojson.shp2geojson(shpPath));
// dto.setGeom(ShpToGeojson.shp2geojson(shpPath));
dto
.
setGeom
(
redisTemplate
.
opsForValue
().
get
(
dto
.
getShpKey
()).
toString
());
String
redisStr
=
redisTemplate
.
opsForValue
().
get
(
dto
.
getShpKey
()).
toString
();
ShpDTO
shpDTO
=
JSONUtil
.
toBean
(
redisStr
,
ShpDTO
.
class
);
if
(
CollUtil
.
isNotEmpty
(
shpDTO
.
getFeatures
()))
{
dto
.
setGeom
(
shpDTO
.
getFeatures
().
get
(
0
));
// dto.setGeom(redisTemplate.opsForValue().get(dto.getShpKey()).toString());
}
return
ObjectRestResponse
.
succ
(
baseBiz
.
queryDataAreaList
(
dto
));
return
ObjectRestResponse
.
succ
(
baseBiz
.
queryDataAreaList
(
dto
));
}
else
{
}
else
{
return
ObjectRestResponse
.
succ
(
baseBiz
.
queryDataAreaList
(
dto
));
return
ObjectRestResponse
.
succ
(
baseBiz
.
queryDataAreaList
(
dto
));
}
}
}
}
@Data
public
static
class
ShpDTO
{
List
<
String
>
features
;
}
@RequestMapping
(
value
=
"/app/unauth/detailById"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/app/unauth/detailById"
,
method
=
RequestMethod
.
GET
)
@IgnoreUserToken
@IgnoreUserToken
public
ObjectRestResponse
<
List
<
RscpImageDataTotal
>>
detailById
(
Long
id
){
public
ObjectRestResponse
<
List
<
RscpImageDataTotal
>>
detailById
(
Long
id
){
...
...
rs-universal/rs-universal-server/src/main/java/com/upyuns/platform/rs/universal/service/UploadService.java
View file @
37b9519d
...
@@ -67,8 +67,8 @@ public class UploadService {
...
@@ -67,8 +67,8 @@ public class UploadService {
//将文件写入指定位置
//将文件写入指定位置
FileUtils
.
copyInputStreamToFile
(
file
.
getInputStream
(),
new
File
(
filePath
));
FileUtils
.
copyInputStreamToFile
(
file
.
getInputStream
(),
new
File
(
filePath
));
String
key
=
"shp:"
+
UUIDUtils
.
generateShortUuid
();
String
key
=
"shp:"
+
UUIDUtils
.
generateShortUuid
();
//
String geomJson = ShpToGeojson.shp2geojson(filePath);
String
geomJson
=
ShpToGeojson
.
shp2geojson
(
filePath
);
String
geomJson
=
ShpToGeojson
.
shp2OneGeojson
(
filePath
);
//
String geomJson = ShpToGeojson.shp2OneGeojson(filePath);
redisTemplate
.
opsForValue
().
setIfAbsent
(
key
,
geomJson
);
redisTemplate
.
opsForValue
().
setIfAbsent
(
key
,
geomJson
);
// realFileRelPath=xx_url+SystemConfig.XXMP_URL+realFileRelPath;
// realFileRelPath=xx_url+SystemConfig.XXMP_URL+realFileRelPath;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment