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
jinan
traffic-signal-platform
Commits
3b121d60
Commit
3b121d60
authored
May 16, 2025
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码逻辑优化
parent
78dd84d7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
5 deletions
+15
-5
CrossIndexServiceImpl.java
...ava/net/wanji/opt/service/impl/CrossIndexServiceImpl.java
+6
-1
TrendServiceImpl.java
...ain/java/net/wanji/opt/service/impl/TrendServiceImpl.java
+4
-1
CrossServiceImpl.java
...java/net/wanji/opt/servicev2/implv2/CrossServiceImpl.java
+3
-1
GreenwaveHistMapper.xml
...service/src/main/resources/mapper/GreenwaveHistMapper.xml
+1
-1
StrategyPriorityMapper.xml
...main/resources/mapper/strategy/StrategyPriorityMapper.xml
+1
-1
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/CrossIndexServiceImpl.java
View file @
3b121d60
...
...
@@ -24,7 +24,6 @@ import net.wanji.opt.vo.AIOptResultVO;
import
net.wanji.opt.vo.CrossEventListPO
;
import
net.wanji.opt.vo.CrossOptResult
;
import
net.wanji.opt.vo.CrossStatusCountVO
;
import
org.apache.curator.drivers.EventTrace
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
...
...
@@ -73,6 +72,12 @@ public class CrossIndexServiceImpl implements CrossIndexService {
@Override
public
CrossDataRealtimePO
crossIndex
(
CrossIdBO
crossIdBO
)
{
CrossDataRealtimePO
crossDataRealtimePO
=
crossDataRealtimeMapper
.
selectByCrossId
(
crossIdBO
.
getCrossId
());
if
(
Objects
.
nonNull
(
crossDataRealtimePO
))
{
Double
trafficIndex
=
crossDataRealtimePO
.
getTrafficIndex
();
if
(
trafficIndex
<
1.0
)
{
crossDataRealtimePO
.
setTrafficIndex
(
1.0
);
}
}
return
crossDataRealtimePO
;
}
...
...
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/TrendServiceImpl.java
View file @
3b121d60
package
net
.
wanji
.
opt
.
service
.
impl
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.date.DateUnit
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.ObjectUtil
;
...
...
@@ -305,6 +304,10 @@ public class TrendServiceImpl implements TrendService {
//}
// 坐标格式转换
for
(
AbnormalCrossListVO
abnormalCrossListVO
:
abnormalCrossListVOList
)
{
Double
trafficIndex
=
abnormalCrossListVO
.
getTrafficIndex
();
if
(
trafficIndex
<
1
)
{
abnormalCrossListVO
.
setTrafficIndex
(
1.0
);
}
String
locationStr
=
abnormalCrossListVO
.
getLocationStr
();
double
[]
lonLat
=
CrossUtil
.
getLonLat
(
locationStr
);
List
<
Double
>
location
=
new
ArrayList
<>();
...
...
signal-optimize-service/src/main/java/net/wanji/opt/servicev2/implv2/CrossServiceImpl.java
View file @
3b121d60
...
...
@@ -125,7 +125,9 @@ public class CrossServiceImpl implements CrossService {
cd
.
setQueueLength
(
c
.
getAvgQueueLength
());
cd
.
setLaneNo
(
c
.
getLaneNo
());
cd
.
setFlow
(
c
.
getFlow
());
if
(
c
.
getFlow
()
<
0
)
{
cd
.
setFlow
(
0
);
}
results
.
add
(
cd
);
}
...
...
signal-optimize-service/src/main/resources/mapper/GreenwaveHistMapper.xml
View file @
3b121d60
...
...
@@ -195,7 +195,7 @@
when #{groupType}=0 then start_time
when #{groupType}=1 then dt_15min
when #{groupType}=2 then dt_30min
when #{groupType}=3 then dt
when #{groupType}=3 then dt
_60min
when #{groupType}=4 then DATE_FORMAT(start_time,'%Y-%m-%d 00:00:00' )
else DATE_FORMAT(start_time,'%Y-01-01 00:00:00')
end
...
...
signal-optimize-service/src/main/resources/mapper/strategy/StrategyPriorityMapper.xml
View file @
3b121d60
...
...
@@ -301,7 +301,7 @@
<select
id=
"getPlanConfigData"
parameterType=
"map"
resultType=
"net.wanji.opt.entity.strategy.StrategyPriorityDailyInfo"
>
SELECT
id,daily_plan_id,week_execute,daily_plan_details,cross_id
id,daily_plan_id,week_execute,daily_plan_details,cross_id
, switch_status
FROM
t_strategy_priority_daily_info
WHERE
...
...
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