瀏覽代碼

预警合并代码

hanzhiwei 2 年之前
父節點
當前提交
a1498abd00

+ 8 - 1
zd-api/zd-airbottle-api/src/main/java/com/zd/airbottle/api/feign/RemoteAirBottleService.java

@@ -1,10 +1,11 @@
 package com.zd.airbottle.api.feign;
 
-import com.zd.model.entity.InventoryTag;
 import com.zd.airbottle.api.feign.fallback.RemoteAirBottleFallbackFactory;
 import com.zd.model.constant.ApplicationConstants;
 import com.zd.model.domain.R;
+import com.zd.model.entity.InventoryTag;
 import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 
@@ -22,4 +23,10 @@ public interface RemoteAirBottleService {
     @PostMapping("alarm/record/remote/add")
     R<Boolean> remoteAdd(@RequestBody InventoryTag tag);
 
+    /**
+     * 气瓶超时定时任务
+     */
+    @GetMapping(value = "/alarm/record/qpTimeOut")
+    void qpTimeOut();
+
 }

+ 13 - 1
zd-api/zd-airbottle-api/src/main/java/com/zd/airbottle/api/feign/fallback/RemoteAirBottleFallbackFactory.java

@@ -2,6 +2,7 @@ package com.zd.airbottle.api.feign.fallback;
 
 import com.zd.airbottle.api.feign.RemoteAirBottleService;
 import com.zd.model.domain.R;
+import com.zd.model.entity.InventoryTag;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.cloud.openfeign.FallbackFactory;
@@ -15,6 +16,17 @@ public class RemoteAirBottleFallbackFactory implements FallbackFactory<RemoteAir
     @Override
     public RemoteAirBottleService create(Throwable throwable) {
         log.error("气瓶服务调用失败:{}", throwable.getMessage());
-        return (tag) -> R.fail("新增报警记录失败:" + throwable.getMessage());
+        return new RemoteAirBottleService() {
+            @Override
+            public R<Boolean> remoteAdd(InventoryTag tag) {
+                log.error("新增报警记录失败:{}" ,throwable.getMessage());
+                return R.fail("新增报警记录失败:" + throwable.getMessage());
+            }
+
+            @Override
+            public void qpTimeOut() {
+                log.error("气瓶超时调用失败:{}" ,throwable.getMessage());
+            }
+        };
     }
 }

+ 4 - 4
zd-api/zd-chemical-api/src/main/java/com/zd/chemical/api/fegin/RemoteStockService.java

@@ -21,11 +21,11 @@ public interface RemoteStockService {
     @PostMapping(value = "/hxpStock/RFIDCheck")
     public R<Boolean> rfidCheck(@RequestBody Object tag);
 
-    @GetMapping(value = "/hxpStock/expireCheck")
-    public void expireCheck();
+    @GetMapping(value = "/hxpStock/hxpExpired")
+    void hxpExpired();
 
-    @GetMapping(value = "/hxpUserecord/checkOvertime")
-    public void checkOvertime();
+    @GetMapping(value = "/hxpStock/hxpTimeOut")
+    void hxpTimeOut();
 
     @PostMapping("/hxpChemical/indicatorMonitoring")
     public void indicatorMonitoring();

+ 3 - 3
zd-api/zd-chemical-api/src/main/java/com/zd/chemical/api/fegin/factory/RemoteStockFallbackFactory.java

@@ -28,12 +28,12 @@ public class RemoteStockFallbackFactory implements FallbackFactory<RemoteStockSe
             }
 
             @Override
-            public void expireCheck() {
-                logger.error("化学品库存过期调度失败:{}" ,throwable.getMessage());
+            public void hxpExpired() {
+                logger.error("化学品库存过期/即将过期调度失败:{}" ,throwable.getMessage());
             }
 
             @Override
-            public void checkOvertime() {
+            public void hxpTimeOut() {
                 logger.error("化学品领用超时调度失败:{}" ,throwable.getMessage());
             }
 

+ 4 - 0
zd-api/zd-laboratory-api/src/main/java/com/zd/laboratory/api/feign/RemoteLaboratoryService.java

@@ -566,6 +566,10 @@ public interface RemoteLaboratoryService {
     @GetMapping("/warningNoticeLog/getRemindData")
     ResultData getRemindData(@RequestParam("keyId") Long keyId,@RequestParam("type") Integer type);
 
+    @ApiOperation("穿戴算法识别预警")
+    @GetMapping("/warningNoticeLog/labCoatTask")
+    ResultData labCoatTask();
+
     @GetMapping("/warningConfig/getByType")
     @ApiOperation("根据类型查询报警配置信息-预警类型(1算法识别 2化学品 3气瓶)")
     ResultData<WarningConfigDto> getByType(@RequestParam("type") Integer type);

+ 5 - 0
zd-api/zd-laboratory-api/src/main/java/com/zd/laboratory/api/feign/fallback/RemoteLaboratoryFallbackFactory.java

@@ -544,6 +544,11 @@ public class RemoteLaboratoryFallbackFactory implements FallbackFactory<RemoteLa
             }
 
             @Override
+            public ResultData labCoatTask() {
+                return ResultData.fail("穿戴算法识别预警失败!"+ cause.getMessage());
+            }
+
+            @Override
             public ResultData<WarningConfigDto> getByType(Integer type) {
                 return ResultData.fail("获取告警通知配置失败!"+ cause.getMessage());
             }

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

@@ -47,7 +47,6 @@ import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.concurrent.BasicThreadFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -453,8 +452,7 @@ public class AlarmRecordServiceImpl implements IAlarmRecordService {
      * @Param []
      * @Return void
      **/
-//    @Scheduled(cron = "0 0/1 * * * ? ")
-    @Scheduled(cron = "0 0 0 * * ?")
+//    @Scheduled(cron = "0 0 0 * * ?")
     public void qpTimeOut() {
         // 查询配置
         ResultData<WarningConfigDto> byType = laboratoryService.getByType(3);

+ 8 - 0
zd-modules/zd-base/pom.xml

@@ -147,6 +147,14 @@
             <groupId>com.zd.algorithm</groupId>
             <artifactId>zd-algorithm-api</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.zd.security</groupId>
+            <artifactId>zd-security-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.zd.airbottle</groupId>
+            <artifactId>zd-airbottle-api</artifactId>
+        </dependency>
     </dependencies>
 
     <build>

+ 26 - 0
zd-modules/zd-base/src/main/java/com/zd/base/job/task/BottleTask.java

@@ -0,0 +1,26 @@
+package com.zd.base.job.task;
+
+import com.zd.airbottle.api.feign.RemoteAirBottleService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description 气瓶定时任务
+ * @Author hzw
+ * @Date 2023/7/11 15:23
+ * @Version 2.0
+ */
+@Component("bottleTask")
+public class BottleTask {
+
+    @Autowired
+    private RemoteAirBottleService remoteAirBottleService;
+
+    /**
+     * 检测领用超时
+     */
+    public void qpTimeOut(){
+        remoteAirBottleService.qpTimeOut();
+    }
+
+}

+ 5 - 5
zd-modules/zd-base/src/main/java/com/zd/base/job/task/ChemicalTask.java

@@ -11,17 +11,17 @@ public class ChemicalTask {
     private RemoteStockService remoteStockService;
 
     /**
-     * 化学品过期检测
+     * 化学品过期、即将过期检测
      */
-    public void expireCheck(){
-        remoteStockService.expireCheck();
+    public void hxpExpired(){
+        remoteStockService.hxpExpired();
     }
 
     /**
      * 检测领用超时
      */
-    public void checkOvertime(){
-        remoteStockService.checkOvertime();
+    public void hxpTimeOut(){
+        remoteStockService.hxpTimeOut();
     }
 
     /**

+ 7 - 0
zd-modules/zd-base/src/main/java/com/zd/base/job/task/LabTask.java

@@ -78,4 +78,11 @@ public class LabTask {
     public void timingClearMsg() {
         remoteLaboratoryService.timingClearMsg();
     }
+
+    /**
+     * 穿戴识别
+     */
+    public void labCoatTask(){
+        remoteLaboratoryService.labCoatTask();
+    }
 }

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

@@ -54,7 +54,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -76,16 +75,6 @@ import java.util.stream.Stream;
 @Service
 public class HxpStockServiceImpl implements IHxpStockService {
     private static Logger logger = LoggerFactory.getLogger(HxpStockServiceImpl.class);
-
-//    private static Map<String, Date> cacheMap = new ConcurrentHashMap<>();
-
-//    private static int interval = 60 * 3;
-
-//    @Value("${config.interval:180}")
-//    private void setInterval(Integer interval){
-//        HxpStockServiceImpl.interval = interval;
-//    }
-
     public static Integer phoneMode = 0;
 
     @Value("${phoneMode:0}")
@@ -505,130 +494,6 @@ public class HxpStockServiceImpl implements IHxpStockService {
                 }
             }
             return true;
-//            // 如果非领用状态,做报警台账
-//            // 0.检测实验室声光报警器是否使用- 使用则直接调用触发- 否则跳过
-//            Map<String, Object> subInfo = hxpUserecordMapper.selectSubInfoById(hxpStock.getSubId());
-//            String subName = "";
-//            String safeUserId = "";
-//            if (subInfo != null) {
-//                subName = subInfo.get("name") == null ? "" : String.valueOf(subInfo.get("name"));
-//                safeUserId = subInfo.get("safeUserId") == null ? "" : String.valueOf(subInfo.get("safeUserId"));
-//            }
-//
-//            String terminalNum;
-//            HxpAlarmRecord hxpAlarmRecord;
-//            Integer dealTime = 0;
-//            List<Map<String, Object>> terminalList = hxpSmartTerminalMapper.selectTerminalBySubId(8, hxpStock.getSubId());
-//            if (CollectionUtils.isEmpty(terminalList)) {
-//                logger.info("实验室【" + subName + "】ID" + hxpStock.getSubId() + "未设置或启用声光报警器!");
-//            } else {
-//                Map<String, Object> smartTerminal = terminalList.get(0);
-//                terminalNum = String.valueOf(smartTerminal.get("hardwareNum"));
-//                dealTime = (Integer) smartTerminal.get("dealTime");
-//                // 执行声光报警器动作触发
-//                remoteLaboratoryService.controlByInside(Long.parseLong(smartTerminal.get("id") + ""), "01");
-//                isAlarm = true;
-//
-//
-//                // 默认一个实验室只触发一个报警器
-//                hxpAlarmRecord = new HxpAlarmRecord();
-//                hxpAlarmRecord.setAlarmContent("未领用即携带化学品离开实验室【" + subName + "】," + "化学品(" + hxpStock.getChemicalName() + "), 请尽快确认!");
-//                hxpAlarmRecord.setAlarmType(2);
-//                hxpAlarmRecord.setHasValid(1);
-//                hxpAlarmRecord.setAlarmMode(2);
-//                hxpAlarmRecord.setAlarmTime(DateUtils.getNowDate());
-//                hxpAlarmRecord.setSubId(hxpStock.getSubId());
-//                hxpAlarmRecord.setTerminalNum(terminalNum == null ? tag.getSerialNumber() : terminalNum);
-//                hxpAlarmRecord.setHandlingStatus(1);
-//                // TODO 请在此处新增图片路径字段并使用 fileR 中的返回值url作为图片路径以供前端调用,具体实现方式可参考 com.zd.bottle.service.impl.AlarmRecordServiceImpl.remoteAdd#155 行代码,默认配置为空,具体配置可参考zd-bottle-dev.yml#113行到115行
-//
-//                hxpAlarmRecordMapper.insertHxpAlarmRecord(hxpAlarmRecord);
-//
-//                Long recordId = hxpAlarmRecord.getId();
-//                // 控制响铃时长
-//                if (smartTerminal.get("ringTime") != null) {
-//                    ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();
-//                    executorService.schedule(new Runnable() {
-//                        @Override
-//                        public void run() {
-//                            // 自动处理声光报警状态
-//                            HxpAlarmRecord hxpAlarmRecord1 = new HxpAlarmRecord();
-//                            hxpAlarmRecord1.setId(recordId);
-//                            hxpAlarmRecord1.setHandlingStatus(2);
-//                            hxpAlarmRecord1.setHandlingTime(DateUtils.getNowDate());
-//                            hxpAlarmRecord1.setHandlingUserId(-2L);
-//                            hxpAlarmRecordMapper.updateHxpAlarmRecord(hxpAlarmRecord1);
-//
-//                            remoteLaboratoryService.controlByInside(Long.parseLong(smartTerminal.get("id") + ""), "00");
-//                        }
-//                    }, Long.parseLong(smartTerminal.get("ringTime") + ""), TimeUnit.SECONDS);
-//                }
-//            }
-//
-//
-//            // 报警通知演示临时通知给实验室管理员  phones
-//            Long recordId = sendPhoneAlarm(hxpStock.getId(), hxpStock.getSubId(), subName, hxpStock.getChemicalName(), subInfo.get("phones") + "");
-//
-//            cacheMap.put(rfidCode, DateUtils.getNowDate());
-//
-//            // 系统通知 未领用即携带化学品离开实验室-实验室安全责任人
-//            Map<String, Object> msgData = new HashMap<>();
-//            msgData.put("sendRange", 3);
-//            msgData.put("messClass", -1);
-//            msgData.put("content", "系统检测到:化学品【" + hxpStock.getChemicalName() + "】,未领用被带离实验室【" + subName + "】,请您确认!");
-//
-//            List<Map<String, Object>> userMsgList = new ArrayList<>();
-//
-//            if (StringUtils.isNotBlank(safeUserId)) {
-//                String[] userIds = safeUserId.split(",");
-//                Map<String, Object> userMsg;
-//                for (String userId : userIds) {
-//                    userMsg = new HashMap<>();
-//                    userMsg.put("joinUserId", userId);
-//                    userMsg.put("isRead", false);
-//                    userMsgList.add(userMsg);
-//                }
-//                msgData.put("messageUserList", userMsgList);
-//
-//                remoteMessageContentService.addDynamicMessage(msgData);
-//            }
-//
-//            // 需求变动内容:未领用即携带化学品离开房间报警时,如实验室安全责任人通过化学品终端或PC管理后台操作处理,状态更改为已处理,报警流程终止
-//            // 保证逻辑严谨,数据必须进行强关联
-//            if (recordId != null) {
-//                // 1.查询标签所属实验室院系报警配置流程处理
-//                List<HxpAlarmConfig> hxpAlarmConfigList = hxpAlarmConfigMapper.selectBySubId(3, hxpStock.getSubId());
-//                // 2.最多五个步骤分别执行
-//                if (CollectionUtils.isNotEmpty(hxpAlarmConfigList)) {
-//                    logger.info("实验室【" + subName + "】ID" + hxpStock.getSubId() + "执行用户短信通知!");
-//
-//                    Date date = DateUtil.offsetMinute(DateUtils.getNowDate(), Optional.ofNullable(dealTime).orElse(1));
-//
-//                    for (HxpAlarmConfig hxpAlarmConfig : hxpAlarmConfigList) {
-//                        hxpAlarmRecord = new HxpAlarmRecord();
-//                        hxpAlarmRecord.setAlarmContent("未领用即携带化学品离开实验室【" + subName + "】," + "化学品(" + hxpStock.getChemicalName() + "),请尽快确认!");
-//                        hxpAlarmRecord.setAlarmType(2);
-//                        hxpAlarmRecord.setAlarmMode(3);
-//                        hxpAlarmRecord.setHasValid(0);
-//                        hxpAlarmRecord.setAlarmTime(date);
-//                        hxpAlarmRecord.setSubId(hxpStock.getSubId());
-//                        hxpAlarmRecord.setStockId(hxpStock.getId());
-//                        hxpAlarmRecord.setParentId(recordId);
-//                        //hxpAlarmRecord.setTerminalNum();
-//                        hxpAlarmRecord.setHandlingStatus(1);
-//                        hxpAlarmRecord.setLiableUserIds(hxpAlarmConfig.getAlarmPhone());
-//
-//                        //执行时间 - 报警时间计算
-//                        date = DateUtil.offsetMinute(date, Optional.ofNullable(hxpAlarmConfig.getTimeInterval()).orElse(1));
-//                        // TODO 短信阶梯通知触发流程控制
-//                        hxpAlarmRecordMapper.insertHxpAlarmRecord(hxpAlarmRecord);
-//                    }
-//                }
-//            } else {
-//                logger.error("通知升级功能异常");
-//            }
-
-//            return true;
         }
     }
 
@@ -934,8 +799,7 @@ public class HxpStockServiceImpl implements IHxpStockService {
      * @Param []
      * @Return void
      **/
-//    @Scheduled(cron = "0 0/1 * * * ? ")
-    @Scheduled(cron = "0 0 0 * * ?")
+//    @Scheduled(cron = "0 0 0 * * ?")
     public void hxpExpired() {
         // 查询配置
         ResultData<WarningConfigDto> byType = remoteLaboratoryService.getByType(2);
@@ -953,135 +817,6 @@ public class HxpStockServiceImpl implements IHxpStockService {
         List<HxpStockVO> expiredStock = hxpStockMapper.selectExpiredStock();
         unexpired(unexpiredStock,warningConfigDto);
         expired(expiredStock,warningConfigDto);
-
-        //化学品已过期 化学品即将过期
-        /*List<HxpStock> hxpStocks = hxpStockMapper.selectHxpStockList(new HxpStock());
-        Optional.ofNullable(hxpStocks).orElseGet(Collections::emptyList).forEach(hxpStock -> {
-            HxpChemicalJoinCabinet hxpChemicalJoinCabinet = hxpChemicalJoinCabinetMapper.selectHxpChemicalJoinCabinetById(hxpStock.getJoinId());
-            //过期时间
-            Date expirationTime = hxpStock.getExpirationTime();
-            //即将过期提醒天数
-            Integer unexpiredWarnDays = warningConfigDto.getUnexpiredWarnDays();
-            DateTime startDateTime = DateUtil.offsetDay(DateTime.now(), unexpiredWarnDays -1);
-            DateTime endDateTime = DateUtil.offsetDay(DateTime.now(), unexpiredWarnDays);
-
-            ResultData resultData = remoteLaboratoryService.getRemindData(hxpStock.getId());
-            if (HttpStatus.SUCCESS != resultData.getCode()) {
-                logger.error("获取提醒日志数据失败!");
-            }
-            List<WarningNoticeLogDto> warningNoticeLogDtos = JSON.parseArray(JSON.toJSONString(resultData.getData()), WarningNoticeLogDto.class);
-            //过期提醒数据
-            List<WarningNoticeLogDto> logDtoList = Optional.ofNullable(warningNoticeLogDtos).orElseGet(Collections::emptyList).stream().filter(i -> i.getWarningType() == 2 && i.getWarningSubType() == 4).collect(Collectors.toList());
-
-            //过期时间在提醒天数内 并且在一天之内
-            WarningNoticeLogDto warningNoticeLogDto = new WarningNoticeLogDto();
-            warningNoticeLogDto.setKeyId(hxpStock.getId());
-            warningNoticeLogDto.setName(hxpStock.getChemicalName());
-            warningNoticeLogDto.setWarningType(2);
-            warningNoticeLogDto.setWarningSubType(1);
-            warningNoticeLogDto.setWarningTime(LocalDateTime.now());
-            warningNoticeLogDto.setExpirationTime(LocalDateTimeUtil.of(hxpStock.getExpirationTime()));
-            warningNoticeLogDto.setWarningWay(warningConfigDto.getTimeout());
-            warningNoticeLogDto.setMargin(hxpStock.getOutUsages());
-            warningNoticeLogDto.setDeposit(hxpStock.getCabinetName());
-            warningNoticeLogDto.setSpecification(hxpChemicalJoinCabinet.getChemicalAmount() + hxpChemicalJoinCabinet.getChemicalAmountUnit());
-
-            //查询到实验室负责人id 安全责任人id
-            ResultData<List<CheckSubjectDto>> subjectInfoList = remoteLaboratoryService.findSubjectInfoList(String.valueOf(hxpStock.getSubId()));
-            StringBuffer userIdStr = new StringBuffer();
-            StringBuffer phones = new StringBuffer();
-            if (HttpStatus.SUCCESS == subjectInfoList.getCode()) {
-                List<CheckSubjectDto> data = subjectInfoList.getData();
-                CheckSubjectDto i = data.get(0);
-                warningNoticeLogDto.setSubId(i.getSubId());
-                warningNoticeLogDto.setSubName(i.getSubjectName());
-                warningNoticeLogDto.setBuildName(i.getBuildName());
-                warningNoticeLogDto.setFloorId(i.getFloorId());
-                warningNoticeLogDto.setFloorName(i.getFloorName());
-                warningNoticeLogDto.setRoomNum(i.getRoomNumber());
-                userIdStr.append(i.getSafeUserId()).append(",").append(i.getAdminId());
-                phones.append(i.getAdminPhone()).append(",").append(i.getSafeUserPhone());
-            }
-            //即将过期
-            if (startDateTime.getTime() < expirationTime.getTime() && endDateTime.getTime() > expirationTime.getTime()) {
-                warningNoticeLogDto.setWarningContent("化学品即将过期");
-                warningNoticeLogDto.setWarningSubType(3);
-                String unexpired = warningConfigDto.getUnexpired();
-                warningNoticeLogDto.setWarningWay(unexpired);
-                ResultData result = remoteLaboratoryService.addWarningNoticeLog(warningNoticeLogDto);
-                if (HttpStatus.SUCCESS == result.getCode()) {
-                    logger.info("即将过期保存日志成功!");
-                }
-                ResultData urlScheme = remoteMessageService.getUrlScheme(Long.valueOf(String.valueOf(result.getData())));
-                if(urlScheme.getCode() != HttpStatus.SUCCESS){
-                    logger.error("获取urlScheme失败!");
-                }
-                String systemText = "【实验室安全系统】"+warningNoticeLogDto.getSubName()+"-"+warningNoticeLogDto.getName()+"即将过期,发生时间:" + LocalDateTime.now() + ",请尽快确认。";
-                String text = "【实验室安全系统】"+warningNoticeLogDto.getSubName()+"-"+warningNoticeLogDto.getName()+"即将过期,发生时间:" + LocalDateTime.now() + ",请尽快确认。点击查看:https://lab.zjznai.com/labAppTest/earlyWarning/index.html?id="+result.getData()+"&urlScheme="+urlScheme.getData();
-                if (unexpired.contains("1")) {
-                    //系统通知
-                    LabMessageContent labMessageContent = new LabMessageContent();
-                    labMessageContent.setSendMode(2);
-                    labMessageContent.setSendRange(3);
-                    labMessageContent.setMessClass(1);
-                    labMessageContent.setMessType(13);
-                    labMessageContent.setSubIds(String.valueOf(hxpStock.getSubId()));
-                    labMessageContent.setUserIds(userIdStr.toString());
-                    labMessageContent.setContent(systemText);
-                    remoteMessageContentService.sendMessage(labMessageContent);
-
-                }
-                if (unexpired.contains("2")) {
-                    //短信通知
-                    String[] strings = Stream.of(phones.toString().split(",")).filter(a -> StrUtil.isNotBlank(a)).collect(Collectors.joining(",")).split(",");
-                    if (strings != null) {
-                        AlarmEntrty alarmEntrty = new AlarmEntrty(Routes.NoticePush, strings, SendTypes.SMS.toString(), text);
-                        remoteAlarmService.send(alarmEntrty);
-                        logger.info("化学品即将过期发送短信打电话消息推送完成!");
-                        logger.info("化学品即将过期发送短信内容:{}",text);
-                    }
-                }
-            }
-            //已过期
-            if (DateUtils.getNowDate().getTime() >= expirationTime.getTime() && logDtoList.size() <= warningConfigDto.getExpiredWarnCount()) {
-                warningNoticeLogDto.setWarningContent("化学品已过期");
-                warningNoticeLogDto.setWarningSubType(4);
-                String expired = warningConfigDto.getExpired();
-                warningNoticeLogDto.setWarningWay(expired);
-                ResultData result = remoteLaboratoryService.addWarningNoticeLog(warningNoticeLogDto);
-                if (HttpStatus.SUCCESS == result.getCode()) {
-                    logger.info("已过期保存日志成功!");
-                }
-                ResultData urlScheme = remoteMessageService.getUrlScheme(Long.valueOf(String.valueOf(result.getData())));
-                if(urlScheme.getCode() != HttpStatus.SUCCESS){
-                    logger.error("获取urlScheme失败!");
-                }
-                String systemText2 =  "【实验室安全系统】"+warningNoticeLogDto.getSubName()+"-"+warningNoticeLogDto.getName()+"已过期,请尽快确认。";
-                String text2 =  "【实验室安全系统】"+warningNoticeLogDto.getSubName()+"-"+warningNoticeLogDto.getName()+"已过期,请尽快确认。点击查看:https://lab.zjznai.com/labAppTest/earlyWarning/index.html?id="+result.getData()+"&urlScheme="+urlScheme.getData();
-                if (expired.contains("1")) {
-                    //系统通知
-                    LabMessageContent labMessageContent = new LabMessageContent();
-                    labMessageContent.setSendMode(2);
-                    labMessageContent.setSendRange(3);
-                    labMessageContent.setMessClass(1);
-                    labMessageContent.setMessType(13);
-                    labMessageContent.setSubIds(String.valueOf(hxpStock.getSubId()));
-                    labMessageContent.setUserIds(userIdStr.toString());
-                    labMessageContent.setContent(systemText2);
-                    remoteMessageContentService.sendMessage(labMessageContent);
-                }
-                if (expired.contains("2")) {
-                    //短信通知
-                    String[] strings = Stream.of(phones.toString().split(",")).filter(a -> StrUtil.isNotBlank(a)).collect(Collectors.joining(",")).split(",");
-                    if (strings != null) {
-                        AlarmEntrty alarmEntrty = new AlarmEntrty(Routes.NoticePush, strings, SendTypes.SMS.toString(), text2);
-                        remoteAlarmService.send(alarmEntrty);
-                        logger.info("化学品已过期发送短信打电话消息推送完成!");
-                        logger.info("化学品已过期发送短信内容:{}",text2);
-                    }
-                }
-            }
-        });*/
     }
 
     private void unexpired(List<HxpStockVO> unexpiredStock, WarningConfigDto warningConfigDto) {
@@ -1234,8 +969,7 @@ public class HxpStockServiceImpl implements IHxpStockService {
      * @Param []
      * @Return void
      **/
-//    @Scheduled(cron = "0 0/1 * * * ? ")
-    @Scheduled(cron = "0 0 0 * * ?")
+//    @Scheduled(cron = "0 0 0 * * ?")
     public void hxpTimeOut() {
         // 查询配置
         ResultData<WarningConfigDto> byType = remoteLaboratoryService.getByType(2);