设备定时任务更新设备状态bug修复

This commit is contained in:
mi9688 2024-12-02 09:34:51 +08:00
parent 29f0ac331b
commit 3f93dc9b65
2 changed files with 2 additions and 1 deletions

View File

@ -110,6 +110,7 @@ public class DeviceAlarmController extends BaseController {
offlineCount+=Integer.parseInt(String.valueOf(moisture.get("deviceOfflineCount"))); offlineCount+=Integer.parseInt(String.valueOf(moisture.get("deviceOfflineCount")));
offlineCount+=Integer.parseInt(String.valueOf(monitor.get("deviceOfflineCount"))); offlineCount+=Integer.parseInt(String.valueOf(monitor.get("deviceOfflineCount")));
offlineCount+=Integer.parseInt(String.valueOf(targetpest.get("deviceOfflineCount"))); offlineCount+=Integer.parseInt(String.valueOf(targetpest.get("deviceOfflineCount")));
System.err.println("设备离线数量:"+offlineCount);

View File

@ -162,7 +162,7 @@ public class DeviceDateTask {
} }
}); });
if(!onlineDeviceList.isEmpty()){ if(!onlineDeviceList.isEmpty()){
new LambdaUpdateChainWrapper<>(meteorologyMapper).in(DeviceInformationMeteorology::getDeviceEncoding,offlineDeviceList).set(DeviceInformationMeteorology::getStatus, 1).update(); new LambdaUpdateChainWrapper<>(meteorologyMapper).in(DeviceInformationMeteorology::getDeviceEncoding,onlineDeviceList).set(DeviceInformationMeteorology::getStatus, 1).update();
} }
} }