Browse Source

建设方案退回重新申报修改

tags/24080901
CMM 1 year ago
parent
commit
915e225d6c
2 changed files with 29 additions and 6 deletions
  1. +6
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/HandlerManage.java
  2. +23
    -5
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java

+ 6
- 1
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/HandlerManage.java View File

@@ -354,12 +354,17 @@ public class HandlerManage {
.eq(ProjectInst::getInstCode, instanceId));
Integer instType = projectInst.getInstType();
LambdaUpdateWrapper<Project> updateWrapper = Wrappers.lambdaUpdate();
// 如果是预审审批退回,需要重新盖章,原来盖过章的文件要清空
// 如果是预审审批或建设方案退回,需要重新盖章,原来盖过章的文件要清空
if (InstTypeEnum.PRELIMINARY_PREVIEW.getCode().equals(instType)){
updateWrapper.set(Project::getPretrialFileId,null)
.set(Project::getPretrialFileName,null)
.eq(Project::getId,declaredProject.getId());
projectService.update(updateWrapper);
} else if (InstTypeEnum.CONSTRUCTION_PLAN_REVIEW.getCode().equals(instType)) {
updateWrapper.set(Project::getConstructFileId,null)
.set(Project::getConstructFileName,null)
.eq(Project::getId,declaredProject.getId());
projectService.update(updateWrapper);
}
// 给项目创建人、流程发起人发送浙政钉工作通知:【项目名称】的【流程名称】被退回,请及时处理。
//发送消息


+ 23
- 5
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java View File

@@ -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 -> {


Loading…
Cancel
Save