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
8212c996
Commit
8212c996
authored
Mar 02, 2023
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[add] 路口优化->方案优化记录表添加data_extend
parent
d19cb0f3
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
18 additions
and
14 deletions
+18
-14
PhaseDirTurnCache.java
.../src/main/java/net/wanji/opt/cache/PhaseDirTurnCache.java
+1
-1
SignalCommandOptController.java
.../controller/signalcontrol/SignalCommandOptController.java
+2
-5
CrossSchemeOptLogPO.java
.../main/java/net/wanji/opt/po/base/CrossSchemeOptLogPO.java
+1
-0
CrossOptimizeServiceImpl.java
.../net/wanji/opt/service/impl/CrossOptimizeServiceImpl.java
+2
-1
FeignProxyServiceImpl.java
...opt/service/signalcontrol/impl/FeignProxyServiceImpl.java
+3
-2
CrossMonitorTask.java
...ce/src/main/java/net/wanji/opt/task/CrossMonitorTask.java
+1
-0
SchemeOptSendVO.java
...rvice/src/main/java/net/wanji/opt/vo/SchemeOptSendVO.java
+2
-0
CrossSchemeOptLogMapper.xml
...ice/src/main/resources/mapper/CrossSchemeOptLogMapper.xml
+6
-5
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/cache/PhaseDirTurnCache.java
View file @
8212c996
...
...
@@ -106,7 +106,7 @@ public class PhaseDirTurnCache implements CommandLineRunner {
}
}
long
end
=
System
.
currentTimeMillis
();
log
.
info
(
"加载区域基础信息到缓存耗时:{}s,条数据,size={}"
,
(
end
-
start
),
phaseMap
.
size
());
log
.
info
(
"加载区域基础信息到缓存耗时:{}
m
s,条数据,size={}"
,
(
end
-
start
),
phaseMap
.
size
());
}
catch
(
Exception
e
)
{
log
.
error
(
"相位方向转向缓存初始化失败"
,
e
);
}
...
...
signal-optimize-service/src/main/java/net/wanji/opt/controller/signalcontrol/SignalCommandOptController.java
View file @
8212c996
...
...
@@ -6,7 +6,6 @@ import io.swagger.annotations.ApiResponse;
import
io.swagger.annotations.ApiResponses
;
import
net.wanji.common.framework.rest.JsonViewObject
;
import
net.wanji.opt.service.signalcontrol.FeignProxyService
;
import
net.wanji.opt.vo.GreenwaveVO
;
import
net.wanji.opt.vo.SchemeOptSendVO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
...
...
@@ -31,11 +30,9 @@ public class SignalCommandOptController {
@ApiOperation
(
value
=
"手动优化方案下发"
,
notes
=
"优化方案下发"
,
response
=
JsonViewObject
.
class
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@PostMapping
(
value
=
"/
greenwaveList
"
,
@PostMapping
(
value
=
"/
schemeOptSend
"
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
GreenwaveVO
.
class
),
})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
JsonViewObject
.
class
)})
public
JsonViewObject
schemeOptSend
(
@RequestBody
@Validated
SchemeOptSendVO
schemeOptSendVO
)
throws
Exception
{
JsonViewObject
jsonViewObject
=
feignProxyService
.
schemeOptSend
(
schemeOptSendVO
);
return
jsonViewObject
;
...
...
signal-optimize-service/src/main/java/net/wanji/opt/po/base/CrossSchemeOptLogPO.java
View file @
8212c996
...
...
@@ -33,5 +33,6 @@ public class CrossSchemeOptLogPO {
private
String
optResultDesc
;
private
int
dataBatchTime
;
private
String
restoreResult
;
private
String
dataExtend
;
}
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/CrossOptimizeServiceImpl.java
View file @
8212c996
...
...
@@ -455,9 +455,10 @@ public class CrossOptimizeServiceImpl implements CrossOptimizeService {
crossSchemeOptLogPO
.
setOptType
(
"1"
);
// 自动优化
crossSchemeOptLogPO
.
setOptType
(
optType
);
crossSchemeOptLogPO
.
setOptResult
(
StatusCodeEnum
.
STATUS_00200
.
getMessage
()
);
crossSchemeOptLogPO
.
setOptResult
(
"1"
);
crossSchemeOptLogPO
.
setOptResultDesc
(
StatusCodeEnum
.
STATUS_00200
.
getDetail
());
crossSchemeOptLogPO
.
setDataBatchTime
((
int
)
dataBatchTimeLong
);
crossSchemeOptLogPO
.
setDataExtend
(
""
);
// todo 需要通过场景策略方法
String
phaseNo
=
crossPhaseDTO
.
getPhaseNo
();
for
(
Map
.
Entry
<
String
,
Integer
>
entry
:
phaseTimeOptResultMap
.
entrySet
())
{
...
...
signal-optimize-service/src/main/java/net/wanji/opt/service/signalcontrol/impl/FeignProxyServiceImpl.java
View file @
8212c996
...
...
@@ -2,6 +2,7 @@ package net.wanji.opt.service.signalcontrol.impl;
import
lombok.extern.slf4j.Slf4j
;
import
net.wanji.common.framework.rest.JsonViewObject
;
import
net.wanji.databus.entity.develop.servicedevelop.develop.StatusCodeEnum
;
import
net.wanji.feign.pojo.vo.SchemeSendVO
;
import
net.wanji.feign.service.UtcFeignClients
;
import
net.wanji.opt.cache.PhaseDirTurnCache
;
...
...
@@ -102,8 +103,8 @@ public class FeignProxyServiceImpl implements FeignProxyService {
crossSchemeOptLogPO
.
setStartTime
(
new
Date
());
crossSchemeOptLogPO
.
setIsRelation
(
schemeOptSendVO
.
getRelationFlag
());
crossSchemeOptLogPO
.
setRelationCrossId
(
schemeOptSendVO
.
getRelationCrossId
());
crossSchemeOptLogPO
.
setOptResult
(
"
成功
"
);
crossSchemeOptLogPO
.
setOptResultDesc
(
"成功"
);
crossSchemeOptLogPO
.
setOptResult
(
"
1
"
);
crossSchemeOptLogPO
.
setOptResultDesc
(
StatusCodeEnum
.
STATUS_00200
.
getDetail
()
);
crossSchemeOptLogPO
.
setDataBatchTime
((
int
)
dataBatchTimeLong
);
}
}
...
...
signal-optimize-service/src/main/java/net/wanji/opt/task/CrossMonitorTask.java
View file @
8212c996
...
...
@@ -110,6 +110,7 @@ public class CrossMonitorTask {
// todo 对数据进行处理,可能主要是CrossTurnDataRealtimeDTO中的车间距,车时距等配置修改
CrossTurnDataRealtimeDTO
crossTurnDataRealtimeDTO
=
new
CrossTurnDataRealtimeDTO
();
// todo 通过获取场景,策略,方法参数,判断下发方案数据
return
crossDataRealtimePOList
;
}
...
...
signal-optimize-service/src/main/java/net/wanji/opt/vo/SchemeOptSendVO.java
View file @
8212c996
...
...
@@ -29,4 +29,6 @@ public class SchemeOptSendVO extends SchemeSendVO {
@ApiModelProperty
(
value
=
"相位号-相位调整时间map"
)
@NotEmpty
private
Map
<
String
,
Integer
>
phaseOffsetTimeMap
;
@ApiModelProperty
(
value
=
"数据拓展json字段"
)
private
String
dataExtend
;
}
signal-optimize-service/src/main/resources/mapper/CrossSchemeOptLogMapper.xml
View file @
8212c996
...
...
@@ -25,12 +25,13 @@
<result
property=
"optResultDesc"
column=
"opt_result_desc"
/>
<result
property=
"dataBatchTime"
column=
"data_batch_time"
/>
<result
property=
"restoreResult"
column=
"restore_result"
/>
<result
property=
"dataExtend"
column=
"data_extend"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, cross_id, scheme_no, dir_type, turn_type, offset, ring_no, phase_no, phase_order_id, ori_green_time,
opt_time, opt_type, opt_reason, start_time, end_time, is_relation, relation_cross_id, opt_result, opt_result_desc,
data_batch_time, restore_result
data_batch_time, restore_result
, data_extend
</sql>
<select
id=
"selectByCrossId"
parameterType=
"String"
resultMap=
"BaseResultMap"
>
...
...
@@ -49,10 +50,10 @@
phase_order_id, ori_green_time, opt_time, opt_type, opt_reason,
start_time,
end_time, is_relation, relation_cross_id, opt_result, opt_result_desc,
data_batch_time, restore_result)
data_batch_time, restore_result
, data_extend
)
values (#{crossId}, #{schemeNo}, #{dirType}, #{turnType}, #{offset}, #{ringNo}, #{phaseNo}, #{phaseOrderId},
#{oriGreenTime}, #{optTime}, #{optType}, #{optReason}, #{startTime}, #{endTime}, #{isRelation},
#{relationCrossId}, #{optResult}, #{optResultDesc}, #{dataBatchTime}, #{restoreResult})
#{relationCrossId}, #{optResult}, #{optResultDesc}, #{dataBatchTime}, #{restoreResult}
, #{dataExtend}
)
</insert>
<insert
id=
"insertBatch"
parameterType=
"net.wanji.opt.po.base.CrossSchemeOptLogPO"
>
...
...
@@ -60,12 +61,12 @@
(cross_id, scheme_no, dir_type, turn_type, offset, ring_no, phase_no,
phase_order_id, ori_green_time, opt_time, opt_type, opt_reason,
start_time, end_time, is_relation, relation_cross_id, opt_result, opt_result_desc,
data_batch_time, restore_result)
data_batch_time, restore_result
, data_extend
)
values
<foreach
collection=
"list"
item=
"entity"
separator=
","
>
(#{entity.crossId}, #{entity.schemeNo}, #{entity.dirType}, #{entity.turnType}, #{entity.offset}, #{entity.ringNo}, #{entity.phaseNo}, #{entity.phaseOrderId},
#{entity.oriGreenTime}, #{entity.optTime}, #{entity.optType}, #{entity.optReason}, #{entity.startTime}, #{entity.endTime}, #{entity.isRelation},
#{entity.relationCrossId}, #{entity.optResult}, #{entity.optResultDesc}, #{entity.dataBatchTime}, #{entity.restoreResult})
#{entity.relationCrossId}, #{entity.optResult}, #{entity.optResultDesc}, #{entity.dataBatchTime}, #{entity.restoreResult}
, #{entity.dataExtend}
)
</foreach>
</insert>
...
...
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