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
b6cf3c68
Commit
b6cf3c68
authored
Oct 08, 2023
by
duanruiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
b06b3bc4
6d8bedef
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
386 additions
and
22 deletions
+386
-22
MainlineEvaluateController.java
.../net/wanji/opt/controller/MainlineEvaluateController.java
+2
-2
SceneStrategyPO.java
.../main/java/net/wanji/opt/po/strategy/SceneStrategyPO.java
+1
-0
MainlineEvaluateService.java
...n/java/net/wanji/opt/service/MainlineEvaluateService.java
+2
-2
MainlineEvaluateServiceImpl.java
...t/wanji/opt/service/impl/MainlineEvaluateServiceImpl.java
+303
-11
MainlineListVO.java
...ervice/src/main/java/net/wanji/opt/vo/MainlineListVO.java
+27
-0
StrategyAndMetricsEnum.java
...n/java/net/wanji/common/enums/StrategyAndMetricsEnum.java
+3
-1
GreenwaveHistPO.java
...in/java/net/wanji/databus/dao/entity/GreenwaveHistPO.java
+8
-2
CrossDataHistMapper.java
...ava/net/wanji/databus/dao/mapper/CrossDataHistMapper.java
+2
-0
GreenwaveCrossMapper.java
...va/net/wanji/databus/dao/mapper/GreenwaveCrossMapper.java
+2
-0
GreenwaveSceneMapper.java
...va/net/wanji/databus/dao/mapper/GreenwaveSceneMapper.java
+2
-0
CrossDataHistMapper.xml
wj-databus/src/main/resources/mapper/CrossDataHistMapper.xml
+12
-0
GreenwaveCrossMapper.xml
...atabus/src/main/resources/mapper/GreenwaveCrossMapper.xml
+11
-2
GreenwaveHistMapper.xml
wj-databus/src/main/resources/mapper/GreenwaveHistMapper.xml
+1
-1
GreenwaveSceneMapper.xml
...atabus/src/main/resources/mapper/GreenwaveSceneMapper.xml
+10
-1
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/controller/MainlineEvaluateController.java
View file @
b6cf3c68
...
@@ -12,13 +12,13 @@ import net.wanji.opt.bo.BottomMenuBO;
...
@@ -12,13 +12,13 @@ import net.wanji.opt.bo.BottomMenuBO;
import
net.wanji.opt.bo.MainlineSchemeAnalysisBO
;
import
net.wanji.opt.bo.MainlineSchemeAnalysisBO
;
import
net.wanji.opt.service.impl.MainlineEvaluateServiceImpl
;
import
net.wanji.opt.service.impl.MainlineEvaluateServiceImpl
;
import
net.wanji.opt.vo.MainlineEvaluateBottomCurveVO
;
import
net.wanji.opt.vo.MainlineEvaluateBottomCurveVO
;
import
net.wanji.opt.vo.MainlineListVO
;
import
net.wanji.opt.vo.MainlineSchemeAnalysisVO
;
import
net.wanji.opt.vo.MainlineSchemeAnalysisVO
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.ws.rs.core.MediaType
;
import
javax.ws.rs.core.MediaType
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Set
;
@Api
(
value
=
"MainlineEvaluateController"
,
description
=
"干线评价"
)
@Api
(
value
=
"MainlineEvaluateController"
,
description
=
"干线评价"
)
@RequestMapping
(
"/mainlineEvaluate"
)
@RequestMapping
(
"/mainlineEvaluate"
)
...
@@ -59,7 +59,7 @@ public class MainlineEvaluateController {
...
@@ -59,7 +59,7 @@ public class MainlineEvaluateController {
@ApiOperation
(
value
=
"干线列表"
,
notes
=
"干线列表"
)
@ApiOperation
(
value
=
"干线列表"
,
notes
=
"干线列表"
)
@GetMapping
(
"/mainlineList"
)
@GetMapping
(
"/mainlineList"
)
public
JsonViewObject
mainlineList
()
{
public
JsonViewObject
mainlineList
()
{
Set
<
String
>
res
=
mainlineEvaluateService
.
mainlineList
();
List
<
MainlineListVO
>
res
=
mainlineEvaluateService
.
mainlineList
();
return
JsonViewObject
.
newInstance
().
success
(
res
);
return
JsonViewObject
.
newInstance
().
success
(
res
);
}
}
...
...
signal-optimize-service/src/main/java/net/wanji/opt/po/strategy/SceneStrategyPO.java
View file @
b6cf3c68
...
@@ -20,6 +20,7 @@ public class SceneStrategyPO {
...
@@ -20,6 +20,7 @@ public class SceneStrategyPO {
/** 策略ID */
/** 策略ID */
@ApiModelProperty
(
name
=
"策略ID"
,
notes
=
""
)
@ApiModelProperty
(
name
=
"策略ID"
,
notes
=
""
)
private
Integer
strategyId
;
private
Integer
strategyId
;
@ApiModelProperty
(
name
=
"优先级"
,
notes
=
""
)
@ApiModelProperty
(
name
=
"优先级"
,
notes
=
""
)
private
Integer
sceneStrategyPriority
;
private
Integer
sceneStrategyPriority
;
/** 创建时间 */
/** 创建时间 */
...
...
signal-optimize-service/src/main/java/net/wanji/opt/service/MainlineEvaluateService.java
View file @
b6cf3c68
...
@@ -4,11 +4,11 @@ import net.wanji.opt.bo.BottomCurveBO;
...
@@ -4,11 +4,11 @@ import net.wanji.opt.bo.BottomCurveBO;
import
net.wanji.opt.bo.BottomMenuBO
;
import
net.wanji.opt.bo.BottomMenuBO
;
import
net.wanji.opt.bo.MainlineSchemeAnalysisBO
;
import
net.wanji.opt.bo.MainlineSchemeAnalysisBO
;
import
net.wanji.opt.vo.MainlineEvaluateBottomCurveVO
;
import
net.wanji.opt.vo.MainlineEvaluateBottomCurveVO
;
import
net.wanji.opt.vo.MainlineListVO
;
import
net.wanji.opt.vo.MainlineSchemeAnalysisVO
;
import
net.wanji.opt.vo.MainlineSchemeAnalysisVO
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Set
;
public
interface
MainlineEvaluateService
{
public
interface
MainlineEvaluateService
{
...
@@ -16,7 +16,7 @@ public interface MainlineEvaluateService {
...
@@ -16,7 +16,7 @@ public interface MainlineEvaluateService {
List
<
MainlineEvaluateBottomCurveVO
>
bottomCurve
(
BottomCurveBO
bo
)
throws
ParseException
;
List
<
MainlineEvaluateBottomCurveVO
>
bottomCurve
(
BottomCurveBO
bo
)
throws
ParseException
;
Set
<
String
>
mainlineList
();
List
<
MainlineListVO
>
mainlineList
();
MainlineSchemeAnalysisVO
mainlineSchemeAnalysis
(
MainlineSchemeAnalysisBO
bo
);
MainlineSchemeAnalysisVO
mainlineSchemeAnalysis
(
MainlineSchemeAnalysisBO
bo
);
}
}
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/MainlineEvaluateServiceImpl.java
View file @
b6cf3c68
This diff is collapsed.
Click to expand it.
signal-optimize-service/src/main/java/net/wanji/opt/vo/MainlineListVO.java
0 → 100644
View file @
b6cf3c68
package
net
.
wanji
.
opt
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
net.wanji.databus.vo.CrossIdAndNameVO
;
import
java.util.List
;
/**
* @author Kent HAN
* @date 2023/2/9 8:38
*/
@Data
@NoArgsConstructor
@ApiModel
(
value
=
"MainlineListVO"
,
description
=
"干线列表"
)
public
class
MainlineListVO
{
@ApiModelProperty
(
value
=
"干线名称"
)
private
String
mainlineName
;
@ApiModelProperty
(
value
=
"路口列表"
)
private
List
<
CrossIdAndNameVO
>
crossList
;
@ApiModelProperty
(
value
=
"干线坐标"
)
private
String
wkt
;
}
wj-common/src/main/java/net/wanji/common/enums/StrategyAndMetricsEnum.java
View file @
b6cf3c68
...
@@ -9,7 +9,9 @@ public class StrategyAndMetricsEnum {
...
@@ -9,7 +9,9 @@ public class StrategyAndMetricsEnum {
public
enum
Strategy
{
public
enum
Strategy
{
BALANCE
(
"100030"
,
"均衡调控"
),
BALANCE
(
"100030"
,
"均衡调控"
),
EFFICIENCY
(
"100152"
,
"效率提升"
),
EFFICIENCY
(
"100152"
,
"效率提升"
),
SECURITY
(
"100010"
,
"安全保障"
);
SECURITY
(
"100010"
,
"安全保障"
),
LINE_EFFICIENCY
(
"200001"
,
"干线效率提升"
),
LINE_BALANCE
(
"200002"
,
"干线均衡调控"
);
private
final
String
code
;
private
final
String
code
;
private
final
String
msg
;
private
final
String
msg
;
...
...
wj-databus/src/main/java/net/wanji/databus/dao/entity/GreenwaveHistPO.java
View file @
b6cf3c68
...
@@ -10,6 +10,12 @@ import lombok.Data;
...
@@ -10,6 +10,12 @@ import lombok.Data;
@Data
@Data
public
class
GreenwaveHistPO
extends
GreenwaveRealtimePO
{
public
class
GreenwaveHistPO
extends
GreenwaveRealtimePO
{
@ApiModelProperty
(
value
=
"绿波名称"
,
notes
=
""
)
@ApiModelProperty
(
value
=
"绿波名称"
)
private
String
greenwaveName
;
private
String
greenwaveName
;
@ApiModelProperty
(
value
=
"协调方向:0正向;1反向;2双向"
)
private
Integer
dir
;
@ApiModelProperty
(
value
=
"时段ID"
)
private
Integer
sectionId
;
}
}
wj-databus/src/main/java/net/wanji/databus/dao/mapper/CrossDataHistMapper.java
View file @
b6cf3c68
...
@@ -28,4 +28,6 @@ public interface CrossDataHistMapper extends BaseMapper<CrossDataHistPO> {
...
@@ -28,4 +28,6 @@ public interface CrossDataHistMapper extends BaseMapper<CrossDataHistPO> {
Double
selectMaxSaturation
(
String
crossId
,
int
startStamp
,
int
endStamp
);
Double
selectMaxSaturation
(
String
crossId
,
int
startStamp
,
int
endStamp
);
Integer
selectCrossEmergencyCount
(
String
crossId
,
int
startStamp
,
int
endStamp
);
Integer
selectCrossEmergencyCount
(
String
crossId
,
int
startStamp
,
int
endStamp
);
List
<
CrossDataHistPO
>
selectByCrossIdsAndTimestamp
(
List
<
String
>
crossIdList
,
int
startTimeStamp
,
int
endTimeStamp
);
}
}
wj-databus/src/main/java/net/wanji/databus/dao/mapper/GreenwaveCrossMapper.java
View file @
b6cf3c68
...
@@ -12,4 +12,6 @@ import java.util.List;
...
@@ -12,4 +12,6 @@ import java.util.List;
@Repository
@Repository
public
interface
GreenwaveCrossMapper
{
public
interface
GreenwaveCrossMapper
{
List
<
GreenwaveCrossPO
>
selectByGreenwaveId
(
Integer
id
);
List
<
GreenwaveCrossPO
>
selectByGreenwaveId
(
Integer
id
);
GreenwaveCrossPO
selectByGreenwaveIdAndKeyRoute
(
Integer
greenwaveId
);
}
}
wj-databus/src/main/java/net/wanji/databus/dao/mapper/GreenwaveSceneMapper.java
View file @
b6cf3c68
...
@@ -12,4 +12,6 @@ public interface GreenwaveSceneMapper {
...
@@ -12,4 +12,6 @@ public interface GreenwaveSceneMapper {
void
deleteByGreenwaveId
(
Integer
greenwaveId
);
void
deleteByGreenwaveId
(
Integer
greenwaveId
);
void
insertOne
(
GreenwaveScenePO
greenwaveScenePO
);
void
insertOne
(
GreenwaveScenePO
greenwaveScenePO
);
GreenwaveScenePO
selectByGreenwaveId
(
Integer
greenwaveId
);
}
}
wj-databus/src/main/resources/mapper/CrossDataHistMapper.xml
View file @
b6cf3c68
...
@@ -112,4 +112,16 @@
...
@@ -112,4 +112,16 @@
AND cross_id = #{crossId}
AND cross_id = #{crossId}
</select>
</select>
<select
id=
"selectByCrossIdsAndTimestamp"
resultType=
"net.wanji.databus.po.CrossDataHistPO"
>
select
<include
refid=
"Base_Column_List"
></include>
from t_cross_data_hist
where cross_id in
<foreach
collection=
"crossIdList"
item=
"crossId"
separator=
","
open=
"("
close=
")"
>
#{crossId}
</foreach>
and batch_time
<![CDATA[ >= ]]>
#{startTimeStamp}
and batch_time
<![CDATA[ <= ]]>
#{endTimeStamp}
order by batch_time
</select>
</mapper>
</mapper>
\ No newline at end of file
wj-databus/src/main/resources/mapper/GreenwaveCrossMapper.xml
View file @
b6cf3c68
...
@@ -2,13 +2,22 @@
...
@@ -2,13 +2,22 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"net.wanji.databus.dao.mapper.GreenwaveCrossMapper"
>
<mapper
namespace=
"net.wanji.databus.dao.mapper.GreenwaveCrossMapper"
>
<sql
id=
"Base_Column_List"
>
id,green_id,cross_id,in_dir,out_dir,offset,sort,section_id,next_cross_len,is_key_route,gmt_create,gmt_modified
</sql>
<select
id=
"selectByGreenwaveId"
resultType=
"net.wanji.databus.dao.entity.GreenwaveCrossPO"
>
<select
id=
"selectByGreenwaveId"
resultType=
"net.wanji.databus.dao.entity.GreenwaveCrossPO"
>
select
select
<include
refid=
"Base_Column_List"
/>
id,green_id,cross_id,in_dir,out_dir,offset,sort,section_id,next_cross_len,is_key_route,gmt_create,gmt_modified
from t_greenwave_cross
from t_greenwave_cross
where green_id = #{id}
where green_id = #{id}
order by sort
order by sort
</select>
</select>
<select
id=
"selectByGreenwaveIdAndKeyRoute"
resultType=
"net.wanji.databus.dao.entity.GreenwaveCrossPO"
>
select
<include
refid=
"Base_Column_List"
/>
from t_greenwave_cross
where green_id = #{id} and is_key_route = 1
</select>
</mapper>
</mapper>
wj-databus/src/main/resources/mapper/GreenwaveHistMapper.xml
View file @
b6cf3c68
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
<select
id=
"selectByTimeSection"
resultType=
"net.wanji.databus.dao.entity.GreenwaveHistPO"
>
<select
id=
"selectByTimeSection"
resultType=
"net.wanji.databus.dao.entity.GreenwaveHistPO"
>
select t1.id,t1.status,t1.type,t1.traffic_index,t1.speed,t1.trval_time,t1.stop_times,t1.queue_length,
select t1.id,t1.status,t1.type,t1.traffic_index,t1.speed,t1.trval_time,t1.stop_times,t1.queue_length,
t1.cong_rate,t1.delay_time,t1.nopark_pass_rate,t1.cord_reliability,t1.cord_queue_ratio,
t1.cong_rate,t1.delay_time,t1.nopark_pass_rate,t1.cord_reliability,t1.cord_queue_ratio,
t1.uncoordinate_phase_queue,t1.gmt_create,t1.gmt_modified, t2.name as greenwaveName
t1.uncoordinate_phase_queue,t1.gmt_create,t1.gmt_modified, t2.name as greenwaveName
, t2.dir, t2.section_id
from t_greenwave_hist t1 join t_greenwave_info t2 on t1.id = t2.id
from t_greenwave_hist t1 join t_greenwave_info t2 on t1.id = t2.id
where t1.gmt_modified
<![CDATA[ <= ]]>
#{endTimeStr}
where t1.gmt_modified
<![CDATA[ <= ]]>
#{endTimeStr}
and t1.gmt_modified
<![CDATA[ >= ]]>
#{startTimeStr}
and t1.gmt_modified
<![CDATA[ >= ]]>
#{startTimeStr}
...
...
wj-databus/src/main/resources/mapper/GreenwaveSceneMapper.xml
View file @
b6cf3c68
...
@@ -2,6 +2,9 @@
...
@@ -2,6 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"net.wanji.databus.dao.mapper.GreenwaveSceneMapper"
>
<mapper
namespace=
"net.wanji.databus.dao.mapper.GreenwaveSceneMapper"
>
<sql
id=
"Base_Column_List"
>
id,greenwave_id,scene_id,gmt_create,gmt_modified
</sql>
<insert
id=
"insertOne"
>
<insert
id=
"insertOne"
>
insert into t_greenwave_scene(greenwave_id,scene_id)
insert into t_greenwave_scene(greenwave_id,scene_id)
...
@@ -10,7 +13,13 @@
...
@@ -10,7 +13,13 @@
<delete
id=
"deleteByGreenwaveId"
>
<delete
id=
"deleteByGreenwaveId"
>
delete from t_greenwave_scene
delete from t_greenwave_scene
where greenwave_id =
$
{greenwaveId}
where greenwave_id =
#
{greenwaveId}
</delete>
</delete>
<select
id=
"selectByGreenwaveId"
resultType=
"net.wanji.databus.po.GreenwaveScenePO"
>
select
<include
refid=
"Base_Column_List"
/>
from t_greenwave_scene
where greenwave_id = #{greenwaveId}
</select>
</mapper>
</mapper>
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