|
@@ -421,7 +421,7 @@ public class HxpStockServiceImpl implements IHxpStockService {
|
|
|
}
|
|
}
|
|
|
Long logId = (Long)resultData.getData();
|
|
Long logId = (Long)resultData.getData();
|
|
|
if(illegalRemoval != null){
|
|
if(illegalRemoval != null){
|
|
|
- String text = "【实验室安全系统】实验室名称-实验人员违规携带化学品名称离开房间,发生时间:"+LocalDateTimeUtil.format(LocalDateTime.now(),"yyyy-MM-dd HH:mm:ss")+",请尽快确认。点击查看:http://";
|
|
|
|
|
|
|
+ String text = "【实验室安全系统】实验室名称-实验人员违规携带化学品名称离开房间,发生时间:"+LocalDateTimeUtil.format(LocalDateTime.now(),"yyyy-MM-dd HH:mm:ss")+",请尽快确认。点击查看:https://lab.zjznai.com/labAppTest/earlyWarning/index.html?id="+warningNoticeLogDto.getKeyId();
|
|
|
if (illegalRemoval.contains("1")) {
|
|
if (illegalRemoval.contains("1")) {
|
|
|
//系统通知
|
|
//系统通知
|
|
|
LabMessageContent labMessageContent = new LabMessageContent();
|
|
LabMessageContent labMessageContent = new LabMessageContent();
|
|
@@ -954,7 +954,7 @@ public class HxpStockServiceImpl implements IHxpStockService {
|
|
|
}
|
|
}
|
|
|
//即将过期
|
|
//即将过期
|
|
|
if (startDateTime.getTime() < expirationTime.getTime() && endDateTime.getTime() > expirationTime.getTime()) {
|
|
if (startDateTime.getTime() < expirationTime.getTime() && endDateTime.getTime() > expirationTime.getTime()) {
|
|
|
- String text = "【实验室安全系统】实验室名称-化学品名称即将过期,发生时间:" + LocalDateTime.now() + ",请尽快确认。点击查看:http://";
|
|
|
|
|
|
|
+ String text = "【实验室安全系统】实验室名称-化学品名称即将过期,发生时间:" + LocalDateTime.now() + ",请尽快确认。点击查看:https://lab.zjznai.com/labAppTest/earlyWarning/index.html?id="+warningNoticeLogDto.getKeyId();
|
|
|
warningNoticeLogDto.setWarningContent("化学品即将过期");
|
|
warningNoticeLogDto.setWarningContent("化学品即将过期");
|
|
|
warningNoticeLogDto.setWarningSubType(3);
|
|
warningNoticeLogDto.setWarningSubType(3);
|
|
|
String unexpired = warningConfigDto.getUnexpired();
|
|
String unexpired = warningConfigDto.getUnexpired();
|
|
@@ -988,7 +988,7 @@ public class HxpStockServiceImpl implements IHxpStockService {
|
|
|
}
|
|
}
|
|
|
//已过期
|
|
//已过期
|
|
|
if (DateUtils.getNowDate().getTime() >= expirationTime.getTime() && logDtoList.size() <= warningConfigDto.getExpiredWarnCount()) {
|
|
if (DateUtils.getNowDate().getTime() >= expirationTime.getTime() && logDtoList.size() <= warningConfigDto.getExpiredWarnCount()) {
|
|
|
- String text2 = "【实验室安全系统】实验室名称-化学品名称已过期,请尽快确认。点击查看:http://";
|
|
|
|
|
|
|
+ String text2 = "【实验室安全系统】实验室名称-化学品名称已过期,请尽快确认。点击查看:https://lab.zjznai.com/labAppTest/earlyWarning/index.html?id="+warningNoticeLogDto.getKeyId();
|
|
|
warningNoticeLogDto.setWarningContent("化学品已过期");
|
|
warningNoticeLogDto.setWarningContent("化学品已过期");
|
|
|
warningNoticeLogDto.setWarningSubType(4);
|
|
warningNoticeLogDto.setWarningSubType(4);
|
|
|
String expired = warningConfigDto.getExpired();
|
|
String expired = warningConfigDto.getExpired();
|
|
@@ -1054,12 +1054,15 @@ public class HxpStockServiceImpl implements IHxpStockService {
|
|
|
//过期时间在提醒天数内 并且在一天之内
|
|
//过期时间在提醒天数内 并且在一天之内
|
|
|
WarningNoticeLogDto warningNoticeLogDto = new WarningNoticeLogDto();
|
|
WarningNoticeLogDto warningNoticeLogDto = new WarningNoticeLogDto();
|
|
|
warningNoticeLogDto.setKeyId(hxpStock.getId());
|
|
warningNoticeLogDto.setKeyId(hxpStock.getId());
|
|
|
- warningNoticeLogDto.setName(hxpStock.getChemicalShapeName());
|
|
|
|
|
|
|
+ warningNoticeLogDto.setName(hxpStock.getChemicalName());
|
|
|
warningNoticeLogDto.setWarningType(2);
|
|
warningNoticeLogDto.setWarningType(2);
|
|
|
|
|
+ warningNoticeLogDto.setWarningSubType(1);
|
|
|
|
|
+ warningNoticeLogDto.setWarningContent("化学品违规带离");
|
|
|
warningNoticeLogDto.setWarningTime(LocalDateTime.now());
|
|
warningNoticeLogDto.setWarningTime(LocalDateTime.now());
|
|
|
- //TODO 余量
|
|
|
|
|
- warningNoticeLogDto.setMargin(BigDecimal.ZERO);
|
|
|
|
|
- warningNoticeLogDto.setSpecification(String.valueOf(hxpStock.getChemicalAmount()));
|
|
|
|
|
|
|
+ warningNoticeLogDto.setWarningWay(warningConfigDto.getTimeout());
|
|
|
|
|
+ warningNoticeLogDto.setMargin(hxpStock.getOutUsages());
|
|
|
|
|
+ warningNoticeLogDto.setDeposit(hxpStock.getCabinetName());
|
|
|
|
|
+ warningNoticeLogDto.setSpecification(hxpChemicalJoinCabinet.getChemicalAmount() + hxpChemicalJoinCabinet.getChemicalAmountUnit());
|
|
|
|
|
|
|
|
//查询到实验室负责人id 安全责任人id
|
|
//查询到实验室负责人id 安全责任人id
|
|
|
ResultData<List<CheckSubjectDto>> subjectInfoList = remoteLaboratoryService.findSubjectInfoList(String.valueOf(hxpStock.getSubId()));
|
|
ResultData<List<CheckSubjectDto>> subjectInfoList = remoteLaboratoryService.findSubjectInfoList(String.valueOf(hxpStock.getSubId()));
|
|
@@ -1079,7 +1082,7 @@ public class HxpStockServiceImpl implements IHxpStockService {
|
|
|
if(DateUtils.getNowDate().getTime() > dateTime.getTime()){
|
|
if(DateUtils.getNowDate().getTime() > dateTime.getTime()){
|
|
|
hxpIds.add(hxpUserecord.getId());
|
|
hxpIds.add(hxpUserecord.getId());
|
|
|
//过了最大领用时间
|
|
//过了最大领用时间
|
|
|
- String text = "【实验室安全系统】实验室名称-人名领用化学品名称超时未归还,领用时间:"+LocalDateTime.now().toString() +",请尽快确认。点击查看:http://";
|
|
|
|
|
|
|
+ String text = "【实验室安全系统】实验室名称-人名领用化学品名称超时未归还,领用时间:"+LocalDateTime.now().toString() +",请尽快确认。点击查看:https://lab.zjznai.com/labAppTest/earlyWarning/index.html?id="+warningNoticeLogDto.getKeyId();
|
|
|
warningNoticeLogDto.setWarningContent("化学品超时未归还");
|
|
warningNoticeLogDto.setWarningContent("化学品超时未归还");
|
|
|
warningNoticeLogDto.setWarningSubType(2);
|
|
warningNoticeLogDto.setWarningSubType(2);
|
|
|
String timeout = warningConfigDto.getTimeout();
|
|
String timeout = warningConfigDto.getTimeout();
|