| | |
| | | |
| | | private static final DateTimeFormatter warnLogFormatter = DateTimeFormatter.ofPattern("yyyy年MM月dd日 HH:mm:ss"); |
| | | |
| | | private static final String[] DEVICE_EXC_RECEIVER = {"17625323889","18019908965"}; |
| | | private static final String[] DEVICE_EXC_RECEIVER = {"17625323889","18019908965","18899396560"}; |
| | | |
| | | @PostConstruct |
| | | public void init() { |
| | |
| | | descs.add(GasFluxStateEnum.INVERSION_FAILED_10_MINUTES_NO_DATA.getDesc()); |
| | | } |
| | | String message = JSON.toJSONString(reqDTO); |
| | | //todo 暂时改为实时推送给前端 |
| | | //暂时改为实时推送给前端 |
| | | try { |
| | | GasDeviceExcWebsocketServer.sendInfo(message,null); |
| | | } catch (IOException e) { |
| | |
| | | if (lastLog == null || now.compareTo(lastLog.getTime().plusHours(1)) >= 0) { |
| | | Map<String, String> mesMap = new HashMap<>(); |
| | | mesMap.put("message","数据异常,无法进行监测"); |
| | | mesMap.put(" level","设备离线"); |
| | | //// TODO: 2024/2/22 |
| | | mesMap.put(" level","设备离线"); // todo |
| | | List<String> deviceExcReceiver = Arrays.asList(DEVICE_EXC_RECEIVER); |
| | | if (!CollectionUtils.isEmpty(deviceExcReceiver)) { |
| | | List<String> distinctPhone = deviceExcReceiver.stream().distinct().collect(Collectors.toList()); |
| | |
| | | Map<String, String> mesMap = new HashMap<>(); |
| | | mesMap.put("message",warnTime+" "+gasCategory.getName()); |
| | | mesMap.put(" level",warnThresholdName); |
| | | //todo |
| | | if (!CollectionUtils.isEmpty(phone)) { |
| | | List<String> distinctPhone = phone.stream().distinct().collect(Collectors.toList()); |
| | | logger.info("【气体浓度异常短信发送】-----发送内容:" + content + " 发送时间: " + now + " 接收人手机号:" + distinctPhone); |