Browse Source

modify:

1. 项目变更修改;
tags/24080901
WendyYang 3 months ago
parent
commit
1d5c8b28be
11 changed files with 454 additions and 121 deletions
  1. +7
    -20
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/EditContractDTO.java
  2. +2
    -23
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/EditOperationDTO.java
  3. +393
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/EditProjectDTO.java
  4. +4
    -8
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/EditProjectDetailDTO.java
  5. +7
    -29
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/EditPurchaseDTO.java
  6. +6
    -4
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/EditPurchaseDetailDTO.java
  7. +13
    -13
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/helper/ProjectChangeStopHelper.java
  8. +17
    -17
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectChangeManage.java
  9. +0
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/ProjectDTO.java
  10. +3
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/req/SubmitProjectChangeApplyReq.java
  11. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/ProjectChangeDetailVO.java

hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/ContractDTO.java → hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/EditContractDTO.java View File

@@ -9,24 +9,20 @@ import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;


/** /**
* @Classname Contract
* @Description
* @Date 2023/5/30 15:35
* @Author PoffyZhang
* <p>
* 合同信息编辑
* </p>
*
* @author WendyYang
* @since 14:14 2024/8/8
*/ */
@Data @Data
@ApiModel(value = "ContractVO") @ApiModel(value = "ContractVO")
public class ContractDTO {
public class EditContractDTO {


@ApiModelProperty("主键") @ApiModelProperty("主键")
private Long id; private Long id;


@ApiModelProperty("创建时间")
private LocalDateTime createOn;

@ApiModelProperty("修改时间")
private LocalDateTime updateOn;

@ApiModelProperty("合同名称") @ApiModelProperty("合同名称")
private String name; private String name;


@@ -56,21 +52,12 @@ public class ContractDTO {
@ApiModelProperty("附件") @ApiModelProperty("附件")
private String attachment; private String attachment;


@ApiModelProperty("项目ID")
private Long projectId;

@ApiModelProperty("项目编号")
private String projectCode;

@ApiModelProperty("供应商联系人") @ApiModelProperty("供应商联系人")
private String supplierContact; private String supplierContact;


@ApiModelProperty("供应商联系方式") @ApiModelProperty("供应商联系方式")
private String supplierContactInfo; private String supplierContactInfo;


@ApiModelProperty("标段ID")
private Long bidId;

@ApiModelProperty("合同编号") @ApiModelProperty("合同编号")
private String constructionNo; private String constructionNo;



hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/OperationDTO.java → hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/EditOperationDTO.java View File

@@ -8,7 +8,7 @@ import java.time.LocalDateTime;


/** /**
* <p> * <p>
* OperationVO
* 实施信息编辑实体类
* </p> * </p>
* *
* @author WendyYang * @author WendyYang
@@ -16,29 +16,11 @@ import java.time.LocalDateTime;
*/ */
@Data @Data
@ApiModel("实施对象") @ApiModel("实施对象")
public class OperationDTO {
public class EditOperationDTO {


@ApiModelProperty("id") @ApiModelProperty("id")
private Long id; private Long id;


@ApiModelProperty("项目ID")
private Long projectId;

@ApiModelProperty("项目Code")
private String projectCode;

@ApiModelProperty("创建时间")
private LocalDateTime createOn;

@ApiModelProperty("修改时间")
private LocalDateTime updateOn;

@ApiModelProperty("创建人 工号")
private String createBy;

@ApiModelProperty("修改人 工号")
private String updateBy;

@ApiModelProperty("项目开工时间") @ApiModelProperty("项目开工时间")
private LocalDateTime projectStartDate; private LocalDateTime projectStartDate;


@@ -48,9 +30,6 @@ public class OperationDTO {
@ApiModelProperty("终验时间") @ApiModelProperty("终验时间")
private LocalDateTime finalInspectionDate; private LocalDateTime finalInspectionDate;


@ApiModelProperty("标段ID")
private Long bidId;

@ApiModelProperty("试运行开始时间") @ApiModelProperty("试运行开始时间")
private LocalDateTime pilotRunStartDate; private LocalDateTime pilotRunStartDate;



+ 393
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/EditProjectDTO.java View File

@@ -0,0 +1,393 @@
package com.hz.pm.api.projectdeclared.model.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hz.pm.api.common.compare.Compare;
import com.hz.pm.api.projectlib.model.dto.GovSystemReplaceInfoDTO;
import com.hz.pm.api.projectlib.model.dto.ProjectApplicationDTO;
import com.hz.pm.api.projectlib.model.dto.ProjectPaymentPlanDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
* <p>
* 项目信息修改参数类
* </p>
*
* @author zpf
* @since 2023-02-03
*/
@Data
public class EditProjectDTO {

public static final String SYSTEM_REPLACE_INFOS = "systemReplaceInfos";

@ApiModelProperty("主键")
private Long id;

@ApiModelProperty("所属地区编号")
private String areaCode;

@ApiModelProperty("所属地区名称")
private String area;

@ApiModelProperty("项目名称")
private String projectName;

@ApiModelProperty("历年项目名称")
private String baseHistorProjName;

@ApiModelProperty("'历年项目编码'")
private String baseHistorProjId;

@ApiModelProperty("历年项目年度")
private String baseHistorProjYear;

@ApiModelProperty("预算来源说明")
private String baseBasisAmountOri;

@ApiModelProperty("是否临时增补 0:否 1:是")
private Integer isTemporaryAugment;

@ApiModelProperty("项目负责人")
private String responsibleMan;

@ApiModelProperty("负责人手机号码")
private String responsibleManMobile;

@ApiModelProperty("项目联系人")
private String contactName;

@ApiModelProperty("项目联系人手机号码")
private String contactPhone;

@ApiModelProperty("建设单位名称")
private String buildOrgName;

@ApiModelProperty("建设单位统一社会信用代码")
private String orgCreditCode;

@ApiModelProperty("公司编码code")
private String buildOrgCode;

@ApiModelProperty("建设单位浙政钉ID")
private String buildOrgZheJiangGovDingId;

@ApiModelProperty("主管单位统一社会信用代码")
@Compare("主管单位统一社会信用代码")
private String superOrgCreditCode;

@ApiModelProperty("项目类型 01:首次建设 02:迭代升级 03:结转建设 04新运维 05续运维")
@Compare("项目类型")
private String projectType;

@ApiModelProperty("是否省级 1省级 2非省级")
private Integer baseProvManDeprtType;

@ApiModelProperty("是否首次新建 0:否 1:是")
private Integer isFirst;

@ApiModelProperty("项目预算年度")
private Integer projectYear;

@ApiModelProperty("项目建设起始时间")
private String beginTime;

@ApiModelProperty("项目建设终止时间")
private String endTime;

@ApiModelProperty("四大体系 1:业务应用 2:应用支撑 3:数据资源 4:基础设施")
private Integer fourSystems;

@ApiModelProperty("是否数字化改革项目 0:否 1:是")
private Integer isDigitalReform;

@ApiModelProperty("综合业务领域 1: '党政机关整体智治',2: '数字政府',3: '数字经济',4: '数字社会',7: '数字文化',5: '数字法治',6: '一体化智能化公共数据平台', 8: '基层智治'")
private Integer bizDomain;

@ApiModelProperty("建设层级 P省级 M市级 C县级 T乡镇级 V村级")
@Compare("建设层级")
private String buildLevel;

@ApiModelProperty("贯通层级 P省级 M市级 C县级 T乡镇级 V村级")
@Compare("贯通层级")
private String lowestLevel;

@ApiModelProperty("立项依据")
private String buildBasis;

@ApiModelProperty("立项依据说明")
private String baseBasisEstablish;

@ApiModelProperty("发改编码")
private String developCode;

@ApiModelProperty("财政编码")
private String financialCode;

@ApiModelProperty("是否上云 0:否 1:是")
private Integer isCloud;

private String cloudType;

@ApiModelProperty("等保级别 1:一级 2:二级 3:三级 4:四级 5:五级")
private Integer protectionLevel;

@ApiModelProperty("是否密评 0:否 1:是")
private Integer isSecretComments;

@ApiModelProperty("项目简介")
private String projectIntroduction;

@ApiModelProperty("资金情况-申报-申报金额(总计)(万元)")
private BigDecimal declareAmount;

@ApiModelProperty("资金情况-申报-自有金额(万元)")
private BigDecimal declareHaveAmount;

@ApiModelProperty("资金情况-申报-政府投资-本级财政资金(万元)")
private BigDecimal declareGovOwnFinanceAmount;

@ApiModelProperty("资金情况-申报-政府投资-上级补助资金(万元)")
private BigDecimal declareGovSuperiorFinanceAmount;

@ApiModelProperty("申报-银行贷款(万元)")
private BigDecimal declareBankLendingAmount;

@ApiModelProperty("申报-其它资金(万元)")
private BigDecimal declareOtherAmount;

@ApiModelProperty("申报资金-分配情况-软件开发(万元)")
private BigDecimal declareSoftwareDevelopmentAmount;

@ApiModelProperty("申报资金-分配情况-云资源、硬件购置(万元)")
private BigDecimal declareCloudHardwarePurchaseAmount;

@ApiModelProperty("申报资金-分配情况-第三方服务(万元)")
private BigDecimal declareThirdPartyAmount;

//==================================================================================================================

@ApiModelProperty("资金分配情况-软件开发(万元)")
private BigDecimal softwareDevelopmentAmount;

@ApiModelProperty("资金分配情况-云资源、硬件购置(万元)")
private BigDecimal cloudHardwarePurchaseAmount;

@ApiModelProperty("资金分配情况-第三方服务(万元)")
private BigDecimal thirdPartyAmount;

@ApiModelProperty("年度支付计划")
private List<ProjectPaymentPlanDTO> paymentPlanList;

@ApiModelProperty("立项批复资金(万元)")
private BigDecimal approvalAmount;

@ApiModelProperty("批复-自有金额(万元)")
@Compare("批复-自有金额")
private BigDecimal approvalHaveAmount;

@ApiModelProperty("批复-政府投资-本级财政资金(万元)")
@Compare("批复-政府投资-本级财政资金")
private BigDecimal approvalGovOwnFinanceAmount;

@ApiModelProperty("批复-政府投资-上级补助资金(万元)")
@Compare("批复-政府投资-上级补助资金")
private BigDecimal approvalGovSuperiorFinanceAmount;

@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime annualPlanAddTime;

@ApiModelProperty("核心业务-核心业务模块")
private String coreBusiness;

@ApiModelProperty("安全投入-投入项")
private String safetyInputTitle;

@ApiModelProperty("安全投入-内容描述")
private String safetyInputDescribe;

@ApiModelProperty("安全投入-金额(万元)")
private BigDecimal safetyInputAmount;

@ApiModelProperty("附件-初步方案")
private String preliminaryPlanFile;

@ApiModelProperty("附件-佐证材料")
private String supportingMaterialsFile;

@ApiModelProperty("附件-项目总投资测算明细")
private String calculationTotalInvestmentFile;

@ApiModelProperty("附件-申报单位主要职责(单位三定方案)")
private String mainResponsibilitiesApplicantFile;

@ApiModelProperty("备注")
private String projectRemarks;

@ApiModelProperty("是否包含应用 0:否 1:是")
private Integer includeApplication;

@ApiModelProperty("工程形象进度-第一季度")
private String engineeringSpeedOne;

@ApiModelProperty("工程形象进度-第二季度")
private String engineeringSpeedTwo;

@ApiModelProperty("工程形象进度-第三季度")
private String engineeringSpeedThree;

@ApiModelProperty("工程形象进度-第四季度")
private String engineeringSpeedFour;

@ApiModelProperty("核心业务-是否开启核心业务模块 false:关闭 true:开启")
private Boolean isOpenCoreBusiness;

@ApiModelProperty("安全投入-是否开启安全投入模块 false:关闭 true:开启")
private Boolean isOpenSafetyInput;

@ApiModelProperty("工程形象进度-是否开启 false:关闭 true:开启")
private Boolean isEngineeringSpeed;

@ApiModelProperty("附件-是否开启 false:关闭 true:开启")
private Boolean isAccessories;

@ApiModelProperty("备注-是否开启 false:关闭 true:开启")
private Boolean isRemarks;

@ApiModelProperty("年度支付计划-是否开启 false:关闭 true:开启")
private Boolean isAnnualPlanAmount;

@ApiModelProperty("一地创新全省共享项目-是否开启 false:关闭 true:开启")
private Boolean isInnovateWholeProvinceShare;

@ApiModelProperty("安全投入-模块信息")
private String safetyInputModular;

@ApiModelProperty("项目申报pdf")
private String projectPdf;

@ApiModelProperty("立项申报pdf")
private String declarationPdf;

@ApiModelProperty("建设周期(月)")
private String buildCycle;

@ApiModelProperty("建设方案文件")
private String constructionPlanFile;

@ApiModelProperty("立项批复文件")
private String approvedFile;

@ApiModelProperty("批复金额")
private BigDecimal approvedTotalInvestmentIncrease;

@ApiModelProperty("是否有上级条线主管部门 0没有 1有")
private Integer isHigherSuperOrg;

@ApiModelProperty("上级主管部门")
private String higherSuperOrg;

@ApiModelProperty("上级主管部门Code")
private String higherSuperOrgCode;

@ApiModelProperty("是否有主管部门 0没有 1有")
private Integer isSuperOrg;

@ApiModelProperty("主管部门名称")
private String superOrg;

@ApiModelProperty("主管部门Code")
private String superOrgCode;

@ApiModelProperty("前端所需验证字段")
private String allApplicationsDone;

@ApiModelProperty("项目应用实例")
private List<ProjectApplicationDTO> applicationList;

@ApiModelProperty("流程状态")
private Integer processStatus;

@ApiModelProperty("项目发起人 员工code")
private String sponsor;

@ApiModelProperty("预审发起人 员工code")
private String preStartUserId;

@ApiModelProperty("上级条线单位审核意见")
private String higherLineSuperOrgReviewComments;

@ApiModelProperty("项目申报书")
private String projectApplicationForm;

@ApiModelProperty("终验材料")
private String finalAcceptanceMaterials;

private Map<String, Object> dynamicForm;

//P省级,M市级,C县(市、区)级,T乡镇(街道、办事处)级,V村(社区)级
private String baseLowestLevel;

//01评审中;02待立项;03已驳回;04已立项;05已采购;06已初验;07已终验;00已终止
private String baseProjSetProg;

//P省级,M市级,C县(市、区)级,T乡镇(街道、办事处)级,V村(社区)级
private String baseProjConsClass;

//01政策、法规,02规划或决策部署,03上级下达任务,04领导批示,05单位核心业务或单位职能,00其他,多个时用中文;分割
private String baseProjBasis;

@ApiModelProperty("项目类型 01首次建设;02迭代升级;03结转建设;04新运维;05续运维")
private String baseProjType;

@ApiModelProperty("是否退回|驳回的项目版本")
private Boolean isBackReject = Boolean.FALSE;

@ApiModelProperty("可研报告")
private String baseResearchReportFile;

@ApiModelProperty("可研批复文件")
private String baseResearchReportApprovalFile;

@ApiModelProperty("其他附件")
private String baseProjOtherFile;

@ApiModelProperty("项目内容与预期成效")
private String beseExpectedResults;

@ApiModelProperty("内容类别")
private String baseConstructionType;

@ApiModelProperty("咨询公司")
private String consultancy;

@ApiModelProperty("是否开启评审清单")
private Boolean isReviewChecklist;

@ApiModelProperty("评审清单")
private String reviewChecklist;

@ApiModelProperty("是否推送省里")
private Boolean push;

@ApiModelProperty("系统定位")
private String systemPosition;

@ApiModelProperty("立项依据证明材料")
private String baseProjBasisFile;

@ApiModelProperty("政务信息系统替代情况")
private List<GovSystemReplaceInfoDTO> systemReplaceInfos;

@ApiModelProperty("申报单位领域")
private Integer unitStrip;

@ApiModelProperty("评审金额")
private BigDecimal reviewAmount;

}

hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/ProjectEditDTO.java → hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/EditProjectDetailDTO.java View File

@@ -1,25 +1,21 @@
package com.hz.pm.api.projectdeclared.model.dto; package com.hz.pm.api.projectdeclared.model.dto;


import com.hz.pm.api.projectdeclared.utils.BeanDiffUtil.FieldDiff; import com.hz.pm.api.projectdeclared.utils.BeanDiffUtil.FieldDiff;
import com.hz.pm.api.projectlib.model.dto.ProjectDTO;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;


import java.io.Serializable;
import java.util.List; import java.util.List;


/** /**
* <p> * <p>
* ProjectDetailDTO
* 项目信息编辑实体类
* </p> * </p>
* *
* @author WendyYang * @author WendyYang
* @since 19:53 2024/8/5 * @since 19:53 2024/8/5
*/ */
@Data @Data
public class ProjectEditDTO implements Serializable {

private static final long serialVersionUID = 7066112975653039072L;
public class EditProjectDetailDTO {


public static final String FIELD_PROJECT = "project"; public static final String FIELD_PROJECT = "project";


@@ -28,10 +24,10 @@ public class ProjectEditDTO implements Serializable {
public static final String FIELD_PROJECT_DIFFS = "projectDiffs"; public static final String FIELD_PROJECT_DIFFS = "projectDiffs";


@ApiModelProperty("项目信息") @ApiModelProperty("项目信息")
private ProjectDTO project;
private EditProjectDTO project;


private List<FieldDiff> projectDiffs; private List<FieldDiff> projectDiffs;


private List<PurchaseEditDTO> purchases;
private List<EditPurchaseDetailDTO> purchases;


} }

hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/PurchaseDTO.java → hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/EditPurchaseDTO.java View File

@@ -12,27 +12,23 @@ import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;


/** /**
* @Classname Purchase
* @Description
* @Date 2023/5/29 10:00
* @Author PoffyZhang
* <p>
* 采购信息编辑实体类
* </p>
*
* @author WendyYang
* @since 14:14 2024/8/8
*/ */
@Data @Data
@ApiModel(value = "采购对象") @ApiModel(value = "采购对象")
@AllArgsConstructor @AllArgsConstructor
public class PurchaseDTO {
public class EditPurchaseDTO {


public static final String FIELD_ID = "id"; public static final String FIELD_ID = "id";


@ApiModelProperty("id") @ApiModelProperty("id")
private Long id; private Long id;


@ApiModelProperty("标段状态")
private Integer status;

@ApiModelProperty("标段状态名称")
private String statusName;

@ApiModelProperty("标段预算") @ApiModelProperty("标段预算")
private BigDecimal bidBudget; private BigDecimal bidBudget;


@@ -42,21 +38,6 @@ public class PurchaseDTO {
@ApiModelProperty("标段类型") @ApiModelProperty("标段类型")
private Integer bidType; private Integer bidType;


@ApiModelProperty("项目ID")
private Long projectId;

@ApiModelProperty("创建时间")
private LocalDateTime createOn;

@ApiModelProperty("修改时间")
private LocalDateTime updateOn;

@ApiModelProperty("创建人 工号")
private String createBy;

@ApiModelProperty("修改人 工号")
private String updateBy;

@ApiModelProperty("供应商") @ApiModelProperty("供应商")
private String supplier; private String supplier;


@@ -139,15 +120,12 @@ public class PurchaseDTO {
private String xcfhxReportFiles; private String xcfhxReportFiles;


@ApiModelProperty("信创符合性测评报告文件") @ApiModelProperty("信创符合性测评报告文件")
@NotBlank(message = "信创符合性测评报告文件不能为空")
private String mhXcfhxReportFile; private String mhXcfhxReportFile;


@ApiModelProperty("信创符合性测评记录ID") @ApiModelProperty("信创符合性测评记录ID")
@NotBlank(message = "信创符合性测评记录ID不能为空")
private String mhXcfhxReportRecordId; private String mhXcfhxReportRecordId;


@ApiModelProperty("初验材料") @ApiModelProperty("初验材料")
@NotBlank(message = "请提交初验材料")
private String preliminaryInspectionMaterials; private String preliminaryInspectionMaterials;


@ApiModelProperty("初验 是否完成日志数据归集") @ApiModelProperty("初验 是否完成日志数据归集")

hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/PurchaseEditDTO.java → hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/EditPurchaseDetailDTO.java View File

@@ -15,7 +15,7 @@ import java.util.List;
* @since 11:12 2024/8/6 * @since 11:12 2024/8/6
*/ */
@Data @Data
public class PurchaseEditDTO {
public class EditPurchaseDetailDTO {


public static final String FIELD_PURCHASE = "purchase"; public static final String FIELD_PURCHASE = "purchase";


@@ -29,18 +29,20 @@ public class PurchaseEditDTO {


public static final String FIELD_OPERATION_DIFFS = "operationDiffs"; public static final String FIELD_OPERATION_DIFFS = "operationDiffs";


//==================================================================================================================

@ApiModelProperty("采购信息") @ApiModelProperty("采购信息")
private PurchaseDTO purchase;
private EditPurchaseDTO purchase;


private List<FieldDiff> purchaseDiffs; private List<FieldDiff> purchaseDiffs;


@ApiModelProperty("合同信息") @ApiModelProperty("合同信息")
private ContractDTO contract;
private EditContractDTO contract;


private List<FieldDiff> contractDiffs; private List<FieldDiff> contractDiffs;


@ApiModelProperty("实施信息") @ApiModelProperty("实施信息")
private OperationDTO operation;
private EditOperationDTO operation;


private List<FieldDiff> operationDiffs; private List<FieldDiff> operationDiffs;



+ 13
- 13
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/helper/ProjectChangeStopHelper.java View File

@@ -24,7 +24,7 @@ import com.hz.pm.api.projectdeclared.service.IPurchaseService;
import com.hz.pm.api.projectdeclared.utils.BeanDiffUtil.FieldDiff; import com.hz.pm.api.projectdeclared.utils.BeanDiffUtil.FieldDiff;
import com.hz.pm.api.projectlib.entity.PurchaseStatusChange; import com.hz.pm.api.projectlib.entity.PurchaseStatusChange;
import com.hz.pm.api.projectlib.manage.ProjectLibManage; import com.hz.pm.api.projectlib.manage.ProjectLibManage;
import com.hz.pm.api.projectlib.model.dto.ProjectDTO;
import com.hz.pm.api.projectdeclared.model.dto.EditProjectDTO;
import com.hz.pm.api.projectlib.model.entity.Project; import com.hz.pm.api.projectlib.model.entity.Project;
import com.hz.pm.api.projectlib.model.entity.ProjectStatusChange; import com.hz.pm.api.projectlib.model.entity.ProjectStatusChange;
import com.hz.pm.api.projectlib.model.enumeration.status.*; import com.hz.pm.api.projectlib.model.enumeration.status.*;
@@ -148,7 +148,7 @@ public class ProjectChangeStopHelper {
changeHistory.setStatus(buildBizStatus(projEvent).getCode()); changeHistory.setStatus(buildBizStatus(projEvent).getCode());
projectChangeHistoryService.updateById(changeHistory); projectChangeHistoryService.updateById(changeHistory);
if (projEvent.equals(ProjectStateChangeEvent.CHANGE_APPLY_PASS)) { if (projEvent.equals(ProjectStateChangeEvent.CHANGE_APPLY_PASS)) {
projectEditRewrite(JSONUtil.toBean(changeHistory.getChangeContent(), ProjectEditDTO.class));
projectEditRewrite(JSONUtil.toBean(changeHistory.getChangeContent(), EditProjectDetailDTO.class));
} }
} }
ProjectStatusChange change = projectStatusChangeService.getLastOne(projBeforeEvent, projectId); ProjectStatusChange change = projectStatusChangeService.getLastOne(projBeforeEvent, projectId);
@@ -222,12 +222,12 @@ public class ProjectChangeStopHelper {
return bizStatus; return bizStatus;
} }


private void projectEditRewrite(ProjectEditDTO projectEdit) {
private void projectEditRewrite(EditProjectDetailDTO projectEdit) {
List<FieldDiff> projectDiffs = projectEdit.getProjectDiffs(); List<FieldDiff> projectDiffs = projectEdit.getProjectDiffs();
if (CollUtil.isNotEmpty(projectDiffs)) { if (CollUtil.isNotEmpty(projectDiffs)) {
ProjectDTO projectDetail = projectEdit.getProject();
EditProjectDTO projectDetail = projectEdit.getProject();
FieldDiff systemReplaceInfos = CollUtil.findOne(projectDiffs, FieldDiff systemReplaceInfos = CollUtil.findOne(projectDiffs,
w -> w.getFieldName().equals(ProjectDTO.SYSTEM_REPLACE_INFOS));
w -> w.getFieldName().equals(EditProjectDTO.SYSTEM_REPLACE_INFOS));
if (systemReplaceInfos != null) { if (systemReplaceInfos != null) {
projectLibManage.saveGovSystemReplaceInfos(projectDetail.getId(), projectLibManage.saveGovSystemReplaceInfos(projectDetail.getId(),
projectDetail.getProjectCode(), projectDetail.getSystemReplaceInfos()); projectDetail.getProjectCode(), projectDetail.getSystemReplaceInfos());
@@ -238,9 +238,9 @@ public class ProjectChangeStopHelper {
projectService.update(wrapper); projectService.update(wrapper);
} }
} }
List<PurchaseEditDTO> purchases = projectEdit.getPurchases();
List<EditPurchaseDetailDTO> purchases = projectEdit.getPurchases();
if (CollUtil.isNotEmpty(purchases)) { if (CollUtil.isNotEmpty(purchases)) {
for (PurchaseEditDTO purchaseEdit : purchases) {
for (EditPurchaseDetailDTO purchaseEdit : purchases) {
modifyPurchase(purchaseEdit); modifyPurchase(purchaseEdit);
modifyContract(purchaseEdit); modifyContract(purchaseEdit);
modifyOperation(purchaseEdit); modifyOperation(purchaseEdit);
@@ -248,10 +248,10 @@ public class ProjectChangeStopHelper {
} }
} }


private void modifyPurchase(PurchaseEditDTO purchaseEdit) {
private void modifyPurchase(EditPurchaseDetailDTO purchaseEdit) {
List<FieldDiff> purchaseDiffs = purchaseEdit.getPurchaseDiffs(); List<FieldDiff> purchaseDiffs = purchaseEdit.getPurchaseDiffs();
if (CollUtil.isNotEmpty(purchaseDiffs)) { if (CollUtil.isNotEmpty(purchaseDiffs)) {
PurchaseDTO purchaseDetail = purchaseEdit.getPurchase();
EditPurchaseDTO purchaseDetail = purchaseEdit.getPurchase();
UpdateWrapper<Purchase> wrapper = buildWrapper(purchaseDiffs, Purchase.class); UpdateWrapper<Purchase> wrapper = buildWrapper(purchaseDiffs, Purchase.class);
if (wrapper != null) { if (wrapper != null) {
wrapper.eq("id", purchaseDetail.getId()); wrapper.eq("id", purchaseDetail.getId());
@@ -260,10 +260,10 @@ public class ProjectChangeStopHelper {
} }
} }


private void modifyContract(PurchaseEditDTO purchaseEdit) {
private void modifyContract(EditPurchaseDetailDTO purchaseEdit) {
List<FieldDiff> contractDiffs = purchaseEdit.getContractDiffs(); List<FieldDiff> contractDiffs = purchaseEdit.getContractDiffs();
if (CollUtil.isNotEmpty(contractDiffs)) { if (CollUtil.isNotEmpty(contractDiffs)) {
ContractDTO contractDetail = purchaseEdit.getContract();
EditContractDTO contractDetail = purchaseEdit.getContract();
UpdateWrapper<Contract> wrapper = buildWrapper(contractDiffs, Contract.class); UpdateWrapper<Contract> wrapper = buildWrapper(contractDiffs, Contract.class);
if (wrapper != null) { if (wrapper != null) {
wrapper.eq("id", contractDetail.getId()); wrapper.eq("id", contractDetail.getId());
@@ -272,10 +272,10 @@ public class ProjectChangeStopHelper {
} }
} }


private void modifyOperation(PurchaseEditDTO purchaseEdit) {
private void modifyOperation(EditPurchaseDetailDTO purchaseEdit) {
List<FieldDiff> operationDiffs = purchaseEdit.getOperationDiffs(); List<FieldDiff> operationDiffs = purchaseEdit.getOperationDiffs();
if (CollUtil.isNotEmpty(operationDiffs)) { if (CollUtil.isNotEmpty(operationDiffs)) {
OperationDTO operationDetail = purchaseEdit.getOperation();
EditOperationDTO operationDetail = purchaseEdit.getOperation();
UpdateWrapper<Operation> wrapper = buildWrapper(operationDiffs, Operation.class); UpdateWrapper<Operation> wrapper = buildWrapper(operationDiffs, Operation.class);
if (wrapper != null) { if (wrapper != null) {
wrapper.eq("id", operationDetail.getId()); wrapper.eq("id", operationDetail.getId());


+ 17
- 17
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectChangeManage.java View File

@@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hz.pm.api.common.enumeration.ProjectProcessType; import com.hz.pm.api.common.enumeration.ProjectProcessType;
import com.hz.pm.api.common.model.constant.BizConst;
import com.hz.pm.api.external.model.enumeration.MhUnitStripEnum; import com.hz.pm.api.external.model.enumeration.MhUnitStripEnum;
import com.hz.pm.api.projectdeclared.entity.ProjectChangeHistory; import com.hz.pm.api.projectdeclared.entity.ProjectChangeHistory;
import com.hz.pm.api.projectdeclared.manage.DeclaredProjectHelper; import com.hz.pm.api.projectdeclared.manage.DeclaredProjectHelper;
@@ -84,7 +83,7 @@ public class ProjectChangeManage {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public synchronized void submitProjectChangeApply(SubmitProjectChangeApplyReq req) { public synchronized void submitProjectChangeApply(SubmitProjectChangeApplyReq req) {
JSONObject projectEditDetail = req.getProjectEditDetail(); JSONObject projectEditDetail = req.getProjectEditDetail();
JSONObject projJsonObj = projectEditDetail.getJSONObject(ProjectEditDTO.FIELD_PROJECT);
JSONObject projJsonObj = projectEditDetail.getJSONObject(EditProjectDetailDTO.FIELD_PROJECT);
ProjectDTO reqProj = projJsonObj.toBean(ProjectDTO.class); ProjectDTO reqProj = projJsonObj.toBean(ProjectDTO.class);
Project project = projectService.getNewProject(reqProj.getId()); Project project = projectService.getNewProject(reqProj.getId());
if (ProjectStatus.ON_CHANGE_APPLY.eq(project.getStatus()) || if (ProjectStatus.ON_CHANGE_APPLY.eq(project.getStatus()) ||
@@ -93,7 +92,8 @@ public class ProjectChangeManage {
} }
ProjectDetailVO projDetailOld = projectLibManage.getProjectDetail(project); ProjectDetailVO projDetailOld = projectLibManage.getProjectDetail(project);


List<FieldDiff> projDiffs = BeanDiffUtil.diffSameField(projDetailOld, projJsonObj, ProjectDTO.SYSTEM_REPLACE_INFOS);
List<FieldDiff> projDiffs = BeanDiffUtil.diffSameField(projDetailOld, projJsonObj,
ProjectDTO.SYSTEM_REPLACE_INFOS, "id", "projectCode", "stage", "status");
List<GovSystemReplaceInfoDTO> systemReplaceInfos = reqProj.getSystemReplaceInfos(); List<GovSystemReplaceInfoDTO> systemReplaceInfos = reqProj.getSystemReplaceInfos();
List<GovSystemReplaceInfoDTO> systemReplaceInfosOld = projDetailOld.getSystemReplaceInfos(); List<GovSystemReplaceInfoDTO> systemReplaceInfosOld = projDetailOld.getSystemReplaceInfos();
if (!CollUtil.isEqualList(systemReplaceInfos, systemReplaceInfosOld)) { if (!CollUtil.isEqualList(systemReplaceInfos, systemReplaceInfosOld)) {
@@ -104,29 +104,29 @@ public class ProjectChangeManage {
.newValue(systemReplaceInfos) .newValue(systemReplaceInfos)
.build()); .build());
} }
projJsonObj.set(ProjectEditDTO.FIELD_PROJECT_DIFFS, projDiffs);
List<JSONObject> purchaseJsonObjs = projectEditDetail.getBeanList(ProjectEditDTO.FIELD_PURCHASES, JSONObject.class);
projJsonObj.set(EditProjectDetailDTO.FIELD_PROJECT_DIFFS, projDiffs);
List<JSONObject> purchaseJsonObjs = projectEditDetail.getBeanList(EditProjectDetailDTO.FIELD_PURCHASES, JSONObject.class);
if (CollUtil.isNotEmpty(purchaseJsonObjs)) { if (CollUtil.isNotEmpty(purchaseJsonObjs)) {
List<PurchaseFullInfoVO> purchaseDetails = projDetailOld.getPurchaseDetails(); List<PurchaseFullInfoVO> purchaseDetails = projDetailOld.getPurchaseDetails();
if (purchaseDetails != null && !purchaseDetails.isEmpty()) { if (purchaseDetails != null && !purchaseDetails.isEmpty()) {
Map<Long, JSONObject> reqPurchaseMap = CollUtils.listToMap(purchaseJsonObjs, Map<Long, JSONObject> reqPurchaseMap = CollUtils.listToMap(purchaseJsonObjs,
w -> w.getJSONObject(PurchaseEditDTO.FIELD_PURCHASE).getLong(PurchaseDTO.FIELD_ID));
w -> w.getJSONObject(EditPurchaseDetailDTO.FIELD_PURCHASE).getLong(EditPurchaseDTO.FIELD_ID));
for (PurchaseFullInfoVO purchaseDetail : purchaseDetails) { for (PurchaseFullInfoVO purchaseDetail : purchaseDetails) {
PurchaseVO purchase = purchaseDetail.getPurchase(); PurchaseVO purchase = purchaseDetail.getPurchase();
ContractVO contract = purchaseDetail.getConstruction(); ContractVO contract = purchaseDetail.getConstruction();
OperationVO operation = purchaseDetail.getOperation(); OperationVO operation = purchaseDetail.getOperation();


JSONObject reqPurchaseDetail = reqPurchaseMap.get(purchase.getId()); JSONObject reqPurchaseDetail = reqPurchaseMap.get(purchase.getId());
JSONObject reqPurchase = reqPurchaseDetail.getJSONObject(PurchaseEditDTO.FIELD_PURCHASE);
JSONObject reqOperation = reqPurchaseDetail.getJSONObject(PurchaseEditDTO.FIELD_OPERATION);
JSONObject reqContract = reqPurchaseDetail.getJSONObject(PurchaseEditDTO.FIELD_CONTRACT);
List<FieldDiff> purchaseDiffs = BeanDiffUtil.diffSameField(purchase, reqPurchase);
List<FieldDiff> operationDiffs = BeanDiffUtil.diffSameField(operation, reqOperation);
List<FieldDiff> contractDiffs = BeanDiffUtil.diffSameField(contract, reqContract);
reqPurchaseDetail.set(PurchaseEditDTO.FIELD_PURCHASE_DIFFS, purchaseDiffs);
reqPurchaseDetail.set(PurchaseEditDTO.FIELD_CONTRACT_DIFFS, contractDiffs);
reqPurchaseDetail.set(PurchaseEditDTO.FIELD_OPERATION_DIFFS, operationDiffs);
JSONObject reqPurchase = reqPurchaseDetail.getJSONObject(EditPurchaseDetailDTO.FIELD_PURCHASE);
JSONObject reqOperation = reqPurchaseDetail.getJSONObject(EditPurchaseDetailDTO.FIELD_OPERATION);
JSONObject reqContract = reqPurchaseDetail.getJSONObject(EditPurchaseDetailDTO.FIELD_CONTRACT);
List<FieldDiff> purchaseDiffs = BeanDiffUtil.diffSameField(purchase, reqPurchase, "id");
List<FieldDiff> operationDiffs = BeanDiffUtil.diffSameField(operation, reqOperation, "id");
List<FieldDiff> contractDiffs = BeanDiffUtil.diffSameField(contract, reqContract, "id");
reqPurchaseDetail.set(EditPurchaseDetailDTO.FIELD_PURCHASE_DIFFS, purchaseDiffs);
reqPurchaseDetail.set(EditPurchaseDetailDTO.FIELD_CONTRACT_DIFFS, contractDiffs);
reqPurchaseDetail.set(EditPurchaseDetailDTO.FIELD_OPERATION_DIFFS, operationDiffs);
} }
} }
} }
@@ -191,7 +191,7 @@ public class ProjectChangeManage {
return null; return null;
} }
ProjectChangeDetailVO result = new ProjectChangeDetailVO(); ProjectChangeDetailVO result = new ProjectChangeDetailVO();
result.setProjectEditDetail(JSONUtil.toBean(changeHistory.getChangeContent(), ProjectEditDTO.class));
result.setProjectEditDetail(JSONUtil.toBean(changeHistory.getChangeContent(), EditProjectDetailDTO.class));
result.setChangeReason(changeHistory.getChangeReason()); result.setChangeReason(changeHistory.getChangeReason());
result.setCreateOn(changeHistory.getCreateOn()); result.setCreateOn(changeHistory.getCreateOn());
return result; return result;


+ 0
- 2
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/ProjectDTO.java View File

@@ -24,8 +24,6 @@ public class ProjectDTO implements Serializable {


private static final long serialVersionUID = 632385496811481979L; private static final long serialVersionUID = 632385496811481979L;


public static final String SYSTEM_REPLACE_INFOS = "systemReplaceInfos";

@ApiModelProperty("主键") @ApiModelProperty("主键")
private Long id; private Long id;




+ 3
- 3
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/req/SubmitProjectChangeApplyReq.java View File

@@ -2,7 +2,7 @@ package com.hz.pm.api.projectlib.model.req;


import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import com.hz.pm.api.projectdeclared.model.dto.ProjectEditDTO;
import com.hz.pm.api.projectdeclared.model.dto.EditProjectDetailDTO;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;


@@ -26,8 +26,8 @@ public class SubmitProjectChangeApplyReq {
@ApiModelProperty("项目信息") @ApiModelProperty("项目信息")
private JSONObject projectEditDetail; private JSONObject projectEditDetail;


public ProjectEditDTO getProjectDetail() {
return BeanUtil.toBean(projectEditDetail, ProjectEditDTO.class);
public EditProjectDetailDTO getProjectDetail() {
return BeanUtil.toBean(projectEditDetail, EditProjectDetailDTO.class);
} }


} }

+ 2
- 2
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/ProjectChangeDetailVO.java View File

@@ -1,6 +1,6 @@
package com.hz.pm.api.projectlib.model.vo; package com.hz.pm.api.projectlib.model.vo;


import com.hz.pm.api.projectdeclared.model.dto.ProjectEditDTO;
import com.hz.pm.api.projectdeclared.model.dto.EditProjectDetailDTO;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;


@@ -21,7 +21,7 @@ public class ProjectChangeDetailVO {
private String changeReason; private String changeReason;


@ApiModelProperty("变更内容") @ApiModelProperty("变更内容")
private ProjectEditDTO projectEditDetail;
private EditProjectDetailDTO projectEditDetail;


@ApiModelProperty("变更申请时间") @ApiModelProperty("变更申请时间")
private LocalDateTime createOn; private LocalDateTime createOn;


Loading…
Cancel
Save