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