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) +"过期,请确认。");