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
f8ee8c63
Commit
f8ee8c63
authored
Apr 15, 2025
by
duwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mock数据
parent
04cc6072
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
RunningEvaluateController.java
...a/net/wanji/opt/controller/RunningEvaluateController.java
+12
-0
CrossDataRealtimeMapper.xml
...bus/src/main/resources/mapper/CrossDataRealtimeMapper.xml
+1
-1
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/controller/RunningEvaluateController.java
View file @
f8ee8c63
package
net
.
wanji
.
opt
.
controller
;
package
net
.
wanji
.
opt
.
controller
;
import
cn.hutool.core.date.DateUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiResponse
;
import
io.swagger.annotations.ApiResponse
;
...
@@ -13,6 +14,7 @@ import net.wanji.opt.bo.CrossNameBO;
...
@@ -13,6 +14,7 @@ import net.wanji.opt.bo.CrossNameBO;
import
net.wanji.opt.bo.MetricsDetailBO
;
import
net.wanji.opt.bo.MetricsDetailBO
;
import
net.wanji.opt.service.impl.RunningEvaluateServiceImpl
;
import
net.wanji.opt.service.impl.RunningEvaluateServiceImpl
;
import
net.wanji.opt.vo.*
;
import
net.wanji.opt.vo.*
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -30,6 +32,8 @@ import java.util.List;
...
@@ -30,6 +32,8 @@ import java.util.List;
@RequestMapping
(
"/runningEvaluate"
)
@RequestMapping
(
"/runningEvaluate"
)
@RestController
@RestController
public
class
RunningEvaluateController
{
public
class
RunningEvaluateController
{
@Value
(
"${mock.flag:false}"
)
private
boolean
isMock
=
false
;
private
final
RunningEvaluateServiceImpl
runningEvaluateService
;
private
final
RunningEvaluateServiceImpl
runningEvaluateService
;
...
@@ -57,6 +61,10 @@ public class RunningEvaluateController {
...
@@ -57,6 +61,10 @@ public class RunningEvaluateController {
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
RunningEvaluateCrossEvaluateVO
.
class
),
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
RunningEvaluateCrossEvaluateVO
.
class
),
})
})
public
JsonViewObject
crossEvaluate
(
@RequestBody
CrossIdAndStartEndDateBO
bo
)
{
public
JsonViewObject
crossEvaluate
(
@RequestBody
CrossIdAndStartEndDateBO
bo
)
{
if
(
isMock
==
true
){
bo
.
setStartDate
(
DateUtil
.
parse
(
"2025-04-07 08:50:00"
,
"yyyy-MM-dd HH:mm:ss"
));
bo
.
setEndDate
(
DateUtil
.
parse
(
"2025-04-07 16:30:00"
,
"yyyy-MM-dd HH:mm:ss"
));
}
RunningEvaluateCrossEvaluateVO
res
=
runningEvaluateService
.
crossEvaluate
(
bo
);
RunningEvaluateCrossEvaluateVO
res
=
runningEvaluateService
.
crossEvaluate
(
bo
);
return
JsonViewObject
.
newInstance
().
success
(
res
);
return
JsonViewObject
.
newInstance
().
success
(
res
);
}
}
...
@@ -157,6 +165,10 @@ public class RunningEvaluateController {
...
@@ -157,6 +165,10 @@ public class RunningEvaluateController {
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
RunningEvaluateHeatMapVO
.
class
),
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
RunningEvaluateHeatMapVO
.
class
),
})
})
public
JsonViewObject
heatMap
(
@RequestBody
HeatMapBO
bo
)
{
public
JsonViewObject
heatMap
(
@RequestBody
HeatMapBO
bo
)
{
if
(
isMock
==
true
)
{
bo
.
setStartDate
(
DateUtil
.
parse
(
"2025-04-14 15:00:00"
,
"yyyy-MM-dd HH:mm:ss"
));
bo
.
setEndDate
(
DateUtil
.
parse
(
"2025-04-14 16:00:00"
,
"yyyy-MM-dd HH:mm:ss"
));
}
List
<
RunningEvaluateHeatMapVO
>
res
=
runningEvaluateService
.
heatMap
(
bo
);
List
<
RunningEvaluateHeatMapVO
>
res
=
runningEvaluateService
.
heatMap
(
bo
);
return
JsonViewObject
.
newInstance
().
success
(
res
);
return
JsonViewObject
.
newInstance
().
success
(
res
);
}
}
...
...
wj-databus/src/main/resources/mapper/CrossDataRealtimeMapper.xml
View file @
f8ee8c63
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
cross_id,status,type,traffic_index,start_time,duration,is_unbalance,is_spillover,is_congestion,unbalance_index,
cross_id,status,type,traffic_index,start_time,duration,is_unbalance,is_spillover,is_congestion,
is_emptyrelease,
unbalance_index,
spillover_index,congestion_index,unbalance_dirs,spillover_dirs,congestion_dirs,flow,flow_rate,speed,
spillover_index,congestion_index,unbalance_dirs,spillover_dirs,congestion_dirs,flow,flow_rate,speed,
queue_length,stop_times,delay_time,sturation,batch_time,gmt_create,gmt_modified,clear_rate,end_time,
queue_length,stop_times,delay_time,sturation,batch_time,gmt_create,gmt_modified,clear_rate,end_time,
load_balance,not_clear_car_nums,green_light_efficiency,effusion_rate,
load_balance,not_clear_car_nums,green_light_efficiency,effusion_rate,
...
...
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