From 8d2bebab21ab76c654564160931eb2d0ac6050d2 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Tue, 13 Aug 2024 10:26:40 +0800 Subject: [PATCH] =?UTF-8?q?modify:=201.=20=E9=A1=B9=E7=9B=AE=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=E6=9B=BF=E4=BB=A3=E7=B3=BB=E7=BB=9F=E6=9C=AA=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E4=BF=AE=E6=94=B9=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pm/api/projectdeclared/model/dto/EditPurchaseDTO.java | 1 - .../pm/api/projectlib/helper/ProjectChangeStopHelper.java | 13 +++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/EditPurchaseDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/EditPurchaseDTO.java index 7a89140..06facbd 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/EditPurchaseDTO.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/EditPurchaseDTO.java @@ -6,7 +6,6 @@ import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Data; -import javax.validation.constraints.NotBlank; import java.math.BigDecimal; import java.time.LocalDate; import java.time.LocalDateTime; diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/helper/ProjectChangeStopHelper.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/helper/ProjectChangeStopHelper.java index 967f030..f00ad5b 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/helper/ProjectChangeStopHelper.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/helper/ProjectChangeStopHelper.java @@ -144,11 +144,12 @@ public class ProjectChangeStopHelper { .eq(ProjectChangeHistory::getProjectCode, projectCode) .orderByDesc(ProjectChangeHistory::getCreateOn) .last(BizConst.LIMIT_1); - ProjectChangeHistory changeHistory = projectChangeHistoryService.getOne(changeHistoryWrapper); - changeHistory.setStatus(buildBizStatus(projEvent).getCode()); - projectChangeHistoryService.updateById(changeHistory); + ProjectChangeHistory history = projectChangeHistoryService.getOne(changeHistoryWrapper); + history.setStatus(buildBizStatus(projEvent).getCode()); + projectChangeHistoryService.updateById(history); if (projEvent.equals(ProjectStateChangeEvent.CHANGE_APPLY_PASS)) { - projectEditRewrite(JSONUtil.toBean(changeHistory.getChangeContent(), EditProjectDetailDTO.class)); + EditProjectDetailDTO editProjectDetail = JSONUtil.toBean(history.getChangeContent(), EditProjectDetailDTO.class); + projectEditRewrite(projectCode, editProjectDetail); } } ProjectStatusChange change = projectStatusChangeService.getLastOne(projBeforeEvent, projectId); @@ -222,7 +223,7 @@ public class ProjectChangeStopHelper { return bizStatus; } - private void projectEditRewrite(EditProjectDetailDTO projectEdit) { + private void projectEditRewrite(String projectCode, EditProjectDetailDTO projectEdit) { List projectDiffs = projectEdit.getProjectDiffs(); if (CollUtil.isNotEmpty(projectDiffs)) { EditProjectDTO projectDetail = projectEdit.getProject(); @@ -230,7 +231,7 @@ public class ProjectChangeStopHelper { w -> w.getFieldName().equals(EditProjectDTO.SYSTEM_REPLACE_INFOS)); if (systemReplaceInfos != null) { projectLibManage.saveGovSystemReplaceInfos(projectDetail.getId(), - projectDetail.getProjectCode(), projectDetail.getSystemReplaceInfos()); + projectCode, projectDetail.getSystemReplaceInfos()); } UpdateWrapper wrapper = buildWrapper(projectDiffs, Project.class); if (wrapper != null) {