Browse Source

优化代码

tags/24080901
PoffyZhang 1 year ago
parent
commit
3534f67fec
2 changed files with 8 additions and 6 deletions
  1. +4
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java
  2. +4
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java

+ 4
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java View File

@@ -132,7 +132,7 @@ public class DeclaredProjectManage {
);
params.setFormData(dto.getFormData());
//开始申报
// 获取发起单位、发起单位主管单位信息
// 获取发起单位、发起单位主管单位流程信息map
Map<String, OrgInfoDTO> orgModelMap = defaultDeclaredProjectManage.getOrgModelInfo(userId, model);
String instanceId = processService.newStartProcess(model.getProcessDefId(),model.getFormId(), params,orgModelMap);
log.info("申报项目成功 【{}】", instanceId);
@@ -187,7 +187,9 @@ public class DeclaredProjectManage {
})
);
params.setFormData(dto.getFormData());
String instanceId = processService.startProcess(model.getProcessDefId(), params);
// 获取发起单位、发起单位主管单位流程信息map
Map<String, OrgInfoDTO> orgModelMap = defaultDeclaredProjectManage.getOrgModelInfo(userId, model);
String instanceId = processService.newStartProcess(model.getProcessDefId(),model.getFormId(), params,orgModelMap);
log.info("重新申报项目成功 【{}】", instanceId);

//保存项目


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

@@ -78,10 +78,10 @@ public class DefaultDeclaredProjectManage {
String startOrgParentCode = startOrg.getParentCode();
String startOrgParentName = startOrg.getParentName();
//查询 当前发起人及主管单位所在区域的 单位流程配置
OrgInfoDTO startOrgInfoDTO = getOrgInfoDTO(model,startOrgCode, startOrgName);
OrgInfoDTO startOrgParentInfoDTO = getOrgInfoDTO(model, startOrgParentCode, startOrgParentName);
orgMap.put(OrgTypeEnum.TARGET_OWNER.name(),startOrgInfoDTO);
orgMap.put(OrgTypeEnum.TARGET_MANAGEMENT.name(),startOrgParentInfoDTO);
OrgInfoDTO startOrgInfoDto = getOrgInfoDTO(model,startOrgCode, startOrgName);
OrgInfoDTO startOrgParentInfoDto = getOrgInfoDTO(model, startOrgParentCode, startOrgParentName);
orgMap.put(OrgTypeEnum.TARGET_OWNER.name(),startOrgInfoDto);
orgMap.put(OrgTypeEnum.TARGET_MANAGEMENT.name(),startOrgParentInfoDto);
// 如果是指定单位,直接根据流程定义ID放入map
Map<String, WflowOrgModels> orgModelMap = orgProcdefService.list().stream()
.filter(v -> v.getProcessDefId().equals(model.getProcessDefId()))


Loading…
Cancel
Save