|
|
@@ -104,15 +104,19 @@ public class IotStatusService {
|
|
|
if (validateDeviceType.contains(tid)) {
|
|
|
// 获取最新上报时间
|
|
|
String updateTime = iotDeviceStatusResVo.getDevUpdateddate();
|
|
|
- String createdTime = iotDeviceStatusResVo.getDevCreateddate();
|
|
|
- String vTime = StringUtils.isEmpty(updateTime) ? createdTime : updateTime;
|
|
|
+ /**
|
|
|
+ * 如果没有更新的上报时间,则跳过不处理,正常他本身就是离线
|
|
|
+ */
|
|
|
+ if (StringUtils.isEmpty(updateTime)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
String devCode = iotDeviceStatusResVo.getDevCode();
|
|
|
String devName = iotDeviceStatusResVo.getDevName();
|
|
|
String devBid = iotDeviceStatusResVo.getDevBid();
|
|
|
String devStatus = iotDeviceStatusResVo.getDevStatus();
|
|
|
// 检查时间上报间隔是否异常,30分钟没有,则异常
|
|
|
- if (!validateTime(vTime, 60)) {
|
|
|
- log.info("【设备检测】【正常】:设备:{} {} 上次时间:{}", iotDeviceStatusResVo.getDevName(), iotDeviceStatusResVo.getDevCode(), vTime);
|
|
|
+ if (!validateTime(updateTime, 60)) {
|
|
|
+ log.info("【设备检测】【正常】:设备:{} {} 上次时间:{}", iotDeviceStatusResVo.getDevName(), iotDeviceStatusResVo.getDevCode(), updateTime);
|
|
|
return;
|
|
|
}
|
|
|
// 1. 当前在线的进行检查;
|