Browse Source

修改立项备案提醒

tags/24080901
WendyYang 7 months ago
parent
commit
aafcba1db7
2 changed files with 22 additions and 17 deletions
  1. +1
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/common/helper/impl/UserInfoHelperImpl.java
  2. +21
    -17
      hz-pm-api/src/main/java/com/hz/pm/api/scheduler/task/DeclaredRecordReminderTask.java

+ 1
- 0
hz-pm-api/src/main/java/com/hz/pm/api/common/helper/impl/UserInfoHelperImpl.java View File

@@ -117,6 +117,7 @@ public class UserInfoHelperImpl implements UserInfoHelper {
userFullInfo.setUsername(userInfo.getRealName());
userFullInfo.setMobile(userInfo.getMobile());
userFullInfo.setAccountId(userInfo.getAccountId());
userFullInfo.setMhUserId(userInfo.getMhUserId());
String available = userInfo.getAvailable();
if (StrUtils.isNotBlank(available)) {
userFullInfo.setAvailable(UserAvailableEnum.valueOf(available));


+ 21
- 17
hz-pm-api/src/main/java/com/hz/pm/api/scheduler/task/DeclaredRecordReminderTask.java View File

@@ -78,7 +78,7 @@ public class DeclaredRecordReminderTask extends ReminderTask {
private void declaredRecordReminder() {
Wrapper<Project> query = Wrappers.lambdaQuery(Project.class)
.eq(Project::getNewest, Boolean.TRUE)
.eq(Project::getStatus, ProjectStatusEnum.DECLARED_APPROVED_TO_BE_RECORD);
.eq(Project::getStatus, ProjectStatusEnum.DECLARED_APPROVED_TO_BE_RECORD.getCode());
List<Project> projects = projectService.list(query);
if (projects.isEmpty()) {
return;
@@ -115,22 +115,26 @@ public class DeclaredRecordReminderTask extends ReminderTask {
}
String content = String.format(MSG_FMT, project.getProjectName());
for (UserFullInfoDTO user : currUnitUsers) {
if (todoRecordMap.containsKey(project.getProjectCode())) {
MhZwddWorkNoticeDTO notice = MhZwddWorkNoticeDTO.builder()
.title(DECLARED_RECORD_APPLY.getVal())
.content(content)
.targetUser(user.getMhUserId())
.build();
mhApiClient.sendZwddWorkNotice(notice);
} else {
MhTodoExtraParamDTO paramObj = MhTodoExtraParamDTO.builder()
.projectId(project.getId())
.projectCode(projectCode)
.path("/declareManage/projectFiling")
.userId(user.getUserId())
.userName(user.getRealName())
.build();
mhTodoClient.addTodo(paramObj, user, DECLARED_RECORD_APPLY, projectCode, content);
try {
if (todoRecordMap.containsKey(project.getProjectCode())) {
MhZwddWorkNoticeDTO notice = MhZwddWorkNoticeDTO.builder()
.title(DECLARED_RECORD_APPLY.getVal())
.content(content)
.targetUser(user.getMhUserId())
.build();
mhApiClient.sendZwddWorkNotice(notice);
} else {
MhTodoExtraParamDTO paramObj = MhTodoExtraParamDTO.builder()
.projectId(project.getId())
.projectCode(projectCode)
.path("/declareManage/projectFiling")
.userId(user.getUserId())
.userName(user.getRealName())
.build();
mhTodoClient.addTodo(paramObj, user, DECLARED_RECORD_APPLY, projectCode, content);
}
} catch (Exception e) {
log.error("立项备案提醒发送失败:{}", project.getProjectCode(), e);
}
}
} catch (Exception e) {


Loading…
Cancel
Save