|
|
|
@ -135,12 +135,12 @@ public class DeviceDataBaStatusServiceImpl implements DeviceDataBaStatusService |
|
|
|
|
|
|
|
// 查询 favorited_device 表中所有设备的 device_id
|
|
|
|
List<String> favoritedDeviceIds = favoritedDeviceMapperExt.getFavoritedDeviceIds(); |
|
|
|
|
|
|
|
long currentTs = System.currentTimeMillis(); |
|
|
|
for (DeviceBaStatusData data : resultList){ |
|
|
|
String deviceId = data.getDeviceId().toLowerCase(); |
|
|
|
String sDeviceId = deviceId85ToSMap.get(deviceId); |
|
|
|
|
|
|
|
data.setContinuousRunningTimeStr(SecondsToHMSConverter.covertSeconds(data.getContinuousRunningTime())); |
|
|
|
|
|
|
|
//处理111状态映射
|
|
|
|
// data.setStatus111(commonOpt.buildStatus111(deviceId, deviceId85To111Map, deviceInfo111Map, realtime111Map, objectMapper));
|
|
|
|
data.setStatus111(commonOpt.buildRawFirstValue(deviceId, deviceId85To111Map, realtime111Map, objectMapper)); |
|
|
|
@ -159,6 +159,13 @@ public class DeviceDataBaStatusServiceImpl implements DeviceDataBaStatusService |
|
|
|
} else { |
|
|
|
data.setStopRun(commonOpt.judgeStopRun(objectMapper, realtime85Map.get(deviceId))); |
|
|
|
} |
|
|
|
|
|
|
|
if (0 == data.getStopRun()) { |
|
|
|
data.setContinuousRunningTimeStr(SecondsToHMSConverter.covertSeconds(data.getContinuousRunningTime())); |
|
|
|
} else if (StringUtils.isNotBlank(data.getLatestTs()) && currentTs >= Long.parseLong(data.getLatestTs())) { |
|
|
|
long diff = currentTs - Long.parseLong(data.getLatestTs()); |
|
|
|
data.setContinuousRunningTimeStr(SecondsToHMSConverter.covertSeconds(diff)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|