Commit 8122b65e authored by duanruiming's avatar duanruiming

[add] 海信灯态时间添加日志

parent 55370eca
......@@ -192,7 +192,8 @@ public class SignalStatusServiceImpl implements SignalStatusService {
*/
@Override
public void receiveLightStatus(List<HisenseLightStatusPojo> hisenseLightStatusPojos) throws Exception {
Date date = new Date();
Long time = date.getTime();
ObjectMapper jackson = JacksonUtils.getInstance();
pushOtherCompany(hisenseLightStatusPojos, jackson, shensiUrl, baiduUrl, yiGouUrl);
......@@ -221,10 +222,12 @@ public class SignalStatusServiceImpl implements SignalStatusService {
}
SignalDataCache.runningStatusStampMap.put(crossId, signalMachineStamp);
}
Date date = new Date();
Long time = date.getTime();
int offsetTime = (int) ((time - signalMachineStamp) / 1000);
long currentTimeMillis = System.currentTimeMillis();
int localOffset = (int) ((currentTimeMillis - signalMachineStamp) / 1000);
log.info("海信灯态延迟时间:{}秒", offsetTime);
log.info("海信灯态延迟时间, 本地时间差:{}秒", localOffset);
int cycleCountDown = content.getCycleCountDown() - Math.max(offsetTime, 0);
int hiControlMode = content.getControlMode();
int period = content.getPeriod();
......
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