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
9e22b2e8
Commit
9e22b2e8
authored
Jul 07, 2022
by
yangyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同步(西藏)
parent
9a0eccca
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
31 deletions
+33
-31
service/publicapi/src/main/java/com/founder/publicapi/controller/SkModelService/SkGjGlAjController.java
+3
-5
service/publicapi/src/main/java/com/founder/publicapi/mapper/mysqlMapper/xml/TbStAsjMapper.xml
+2
-0
service/publicapi/src/main/java/com/founder/publicapi/service/SkGjGlAjService.java
+2
-2
service/publicapi/src/main/java/com/founder/publicapi/service/SkGjGlAjServiceImpl.java
+26
-24
No files found.
service/publicapi/src/main/java/com/founder/publicapi/controller/SkModelService/SkGjGlAjController.java
View file @
9e22b2e8
package
com
.
founder
.
publicapi
.
controller
.
SkModelService
;
import
com.founder.commonutils.model.newPublicEntity.MapRestResult
;
import
com.founder.commonutils.model.vo.param.SkGjglajParam
;
import
com.founder.publicapi.service.SkGjGlAjService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -8,8 +9,6 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
import
java.util.Map
;
@RestController
@RequestMapping
(
"skbs"
)
...
...
@@ -22,9 +21,8 @@ public class SkGjGlAjController {
* 轨迹关联案件
* */
@PostMapping
(
"/getSkgjglaj"
)
public
Map
getGjGlAj
(
@RequestBody
SkGjglajParam
receiving
){
Map
map
=
skGjGlAjService
.
getSkGjGlAj
(
receiving
);
return
map
;
public
MapRestResult
getGjGlAj
(
@RequestBody
SkGjglajParam
receiving
){
return
skGjGlAjService
.
getSkGjGlAj
(
receiving
);
}
}
service/publicapi/src/main/java/com/founder/publicapi/mapper/mysqlMapper/xml/TbStAsjMapper.xml
View file @
9e22b2e8
...
...
@@ -186,6 +186,8 @@
DATE_FORMAT(T.asjfssj_Asjfskssj,'%Y-%m-%d %H:%i:%S') as asjfssjAsjfskssj,
DATE_FORMAT(T.larq,'%Y-%m-%d %H:%i:%S') as larq,
T.ZUZDW_ZBR_XM AS zuzdwZbrXm,
T.ASJFSDD_DQJD AS x,
T.ASJFSDD_DQWD AS y,
(select name from sys_dictitem where groupid='CODE_UNIT' AND code = T.zuzdw_Gajgjgdm) AS zuzdwGajgjgdmMc,
(select name from sys_dictitem where groupid='CODE_ZCJDDM' AND code = T.zcjddm) AS zcjddmMc,
(select name from sys_dictitem where groupid='CODE_UNIT' AND code = T.ladw_Gajgjgdm) AS ladwGajgjgdmMc,
...
...
service/publicapi/src/main/java/com/founder/publicapi/service/SkGjGlAjService.java
View file @
9e22b2e8
package
com
.
founder
.
publicapi
.
service
;
import
com.founder.commonutils.model.newPublicEntity.MapRestResult
;
import
com.founder.commonutils.model.vo.param.SkGjglajParam
;
import
java.util.Map
;
public
interface
SkGjGlAjService
{
Map
getSkGjGlAj
(
SkGjglajParam
receiving
);
Map
RestResult
getSkGjGlAj
(
SkGjglajParam
receiving
);
}
service/publicapi/src/main/java/com/founder/publicapi/service/SkGjGlAjServiceImpl.java
View file @
9e22b2e8
package
com
.
founder
.
publicapi
.
service
;
import
com.founder.commonutils.model.asjEntity.TbStAsjResult
;
import
com.founder.commonutils.model.newPublicEntity.MapRestResult
;
import
com.founder.commonutils.model.newPublicEntity.SkRegionalsResultAll
;
import
com.founder.commonutils.model.newPublicEntity.SkTrail
;
import
com.founder.commonutils.model.vo.param.SkGjglajParam
;
import
com.founder.commonutils.model.vo.param.TbStAsjParm
;
import
com.founder.publicapi.controller.SkModelService.SkTrailController
;
import
com.founder.publicapi.mapper.mysqlMapper.TbStAsjMapper
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -15,6 +18,7 @@ import java.util.*;
import
java.util.concurrent.CountDownLatch
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
java.util.stream.Collectors
;
@Service
public
class
SkGjGlAjServiceImpl
implements
SkGjGlAjService
{
...
...
@@ -23,23 +27,21 @@ public class SkGjGlAjServiceImpl implements SkGjGlAjService {
private
TbStAsjMapper
tbStAsjMapper
;
@Override
public
Map
getSkGjGlAj
(
SkGjglajParam
receiving
)
{
public
Map
RestResult
getSkGjGlAj
(
SkGjglajParam
receiving
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
Map
resultMap
=
new
HashMap
();
if
(
receiving
.
getStartTime
()
==
null
||
receiving
.
getEndTime
()
==
null
)
{
return
resultMap
;
return
MapRestResult
.
error
(
"开始时间、结束时间必传"
)
;
}
if
(
receiving
.
getMinutes
()
==
0
)
{
if
(
receiving
.
getMinutes
()
==
0
)
{
// 默认十分钟
receiving
.
setMinutes
(
10
);
}
if
(
receiving
.
getRadius
()
==
0
d
)
{
if
(
receiving
.
getRadius
()
==
0
d
)
{
// 默认500米
receiving
.
setRadius
(
500
d
);
}
TbStAsjParm
param
=
new
TbStAsjParm
();
param
.
setKssj
(
sdf
.
format
(
new
Date
(
receiving
.
getStartTime
())));
param
.
setJssj
(
sdf
.
format
(
new
Date
(
receiving
.
getEndTime
())));
if
(
StringUtils
.
isNotBlank
(
receiving
.
getAjlbdm
()))
{
...
...
@@ -56,7 +58,7 @@ public class SkGjGlAjServiceImpl implements SkGjGlAjService {
param
.
setJyaq
(
receiving
.
getJyaq
());
}
/
*经度*/
/
/ 经度
if
(
receiving
.
getStartLng
()
<
receiving
.
getEndLng
())
{
param
.
setStartLng
(
String
.
valueOf
(
receiving
.
getStartLng
()));
param
.
setEndLng
(
String
.
valueOf
(
receiving
.
getEndLng
()));
...
...
@@ -65,7 +67,7 @@ public class SkGjGlAjServiceImpl implements SkGjGlAjService {
param
.
setEndLng
(
String
.
valueOf
(
receiving
.
getStartLng
()));
}
/
*纬度*/
/
/ 纬度
if
(
receiving
.
getStartLat
()
<
receiving
.
getEndLat
())
{
param
.
setStartLat
(
String
.
valueOf
(
receiving
.
getStartLat
()));
param
.
setEndLat
(
String
.
valueOf
(
receiving
.
getEndLat
()));
...
...
@@ -74,26 +76,24 @@ public class SkGjGlAjServiceImpl implements SkGjGlAjService {
param
.
setEndLat
(
String
.
valueOf
(
receiving
.
getStartLat
()));
}
/
*是否破案 0未破案 1破案*/
/
/ 是否破案 0未破案 1破案
param
.
setPabj_pdbz
(
"0"
);
Integer
a
=
tbStAsjMapper
.
selectAsjxxByReceivingListCount
(
param
);
Integer
listCount
=
tbStAsjMapper
.
selectAsjxxByReceivingListCount
(
param
);
param
.
setPage
(
1
);
param
.
setPageSize
(
a
);
param
.
setPageSize
(
listCount
);
List
<
TbStAsjResult
>
asjList
=
tbStAsjMapper
.
selectAsjxxByReceivingList
(
param
);
List
results
=
new
LinkedList
();
results
=
getAsjBycar
(
receiving
,
asjList
);
resultMap
.
put
(
"rows"
,
results
);
resultMap
.
put
(
"total"
,
results
.
size
()
);
return
resultMap
;
// 轨迹点位和案件点位比对拿出符合条件得案件
List
results
=
getAsjByBsh
(
receiving
,
asjList
);
return
MapRestResult
.
build
(
200
,
"成功获取轨迹关联案件"
,
results
.
size
(),
results
)
;
}
public
List
getAsjBy
car
(
SkGjglajParam
receiving
,
List
<
TbStAsjResult
>
asjs
){
public
List
getAsjBy
Bsh
(
SkGjglajParam
receiving
,
List
<
TbStAsjResult
>
asjs
){
List
<
SkTrail
>
gjList
=
receiving
.
getSkTrails
();
ExecutorService
executor
=
Executors
.
newCachedThreadPool
();
List
<
TbStAsj
Parm
>
resultList
=
new
Linked
List
<>();
List
<
TbStAsjResult
>
resultList
=
new
ArrayList
<>();
List
<
TbStAsj
Result
>
resultListDistinct
=
new
Array
List
<>();
CountDownLatch
countDownLatch
=
new
CountDownLatch
(
gjList
.
size
());
try
{
for
(
SkTrail
e:
gjList
){
...
...
@@ -108,15 +108,17 @@ public class SkGjGlAjServiceImpl implements SkGjGlAjService {
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
return
resultList
;
resultListDistinct
=
resultList
.
stream
().
collect
(
Collectors
.
collectingAndThen
(
Collectors
.
toCollection
(()
->
new
TreeSet
<>(
Comparator
.
comparing
(
TbStAsjResult:
:
getAsjbh
))),
ArrayList:
:
new
));
return
resultListDistinct
;
}
public
List
getAsjList
(
Map
<
Object
,
Long
>
timeM
,
List
<
TbStAsjResult
>
asjs
,
double
j
,
double
w
,
String
address
,
double
radius
){
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
List
<
TbStAsjResult
>
resultList
=
new
LinkedList
<>();
long
maxTime
=
(
long
)
timeM
.
get
(
"maxTime"
);
long
minTime
=
(
long
)
timeM
.
get
(
"minTime"
);
long
maxTime
=
timeM
.
get
(
"maxTime"
);
long
minTime
=
timeM
.
get
(
"minTime"
);
for
(
TbStAsjResult
aj:
asjs
){
Double
afjd
=
Double
.
parseDouble
(
aj
.
getX
());
Double
afwd
=
Double
.
parseDouble
(
aj
.
getY
());
...
...
@@ -125,8 +127,8 @@ public class SkGjGlAjServiceImpl implements SkGjGlAjService {
if
(
ajfsTime
<
maxTime
&&
ajfsTime
>
minTime
&&
afjd
!=
null
&&
afwd
!=
null
){
double
s
=
getDistance
(
afjd
,
afwd
,
j
,
w
);
if
(
s
<
radius
){
double
a
=
Math
.
abs
(
radius
-
s
)
;
String
b
=
"距离
"
+
address
+
a
+
"米
"
;
double
a
=
radius
-
s
;
String
b
=
"距离
("
+
address
+
")["
+
a
+
"(米)]
"
;
aj
.
setDescripText
(
b
);
resultList
.
add
(
aj
);
}
...
...
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