Commit 121ebc07 authored by duanruiming's avatar duanruiming

[update] UTC模拟灯态优化,优化车道与灯态对应

parent aa0fd27e
......@@ -229,9 +229,6 @@ public class SignalStatus4StaticSchemeTask {
redCountDown = changePhaseTime - runtime - phaseTime + cycleLen;
}
}
System.err.println("当前相位运行时间:" + runtime);
System.err.println("当前相位号:" + dirTurnPhaseNo + " 剩余时间:" + redCountDown);
;
// 遍历灯组缓存,获取相位号方向转向
Map<Integer, Integer> turnCountDown = new HashMap<>();
if (!CollectionUtils.isEmpty(crossPhaseDirTurnCache)) {
......@@ -502,7 +499,7 @@ public class SignalStatus4StaticSchemeTask {
if (!StringUtils.equalsIgnoreCase(currentPhaseNo, String.valueOf(phaseNo))) {
// 相位红灯
Map<Integer, List<CrossLightsPO>> dirTurnMap = phaseDirTurnPojo.getDirTurnMap();
if (!dirTurnMap.isEmpty()) {
if (Objects.nonNull(dirTurnMap) && !dirTurnMap.isEmpty()) {
for (Map.Entry<Integer, List<CrossLightsPO>> entry : dirTurnMap.entrySet()) {
String dir = String.valueOf(entry.getKey());
Map<Integer, String> turnColor = null;
......@@ -525,7 +522,7 @@ public class SignalStatus4StaticSchemeTask {
if (type == 2) {
setAllTurnColor(turnColor, "red"); //红灯时,圆饼灯操作
}
turnColor.put(3, "green");
//turnColor.put(3, "green");
dirLampGroupMap.put(dir, turnColor);
}
}
......@@ -538,7 +535,7 @@ public class SignalStatus4StaticSchemeTask {
Integer yellowTime = phaseCountDownDTO.getYellowTime();
Integer redTime = phaseCountDownDTO.getRedTime();
Map<Integer, List<CrossLightsPO>> dirTurnMap = phaseDirTurnPojo.getDirTurnMap();
if (!dirTurnMap.isEmpty()) {
if (Objects.nonNull(dirTurnMap) && !dirTurnMap.isEmpty()) {
setDirTurnColor(cyclePhaseCountDown, dirLampGroupMap, yellowTime, redTime, dirTurnMap);
}
}
......
......@@ -174,8 +174,10 @@ public class SignalStatusTask {
turnInfo.setColor(color);
String key = dir.concat(Constants.SEPARATOR_UNDER_LINE).concat(String.valueOf(turn));
Map<Integer, Integer> turnMap = (Map<Integer, Integer>) phaseMap.get(dir);
if (!turnMap.isEmpty()) {
Integer countDown = turnMap.get(turn);
turnInfo.setCountDown(countDown);
}
turnList.add(turnInfo);
}
dirInfo.setDir(dir);
......
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