瀏覽代碼

debug 重复map问题

tags/24080901
PoffyZhang 1 年之前
父節點
當前提交
0b142ec016
共有 2 個檔案被更改,包括 15 行新增2 行删除
  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 查看文件

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

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

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


+ 11
- 2
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java 查看文件

@@ -653,7 +653,10 @@ public class TodoCenterManage {
List<ProjectInst> projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class)
.in(ProjectInst::getProjectId, projectIdList)
.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());

// 查出用户工作流
@@ -793,7 +796,10 @@ public class TodoCenterManage {
List<ProjectInst> projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class)
.in(ProjectInst::getProjectId, projectIdList)
.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());

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


Loading…
取消
儲存