From 81a1093ee485b1ad7fa75e5ae510ac1d20e0a29c Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Thu, 3 Aug 2023 14:04:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=86=E5=8F=B2=E7=89=88=E6=9C=AC=20?= =?UTF-8?q?=E5=8F=AA=E7=9C=8B=20=E5=BD=93=E5=89=8D=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=92=8C=E9=80=80=E5=9B=9E=20=E9=A9=B3=E5=9B=9E=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/projectlib/manage/ProjectLibManage.java | 20 ++++++++++++++++---- .../pmapi/todocenter/manage/TodoCenterManage.java | 5 ++++- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java index 4f5afa6..cd7651f 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java @@ -385,10 +385,13 @@ public class ProjectLibManage { project.setId(null); project.setCreateOn(LocalDateTime.now()); project.setUpdateOn(LocalDateTime.now()); - project.setIsBackReject(Boolean.TRUE); + project.setIsBackReject(Boolean.FALSE); stateMachineUtils.pass(project); projectService.save(project); + oldProject.setIsBackReject(Boolean.TRUE); + projectService.updateById(oldProject); + projectService.update(Wrappers.lambdaUpdate(Project.class) .set(Project::getNewest, Boolean.FALSE) .ne(Project::getId, project.getId()) @@ -413,7 +416,7 @@ public class ProjectLibManage { project.setCreateOn(LocalDateTime.now()); project.setUpdateOn(LocalDateTime.now()); //都是在驳回 重新提交时用的 - project.setIsBackReject(Boolean.TRUE); + project.setIsBackReject(Boolean.FALSE); if (Objects.nonNull(stageCode)) { project.setStage(stageCode); } @@ -421,6 +424,9 @@ public class ProjectLibManage { project.setStatus(statusCode); } + oldProject.setIsBackReject(Boolean.TRUE); + projectService.updateById(oldProject); + if (projectService.save(project)) { projectService.update(Wrappers.lambdaUpdate(Project.class) .set(Project::getNewest, Boolean.FALSE) @@ -516,10 +522,13 @@ public class ProjectLibManage { project.setCreateOn(LocalDateTime.now()); project.setUpdateOn(LocalDateTime.now()); // 标识保存的项目信息是否为建设方案申报项目 - project.setIsConstruct(Boolean.TRUE); + project.setIsConstruct(Boolean.FALSE); project.setIsBackReject(isBackReject); stateMachineUtils.pass(project); + oldProject.setIsBackReject(Boolean.TRUE); + projectService.updateById(oldProject); + if (projectService.save(project)) { //保存项目和实例的关系 ProjectInst projectInst = new ProjectInst(); @@ -554,9 +563,12 @@ public class ProjectLibManage { project.setCreateOn(LocalDateTime.now()); project.setUpdateOn(LocalDateTime.now()); // 标识保存的项目信息是否为建设方案申报项目 - project.setIsConstruct(Boolean.TRUE); + project.setIsConstruct(Boolean.FALSE); stateMachineUtils.pass(project); + oldProject.setIsBackReject(Boolean.TRUE); + projectService.updateById(oldProject); + if (projectService.save(project)) { //保存项目和实例的关系 ProjectInst projectInst = new ProjectInst(); 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 04d8341..49220b8 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 @@ -1106,9 +1106,12 @@ public class TodoCenterManage { project.setId(null); project.setCreateOn(LocalDateTime.now()); project.setUpdateOn(LocalDateTime.now()); - project.setIsBackReject(Boolean.TRUE); + project.setIsBackReject(Boolean.FALSE); projectService.save(project); + oldProject.setIsBackReject(Boolean.TRUE); + projectService.updateById(oldProject); + ProjectInst oldInst = projectInstService.getOne(Wrappers.lambdaUpdate(ProjectInst.class) .eq(ProjectInst::getProjectId, oldProject.getId()) .eq(ProjectInst::getInstCode, oldProject.getInstCode()));