소스 검색

Merge branch 'master' of http://git.ningdatech.com/liushuai/project-management into dev

tags/24080901
PoffyZhang 1 년 전
부모
커밋
20c9938d53
2개의 변경된 파일13개의 추가작업 그리고 22개의 파일을 삭제
  1. +12
    -7
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java
  2. +1
    -15
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java

+ 12
- 7
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java 파일 보기

@@ -255,7 +255,9 @@ public class ProjectLibManage {
project.setSponsor(employeeCode);
String projectCode = generateProjectCodeUtil.generateProjectCode(projectDto);
project.setProjectCode(projectCode);
projectService.save(project);
if(projectService.save(project)){
saveApplication(projectDto,project,null);
}
} else {
//否则是重新提交的 新生成一个新版本的项目
project = newProjectWithVersion(projectDto);
@@ -309,13 +311,16 @@ public class ProjectLibManage {
} else {
project.setPrePlanProjectId(oldProject.getId());
}
projectService.save(project);
if(projectService.save(project)){
saveApplication(projectDto,project,null);

// 将旧的项目版本置为不是最新
projectService.update(Wrappers.lambdaUpdate(Project.class)
.set(Project::getNewest, Boolean.FALSE)
.ne(Project::getId, project.getId())
.eq(Project::getProjectCode, project.getProjectCode()));
}

// 将旧的项目版本置为不是最新
projectService.update(Wrappers.lambdaUpdate(Project.class)
.set(Project::getNewest, Boolean.FALSE)
.ne(Project::getId, project.getId())
.eq(Project::getProjectCode, project.getProjectCode()));
} else {
//否则是被驳回,重新提交的 新生成一个新版本的项目
project = newProjectWithVersion(projectDto);


+ 1
- 15
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java 파일 보기

@@ -1136,9 +1136,6 @@ public class TodoCenterManage {
.eq(ProjectApplication::getIsConstruct, Boolean.TRUE));
if (CollUtil.isNotEmpty(applicationList)) {
projectApplicationService.removeBatchByIds(applicationList);
List<Long> applicationIds = applicationList.stream().map(ProjectApplication::getId).collect(Collectors.toList());
// projectCoreBusinessIndicatorsService.remove(Wrappers.lambdaQuery(ProjectCoreBusinessIndicators.class)
// .in(ProjectCoreBusinessIndicators::getApplicationId, applicationIds));
}

List<ProjectApplicationDTO> applications = projectDto.getApplicationList();
@@ -1157,18 +1154,7 @@ public class TodoCenterManage {
projectApplication.setIsConstruct(Boolean.TRUE);
}
projectApplication.setProjectVersion(project.getVersion());
boolean result = projectApplicationService.save(projectApplication);
// // 保存应用关联的核心业务
// List<ProjectCoreBusinessDTO> coreBusinessList = application.getCoreBusinessList();
// Boolean hasCoreBusiness = CollUtil.isNotEmpty(coreBusinessList) ? Boolean.TRUE : Boolean.FALSE;
// if (Boolean.TRUE.equals(result) && Boolean.TRUE.equals(hasCoreBusiness)){
// for (ProjectCoreBusinessDTO coreBusiness : coreBusinessList) {
// ProjectCoreBusinessIndicators projectCoreBusinessIndicators = new ProjectCoreBusinessIndicators();
// BeanUtils.copyProperties(coreBusiness, projectCoreBusinessIndicators);
// projectCoreBusinessIndicators.setApplicationId(application.getId());
// projectCoreBusinessIndicatorsService.save(projectCoreBusinessIndicators);
// }
// }
projectApplicationService.save(projectApplication);
}
}
return Boolean.TRUE;


불러오는 중...
취소
저장