|
|
@@ -22,6 +22,7 @@ import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Objects; |
|
|
|
import java.util.stream.Collectors; |
|
|
@@ -76,17 +77,24 @@ public class DefaultDeclaredProjectManage { |
|
|
|
String startOrgName = startOrg.getOrganizationName(); |
|
|
|
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); |
|
|
|
// 如果是指定单位,直接根据流程定义ID放入map |
|
|
|
Map<String, WflowOrgModels> orgModelMap = orgProcdefService.list().stream() |
|
|
|
.filter(v -> v.getProcessDefId().equals(model.getProcessDefId())) |
|
|
|
.collect(Collectors.toMap(WflowOrgModels::getProcessDefId, v -> v)); |
|
|
|
OrgInfoDTO orgInfoDTO = new OrgInfoDTO(); |
|
|
|
orgInfoDTO.setOrgModelMap(orgModelMap); |
|
|
|
orgMap.put(model.getProcessDefId(),orgInfoDTO); |
|
|
|
return orgMap; |
|
|
|
} |
|
|
|
|
|
|
|
private OrgInfoDTO getOrgInfoDTO(WflowModels model, String startOrgCode, String startOrgName) { |
|
|
|
private OrgInfoDTO getOrgInfoDTO(WflowModels model, String orgCode, String orgName) { |
|
|
|
Map<String, WflowOrgModels> startOrgModelsMap = orgProcdefService.list(Wrappers.lambdaQuery(WflowOrgModels.class) |
|
|
|
.eq(WflowOrgModels::getOrgCode, startOrgCode) |
|
|
|
.eq(WflowOrgModels::getOrgCode, orgCode) |
|
|
|
.eq(StringUtils.isNotEmpty(model.getProcessDefId()), WflowOrgModels::getProcessDefId, model.getProcessDefId()) |
|
|
|
.eq(WflowOrgModels::getIsDelete, Boolean.FALSE)).stream() |
|
|
|
.collect(Collectors.toMap(m -> { |
|
|
@@ -96,10 +104,10 @@ public class DefaultDeclaredProjectManage { |
|
|
|
} |
|
|
|
return m.getProcessDefId(); |
|
|
|
}, v -> v)); |
|
|
|
OrgInfoDTO startOrgInfoDTO = new OrgInfoDTO(); |
|
|
|
startOrgInfoDTO.setOrganizationCode(startOrgCode); |
|
|
|
startOrgInfoDTO.setOrganizationName(startOrgName); |
|
|
|
startOrgInfoDTO.setOrgModelMap(startOrgModelsMap); |
|
|
|
return startOrgInfoDTO; |
|
|
|
OrgInfoDTO orgInfoDTO = new OrgInfoDTO(); |
|
|
|
orgInfoDTO.setOrganizationCode(orgCode); |
|
|
|
orgInfoDTO.setOrganizationName(orgName); |
|
|
|
orgInfoDTO.setOrgModelMap(startOrgModelsMap); |
|
|
|
return orgInfoDTO; |
|
|
|
} |
|
|
|
} |