Commit 4275c637 authored by duanruiming's avatar duanruiming

[update] 相位倒计时优化8

parent c4753009
......@@ -220,21 +220,21 @@ public class DTSignalStatusServiceImpl implements SignalStatusService {
lightsStatusVO.setSchemeId(String.valueOf(currentSchemeId));
lightsStatusVO.setCycleLen(schemeInfoPojo.getCycle());
lightsStatusVO.setCycleCountDown(phaseStageStatusPojo.getRemainTime());
// 当运行时间小于9时
// 当运行时间小于过渡时,运行的时上一个阶段
int realRemainTime = phaseStageStatusPojo.getRemainTime();
Integer runningTime = phaseStageStatusPojo.getRunningTime();
System.err.println("===" + realRemainTime);
if (runningTime < redTime) {
lightsStatusVO.setPhaseId(String.valueOf(currentPhaseStageId));
lightsStatusVO.setCyclePhaseCountDown(realRemainTime);
} else {
PhaseStageInfoPojo nextPhaseStageInfoPojo = null;
if (l == 0) {
nextPhaseStageInfoPojo = phaseStageInfoPojos.get(l);
Integer preStageId = null;
int index = phaseStageChain.indexOf(currentPhaseStageId);
if (index == 0) {
preStageId = phaseStageChain.get(phaseStageChain.size() - 1);
} else {
nextPhaseStageInfoPojo = phaseStageInfoPojos.get(phaseStageInfoPojos.size() - 1);
preStageId = phaseStageChain.get(index);
}
lightsStatusVO.setPhaseId(String.valueOf(nextPhaseStageInfoPojo.getPhaseStageId()));
lightsStatusVO.setPhaseId(String.valueOf(preStageId));
lightsStatusVO.setCyclePhaseCountDown(phaseStageStatusPojo.getRemainTime());
}
}
......
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