From 4badb161a282468e407d15f15126597af532c7eb Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Thu, 18 Jan 2024 09:27:12 +0800 Subject: [PATCH] =?UTF-8?q?#=20=E6=97=A5=E5=B8=B8=E7=BB=B4=E6=8A=A4?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=B6=88=E6=81=AF=E6=8F=90=E9=86=92=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hnac/hzims/operational/constants/RoleAliasConstants.java | 8 ++++++++ .../maintenance/scheduled/MaintenanceTaskRemindHandler.java | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/constants/RoleAliasConstants.java diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/constants/RoleAliasConstants.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/constants/RoleAliasConstants.java new file mode 100644 index 0000000..33b75f2 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/constants/RoleAliasConstants.java @@ -0,0 +1,8 @@ +package com.hnac.hzims.operational.constants; + +public interface RoleAliasConstants { + + /**项目经理**/ + String PROJECT_MANAGER = "projectManager"; + +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskRemindHandler.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskRemindHandler.java index 917c51c..4ae4917 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskRemindHandler.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskRemindHandler.java @@ -7,6 +7,7 @@ import com.hnac.hzims.message.MessageConstants; import com.hnac.hzims.message.dto.BusinessMessageDTO; import com.hnac.hzims.message.fegin.IMessageClient; import com.hnac.hzims.operational.constants.RedisKeyConstants; +import com.hnac.hzims.operational.constants.RoleAliasConstants; import com.hnac.hzims.operational.maintenance.entity.OperMaintenanceTaskEntity; import com.hnac.hzims.operational.maintenance.service.IOperMaintenanceTaskService; import com.xxl.job.core.biz.model.ReturnT; @@ -90,7 +91,7 @@ public class MaintenanceTaskRemindHandler { XxlJobLogger.log(taskEntity.getId() +"执行人消息推送失败!"); } // 任务执行人发送短信 - R> listR = userClient.userByDeptId(CommonConstant.TENANT_ID, taskEntity.getCreateDept()); + R> listR = userClient.relationUserListByRoleAlias(CommonConstant.TENANT_ID, taskEntity.getCreateDept(), RoleAliasConstants.PROJECT_MANAGER); if(listR.isSuccess()) { request.setUserIds(listR.getData().stream().map(User::getId).map(String::valueOf).collect(Collectors.joining(","))); request.setContent("有一条待执行的日常维护任务【"+taskEntity.getTitle()+"】即将于"+ DateUtil.format(taskEntity.getPlanEndTime(),DateUtil.PATTERN_DATETIME) +"过期,请确认。");