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
f2b629eb
Commit
f2b629eb
authored
Apr 09, 2025
by
zhoushiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询上周优化记录
parent
8af2465f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
6 deletions
+21
-6
StrategyGreenOptHistDTO.java
...ava/net/wanji/opt/dto/report/StrategyGreenOptHistDTO.java
+16
-4
OptimizeStatisticTask.java
...c/main/java/net/wanji/opt/task/OptimizeStatisticTask.java
+2
-1
StrategyGreenOptHistMapper.xml
.../src/main/resources/mapper/StrategyGreenOptHistMapper.xml
+3
-1
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/dto/report/StrategyGreenOptHistDTO.java
View file @
f2b629eb
...
...
@@ -17,40 +17,52 @@ public class StrategyGreenOptHistDTO {
@TableField
(
"green_id"
)
private
Integer
greenId
;
@TableField
(
"length"
)
private
Double
length
;
@TableField
(
"cycle"
)
private
Integer
cycle
;
@TableField
(
"control_time"
)
private
String
controlTime
;
@TableField
(
"control_duration"
)
private
Integer
controlDuration
;
@TableField
(
"control_method"
)
private
Integer
controlMethod
;
@TableField
(
"type"
)
private
Integer
type
;
@TableField
(
"dynamic"
)
private
Integer
dynamic
;
@TableField
(
"dir_type"
)
private
Integer
dirType
;
@TableField
(
"dir"
)
private
String
dir
;
@TableField
(
"max_speed"
)
private
Double
maxSpeed
;
@TableField
(
"min_speed"
)
private
Double
minSpeed
;
@TableField
(
"green_width_time"
)
private
Double
greenWidthTime
;
@TableField
(
"cross_green_detail"
)
private
String
crossGreenDetail
;
@TableField
(
"key_cross"
)
private
String
keyCross
;
@TableField
(
"create_time"
)
private
Date
createTime
;
@TableField
(
"modify_time"
)
private
Date
modifyTime
;
@TableField
(
"response_code"
)
private
Integer
responseCode
;
@TableField
(
"response_content"
)
private
String
responseContent
;
...
...
signal-optimize-service/src/main/java/net/wanji/opt/task/OptimizeStatisticTask.java
View file @
f2b629eb
...
...
@@ -15,6 +15,7 @@ import org.springframework.context.annotation.Profile;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
javax.annotation.PostConstruct
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.Comparator
;
...
...
@@ -49,7 +50,7 @@ public class OptimizeStatisticTask {
/**
* 干线策略优化时长计算
*/
// @Scheduled(cron
= "0 40 1 ? * 1")
// @Scheduled(cron
查询上周优化记录
public
void
optimizeGreenWaveDurationCal
()
{
long
st
=
System
.
currentTimeMillis
();
try
{
...
...
signal-optimize-service/src/main/resources/mapper/StrategyGreenOptHistMapper.xml
View file @
f2b629eb
...
...
@@ -52,12 +52,14 @@
a.control_method,
min(DATE_SUB(CURDATE(), INTERVAL (WEEKDAY(CURDATE()) + 7) DAY)) week_start_day,
max(DATE_SUB(CURDATE(), INTERVAL (WEEKDAY(CURDATE()) ) +1 DAY)) week_end_day,
weekday
(week(control_time)+1) year_week,
(WEEKDAY(control_time)+1) week_day
FROM t_strategy_green_opt_hist a
WHERE control_time >= DATE_SUB(CURDATE(), INTERVAL (WEEKDAY(CURDATE()) + 7) DAY)
and control_time
<
DATE_SUB(CURDATE(), INTERVAL (WEEKDAY(CURDATE()) ) DAY)
and control_method in (-1, 1)
group by green_id, control_time, control_duration, control_method
ORDER BY green_id,control_time
</select>
</mapper>
\ No newline at end of file
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