|
|
@@ -438,13 +438,8 @@ public class HxpStockServiceImpl implements IHxpStockService {
|
|
|
}
|
|
|
}, 30, TimeUnit.SECONDS);
|
|
|
}
|
|
|
-
|
|
|
//按照配置预警
|
|
|
if (illegalRemoval != null) {
|
|
|
- ResultData urlScheme = remoteMessageService.getUrlScheme(logId);
|
|
|
- if (urlScheme.getCode() != HttpStatus.SUCCESS) {
|
|
|
- logger.error("获取urlScheme失败!");
|
|
|
- }
|
|
|
String text = "【实验室安全系统】" + warningNoticeLogDto.getSubName() + "-实验人员违规携带" + warningNoticeLogDto.getName() + "离开房间,发生时间:" + LocalDateTimeUtil.format(LocalDateTime.now(), "yyyy-MM-dd HH:mm:ss") + ",请尽快确认。";
|
|
|
//系统通知
|
|
|
if (illegalRemoval.contains("1")) {
|
|
|
@@ -457,9 +452,7 @@ public class HxpStockServiceImpl implements IHxpStockService {
|
|
|
labMessageContent.setUserIds(userIdStr.toString());
|
|
|
labMessageContent.setContent(text);
|
|
|
remoteMessageContentService.sendMessage(labMessageContent);
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
//短信通知
|
|
|
if (illegalRemoval.contains("2")) {
|
|
|
String[] strings = Stream.of(phones.toString().split(",")).filter(a -> StrUtil.isNotBlank(a)).collect(Collectors.joining(",")).split(",");
|
|
|
@@ -491,7 +484,6 @@ public class HxpStockServiceImpl implements IHxpStockService {
|
|
|
remoteLaboratoryService.updateWarningNoticeLog(warningNoticeLogDto);
|
|
|
Long id = hardwareByType.getData().getId();
|
|
|
remoteLaboratoryService.controlDevice(id, 1);
|
|
|
-
|
|
|
// 默认一个实验室只触发一个报警器
|
|
|
HxpAlarmRecord hxpAlarmRecord = new HxpAlarmRecord();
|
|
|
hxpAlarmRecord.setAlarmContent(text);
|
|
|
@@ -502,7 +494,6 @@ public class HxpStockServiceImpl implements IHxpStockService {
|
|
|
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();
|
|
|
scheduledExecutorService.schedule(new TimerTask() {
|