|
|
@@ -105,8 +105,8 @@ public class IotStatusService {
|
|
|
/**
|
|
|
* 定期根据类型查设备最新设备数据,是否长时间不上报。
|
|
|
*/
|
|
|
-// @Scheduled(cron = "30 * * * * ?")
|
|
|
- @Scheduled(cron = "0 0/20 * * * ? ")
|
|
|
+ @Scheduled(cron = "30 * * * * ?")
|
|
|
+// @Scheduled(cron = "0 0/20 * * * ? ")
|
|
|
public void validateStatusByDevType() {
|
|
|
if(!connectionManager.initCompleted()){
|
|
|
return;
|
|
|
@@ -128,6 +128,9 @@ public class IotStatusService {
|
|
|
Map param = new HashMap();
|
|
|
param.put("type", type);
|
|
|
// 查出来待检查的设备。根据类型
|
|
|
+ if(Objects.equals(type, IotDeviceDictConst.TYPE_YF_XCT)){
|
|
|
+ log.info("【吸虫塔检测");
|
|
|
+ }
|
|
|
List<IotDeviceStatusResVo> iotDeviceStatusResVos = iIotDeviceService.selectAllDeviceConfigStatus(param);
|
|
|
log.info("【设备检测】【设备类型{} 】设备:{} 个", type, iotDeviceStatusResVos.size());
|
|
|
for (IotDeviceStatusResVo iotDeviceStatusResVo : iotDeviceStatusResVos) {
|
|
|
@@ -146,7 +149,7 @@ public class IotStatusService {
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isEmpty(updateTime)) {
|
|
|
- return;
|
|
|
+ continue;
|
|
|
}
|
|
|
String devCode = iotDeviceStatusResVo.getDevCode();
|
|
|
String devName = iotDeviceStatusResVo.getDevName();
|
|
|
@@ -155,7 +158,7 @@ public class IotStatusService {
|
|
|
// 检查时间上报间隔是否异常,60分钟没有,则异常
|
|
|
if (!validateTime(updateTime, 90)) {
|
|
|
log.info("【设备检测】【正常】:设备:{} {} 上次时间:{}", iotDeviceStatusResVo.getDevName(), iotDeviceStatusResVo.getDevCode(), updateTime);
|
|
|
- return;
|
|
|
+ continue;
|
|
|
}
|
|
|
// 1. 当前在线的进行检查;
|
|
|
if (!IotDeviceStatusTypeEnum.OFFLINE.getCode().equals(devStatus)) {
|