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 2bf9ab0..900a988 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 @@ -117,8 +117,8 @@ public class ConstructionPlanManage { }) ); params.setFormData(dto.getFormData()); - // 获取发起单位、发起单位主管单位信息 - Map orgModelMap = defaultDeclaredProjectManage.getOrgModelInfo(userId, model); + // 获取发起单位、发起单位主管单位、发起单位上级条线主管单位信息 + Map orgModelMap = defaultDeclaredProjectManage.getOrgModelInfo(userId); String instanceId = processService.newStartProcess(model.getProcessDefId(),model.getFormId(), params,orgModelMap); log.info("建设方案项目申报成功 【{}】", instanceId); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java index 47b456a..bd5c3bc 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java @@ -143,8 +143,8 @@ public class DeclaredProjectManage { ); params.setFormData(dto.getFormData()); //开始申报 - // 获取发起单位、发起单位主管单位流程信息map - Map orgModelMap = defaultDeclaredProjectManage.getOrgModelInfo(userId, model); + // 获取发起单位、发起单位主管单位、发起单位上级主管条线单位信息 + Map orgModelMap = defaultDeclaredProjectManage.getOrgModelInfo(userId); String instanceId = processService.newStartProcess(model.getProcessDefId(),model.getFormId(), params,orgModelMap); log.info("申报项目成功 【{}】", instanceId); @@ -207,8 +207,8 @@ public class DeclaredProjectManage { }) ); params.setFormData(dto.getFormData()); - // 获取发起单位、发起单位主管单位流程信息map - Map orgModelMap = defaultDeclaredProjectManage.getOrgModelInfo(userId, model); + // 获取发起单位、发起单位主管单位、发起单位上级主管条线单位信息 + Map orgModelMap = defaultDeclaredProjectManage.getOrgModelInfo(userId); String instanceId = processService.newStartProcess(model.getProcessDefId(),model.getFormId(), params,orgModelMap); log.info("重新申报项目成功 【{}】", instanceId); 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 7842f1f..0754d51 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 @@ -67,7 +67,7 @@ public class DefaultDeclaredProjectManage { .build(); } - public Map getOrgModelInfo(Long userId, WflowModels model) { + public Map getOrgModelInfo(Long userId) { Map orgMap = new HashMap<>(); // 查出所有的单位流程配置 @@ -78,8 +78,16 @@ public class DefaultDeclaredProjectManage { .eq(DingOrganization::getOrganizationCode, userFullInfo.getOrganizationCode())); String startOrgCode = startOrg.getOrganizationCode(); String startOrgName = startOrg.getOrganizationName(); - String startOrgParentCode = startOrg.getParentCode(); - String startOrgParentName = startOrg.getParentName(); + String startOrgParentCode; + String startOrgParentName; + // 如果没有上级主管单位,由该单位自己审核 + if (Objects.isNull(startOrg.getParentCode())){ + startOrgParentCode = startOrgCode; + startOrgParentName = startOrgName; + }else { + startOrgParentCode = startOrg.getParentCode(); + startOrgParentName = startOrg.getParentName(); + } //查询 当前发起人及主管单位所在区域的 单位流程配置 OrgInfoDTO startOrgInfoDto = new OrgInfoDTO(); startOrgInfoDto.setOrganizationCode(startOrgCode); @@ -105,6 +113,8 @@ public class DefaultDeclaredProjectManage { orgMap.put(OrgTypeEnum.TARGET_OWNER.name(),startOrgInfoDto); orgMap.put(OrgTypeEnum.TARGET_MANAGEMENT.name(),parentOrgInfoDto); + // TODO 上级条线主管单位信息(可能是多个) + // 如果是指定单位,直接根据流程定义ID放入map OrgInfoDTO orgInfoDTO = new OrgInfoDTO(); orgInfoDTO.setOrgModelMap(orgModelsList.stream() diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java index 9653119..85c2156 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java @@ -139,8 +139,8 @@ public class PrequalificationDeclaredProjectManage { ); params.setFormData(dto.getFormData()); - // 获取发起单位、发起单位主管单位信息 - Map orgModelMap = defaultDeclaredProjectManage.getOrgModelInfo(userId, model); + // 获取发起单位、发起单位主管单位、发起单位上级主管条线单位信息 + Map orgModelMap = defaultDeclaredProjectManage.getOrgModelInfo(userId); instanceId = processService.newStartProcess(model.getProcessDefId(),model.getFormId(), params,orgModelMap); log.info("提交预审项目成功 【{}】", instanceId); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewByDeptJointManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewByDeptJointManage.java index 911c6fe..5be0b00 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewByDeptJointManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewByDeptJointManage.java @@ -104,8 +104,8 @@ public class ReviewByDeptJointManage { ); params.setFormData(formData); - // 获取发起单位、发起单位主管单位信息 - Map orgModelMap = defaultDeclaredProjectManage.getOrgModelInfo(userId, model); + // 获取发起单位、发起单位主管单位、发起单位上级主管条线单位信息 + Map orgModelMap = defaultDeclaredProjectManage.getOrgModelInfo(userId); String instanceId = processService.newStartProcess(model.getProcessDefId(),model.getFormId(), params,orgModelMap); log.info("部门联审申报成功 【{}】", instanceId);