Browse Source

立项备案提醒修改

tags/24080901
WendyYang 7 months ago
parent
commit
9a5f72748a
2 changed files with 17 additions and 2 deletions
  1. +4
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/external/todo/dto/MhTodoExtraParamDTO.java
  2. +13
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/scheduler/task/DeclaredRecordReminderTask.java

+ 4
- 0
hz-pm-api/src/main/java/com/hz/pm/api/external/todo/dto/MhTodoExtraParamDTO.java View File

@@ -52,4 +52,8 @@ public class MhTodoExtraParamDTO {
*/
private String path;

private Long mhProjectId;

private Integer status;

}

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

@@ -12,6 +12,7 @@ import com.hz.pm.api.external.todo.MHTodoClient;
import com.hz.pm.api.external.todo.dto.MhTodoExtraParamDTO;
import com.hz.pm.api.projectlib.model.entity.Project;
import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum;
import com.hz.pm.api.projectlib.service.IMhProjectService;
import com.hz.pm.api.projectlib.service.IProjectService;
import com.hz.pm.api.sys.entity.MhTodoRecord;
import com.hz.pm.api.sys.service.IMhTodoRecordService;
@@ -28,6 +29,7 @@ import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;

import static com.hz.pm.api.external.todo.enumerization.MHTodoTypeEnum.DECLARED_RECORD_APPLY;
@@ -50,6 +52,7 @@ public class DeclaredRecordReminderTask extends ReminderTask {
private final MHTodoClient mhTodoClient;
private final MhUnitCache mhUnitCache;
private final UserInfoHelper userInfoHelper;
private final IMhProjectService mhProjectService;


public DeclaredRecordReminderTask(Environment environment,
@@ -58,7 +61,8 @@ public class DeclaredRecordReminderTask extends ReminderTask {
MhApiClient mhApiClient,
MHTodoClient mhTodoClient,
MhUnitCache mhUnitCache,
UserInfoHelper userInfoHelper) {
UserInfoHelper userInfoHelper,
IMhProjectService mhProjectService) {
super(environment);
this.projectService = projectService;
this.todoRecordService = todoRecordService;
@@ -66,6 +70,7 @@ public class DeclaredRecordReminderTask extends ReminderTask {
this.mhTodoClient = mhTodoClient;
this.mhUnitCache = mhUnitCache;
this.userInfoHelper = userInfoHelper;
this.mhProjectService = mhProjectService;
}

@Override
@@ -104,6 +109,10 @@ public class DeclaredRecordReminderTask extends ReminderTask {
for (Project project : projects) {
try {
String projectCode = project.getProjectCode();
Optional<Long> mhProjectId = mhProjectService.getIdByProjectCode(projectCode);
if (!mhProjectId.isPresent()) {
continue;
}
String buildOrgCode = project.getBuildOrgCode();
UnitDTO unit = unitMap.get(buildOrgCode);
if (unit == null) {
@@ -127,7 +136,9 @@ public class DeclaredRecordReminderTask extends ReminderTask {
MhTodoExtraParamDTO paramObj = MhTodoExtraParamDTO.builder()
.projectId(project.getId())
.projectCode(projectCode)
.path("/declareManage/projectFiling")
.mhProjectId(mhProjectId.get())
.status(project.getStatus())
.path("/declareManage/projectFilingEdit")
.userId(user.getUserId())
.userName(user.getRealName())
.build();


Loading…
Cancel
Save