Selaa lähdekoodia

新增预警方式2

hanzhiwei 2 vuotta sitten
vanhempi
commit
13d14df4d6

+ 5 - 2
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/event/RedisExpiredPhotographListener.java

@@ -216,6 +216,7 @@ public class RedisExpiredPhotographListener extends KeyExpirationEventMessageLis
                             }
                             String systemText = "【实验室安全系统】"+warningNoticeLog.getSubName()+"-监测到实验人员违规未穿戴实验服,请尽快确认。";
                             String text = "【实验室安全系统】"+warningNoticeLog.getSubName()+"-监测到实验人员违规未穿戴实验服,请尽快确认。点击查看:https://lab.zjznai.com/labAppTest/earlyWarning/index.html?id="+warningNoticeLog.getId()+"&urlScheme="+urlScheme.getData();
+                            WarningNoticeLogDto warningNoticeLogDto2 = new WarningNoticeLogDto();
                             //系统 短信 语音通知
                             long systemNoticeCount = warningNoticeLogService.count(new LambdaQueryWrapper<WarningNoticeLog>().eq(WarningNoticeLog::getSubId, warningNoticeLog.getSubId())
                                     .eq(WarningNoticeLog::getWarningType,1).like(WarningNoticeLog::getWarningWay,"1").eq(WarningNoticeLog::getIsDeleted,Boolean.FALSE));
@@ -250,6 +251,7 @@ public class RedisExpiredPhotographListener extends KeyExpirationEventMessageLis
                             if (warningConfig.getVoiceNotcie() != null && voiceNoticeCount >= warningConfig.getVoiceNotcie()) {
                                 //
                                 warningWay.append("3,");
+                                warningNoticeLogDto2.setVoiceBroadcast(1);
                                 log.info("打开喇叭-远程调用查询喇叭列表,实验室id={}", warningNoticeLog.getSubId());
                                 Integer count = labSparseHardwareService.selectSpeakerCount();
                                 R deviceList = remoteSpeakService.getDeviceList(1, count + 10, -99L, warningNoticeLog.getSubId());
@@ -276,8 +278,9 @@ public class RedisExpiredPhotographListener extends KeyExpirationEventMessageLis
                                     log.info("打开喇叭-远程调用喇叭播放音乐返回信息:{}", JSON.toJSONString(r));
                                 }
                             }
-                            warningNoticeLogDto.setWarningWay(warningWay.toString());
-                            ResultData updateResult = remoteLaboratoryService.updateWarningNoticeLog(warningNoticeLogDto);
+                            warningNoticeLogDto2.setId(warningNoticeLog.getId());
+                            warningNoticeLogDto2.setWarningWay(warningWay.toString());
+                            ResultData updateResult = remoteLaboratoryService.updateWarningNoticeLog(warningNoticeLogDto2);
                             if (HttpStatus.SUCCESS == updateResult.getCode()) {
                                 log.info("未穿戴实验服修改报警方式日志成功!");
                             }

+ 1 - 1
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/LabMessageUserMapper.xml

@@ -283,7 +283,7 @@
     SELECT x1.* FROM (
 
      SELECT t1.* FROM (SELECT ur.`join_user_id` AS send_user_id,
-            su.nick_name AS send_name,
+            ifnull(su.nick_name,SYSTEM) AS send_name,
                 sd.dept_name AS dept_name,
                 dc.create_time AS new_message_date,
                 dc.content AS new_message,