Commit 7277f132 authored by duanruiming's avatar duanruiming

[add] 绿波相位差表添加路口名称

parent ecdd2b55
package net.wanji.opt.servicev2.implv2;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.pagehelper.PageHelper;
......@@ -19,6 +18,7 @@ import net.wanji.databus.dao.mapper.GreenwaveHistMapper;
import net.wanji.databus.po.CrossDataHistPO;
import net.wanji.databus.po.CrossSchemeRings;
import net.wanji.databus.vo.LightsStatusVO2;
import net.wanji.opt.cache.BaseCrossInfoCache;
import net.wanji.opt.common.RedisUtils;
import net.wanji.opt.common.enums.EventInfoTypeEnum;
import net.wanji.opt.common.enums.GreenBeltDirEnum;
......@@ -70,6 +70,8 @@ public class TrendServiceV2Impl implements TrendServiceV2 {
private RedisUtils redisUtil;
@Resource
private BaseCrossSchemeMapper baseCrossSchemeMapper;
@Resource
private BaseCrossInfoCache baseCrossInfoCache;
private static List<OptMonitoringVO> greenListCache = new ArrayList<>(10);
private static List<OptMonitoringVO> crossListCache = new ArrayList<>(80);
......@@ -409,10 +411,14 @@ public class TrendServiceV2Impl implements TrendServiceV2 {
for (GreenwaveCrossPO greenwaveCrossPO : greenwaveCrossPOS) {
String crossId = greenwaveCrossPO.getCrossId();
String crossName = baseCrossInfoCache.getCrossName(crossId);
GreenOptCrossOffsetVO.CrossOffsetDetail oriOffsetDetail = getOriOffsetDetail(crossId);
oriOffsetDetail.setCrossName(crossName);
oriOffsetDetails.add(oriOffsetDetail);
GreenOptCrossOffsetVO.CrossOffsetDetail curOffsetDetail = getCurOffsetDetail(crossId, oriOffsetDetail);
curOffsetDetail.setCrossName(crossName);
curOffsetDetails.add(curOffsetDetail);
}
......
......@@ -23,6 +23,8 @@ public class GreenOptCrossOffsetVO {
public static class CrossOffsetDetail {
@ApiModelProperty(value = "路口编号")
private String crossId;
@ApiModelProperty(value = "路口名称")
private String crossName;
@ApiModelProperty(value = "方案相位差")
private Integer offset;
@ApiModelProperty(value = "方案号")
......
......@@ -296,7 +296,7 @@
WHERE dt = CURDATE()
AND type IN ('701', '702', '703', '707')
AND start_time <![CDATA[ < ]]> NOW()
AND IFNULL(end_time, NOW()) <![CDATA[ < ]]> NOW()
AND IFNULL(end_time, NOW()) <![CDATA[ > ]]> NOW()
GROUP BY cross_id
) latest_event ON t1.id = latest_event.cross_id
LEFT JOIN t_event_info t2
......@@ -305,7 +305,7 @@
AND t2.dt = CURDATE()
AND t2.type IN ('701', '702', '703', '707')
AND t2.start_time <![CDATA[ < ]]> NOW()
AND IFNULL(t2.end_time, NOW()) <![CDATA[ < ]]> NOW()
AND IFNULL(t2.end_time, NOW()) <![CDATA[ > ]]> NOW()
WHERE t1.is_signal = 1
ORDER BY t2.start_time DESC
</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