From 5f4d0f6f98ecf0d1a737097b14b2eb24b3b1dd51 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 29 Aug 2023 16:38:19 +0800 Subject: [PATCH] =?UTF-8?q?debug=20=E6=9D=A1=E4=BB=B6=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../projectdeclared/manage/ConstructionPlanManage.java | 2 +- .../manage/DefaultDeclaredProjectManage.java | 17 +++++++++++++++++ .../projectdeclared/manage/FinalAcceptanceManage.java | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java index e367d4a..8bc7aab 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java @@ -168,7 +168,7 @@ public class ConstructionPlanManage { params.setProcessUsers(Collections.emptyMap()); //放入条件判断的项目字段 //把条件值给放入工作流 - defaultDeclaredProjectManage.buildCondition(params, dto); + defaultDeclaredProjectManage.buildCondition(params, oldProject,dto); // 获取发起单位、发起单位主管单位、发起单位上级条线主管单位信息 Map orgModelMap = defaultDeclaredProjectManage.buildOrgModelMap(employeeCode, constructProject); String instanceId = processService.startProcessLs(model, params, orgModelMap); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java index 7b40d30..682013e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java @@ -332,4 +332,21 @@ public class DefaultDeclaredProjectManage { params.setFormData(JSON.parseObject(JSON.toJSONString(conditionDto), new TypeReference>() { })); } + + public void buildCondition(ProcessStartParamsVo params, Project projectInfo,DefaultDeclaredDTO dto) { + //放入条件判断的项目字段 优先取dto的 再取项目的 + ProjectDTO pdto = dto.getProjectInfo(); + ProjectConditionDTO conditionDto = new ProjectConditionDTO(); + conditionDto.setProjectId(projectInfo.getId()); + conditionDto.setDeclareAmount(Objects.nonNull(pdto) && Objects.nonNull(pdto.getDeclareAmount()) + ?pdto.getDeclareAmount() : projectInfo.getDeclareAmount()); + conditionDto.setIsDigitalReform(Objects.nonNull(pdto) && Objects.nonNull(pdto.getIsDigitalReform()) + ?pdto.getIsDigitalReform() : projectInfo.getIsDigitalReform()); + conditionDto.setIsTemporaryAugment(Objects.nonNull(pdto) && Objects.nonNull(pdto.getIsTemporaryAugment()) + ?pdto.getIsTemporaryAugment() : projectInfo.getIsTemporaryAugment()); + conditionDto.setBizDomain(Objects.nonNull(pdto) && Objects.nonNull(pdto.getBizDomain()) + ?pdto.getBizDomain() : projectInfo.getBizDomain()); + params.setFormData(JSON.parseObject(JSON.toJSONString(conditionDto), new TypeReference>() { + })); + } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/FinalAcceptanceManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/FinalAcceptanceManage.java index 47f9f2f..4889a52 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/FinalAcceptanceManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/FinalAcceptanceManage.java @@ -285,7 +285,7 @@ public class FinalAcceptanceManage { params.setProcessUsers(Collections.emptyMap()); //放入条件判断的项目字段 //把条件值给放入工作流 - declaredProjectManage.buildCondition(params, dto); + declaredProjectManage.buildCondition(params,projectInfo, dto); // 获取发起单位、发起单位主管单位、发起单位上级条线主管单位信息 Map orgModelMap = declaredProjectManage.buildOrgModelMap(employeeCode, projectInfo); String instanceId = processInstanceService.startProcessLs(model, params, orgModelMap);