Commit dd90c153 authored by Zheng Yi Fan's avatar Zheng Yi Fan

Merge remote-tracking branch 'origin/master'

parents 5ef3e0a2 675afb1b
...@@ -160,7 +160,9 @@ public class TrendControllerV2 { ...@@ -160,7 +160,9 @@ public class TrendControllerV2 {
log.error("态势监测-事件告警-实时列表:", e); log.error("态势监测-事件告警-实时列表:", e);
JsonViewObject.newInstance().success(list); JsonViewObject.newInstance().success(list);
} }
List<OptMonitoringVO> collect = list.stream().filter(vo -> !StringUtils.equalsIgnoreCase("700", vo.getType())).collect(Collectors.toList()); List<OptMonitoringVO> collect = list.stream().
filter(vo -> !StringUtils.equalsIgnoreCase("700", vo.getType())
&& !StringUtils.equalsIgnoreCase("708", vo.getType())).collect(Collectors.toList());
return JsonViewObject.newInstance().success(collect); return JsonViewObject.newInstance().success(collect);
} }
......
...@@ -36,12 +36,14 @@ public class AnalysisProblemAreaDayController { ...@@ -36,12 +36,14 @@ public class AnalysisProblemAreaDayController {
@GetMapping(value = "/overview") @GetMapping(value = "/overview")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "areaId", value = "区域ID", required = true, dataType = "String", defaultValue = "1"), @ApiImplicitParam(name = "areaId", value = "区域ID", required = true, dataType = "String", defaultValue = "1"),
@ApiImplicitParam(name = "timeType", value = "事件类型 1:近一个月 2:近一周", required = true, dataType = "int", defaultValue = "1"), @ApiImplicitParam(name = "timeType", value = "事件类型 1:近一个月 2:近一周", required = false, dataType = "int", defaultValue = ""),
@ApiImplicitParam(name = "startTime", value = "开始时间", required = false, dataType = "String"),
@ApiImplicitParam(name = "endTime", value = "结束时间", required = false, dataType = "String"),
}) })
@ApiResponses({ @ApiResponses({
@ApiResponse(code = 200, message = "OK", response = AreaProblemOverview.class), @ApiResponse(code = 200, message = "OK", response = AreaProblemOverview.class),
}) })
public JsonViewObject areaProblemOverview(String timeType,String areaId) { public JsonViewObject areaProblemOverview(String timeType,String areaId, String startTime, String endTime) {
return JsonViewObject.newInstance().success(null); return JsonViewObject.newInstance().success(null);
} }
...@@ -51,7 +53,9 @@ public class AnalysisProblemAreaDayController { ...@@ -51,7 +53,9 @@ public class AnalysisProblemAreaDayController {
@GetMapping(value = "/trend") @GetMapping(value = "/trend")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "areaId", value = "区域ID", required = true, dataType = "String", defaultValue = "1"), @ApiImplicitParam(name = "areaId", value = "区域ID", required = true, dataType = "String", defaultValue = "1"),
@ApiImplicitParam(name = "timeType", value = "事件类型 1:近一个月 2:近一周", required = true, dataType = "int", defaultValue = "1"), @ApiImplicitParam(name = "timeType", value = "事件类型 1:近一个月 2:近一周", required = false, dataType = "int", defaultValue = ""),
@ApiImplicitParam(name = "startTime", value = "开始时间", required = false, dataType = "String", defaultValue = ""),
@ApiImplicitParam(name = "endTime", value = "结束时间", required = false, dataType = "String", defaultValue = ""),
}) })
@ApiResponses({ @ApiResponses({
@ApiResponse(code = 200, message = "OK", response = AreaProblemTrendAnalysisResult.class), @ApiResponse(code = 200, message = "OK", response = AreaProblemTrendAnalysisResult.class),
...@@ -67,7 +71,9 @@ public class AnalysisProblemAreaDayController { ...@@ -67,7 +71,9 @@ public class AnalysisProblemAreaDayController {
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "eventType", value = "事件代码 701:路口空放 702:路口失衡,703:路口溢出 707:路口拥堵", required = true, dataType = "String", defaultValue = ""), @ApiImplicitParam(name = "eventType", value = "事件代码 701:路口空放 702:路口失衡,703:路口溢出 707:路口拥堵", required = true, dataType = "String", defaultValue = ""),
@ApiImplicitParam(name = "areaId", value = "区域ID", required = true, dataType = "String", defaultValue = "1"), @ApiImplicitParam(name = "areaId", value = "区域ID", required = true, dataType = "String", defaultValue = "1"),
@ApiImplicitParam(name = "timeType", value = "事件类型 1:近一个月 2:近一周", required = true, dataType = "int", defaultValue = "1"), @ApiImplicitParam(name = "timeType", value = "事件类型 1:近一个月 2:近一周", required = false, dataType = "int", defaultValue = ""),
@ApiImplicitParam(name = "startTime", value = "开始时间", required = false, dataType = "String"),
@ApiImplicitParam(name = "endTime", value = "结束时间", required = false, dataType = "String"),
}) })
@GetMapping(value = "/cross-problem-number") @GetMapping(value = "/cross-problem-number")
...@@ -84,7 +90,9 @@ public class AnalysisProblemAreaDayController { ...@@ -84,7 +90,9 @@ public class AnalysisProblemAreaDayController {
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "eventType", value = "事件代码 705:干线缓行 706:干线拥堵 ", required = true, dataType = "String", defaultValue = ""), @ApiImplicitParam(name = "eventType", value = "事件代码 705:干线缓行 706:干线拥堵 ", required = true, dataType = "String", defaultValue = ""),
@ApiImplicitParam(name = "areaId", value = "区域ID", required = true, dataType = "String", defaultValue = "1"), @ApiImplicitParam(name = "areaId", value = "区域ID", required = true, dataType = "String", defaultValue = "1"),
@ApiImplicitParam(name = "timeType", value = "事件类型 1:近一个月 2:近一周", required = true, dataType = "int", defaultValue = "1"), @ApiImplicitParam(name = "timeType", value = "事件类型 1:近一个月 2:近一周", required = false, dataType = "int", defaultValue = ""),
@ApiImplicitParam(name = "startTime", value = "开始时间", required = false, dataType = "String"),
@ApiImplicitParam(name = "endTime", value = "结束时间", required = false, dataType = "String"),
}) })
@GetMapping(value = "/green-problem-number") @GetMapping(value = "/green-problem-number")
@ApiResponses({ @ApiResponses({
......
...@@ -361,15 +361,19 @@ public class TrendServiceV2Impl implements TrendServiceV2 { ...@@ -361,15 +361,19 @@ public class TrendServiceV2Impl implements TrendServiceV2 {
private String getOptGreenResult(String id, StringBuilder sb) { private String getOptGreenResult(String id, StringBuilder sb) {
String result = ""; String result = "";
List<GreenLastOptResultDTO> greenLastOptResultDTOS = strategyGreenOptHistMapper.selectLastGreenOptResultList(); List<GreenLastOptResultDTO> greenLastOptResultDTOS = strategyGreenOptHistMapper.selectLastGreenOptResultList();
for (GreenLastOptResultDTO dto : greenLastOptResultDTOS) { if (!CollectionUtils.isEmpty(greenLastOptResultDTOS)) {
if (StringUtils.endsWithIgnoreCase(id, String.valueOf(dto.getGreenId()))) { for (GreenLastOptResultDTO dto : greenLastOptResultDTOS) {
Integer controlMethod = dto.getControlMethod(); if (StringUtils.endsWithIgnoreCase(id, String.valueOf(dto.getGreenId()))) {
if (0 >= controlMethod) { Integer controlMethod = dto.getControlMethod();
sb.append("动态绿波").append("-").append("均衡调控").append("-").append("神思策略"); if (controlMethod >= 0) {
} else { sb.append("动态绿波").append("-").append("均衡调控").append("-").append("神思策略");
sb.append("均衡调控").append("-").append("专家方案"); } else {
sb.append("均衡调控").append("-").append("专家方案");
}
} }
} }
} else {
sb.append("动态绿波-专家方案");
} }
result = sb.toString(); result = sb.toString();
return result; return result;
......
...@@ -40,10 +40,14 @@ public class TrunkLineImpl implements TrunkLineService { ...@@ -40,10 +40,14 @@ public class TrunkLineImpl implements TrunkLineService {
vo.setCrossID(e.getCrossID()); vo.setCrossID(e.getCrossID());
vo.setName(e.getName()); vo.setName(e.getName());
vo.setWkt(e.getWkt());
if (e.getDirection() != null) { if (e.getDirection() != null) {
String temp = e.getDirection().substring(1, e.getDirection().length() - 1);
temp = temp.replace("\"", "");
String[] temp1 = temp.split(",");
Map<String, Integer> directionMap = new HashMap<>(); Map<String, Integer> directionMap = new HashMap<>();
for (String s : e.getDirection()) { for (String s : temp1) {
directionMap.put(s, directionMap.getOrDefault(s, 0) + 1); directionMap.put(s, directionMap.getOrDefault(s, 0) + 1);
} }
......
...@@ -9,6 +9,7 @@ public class TrunkLineCrossProblemEntity { ...@@ -9,6 +9,7 @@ public class TrunkLineCrossProblemEntity {
private Integer inDir; private Integer inDir;
private Integer outDir; private Integer outDir;
private Integer status; private Integer status;
private String[] direction; private String direction;
private String startTime; private String startTime;
private String wkt;
} }
...@@ -23,6 +23,7 @@ public class TrunkLineCrossProblemVO { ...@@ -23,6 +23,7 @@ public class TrunkLineCrossProblemVO {
private String dir_1_name; private String dir_1_name;
@ApiModelProperty(value = "方向2") @ApiModelProperty(value = "方向2")
private String dir_2_name; private String dir_2_name;
@ApiModelProperty(value = "路口坐标")
private String wkt;
} }
...@@ -62,15 +62,18 @@ ...@@ -62,15 +62,18 @@
<select id="getCrossRealTimeAlarms" parameterType="String" resultMap="CrossRealTimeAlarmsResultMap"> <select id="getCrossRealTimeAlarms" parameterType="String" resultMap="CrossRealTimeAlarmsResultMap">
select select
a.type , a.type ,
MAX(a.start_time) as startTime , a.start_time startTime ,
SUBSTR(a.dir, 2, length(a.dir)-2) as dir SUBSTR(a.dir, 2, length(a.dir)-2) as dir
from from
t_event_info a t_event_info a
where 1=1 where 1=1
and a.start_time = (select MAX(start_time) from t_event_info
where cross_id = #{crossID}
<if test="time != null and time != ''">
and start_time <![CDATA[ <= ]]> DATE_FORMAT(#{time}, '%Y-%m-%d %H:%i:%s')
</if>
)
and a.cross_id = #{crossID} and a.cross_id = #{crossID}
<if test="time != null and time != ''">
and a.start_time <![CDATA[ <= ]]> DATE_FORMAT(#{time}, '%Y-%m-%d %H:%i:%s')
</if>
union union
select select
'' as type, '' as type,
......
...@@ -74,30 +74,17 @@ ...@@ -74,30 +74,17 @@
) b ) b
</select> </select>
<select id="getTrunkLineCrossProblem" parameterType="map" resultType="net.wanji.opt.synthesis.pojo.TrunkLineCrossProblemEntity"> <select id="getTrunkLineCrossProblem" parameterType="map" resultType="net.wanji.opt.synthesis.pojo.TrunkLineCrossProblemEntity">
select select a.cross_id,b.name,SUBSTR(b.location , 7 , LENGTH(b.location) - 7) as wkt,a.status,a.direction , a.start_time
a.cross_id, from t_cross_data_hist a
b.name, left join t_base_cross_info b on a.cross_id = b.id
a.`status`, where a.cross_id in (select cross_id from t_greenwave_cross where green_id = #{greenID})
a.direction , <if test="time == null or time == '' ">
MAX(a.start_time) as start_time and DATE_FORMAT(a.start_time, '%Y-%m-%d %H:%i:00')= DATE_FORMAT(FROM_UNIXTIME(FLOOR(UNIX_TIMESTAMP(DATE_SUB(now(),INTERVAL 5 MINUTE)) / 300 ) * 300), '%Y-%m-%d %H:%i:00')
from </if>
t_cross_data_hist a <if test="time != null and time != '' ">
left join t_base_cross_info b on and DATE_FORMAT(a.start_time, '%Y-%m-%d %H:%i:00')= DATE_FORMAT(FROM_UNIXTIME(FLOOR(UNIX_TIMESTAMP(#{time}) / 300 ) * 300), '%Y-%m-%d %H:%i:00')
a.cross_id = b.id </if>
where
a.cross_id in (
select
cross_id
from
t_greenwave_cross
where
green_id = #{greenID})
<if test="time != null and time != ''">
and DATE_FORMAT(a.start_time, '%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> DATE_FORMAT(#{time}, '%Y-%m-%d %H:%i:%s')
</if>
group by
a.cross_id
</select> </select>
<select id="getIODir" parameterType="map" resultType="net.wanji.opt.synthesis.pojo.TrunkLineCrossProblemEntity"> <select id="getIODir" parameterType="map" resultType="net.wanji.opt.synthesis.pojo.TrunkLineCrossProblemEntity">
select select
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment