Browse Source

debug 条件代码

tags/24080901
PoffyZhang 1 year ago
parent
commit
5f4d0f6f98
3 changed files with 19 additions and 2 deletions
  1. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java
  2. +17
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java
  3. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/FinalAcceptanceManage.java

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java View File

@@ -168,7 +168,7 @@ public class ConstructionPlanManage {
params.setProcessUsers(Collections.emptyMap());
//放入条件判断的项目字段
//把条件值给放入工作流
defaultDeclaredProjectManage.buildCondition(params, dto);
defaultDeclaredProjectManage.buildCondition(params, oldProject,dto);
// 获取发起单位、发起单位主管单位、发起单位上级条线主管单位信息
Map<String, OrgInfoDTO> orgModelMap = defaultDeclaredProjectManage.buildOrgModelMap(employeeCode, constructProject);
String instanceId = processService.startProcessLs(model, params, orgModelMap);


+ 17
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java View File

@@ -332,4 +332,21 @@ public class DefaultDeclaredProjectManage {
params.setFormData(JSON.parseObject(JSON.toJSONString(conditionDto), new TypeReference<Map<String, Object>>() {
}));
}

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<Map<String, Object>>() {
}));
}
}

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/FinalAcceptanceManage.java View File

@@ -285,7 +285,7 @@ public class FinalAcceptanceManage {
params.setProcessUsers(Collections.emptyMap());
//放入条件判断的项目字段
//把条件值给放入工作流
declaredProjectManage.buildCondition(params, dto);
declaredProjectManage.buildCondition(params,projectInfo, dto);
// 获取发起单位、发起单位主管单位、发起单位上级条线主管单位信息
Map<String, OrgInfoDTO> orgModelMap = declaredProjectManage.buildOrgModelMap(employeeCode, projectInfo);
String instanceId = processInstanceService.startProcessLs(model, params, orgModelMap);


Loading…
Cancel
Save