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
322d3cd5
Commit
322d3cd5
authored
Dec 14, 2022
by
yangyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
伴随验证调整提交(标准)
parent
fbf4d987
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
service/publicapi/src/main/java/com/founder/publicapi/controller/SkModelService/SkTrailController.java
+1
-1
service/publicapi/src/main/java/com/founder/publicapi/controller/SkModelService/SkbsController.java
+6
-3
No files found.
service/publicapi/src/main/java/com/founder/publicapi/controller/SkModelService/SkTrailController.java
View file @
322d3cd5
...
...
@@ -76,7 +76,7 @@ public class SkTrailController extends ApiController {
@PostMapping
(
"getGjxsd"
)
@ApiOperation
(
value
=
"公共_轨迹相似度"
)
//
@OperLog(message = "公共_轨迹相似度", operation = OperationType.QUERY)
@OperLog
(
message
=
"公共_轨迹相似度"
,
operation
=
OperationType
.
QUERY
)
public
MapRestResult
getGjxsd
(
@RequestBody
SkTrailXsdParam
skTrailXsdParam
){
LCSS
lcss
=
new
LCSS
();
return
MapRestResult
.
build
(
200
,
"轨迹相似度"
,
1
,
lcss
.
lcs
(
skTrailXsdParam
.
getListOne
(),
skTrailXsdParam
.
getListTwo
(),
skTrailXsdParam
.
getRadius
(),
skTrailXsdParam
.
getMinutes
()));
...
...
service/publicapi/src/main/java/com/founder/publicapi/controller/SkModelService/SkbsController.java
View file @
322d3cd5
...
...
@@ -15,6 +15,7 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.web.bind.annotation.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@RestController
@RequestMapping
(
"skbs"
)
...
...
@@ -142,6 +143,9 @@ public class SkbsController {
* list2为所有数据的集合,将集合按轨迹开始时间排序
* */
Collections
.
sort
(
paramList
,
Comparator
.
comparing
(
TogetherEntity:
:
getTimestamp
));
// 根据ObjectValue去重
List
<
TogetherEntity
>
resultListDistinct
=
resultList
.
stream
().
collect
(
Collectors
.
collectingAndThen
(
Collectors
.
toCollection
(()
->
new
TreeSet
<>(
Comparator
.
comparing
(
TogetherEntity
::
getObjectValue
))),
ArrayList:
:
new
));
for
(
int
i
=
1
;
i
<
paramList
.
size
();
i
++)
{
TogetherEntity
a
=
paramList
.
get
(
i
-
1
);
...
...
@@ -153,7 +157,7 @@ public class SkbsController {
BeanUtils
.
copyProperties
(
a
,
t
);
BeanUtils
.
copyProperties
(
a1
,
t1
);
if
(!
t
.
getObjectValue
().
equals
(
t1
.
getObjectValue
()))
{
if
(
(!
t
.
getObjectType
().
equals
(
t1
.
getObjectType
())&&
t
.
getObjectValue
().
equals
(
t1
.
getObjectValue
()))||
!
t
.
getObjectValue
().
equals
(
t1
.
getObjectValue
()))
{
long
timeIterval
=
t1
.
getTimestamp
()
-
t
.
getTimestamp
();
double
s
=
getDistance
(
t
.
getJ
(),
t
.
getW
(),
t1
.
getJ
(),
t1
.
getW
());
if
(
s
<
requestParams
.
getRadius
()
&&
timeIterval
<
timeItervalMinutes
)
{
...
...
@@ -172,8 +176,7 @@ public class SkbsController {
resultList
.
add
(
t1
);
}
}
}
}
resultList
.
stream
().
sorted
(
Comparator
.
comparing
(
TogetherEntity:
:
getTimestamp
));
return
resultList
;
...
...
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