Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
traffic-signal-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
signal
traffic-signal-platform
Commits
e3ca3dd3
Commit
e3ca3dd3
authored
May 24, 2024
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "[update] test"
This reverts commit
381789aa
.
parent
381789aa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
31 deletions
+1
-31
TrendController.java
...c/main/java/net/wanji/opt/controller/TrendController.java
+0
-5
TrendServiceImpl.java
...ain/java/net/wanji/opt/service/impl/TrendServiceImpl.java
+1
-26
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/controller/TrendController.java
View file @
e3ca3dd3
...
...
@@ -4,7 +4,6 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiResponse
;
import
io.swagger.annotations.ApiResponses
;
import
lombok.extern.slf4j.Slf4j
;
import
net.wanji.common.framework.rest.JsonViewObject
;
import
net.wanji.databus.bo.CrossIdBO
;
import
net.wanji.databus.vo.GreenwaveListVO
;
...
...
@@ -32,7 +31,6 @@ import java.util.List;
@Api
(
value
=
"TrendController"
,
description
=
"态势监测"
)
@RequestMapping
(
"/trend"
)
@RestController
@Slf4j
public
class
TrendController
{
private
final
TrendServiceImpl
trendService
;
...
...
@@ -288,10 +286,7 @@ public class TrendController {
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
TableQueryVO
.
CycleDataElement
.
class
),
})
public
JsonViewObject
laneTrafficIndex
(
@RequestBody
CommonCrossIdDateTimeVO
crossIdDateTimeVO
)
throws
Exception
{
long
l
=
System
.
currentTimeMillis
();
List
<
TableQueryVO
.
CycleDataElement
>
result
=
trendService
.
laneTrafficIndex
(
crossIdDateTimeVO
);
long
l1
=
System
.
currentTimeMillis
();
log
.
error
(
"接口调用时间== "
+
(
l1
-
l
)/
1000
);
return
JsonViewObject
.
newInstance
().
success
(
result
);
}
...
...
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/TrendServiceImpl.java
View file @
e3ca3dd3
...
...
@@ -40,7 +40,6 @@ import net.wanji.opt.service.TrendService;
import
net.wanji.opt.service.es.LaneSnapshotDataQueryService
;
import
net.wanji.opt.vo.*
;
import
org.jetbrains.annotations.NotNull
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -1973,32 +1972,8 @@ public class TrendServiceImpl implements TrendService {
int
start
=
(
int
)
(
crossIdDateTimeVO
.
getStart
().
getTime
()
/
1000
);
int
end
=
(
int
)
(
crossIdDateTimeVO
.
getEnd
().
getTime
()
/
1000
);
LambdaQueryWrapper
<
CrossBaseLaneInfoPO
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
CrossBaseLaneInfoPO:
:
getCrossId
,
crossId
);
List
<
CrossBaseLaneInfoPO
>
crossBaseLaneInfoPOS
=
crossBaseLaneInfoMapper
.
selectList
(
queryWrapper
);
// 查询周期数据
LambdaQueryWrapper
<
CrossLaneDataHistPO
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
CrossLaneDataHistPO:
:
getCrossId
,
crossId
);
wrapper
.
between
(
CrossLaneDataHistPO:
:
getBatchTime
,
start
,
end
);
long
l
=
System
.
currentTimeMillis
();
List
<
CrossLaneDataHistPO
>
crossLaneDataHistPOS
=
crossLaneDataHistMapper
.
selectList
(
wrapper
);
List
<
CrossLaneDataHistPOExt
>
poExtList
=
new
ArrayList
<>(
crossLaneDataHistPOS
.
size
());
if
(!
CollectionUtils
.
isEmpty
(
crossLaneDataHistPOS
)
&&
!
CollectionUtils
.
isEmpty
(
crossBaseLaneInfoPOS
))
{
for
(
CrossLaneDataHistPO
po
:
crossLaneDataHistPOS
)
{
CrossLaneDataHistPOExt
crossLaneDataHistPOExt
=
new
CrossLaneDataHistPOExt
();
BeanUtils
.
copyProperties
(
po
,
crossLaneDataHistPOExt
);
for
(
CrossBaseLaneInfoPO
laneInfoPO
:
crossBaseLaneInfoPOS
)
{
if
(
StringUtils
.
equalsIgnoreCase
(
po
.
getCrossId
(),
laneInfoPO
.
getCrossId
()))
{
crossLaneDataHistPOExt
.
setDir
(
laneInfoPO
.
getDir
());
crossLaneDataHistPOExt
.
setTurn
(
laneInfoPO
.
getTurn
());
crossLaneDataHistPOExt
.
setSort
(
laneInfoPO
.
getSort
());
poExtList
.
add
(
crossLaneDataHistPOExt
);
}
}
}
}
long
l1
=
System
.
currentTimeMillis
();
log
.
error
(
"实体复制需要时间:"
,
((
l1
-
l
)
/
1000
));
List
<
CrossLaneDataHistPOExt
>
poExtList
=
crossLaneDataHistMapper
.
selectByCrossIdAndTimeSpan
(
crossId
,
start
,
end
);
return
buildCycleData
(
crossId
,
poExtList
);
}
catch
(
Exception
e
)
{
log
.
error
(
"车道数据查询异常:"
,
e
);
...
...
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