Commit aedba3f0 authored by duanruiming's avatar duanruiming

[update] 相位倒计时优化4

parent 6dcd366d
......@@ -221,7 +221,7 @@ public class DTSignalStatusServiceImpl implements SignalStatusService {
lightsStatusVO.setCycleLen(schemeInfoPojo.getCycle());
lightsStatusVO.setCycleCountDown(phaseStageStatusPojo.getRemainTime());
// 当相位剩余时间小于0是,运行的第二个阶段
int realRemainTime = phaseStageStatusPojo.getRemainTime() - redTime;
int realRemainTime = phaseStageStatusPojo.getRemainTime() - (phaseStageTime - redTime);
if (realRemainTime >= 0) {
lightsStatusVO.setPhaseId(String.valueOf(currentPhaseStageId));
lightsStatusVO.setCyclePhaseCountDown(realRemainTime);
......@@ -232,8 +232,8 @@ public class DTSignalStatusServiceImpl implements SignalStatusService {
} else {
nextPhaseStageInfoPojo = phaseStageInfoPojos.get(0);
}
lightsStatusVO.setPhaseId(String.valueOf(nextPhaseStageInfoPojo.getPhaseStageId()));
lightsStatusVO.setCyclePhaseCountDown(phaseStageStatusPojo.getRemainTime() + redTime);
lightsStatusVO.setPhaseId(String.valueOf(currentPhaseStageId));
lightsStatusVO.setCyclePhaseCountDown(phaseStageStatusPojo.getRemainTime() + (phaseStageTime - redTime));
}
}
}
......
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