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