Forráskód Böngészése

北向代码提交

jingyuanchao 1 éve
szülő
commit
f2d00be3c2

+ 1 - 3
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/IotAlarmDefenceAreaServiceImpl.java

@@ -144,9 +144,7 @@ public class IotAlarmDefenceAreaServiceImpl extends ServiceImpl<IotAlarmDefenceA
             result.setErrorMsg("没有找到对应的设备");
             return result;
         }
-        if (ObjectUtil.notEqual(sensor.getState(),sensorData.getInputState())){
-            sensor.setStateUpdateTime(LocalDateTime.now());
-        }
+        sensor.setStateUpdateTime(LocalDateTime.now());
         sensor.setState(sensorData.getInputState());
         if (sensorData.getInputState().equalsIgnoreCase("alarm")) {
             sensor.setStateText("报警");

+ 1 - 3
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/IotAlarmSubSystemServiceImpl.java

@@ -159,9 +159,7 @@ public class IotAlarmSubSystemServiceImpl extends ServiceImpl<IotAlarmSubsystemM
 
         protection.setName(protectionEditDto.getDefenceareaName());
         protection.setUpdateTime(updateTime);
-        if (ObjectUtil.notEqual(protection.getStatus(),protectionEditDto.getDefenceStatus())){
-            protection.setStatusUpdateTime(LocalDateTime.now());
-        }
+        protection.setStatusUpdateTime(LocalDateTime.now());
         switch (protectionEditDto.getDefenceStatus()) {
             case 0:
                 protection.setStatus(ProtectionStatus.REMOVAL.ordinal());

+ 1 - 3
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/IotDeviceDetectionServiceImpl.java

@@ -149,9 +149,7 @@ public class IotDeviceDetectionServiceImpl extends ServiceImpl<IotDeviceDetectio
             networkDeviceDetection.setId(IDHelper.id());
             networkDeviceDetection.setCreateTime(LocalDateTime.now());
         }
-        if (ObjectUtil.notEqual(networkDeviceDetection.getState(),networkDeviceDetectionEditDto.getNetStatus())){
-            networkDeviceDetection.setStateUpdateTime(LocalDateTime.now());
-        }
+        networkDeviceDetection.setStateUpdateTime(LocalDateTime.now());
         networkDeviceDetection.setEquipmentName(networkDeviceDetectionEditDto.getEquipmentName());
         networkDeviceDetection.setUpdateTime(DateUtils.toLocalDateTime(networkDeviceDetectionEditDto.getUpdateTime()));
         switch (networkDeviceDetectionEditDto.getNetStatus()) {

+ 1 - 3
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/IotDvrHardDiskDetectionServiceImpl.java

@@ -133,14 +133,12 @@ public class IotDvrHardDiskDetectionServiceImpl extends ServiceImpl<IotDvrHardDi
         videoRecorderHardDiskDetection.setEquipmentCode(videoRecorderHardDiskDetectionEditDto.getEquipmentCode());
         IotDvrHardDiskDetection old = this.findTopByEquipmentCodeAndOrgId(videoRecorderHardDiskDetectionEditDto.getEquipmentCode(), org.getId());
         if (old != null) {
-            if (ObjectUtil.notEqual(old.getCheckStatus(), videoRecorderHardDiskDetectionEditDto.getCheckStatus())) {
-                videoRecorderHardDiskDetection.setStateUpdateTime(LocalDateTime.now());
-            }
             videoRecorderHardDiskDetection = old;
         } else {
             videoRecorderHardDiskDetection.setId(IDHelper.id());
             videoRecorderHardDiskDetection.setCreateTime(LocalDateTime.now());
         }
+        videoRecorderHardDiskDetection.setStateUpdateTime(LocalDateTime.now());
         videoRecorderHardDiskDetection.setEquipmentName(videoRecorderHardDiskDetectionEditDto.getEquipmentName());
         videoRecorderHardDiskDetection.setCheckTime(DateUtils.toLocalDateTime(videoRecorderHardDiskDetectionEditDto.getCheckTime()));
         videoRecorderHardDiskDetection.setCheckStatus(videoRecorderHardDiskDetectionEditDto.getCheckStatus());

+ 2 - 4
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/IotSensorServiceImpl.java

@@ -105,12 +105,10 @@ public class IotSensorServiceImpl extends ServiceImpl<IotSensorMapper, IotSensor
             iotSensor.setUpdateTime(LocalDateTime.now());
             iotSensor.setDeviceName(status.getDeviceName());
             iotSensor.setDeviceType(status.getDeviceType());
-            if (ObjectUtil.notEqual(iotSensor.getInfos(), infoStr)) {
-                iotSensor.setStateUpdateTime(LocalDateTime.now());
-            }
+            iotSensor.setStateUpdateTime(LocalDateTime.now());
             iotSensor.setInfos(infoStr);
             final IotSensorLog iotSensorLog = new IotSensorLog();
-            BeanUtils.copyProperties(iotSensor, iotSensorLog,"id");
+            BeanUtils.copyProperties(iotSensor, iotSensorLog, "id");
             iotSensorLog.setIotSensorId(iotSensor.getId());
             iotSensorLog.setSource(1);
             iotSensorLog.setDeviceType(iotSensor.getDeviceType());