Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
map-parent
Overview
Overview
Details
Activity
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
常超
map-parent
Commits
90e969ff
Commit
90e969ff
authored
May 07, 2024
by
yangyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
轨迹相关提交(西藏)
parent
75e8d73e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
19 deletions
+34
-19
service/publicapi/src/main/java/com/founder/publicapi/controller/SkDataOperation/SkPointlocationController.java
+27
-18
service/publicapi/src/main/java/com/founder/publicapi/controller/SkInterface/InterfaceAPI.java
+7
-1
No files found.
service/publicapi/src/main/java/com/founder/publicapi/controller/SkDataOperation/SkPointlocationController.java
View file @
90e969ff
...
...
@@ -9,6 +9,7 @@ import com.founder.commonutils.model.newPublicEntity.MapRestResult;
import
com.founder.commonutils.model.vo.param.Point
;
import
com.founder.commonutils.model.vo.param.SkPointlocationParam
;
import
com.founder.commonutils.model.vo.param.SkPointlocationParams
;
import
com.founder.commonutils.model.vo.param.SkPointlocationParamsGeo
;
import
com.founder.commonutils.util.DateUtil
;
import
com.founder.commonutils.util.KeyUtil
;
import
com.founder.commonutils.model.newPublicEntity.SkPointlocation
;
...
...
@@ -193,27 +194,35 @@ public class SkPointlocationController extends ApiController implements ExcelCon
@PostMapping
(
"queryGroupby"
)
@ApiOperation
(
value
=
"以案侦查_设备点位信息查询"
)
@OperLog
(
message
=
"公共_设备点位信息查询"
,
operation
=
OperationType
.
QUERY
)
public
MapRestResult
queryGroupby
(
@RequestBody
SkPointlocationParams
skPointlocationParams
)
{
QueryWrapper
queryWrapper
=
new
QueryWrapper
();
queryWrapper
.
eq
(
"isDeleted"
,
"0"
);
//纬度
if
(
skPointlocationParams
.
getStartLat
()
!=
null
&&
!
skPointlocationParams
.
getStartLat
().
equals
(
""
))
{
queryWrapper
.
ge
(
"CAST(y AS decimal(16,8))"
,
Double
.
parseDouble
(
skPointlocationParams
.
getStartLat
()));
}
if
(
skPointlocationParams
.
getEndLat
()
!=
null
&&
!
skPointlocationParams
.
getEndLat
().
equals
(
""
))
{
queryWrapper
.
le
(
"CAST(y AS decimal(16,8))"
,
Double
.
parseDouble
(
skPointlocationParams
.
getEndLat
()));
}
//经度
if
(
skPointlocationParams
.
getStartLng
()
!=
null
&&
!
skPointlocationParams
.
getStartLng
().
equals
(
""
))
{
queryWrapper
.
ge
(
"CAST(x AS decimal(16,8))"
,
Double
.
parseDouble
(
skPointlocationParams
.
getStartLng
()));
public
MapRestResult
queryGroupby
(
@RequestBody
SkPointlocationParamsGeo
skPointlocationaParamsGeo
)
{
List
<
SkPointlocation
>
list
=
new
ArrayList
<>();
Map
<
String
,
List
<
SkPointlocation
>>
listMap
=
new
HashMap
<>();
List
<
Point
>
geoametrys
=
skPointlocationaParamsGeo
.
getGeometrys
();
if
(
null
!=
geoametrys
){
if
(
geoametrys
.
size
()>
0
)
{
QueryWrapper
queryWrapper
=
new
QueryWrapper
();
queryWrapper
.
eq
(
"isDeleted"
,
"0"
);
// 多个点位即为多边形
if
(
geoametrys
.
size
()>
1
)
{
String
geoametryStr
=
""
;
for
(
int
i
=
0
;
i
<
geoametrys
.
size
();
i
++)
{
if
(
i
==
geoametrys
.
size
()-
1
)
{
geoametryStr
+=
geoametrys
.
get
(
i
).
getX
()
+
" "
+
geoametrys
.
get
(
i
).
getY
();
}
else
{
geoametryStr
+=
geoametrys
.
get
(
i
).
getX
()
+
" "
+
geoametrys
.
get
(
i
).
getY
()
+
","
;
}
}
queryWrapper
.
apply
(
"ST_CONTAINS(ST_GEOMFROMTEXT('POLYGON(("
+
geoametryStr
+
"))'), coordinates)"
);
}
else
if
(
StringUtils
.
isNotEmpty
(
skPointlocationaParamsGeo
.
getRadius
())){
queryWrapper
.
apply
(
"ST_Distance_Sphere(coordinates, POINT("
+
geoametrys
.
get
(
0
).
getX
()+
","
+
geoametrys
.
get
(
0
).
getY
()
+
")) < "
+
skPointlocationaParamsGeo
.
getRadius
());
}
list
=
skPointlocationService
.
list
(
queryWrapper
);
}
}
if
(
skPointlocationParams
.
getEndLng
()
!=
null
&&
!
skPointlocationParams
.
getEndLng
().
equals
(
""
))
{
queryWrapper
.
le
(
"CAST(x AS decimal(16,8))"
,
Double
.
parseDouble
(
skPointlocationParams
.
getEndLng
()
));
if
(
list
.
size
()>
0
)
{
listMap
=
list
.
stream
().
collect
(
Collectors
.
groupingBy
(
SkPointlocation:
:
getObjectname
));
}
List
<
SkPointlocation
>
list
=
skPointlocationService
.
list
(
queryWrapper
);
Map
<
String
,
List
<
SkPointlocation
>>
listMap
=
list
.
stream
().
collect
(
Collectors
.
groupingBy
(
SkPointlocation:
:
getObjectname
));
return
new
MapRestResult
(
200
,
"OK"
,
listMap
.
size
(),
listMap
);
}
...
...
service/publicapi/src/main/java/com/founder/publicapi/controller/SkInterface/InterfaceAPI.java
View file @
90e969ff
...
...
@@ -270,7 +270,13 @@ public class InterfaceAPI {
skTrailCf
.
setY
(
xy
[
0
]);
}
}
skTrailCf
.
setAddress
(
esKoQueryResult
.
getSiad
());
String
address
=
""
;
if
(
StringUtils
.
isNotBlank
(
esKoQueryResult
.
getSiad
())){
address
=
esKoQueryResult
.
getSiad
();
}
else
{
address
=
"暂无地址"
;
}
skTrailCf
.
setAddress
(
address
);
skTrailCf
.
setDate
(
DateUtil
.
getTimeTz
(
esKoQueryResult
.
getStti
()));
skTrailCf
.
setTime
(
DateUtil
.
getTimeStamp
(
DateUtil
.
getTimeTz
(
esKoQueryResult
.
getStti
())));
skTrailCf
.
setDeviceid
(
esKoQueryResult
.
getNewa
());
...
...
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