Commit 8f81a3cc authored by duanruiming's avatar duanruiming

[update] 相位倒计时优化5

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