Commit 465e0837 authored by duanruiming's avatar duanruiming

[update] 相位倒计时优化7

parent 85159d85
......@@ -220,18 +220,19 @@ public class DTSignalStatusServiceImpl implements SignalStatusService {
lightsStatusVO.setSchemeId(String.valueOf(currentSchemeId));
lightsStatusVO.setCycleLen(schemeInfoPojo.getCycle());
lightsStatusVO.setCycleCountDown(phaseStageStatusPojo.getRemainTime());
// 当相位剩余时间小于0是,运行的第二个阶段
// 当运行时间小于9时,
int realRemainTime = phaseStageStatusPojo.getRemainTime();
Integer runningTime = phaseStageStatusPojo.getRunningTime();
System.err.println("===" + realRemainTime);
if (realRemainTime > 9) {
if (runningTime < redTime) {
lightsStatusVO.setPhaseId(String.valueOf(currentPhaseStageId));
lightsStatusVO.setCyclePhaseCountDown(realRemainTime);
} else {
PhaseStageInfoPojo nextPhaseStageInfoPojo = null;
if (l< phaseStageInfoPojos.size()) {
if (l == 0) {
nextPhaseStageInfoPojo = phaseStageInfoPojos.get(l);
} else {
nextPhaseStageInfoPojo = phaseStageInfoPojos.get(0);
nextPhaseStageInfoPojo = phaseStageInfoPojos.get(phaseStageInfoPojos.size() - 1);
}
lightsStatusVO.setPhaseId(String.valueOf(nextPhaseStageInfoPojo.getPhaseStageId()));
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