Przeglądaj źródła

添加声光报警记录

hanzhiwei 2 lat temu
rodzic
commit
20ccea0ceb

+ 2 - 1
zd-modules/zd-airbottle/src/main/java/com/zd/airbottle/service/impl/AlarmRecordServiceImpl.java

@@ -230,7 +230,9 @@ public class AlarmRecordServiceImpl implements IAlarmRecordService {
                     if (hardwareRfidDto != null && illegalRemoval.contains("3")) {
                     if (hardwareRfidDto != null && illegalRemoval.contains("3")) {
                         ResultData<LabHardwareDto> hardwareByType = remoteLabHardwareService.findHardwareByType(storageRVo.getSubjectId(), 8, null, null);
                         ResultData<LabHardwareDto> hardwareByType = remoteLabHardwareService.findHardwareByType(storageRVo.getSubjectId(), 8, null, null);
                         if (HttpStatus.SUCCESS == hardwareByType.getCode()) {
                         if (HttpStatus.SUCCESS == hardwareByType.getCode()) {
+                            warningNoticeLogDto.setId(logId);
                             warningNoticeLogDto.setVoiceBroadcast(1);
                             warningNoticeLogDto.setVoiceBroadcast(1);
+                            laboratoryService.updateWarningNoticeLog(warningNoticeLogDto);
                             Long id = hardwareByType.getData().getId();
                             Long id = hardwareByType.getData().getId();
                             laboratoryService.controlDevice(id, 1);
                             laboratoryService.controlDevice(id, 1);
                             scheduledExecutorService.schedule(new TimerTask() {
                             scheduledExecutorService.schedule(new TimerTask() {
@@ -241,7 +243,6 @@ public class AlarmRecordServiceImpl implements IAlarmRecordService {
                             }, 30, TimeUnit.SECONDS);
                             }, 30, TimeUnit.SECONDS);
                         }
                         }
                     }
                     }
-                    laboratoryService.updateWarningNoticeLog(warningNoticeLogDto);
                 }
                 }
             } else {
             } else {
                 return 0;
                 return 0;

+ 2 - 1
zd-modules/zd-chemical/src/main/java/com/zd/chemical/service/impl/HxpStockServiceImpl.java

@@ -473,7 +473,9 @@ public class HxpStockServiceImpl implements IHxpStockService {
                 if (hardwareRfidDto != null && illegalRemoval.contains("3")) {
                 if (hardwareRfidDto != null && illegalRemoval.contains("3")) {
                     ResultData<LabHardwareDto> hardwareByType = remoteLabHardwareService.findHardwareByType(hxpStock.getSubId(), 8, null, null);
                     ResultData<LabHardwareDto> hardwareByType = remoteLabHardwareService.findHardwareByType(hxpStock.getSubId(), 8, null, null);
                     if (HttpStatus.SUCCESS == hardwareByType.getCode()) {
                     if (HttpStatus.SUCCESS == hardwareByType.getCode()) {
+                        warningNoticeLogDto.setId(logId);
                         warningNoticeLogDto.setVoiceBroadcast(1);
                         warningNoticeLogDto.setVoiceBroadcast(1);
+                        remoteLaboratoryService.updateWarningNoticeLog(warningNoticeLogDto);
                         Long id = hardwareByType.getData().getId();
                         Long id = hardwareByType.getData().getId();
                         remoteLaboratoryService.controlDevice(id, 1);
                         remoteLaboratoryService.controlDevice(id, 1);
                         scheduledExecutorService.schedule(new TimerTask() {
                         scheduledExecutorService.schedule(new TimerTask() {
@@ -484,7 +486,6 @@ public class HxpStockServiceImpl implements IHxpStockService {
                         }, 30, TimeUnit.SECONDS);
                         }, 30, TimeUnit.SECONDS);
                     }
                     }
                 }
                 }
-                remoteLaboratoryService.updateWarningNoticeLog(warningNoticeLogDto);
             }
             }
             // 如果非领用状态,做报警台账
             // 如果非领用状态,做报警台账
             // 0.检测实验室声光报警器是否使用- 使用则直接调用触发- 否则跳过
             // 0.检测实验室声光报警器是否使用- 使用则直接调用触发- 否则跳过