Parcourir la source

modify:

1. 项目变更替代系统未删除修改;
tags/24081601
WendyYang il y a 2 mois
Parent
révision
8d2bebab21
2 fichiers modifiés avec 7 ajouts et 7 suppressions
  1. +0
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/EditPurchaseDTO.java
  2. +7
    -6
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/helper/ProjectChangeStopHelper.java

+ 0
- 1
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/EditPurchaseDTO.java Voir le fichier

@@ -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;


+ 7
- 6
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/helper/ProjectChangeStopHelper.java Voir le fichier

@@ -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<FieldDiff> 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<Project> wrapper = buildWrapper(projectDiffs, Project.class);
if (wrapper != null) {


Chargement…
Annuler
Enregistrer