diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/OperationalConstants.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/OperationalConstants.java index 4e6161b..93810fc 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/OperationalConstants.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/OperationalConstants.java @@ -46,8 +46,9 @@ public class OperationalConstants { */ CARRY_REC_MESSAGE(30, "接班巡视时间"), - DELAYED_HAND_REC_MESSAGE(1, "延时交班提醒"); - + DELAYED_HAND_REC_MESSAGE(1, "延时交班提醒"), + //最迟延迟交班提醒 + DELAYED_HAND_REC_MESSAGE_LAST(15, "延时交班提醒"); @Getter private int val; @Getter diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java index a5de84f..fc0c4c3 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java @@ -639,9 +639,11 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl user = userClient.userInfoById(carryManagerId); if (ObjectUtil.isEmpty(one)) {//未发起交班流程 判断是否提醒交班 Long differMinute = DateUtils.getDifferMinute(calculateDate(entity, classEntity, OperationalConstants.DutyRecTypeEnum.HAND_REC.getVal())); - if (differMinute == -OperationalConstants.MessageRecTypeEnum.HAND_REC_MESSAGE.getVal()) { // 提醒交班 + //如果时间差小于15分钟,大于1分钟 + if (differMinute> -OperationalConstants.MessageRecTypeEnum.HAND_REC_MESSAGE.getVal()&& differMinute<-OperationalConstants.MessageRecTypeEnum.DELAYED_HAND_REC_MESSAGE.getVal()) { // 提醒交班 remondingHeadV2(carryMainentity.getDutyDate(),OperationalConstants.RecTypeEnum.HAND_REMIND.getVal(), groupEntityManagerId, userName, entity.getTenantId(), entity.getCreateDept(), entity.getId(), entity.getCreateUser()); - } else if (differMinute == OperationalConstants.MessageRecTypeEnum.DELAYED_HAND_REC_MESSAGE.getVal()) {//延时交班提醒 + //如果延迟的时间差超过1分钟到15分钟 + } else if (differMinute>OperationalConstants.MessageRecTypeEnum.DELAYED_HAND_REC_MESSAGE.getVal()&&differMinute booleanR = messageClient.sendMessage(messagePushRecordDto); - System.out.println(booleanR.toString()); + log.info(booleanR.toString()); } /** @@ -1030,10 +1032,13 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl deptName = sysClient.getDeptName(createDept); - messagePushRecordDto.setDeptName(deptName.getData()); + if(deptName.isSuccess()) { + messagePushRecordDto.setDeptName(deptName.getData()); + } messagePushRecordDto.setCreateDept(createDept); messagePushRecordDto.setCreateUser(createUser); - messageClient.sendMessage(messagePushRecordDto); + R booleanR = messageClient.sendMessage(messagePushRecordDto); + log.info(booleanR.toString()); } /** @@ -1081,11 +1086,13 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl deptName = sysClient.getDeptName(createDept); - messagePushRecordDto.setDeptName(deptName.getData()); + if(deptName.isSuccess()) { + messagePushRecordDto.setDeptName(deptName.getData()); + } messagePushRecordDto.setCreateDept(createDept); messagePushRecordDto.setCreateUser(createUser); R booleanR = messageClient.sendMessage(messagePushRecordDto); - System.out.println(booleanR.toString()); + log.info(booleanR.toString()); } //新增巡检计划 获取巡检任务ID