|
@@ -54,7 +54,6 @@ import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
-import org.springframework.scheduling.annotation.Scheduled;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
@@ -76,16 +75,6 @@ import java.util.stream.Stream;
|
|
|
@Service
|
|
@Service
|
|
|
public class HxpStockServiceImpl implements IHxpStockService {
|
|
public class HxpStockServiceImpl implements IHxpStockService {
|
|
|
private static Logger logger = LoggerFactory.getLogger(HxpStockServiceImpl.class);
|
|
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;
|
|
public static Integer phoneMode = 0;
|
|
|
|
|
|
|
|
@Value("${phoneMode:0}")
|
|
@Value("${phoneMode:0}")
|
|
@@ -505,130 +494,6 @@ public class HxpStockServiceImpl implements IHxpStockService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
return true;
|
|
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 []
|
|
* @Param []
|
|
|
* @Return void
|
|
* @Return void
|
|
|
**/
|
|
**/
|
|
|
-// @Scheduled(cron = "0 0/1 * * * ? ")
|
|
|
|
|
- @Scheduled(cron = "0 0 0 * * ?")
|
|
|
|
|
|
|
+// @Scheduled(cron = "0 0 0 * * ?")
|
|
|
public void hxpExpired() {
|
|
public void hxpExpired() {
|
|
|
// 查询配置
|
|
// 查询配置
|
|
|
ResultData<WarningConfigDto> byType = remoteLaboratoryService.getByType(2);
|
|
ResultData<WarningConfigDto> byType = remoteLaboratoryService.getByType(2);
|
|
@@ -953,135 +817,6 @@ public class HxpStockServiceImpl implements IHxpStockService {
|
|
|
List<HxpStockVO> expiredStock = hxpStockMapper.selectExpiredStock();
|
|
List<HxpStockVO> expiredStock = hxpStockMapper.selectExpiredStock();
|
|
|
unexpired(unexpiredStock,warningConfigDto);
|
|
unexpired(unexpiredStock,warningConfigDto);
|
|
|
expired(expiredStock,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) {
|
|
private void unexpired(List<HxpStockVO> unexpiredStock, WarningConfigDto warningConfigDto) {
|
|
@@ -1234,8 +969,7 @@ public class HxpStockServiceImpl implements IHxpStockService {
|
|
|
* @Param []
|
|
* @Param []
|
|
|
* @Return void
|
|
* @Return void
|
|
|
**/
|
|
**/
|
|
|
-// @Scheduled(cron = "0 0/1 * * * ? ")
|
|
|
|
|
- @Scheduled(cron = "0 0 0 * * ?")
|
|
|
|
|
|
|
+// @Scheduled(cron = "0 0 0 * * ?")
|
|
|
public void hxpTimeOut() {
|
|
public void hxpTimeOut() {
|
|
|
// 查询配置
|
|
// 查询配置
|
|
|
ResultData<WarningConfigDto> byType = remoteLaboratoryService.getByType(2);
|
|
ResultData<WarningConfigDto> byType = remoteLaboratoryService.getByType(2);
|