|
|
@@ -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) { |
|
|
|