|
|
@@ -1076,11 +1076,29 @@ public class TodoCenterManage { |
|
|
|
//再修改应用信息 |
|
|
|
Boolean isApp = Objects.nonNull(projectDto.getIncludeApplication()) && 1 == projectDto.getIncludeApplication() |
|
|
|
? Boolean.TRUE : Boolean.FALSE; |
|
|
|
//批量删除 |
|
|
|
projectApplicationService.remove(Wrappers.lambdaQuery(ProjectApplication.class) |
|
|
|
.eq(ProjectApplication::getProjectId,project.getId())); |
|
|
|
projectApplicationService.remove(Wrappers.lambdaQuery(ProjectApplication.class) |
|
|
|
.eq(ProjectApplication::getProjectCode,project.getProjectCode())); |
|
|
|
Long projectDtoId = projectDto.getId(); |
|
|
|
Project projectInfo = projectService.getById(projectDtoId); |
|
|
|
String instCode = projectInfo.getInstCode(); |
|
|
|
ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class).eq(ProjectInst::getInstCode, instCode)); |
|
|
|
Integer instType = projectInst.getInstType(); |
|
|
|
if (InstTypeEnum.UNIT_INNER_AUDIT.getCode().equals(instType) || |
|
|
|
InstTypeEnum.PRELIMINARY_PREVIEW.getCode().equals(instType) || |
|
|
|
InstTypeEnum.DEPT_UNITED_REVIEW.getCode().equals(instType)) { |
|
|
|
//批量删除 |
|
|
|
projectApplicationService.remove(Wrappers.lambdaQuery(ProjectApplication.class) |
|
|
|
.eq(ProjectApplication::getProjectId, project.getId())); |
|
|
|
projectApplicationService.remove(Wrappers.lambdaQuery(ProjectApplication.class) |
|
|
|
.eq(ProjectApplication::getProjectCode, project.getProjectCode())); |
|
|
|
}else { |
|
|
|
//采取批量删除 批量添加的方式 批量删除建设方案申报后的应用信息 |
|
|
|
List<Long> projectIdList = projectService.list(Wrappers.lambdaQuery(Project.class) |
|
|
|
.eq(Project::getProjectCode, projectInfo.getProjectCode()) |
|
|
|
.eq(Project::getIsConstruct, Boolean.TRUE)).stream() |
|
|
|
.map(Project::getId).collect(Collectors.toList()); |
|
|
|
projectApplicationService.remove(Wrappers.lambdaQuery(ProjectApplication.class) |
|
|
|
.eq(ProjectApplication::getProjectCode,projectInfo.getProjectCode()) |
|
|
|
.in(ProjectApplication::getProjectId,projectIdList)); |
|
|
|
} |
|
|
|
if(isApp && CollUtil.isNotEmpty(projectDto.getApplicationList())){ |
|
|
|
//批量添加 |
|
|
|
List<ProjectApplication> applications = projectDto.getApplicationList().stream().map(application -> { |
|
|
|