From 7251ab068fe57c5bc6c89b2eb206f0ec502ade62 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 8 Mar 2023 11:42:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8D=89=E7=A8=BF=E6=8F=90=E4=BA=A4=E7=9A=84?= =?UTF-8?q?=20=E5=88=A0=E9=99=A4=E8=8D=89=E7=A8=BF=E7=AE=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/projectdeclared/manage/DeclaredProjectManage.java | 8 ++++++-- .../com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java index 3fec8c1..47b456a 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java @@ -149,7 +149,10 @@ public class DeclaredProjectManage { log.info("申报项目成功 【{}】", instanceId); //如果是重新提交的话 判断下 项目是否存在 - saveOrUpdateProject(projectInfo, instanceId,userId); + if(saveOrUpdateProject(projectInfo, instanceId,userId) && Objects.nonNull(projectInfo.getDraftId())){ + //如果是草稿箱提交 删除对应的草稿箱 + projectDraftService.removeById(projectInfo.getDraftId()); + } return instanceId; } @@ -221,7 +224,7 @@ public class DeclaredProjectManage { * @param projectDto * @param instanceId */ - private void saveOrUpdateProject(ProjectDTO projectDto, String instanceId, + private Boolean saveOrUpdateProject(ProjectDTO projectDto, String instanceId, Long userId) { //流程启动之后 入库项目 重要业务信息 用于列表查询 展示 try { @@ -260,6 +263,7 @@ public class DeclaredProjectManage { log.error("项目信息入库错误 ", e); throw new BusinessException("项目信息入库错误 :" + e.getMessage()); } + return Boolean.TRUE; } public PageVo pageDraft(DeclaredProjectListParamDTO params) { diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java index 8327f3d..d8efc71 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java @@ -28,6 +28,9 @@ public class ProjectDTO implements Serializable { @ApiModelProperty("主键") private Long id; + @ApiModelProperty("如果是通过草稿箱提交的 要传下草稿id") + private Long draftId; + @ApiModelProperty("所属地区编号") private String areaCode;