From b3b32f34fb9c7d447e6654ace66a3e4da263f974 Mon Sep 17 00:00:00 2001 From: tyty Date: Fri, 19 May 2023 17:50:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=80=BC=E7=8F=AD=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E4=B8=AD=E5=BF=83=E6=8F=90=E9=86=92=E7=9A=84=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hzims/operational/OperationalConstants.java | 5 +++-- .../duty/service/impl/ImsDutyRecServiceImpl.java | 21 ++++++++++++++------- 2 files changed, 17 insertions(+), 9 deletions(-) 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