From 915e225d6c3d145cf75f2968687dc05c8835cda4 Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Wed, 19 Jul 2023 22:58:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BB=BA=E8=AE=BE=E6=96=B9=E6=A1=88=E9=80=80?= =?UTF-8?q?=E5=9B=9E=E9=87=8D=E6=96=B0=E7=94=B3=E6=8A=A5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/todocenter/manage/HandlerManage.java | 7 +++++- .../pmapi/todocenter/manage/TodoCenterManage.java | 28 ++++++++++++++++++---- 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/HandlerManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/HandlerManage.java index 18d8918..ed2e75f 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/HandlerManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/HandlerManage.java @@ -354,12 +354,17 @@ public class HandlerManage { .eq(ProjectInst::getInstCode, instanceId)); Integer instType = projectInst.getInstType(); LambdaUpdateWrapper 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); } // 给项目创建人、流程发起人发送浙政钉工作通知:【项目名称】的【流程名称】被退回,请及时处理。 //发送消息 diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java index 430a77a..f102842 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java @@ -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 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 applications = projectDto.getApplicationList().stream().map(application -> {