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
01ea31ba
Commit
01ea31ba
authored
Dec 23, 2021
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
a9a5e089
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
6 deletions
+20
-6
RscpImageDataTotalController.java
...form/rs/datacenter/rest/RscpImageDataTotalController.java
+14
-2
ShpToGeojson.java
...com/upyuns/platform/rs/datacenter/utils/ShpToGeojson.java
+6
-4
No files found.
rs-datacenter/rs-datacenter-server/src/main/java/com/upyuns/platform/rs/datacenter/rest/RscpImageDataTotalController.java
View file @
01ea31ba
...
...
@@ -27,6 +27,7 @@ import com.upyuns.platform.rs.datacenter.mapper.RscpAreaInfoMapper;
import
com.upyuns.platform.rs.datacenter.pojo.ImageDataVO
;
import
com.upyuns.platform.rs.datacenter.pojo.ImagePageFeginDTO
;
import
com.upyuns.platform.rs.datacenter.pojo.ImageTotalInputDTO
;
import
com.upyuns.platform.rs.datacenter.utils.ShpToGeojson
;
import
com.upyuns.platform.rs.datacenter.vo.ImageInputVO
;
import
com.upyuns.platform.rs.gtdata.GtDataRestClient
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -34,6 +35,7 @@ import lombok.Data;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.web.bind.annotation.*
;
import
sun.nio.cs.ext.Big5
;
...
...
@@ -60,6 +62,9 @@ public class RscpImageDataTotalController extends BaseController<RscpImageDataTo
@Autowired
GtDataRestClient
gtDataRestClient
;
@Autowired
private
RedisTemplate
<
String
,
String
>
redisTemplate
;
@RequestMapping
(
value
=
"/app/unauth/query"
,
method
=
RequestMethod
.
GET
)
@IgnoreUserToken
public
ObjectRestResponse
unauthQuery
(
PageParam
pageParam
)
{
...
...
@@ -107,9 +112,14 @@ public class RscpImageDataTotalController extends BaseController<RscpImageDataTo
@RequestMapping
(
value
=
"/app/unauth/queryDataList"
,
method
=
RequestMethod
.
POST
)
@IgnoreUserToken
public
ObjectRestResponse
queryDataList
(
@RequestBody
QueryDTO
dto
)
{
if
(
RscpImageDataTotalController
.
QueryDTO
.
TYPE_AREA
==
dto
.
getType
())
{
if
(
QueryDTO
.
TYPE_AREA
==
dto
.
getType
())
{
return
ObjectRestResponse
.
succ
(
rscpAreaImageTotalBiz
.
queryDataList
(
dto
));
}
else
{
}
else
if
(
QueryDTO
.
TYPE_SHP
==
dto
.
getType
()){
//shp 转 geom
String
shpPath
=
redisTemplate
.
opsForValue
().
get
(
dto
.
getShpKey
());
dto
.
setGeom
(
ShpToGeojson
.
shp2geojson
(
shpPath
));
return
ObjectRestResponse
.
succ
(
baseBiz
.
queryDataAreaList
(
dto
));
}
else
{
return
ObjectRestResponse
.
succ
(
baseBiz
.
queryDataAreaList
(
dto
));
}
}
...
...
@@ -162,6 +172,8 @@ public class RscpImageDataTotalController extends BaseController<RscpImageDataTo
static
public
class
QueryDTO
{
public
static
final
int
TYPE_AREA
=
1
;
public
static
final
int
TYPE_GEOM
=
2
;
public
static
final
int
TYPE_SHP
=
3
;
Integer
shpKey
;
Integer
type
;
String
startDate
;
String
endDate
;
...
...
rs-datacenter/rs-datacenter-server/src/main/java/com/upyuns/platform/rs/datacenter/utils/ShpToGeojson.java
View file @
01ea31ba
...
...
@@ -153,7 +153,7 @@ public class ShpToGeojson {
* @param shpPath
* @return
*/
public
static
Object
shp2geojson
(
String
shpPath
)
public
static
String
shp2geojson
(
String
shpPath
)
{
Map
map
=
new
HashMap
();
//新建json对象
...
...
@@ -188,8 +188,9 @@ public class ShpToGeojson {
array
.
add
(
geometry
);
}
itertor
.
close
();
return
array
;
// geojsonObject.put("features",array);
// return array;
geojsonObject
.
put
(
"features"
,
array
);
return
JSON
.
toJSONString
(
geojsonObject
);
// itertor.close();
// long startTime=System.currentTimeMillis();
...
...
@@ -226,7 +227,8 @@ public class ShpToGeojson {
}
//
return
geojsonObject
;
// return geojsonObject;
return
JSON
.
toJSONString
(
geojsonObject
);
}
/**
...
...
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