Browse Source

debug 重复map问题

tags/24080901
PoffyZhang 1 year ago
parent
commit
0b142ec016
2 changed files with 15 additions and 2 deletions
  1. +4
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java
  2. +11
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java

+ 4
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java View File

@@ -1125,6 +1125,10 @@ public class ProjectLibManage {
projectApplication.setProjectVersion(version); projectApplication.setProjectVersion(version);
projectApplication.setIsConstruct(isConstruct); projectApplication.setIsConstruct(isConstruct);


if(StringUtils.isNotBlank(application.getRelatedExistsApplication())){
projectApplication.setApplicationName(null);
}

boolean result = projectApplicationService.save(projectApplication); boolean result = projectApplicationService.save(projectApplication);
// 保存应用关联的核心业务 // 保存应用关联的核心业务
List<ProjectCoreBusinessDTO> coreBusinessList = application.getCoreBusinessList(); List<ProjectCoreBusinessDTO> coreBusinessList = application.getCoreBusinessList();


+ 11
- 2
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java View File

@@ -653,7 +653,10 @@ public class TodoCenterManage {
List<ProjectInst> projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class) List<ProjectInst> projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class)
.in(ProjectInst::getProjectId, projectIdList) .in(ProjectInst::getProjectId, projectIdList)
.orderByDesc(ProjectInst::getProjectId)); .orderByDesc(ProjectInst::getProjectId));
Map<String, Project> projectInfoMap = projectInstList.stream().collect(Collectors.toMap(ProjectInst::getInstCode, p -> projectsMap.get(p.getProjectId())));
Map<String, Project> projectInfoMap = projectInstList.stream()
.filter(p -> Objects.nonNull(p.getInstCode()) &&
!TodoCenterConstant.Declared.NULL_INST_CODE.equals(p.getInstCode()))
.collect(Collectors.toMap(ProjectInst::getInstCode, p -> projectsMap.get(p.getProjectId())));
List<String> instCodes = projectInstList.stream().map(ProjectInst::getInstCode).collect(Collectors.toList()); List<String> instCodes = projectInstList.stream().map(ProjectInst::getInstCode).collect(Collectors.toList());


// 查出用户工作流 // 查出用户工作流
@@ -793,7 +796,10 @@ public class TodoCenterManage {
List<ProjectInst> projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class) List<ProjectInst> projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class)
.in(ProjectInst::getProjectId, projectIdList) .in(ProjectInst::getProjectId, projectIdList)
.orderByDesc(ProjectInst::getProjectId)); .orderByDesc(ProjectInst::getProjectId));
Map<String, Project> projectInfoMap = projectInstList.stream().collect(Collectors.toMap(ProjectInst::getInstCode, p -> projectsMap.get(p.getProjectId())));
Map<String, Project> projectInfoMap = projectInstList.stream()
.filter(p -> Objects.nonNull(p.getInstCode()) &&
!TodoCenterConstant.Declared.NULL_INST_CODE.equals(p.getInstCode()))
.collect(Collectors.toMap(ProjectInst::getInstCode, p -> projectsMap.get(p.getProjectId())));
List<String> instCodes = projectInstList.stream().map(ProjectInst::getInstCode).collect(Collectors.toList()); List<String> instCodes = projectInstList.stream().map(ProjectInst::getInstCode).collect(Collectors.toList());


// 查出用户工作流 // 查出用户工作流
@@ -1153,6 +1159,9 @@ public class TodoCenterManage {
!InstTypeEnum.DEPT_UNITED_REVIEW.getCode().equals(instType)) { !InstTypeEnum.DEPT_UNITED_REVIEW.getCode().equals(instType)) {
projectApplication.setIsConstruct(Boolean.TRUE); projectApplication.setIsConstruct(Boolean.TRUE);
} }
if(StringUtils.isNotBlank(application.getRelatedExistsApplication())){
projectApplication.setApplicationName(null);
}
projectApplication.setProjectVersion(project.getVersion()); projectApplication.setProjectVersion(project.getVersion());
projectApplicationService.save(projectApplication); projectApplicationService.save(projectApplication);
} }


Loading…
Cancel
Save