Browse Source

值班消息提醒,修改发给站长逻辑,不再是admin

zhongwei
tyty 1 year ago
parent
commit
15a79f8bbb
  1. 26
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java

26
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java

@ -645,8 +645,16 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl<ImsDutyRecMapper, Ims
//如果延迟的时间差超过1分钟到15分钟 //如果延迟的时间差超过1分钟到15分钟
} else if (differMinute>OperationalConstants.MessageRecTypeEnum.DELAYED_HAND_REC_MESSAGE.getVal()&&differMinute<OperationalConstants.MessageRecTypeEnum.DELAYED_HAND_REC_MESSAGE_LAST.getVal()) {//延时交班提醒 } else if (differMinute>OperationalConstants.MessageRecTypeEnum.DELAYED_HAND_REC_MESSAGE.getVal()&&differMinute<OperationalConstants.MessageRecTypeEnum.DELAYED_HAND_REC_MESSAGE_LAST.getVal()) {//延时交班提醒
//提醒站长 接班人 交班人 //提醒站长 接班人 交班人
// User admin = userClient.userByAccount(entity.getTenantId(), "admin").getData(); R<List<User>> stationAgent = userClient.relationUserListByRoleAlias(entity.getTenantId(), entity.getCreateDept(), "stationAgent");
// remondingStationV2(carryMainentity.getDutyDate(),admin, userName, classEntity, carryMainentity.getTenantId(), carryMainentity.getId(), carryMainentity.getCreateDept(), carryMainentity.getCreateUser());//提醒站长 //提醒站长
if (stationAgent.isSuccess()){
List<User> data = stationAgent.getData();
if (CollectionUtil.isNotEmpty(data)){
for (User admin : data) {
remondingStationV2(carryMainentity.getDutyDate(),admin, userName, classEntity, carryMainentity.getTenantId(), carryMainentity.getId(), carryMainentity.getCreateDept(), carryMainentity.getCreateUser());//提醒站长
}
}
}
remondingCarryV2(carryMainentity.getDutyDate(),OperationalConstants.RecTypeEnum.HAND_DELAY.getVal(), carryManagerId, userName, classEntity, null, carryTenantId, carryCreateDept, carryMainentity.getId(), carryMainentity.getCreateUser());//提醒接班人 remondingCarryV2(carryMainentity.getDutyDate(),OperationalConstants.RecTypeEnum.HAND_DELAY.getVal(), carryManagerId, userName, classEntity, null, carryTenantId, carryCreateDept, carryMainentity.getId(), carryMainentity.getCreateUser());//提醒接班人
remondingHeadV2(carryMainentity.getDutyDate(),OperationalConstants.RecTypeEnum.HAND_DELAY.getVal(), groupEntityManagerId, userName, entity.getTenantId(), entity.getCreateDept(), entity.getId(), entity.getCreateUser());//提醒交班人 remondingHeadV2(carryMainentity.getDutyDate(),OperationalConstants.RecTypeEnum.HAND_DELAY.getVal(), groupEntityManagerId, userName, entity.getTenantId(), entity.getCreateDept(), entity.getId(), entity.getCreateUser());//提醒交班人
} }
@ -655,8 +663,16 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl<ImsDutyRecMapper, Ims
Long differMinute = DateUtils.getDifferMinute(calculateDate(carryMainentity, carryClassEntity, OperationalConstants.DutyRecTypeEnum.CARRY_REC.getVal())); Long differMinute = DateUtils.getDifferMinute(calculateDate(carryMainentity, carryClassEntity, OperationalConstants.DutyRecTypeEnum.CARRY_REC.getVal()));
if (differMinute > 0 && one.getDelayStatus() == 0&&differMinute < 15) { if (differMinute > 0 && one.getDelayStatus() == 0&&differMinute < 15) {
//提醒站长 接班人 交班人 //提醒站长 接班人 交班人
// User admin = userClient.userByAccount(entity.getTenantId(), "admin").getData(); R<List<User>> stationAgent = userClient.relationUserListByRoleAlias(entity.getTenantId(), entity.getCreateDept(), "stationAgent");
// remondingStationV2(carryMainentity.getDutyDate(),admin, admin.getName(), classEntity, carryMainentity.getTenantId(), carryMainentity.getId(), carryMainentity.getCreateDept(), carryMainentity.getCreateUser());//提醒站长 //提醒站长
if (stationAgent.isSuccess()){
List<User> data = stationAgent.getData();
if (CollectionUtil.isNotEmpty(data)){
for (User admin : data) {
remondingStationV2(carryMainentity.getDutyDate(),admin, userName, classEntity, carryMainentity.getTenantId(), carryMainentity.getId(), carryMainentity.getCreateDept(), carryMainentity.getCreateUser());
}
}
}
remondingCarryV2(carryMainentity.getDutyDate(),2, carryManagerId, user.getData().getName(), classEntity, null, carryTenantId, carryCreateDept, carryMainentity.getId(), carryMainentity.getCreateUser());//提醒接班人 remondingCarryV2(carryMainentity.getDutyDate(),2, carryManagerId, user.getData().getName(), classEntity, null, carryTenantId, carryCreateDept, carryMainentity.getId(), carryMainentity.getCreateUser());//提醒接班人
} }
} }
@ -975,7 +991,7 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl<ImsDutyRecMapper, Ims
messagePushRecordDto.setTaskId(taskId); messagePushRecordDto.setTaskId(taskId);
messagePushRecordDto.setTenantId(tenantId); messagePushRecordDto.setTenantId(tenantId);
messagePushRecordDto.setPusher(admin.getId().toString()); messagePushRecordDto.setPusher(admin.getId().toString());
messagePushRecordDto.setPusherName(userName); messagePushRecordDto.setPusherName(admin.getName());
messagePushRecordDto.setAccount(admin.getId().toString()); messagePushRecordDto.setAccount(admin.getId().toString());
messagePushRecordDto.setContent(userName + " 负责人"+datyTime+ " 的值班,时间段为:(" + classEntity.getStartTime() messagePushRecordDto.setContent(userName + " 负责人"+datyTime+ " 的值班,时间段为:(" + classEntity.getStartTime()
+ "-" + classEntity.getEndTime() + ") 目前已交班延迟,请尽快联系该负责人进行交班工作"); + "-" + classEntity.getEndTime() + ") 目前已交班延迟,请尽快联系该负责人进行交班工作");

Loading…
Cancel
Save