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
82e9ef77
Commit
82e9ef77
authored
Oct 11, 2022
by
YANGYANG
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/skyp_Api' into skyp_Api
parents
02be66c6
66a4ece5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
15 deletions
+17
-15
service/publicapi/src/main/java/com/founder/publicapi/controller/SkDataOperation/SkPointlocationController.java
+16
-14
service/publicapi/src/main/java/com/founder/publicapi/mapper/mysqlMapper/xml/SkPointlocationMapper.xml
+1
-1
No files found.
service/publicapi/src/main/java/com/founder/publicapi/controller/SkDataOperation/SkPointlocationController.java
View file @
82e9ef77
...
@@ -164,26 +164,28 @@ public class SkPointlocationController extends ApiController implements ExcelCon
...
@@ -164,26 +164,28 @@ public class SkPointlocationController extends ApiController implements ExcelCon
queryWrapper
.
le
(
"str_to_date(date,'%Y-%m-%d %H:%i:%s')"
,
skPointlocationParam
.
getJssj
());
queryWrapper
.
le
(
"str_to_date(date,'%Y-%m-%d %H:%i:%s')"
,
skPointlocationParam
.
getJssj
());
}
}
List
<
Point
>
geoametrys
=
skPointlocationParam
.
getGeometrys
();
List
<
Point
>
geoametrys
=
skPointlocationParam
.
getGeometrys
();
if
(
geoametrys
.
size
()>
0
)
{
if
(
geoametrys
!=
null
){
// 多个点位即为多边形
if
(
geoametrys
.
size
()>
0
)
{
if
(
geoametrys
.
size
()>
1
)
{
// 多个点位即为多边形
String
geoametryStr
=
""
;
if
(
geoametrys
.
size
()>
1
)
{
for
(
int
i
=
0
;
i
<
geoametrys
.
size
();
i
++)
{
String
geoametryStr
=
""
;
if
(
i
==
geoametrys
.
size
()-
1
)
{
for
(
int
i
=
0
;
i
<
geoametrys
.
size
();
i
++)
{
geoametryStr
+=
geoametrys
.
get
(
i
).
getX
()
+
" "
+
geoametrys
.
get
(
i
).
getY
();
if
(
i
==
geoametrys
.
size
()-
1
)
{
}
else
{
geoametryStr
+=
geoametrys
.
get
(
i
).
getX
()
+
" "
+
geoametrys
.
get
(
i
).
getY
();
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
(
skPointlocationParam
.
getRadius
())){
queryWrapper
.
apply
(
"ST_Distance_Sphere(coordinates, POINT("
+
geoametrys
.
get
(
0
).
getX
()+
","
+
geoametrys
.
get
(
0
).
getY
()
+
")) < "
+
skPointlocationParam
.
getRadius
());
}
}
queryWrapper
.
apply
(
"ST_CONTAINS(ST_GEOMFROMTEXT('POLYGON(("
+
geoametryStr
+
"))'), coordinates)"
);
}
else
if
(
StringUtils
.
isNotEmpty
(
skPointlocationParam
.
getRadius
())){
queryWrapper
.
apply
(
"ST_Distance_Sphere(coordinates, POINT("
+
geoametrys
.
get
(
0
).
getX
()+
","
+
geoametrys
.
get
(
0
).
getY
()
+
")) < "
+
skPointlocationParam
.
getRadius
());
}
}
}
else
{
return
MapRestResult
.
error
(
"边界数据必传!"
);
}
}
IPage
page1
=
skPointlocationService
.
page
(
page
,
queryWrapper
);
IPage
page1
=
skPointlocationService
.
page
(
page
,
queryWrapper
);
return
new
MapRestResult
(
200
,
"OK"
,
page1
.
getTotal
(),
page1
.
getRecords
());
return
new
MapRestResult
(
200
,
"OK"
,
page1
.
getTotal
(),
page1
.
getRecords
());
...
...
service/publicapi/src/main/java/com/founder/publicapi/mapper/mysqlMapper/xml/SkPointlocationMapper.xml
View file @
82e9ef77
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
#{y},
#{y},
#{skPointlocation.address},
#{skPointlocation.address},
#{skPointlocation.objecttype},
#{skPointlocation.objecttype},
#{
skPointlocation.
objectname},
#{objectname},
#{time},
#{time},
#{skPointlocation.date},
#{skPointlocation.date},
'0',
'0',
...
...
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