Merge branch 'feature/REQ-4418' into dev
This commit is contained in:
commit
4c907394f6
@ -121,6 +121,8 @@ public interface BpmnConstants {
|
|||||||
String CONFIG_BUTTON_TYPE_HISTORY = "history";
|
String CONFIG_BUTTON_TYPE_HISTORY = "history";
|
||||||
String CONFIG_BUTTON_TYPE_CARBON_COPY = "carbonCopy";
|
String CONFIG_BUTTON_TYPE_CARBON_COPY = "carbonCopy";
|
||||||
String CONFIG_SIGN_TYPE = "signType";
|
String CONFIG_SIGN_TYPE = "signType";
|
||||||
|
String CONFIG_AREA_FILTER_ENABLE = "areaFilterEnable";
|
||||||
|
String CONFIG_SPECIALTY_FILTER_ENABLE = "specialtyFilterEnable";
|
||||||
String ELEMENT_ATTRIBUTE_NAME = "name";
|
String ELEMENT_ATTRIBUTE_NAME = "name";
|
||||||
String ELEMENT_ATTRIBUTE_VALUE = "value";
|
String ELEMENT_ATTRIBUTE_VALUE = "value";
|
||||||
String ELEMENT_ATTRIBUTE_DESC = "desc";
|
String ELEMENT_ATTRIBUTE_DESC = "desc";
|
||||||
|
|||||||
@ -31,12 +31,12 @@ public class CooperationOrgDTO implements Serializable {
|
|||||||
private Long nodeId;
|
private Long nodeId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基于人权事的,需要排除的身份类型
|
* 基于人权事的,指定某些管理管辖人员
|
||||||
*/
|
*/
|
||||||
private List<String> includeAreaCodes;
|
private List<String> includeAreaCodes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基于人权事的,需要排除的参建单位类型
|
* 基于人权事的,指定专业管辖人员
|
||||||
*/
|
*/
|
||||||
private List<String> includeSpecialtyCodes;
|
private List<String> includeSpecialtyCodes;
|
||||||
|
|
||||||
|
|||||||
@ -129,6 +129,7 @@ import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApprove
|
|||||||
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverSpecifyRangeUnit;
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverSpecifyRangeUnit;
|
||||||
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverSpecifyValue;
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverSpecifyValue;
|
||||||
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverSpecifyValueV2;
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverSpecifyValueV2;
|
||||||
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getAreaFilterEnable;
|
||||||
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getButtonConfig;
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getButtonConfig;
|
||||||
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getCategoryVersion;
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getCategoryVersion;
|
||||||
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getCooperateShipType;
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getCooperateShipType;
|
||||||
@ -140,6 +141,7 @@ import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getInitiat
|
|||||||
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getNoticeConfig;
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getNoticeConfig;
|
||||||
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getProcessApproveConf;
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getProcessApproveConf;
|
||||||
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getSignConfig;
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getSignConfig;
|
||||||
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getSpecialtyFilterEnable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BPMN json 格式转换工具
|
* BPMN json 格式转换工具
|
||||||
@ -856,6 +858,8 @@ public final class BpmnJsonConverterUtil {
|
|||||||
Optional<CooperateShipTypeEnum> cooperateShipType = getCooperateShipType(flowElement);
|
Optional<CooperateShipTypeEnum> cooperateShipType = getCooperateShipType(flowElement);
|
||||||
Optional<ApproverSpecifyRangeUnitEnum> approverSpecifyRangeUnit = getApproverSpecifyRangeUnit(flowElement);
|
Optional<ApproverSpecifyRangeUnitEnum> approverSpecifyRangeUnit = getApproverSpecifyRangeUnit(flowElement);
|
||||||
Optional<SignApproverOrgLimitEnum> approverSpecifyRangeOrgLimit = getApproverSpecifyRangeOrgLimit(flowElement);
|
Optional<SignApproverOrgLimitEnum> approverSpecifyRangeOrgLimit = getApproverSpecifyRangeOrgLimit(flowElement);
|
||||||
|
Boolean areaFilterEnable = getAreaFilterEnable(flowElement);
|
||||||
|
Boolean specialtyFilterEnable = getSpecialtyFilterEnable(flowElement);
|
||||||
// generateImage(bpmnModel);
|
// generateImage(bpmnModel);
|
||||||
|
|
||||||
byte[] xml = transformBytes(bpmnModel);
|
byte[] xml = transformBytes(bpmnModel);
|
||||||
|
|||||||
@ -71,6 +71,7 @@ import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_APPROVE_SPEC
|
|||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_APPROVE_SPECIFY_RANGE;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_APPROVE_SPECIFY_RANGE;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_APPROVE_SPECIFY_RANGE_ORG_LIMIT;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_APPROVE_SPECIFY_RANGE_ORG_LIMIT;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_APPROVE_SPECIFY_RANGE_UNIT;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_APPROVE_SPECIFY_RANGE_UNIT;
|
||||||
|
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_AREA_FILTER_ENABLE;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_BUTTON;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_BUTTON;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_BUTTON_META;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_BUTTON_META;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_BUTTON_TYPE_CARBON_COPY;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_BUTTON_TYPE_CARBON_COPY;
|
||||||
@ -96,6 +97,7 @@ import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_SIGN_APPROVE
|
|||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_SIGN_APPROVER_ORG_LIMIT;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_SIGN_APPROVER_ORG_LIMIT;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_SIGN_APPROVER_ROLE_LIMIT;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_SIGN_APPROVER_ROLE_LIMIT;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_SIGN_TYPE;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_SIGN_TYPE;
|
||||||
|
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_SPECIALTY_FILTER_ENABLE;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.ELEMENT_ATTRIBUTE_APPROVER_SPECIFY;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.ELEMENT_ATTRIBUTE_APPROVER_SPECIFY;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.ELEMENT_ATTRIBUTE_CHECKED;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.ELEMENT_ATTRIBUTE_CHECKED;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.ELEMENT_ATTRIBUTE_CODE;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.ELEMENT_ATTRIBUTE_CODE;
|
||||||
@ -691,6 +693,14 @@ public final class BpmnMetaParserHelper {
|
|||||||
&& Objects.equals(specifyEnum, ApproverSpecifyEnum.initiatorSpecified);
|
&& Objects.equals(specifyEnum, ApproverSpecifyEnum.initiatorSpecified);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Boolean getAreaFilterEnable(FlowElement flowElement){
|
||||||
|
return defaultValid(flowElement, CONFIG_AREA_FILTER_ENABLE).map(element -> Boolean.valueOf(element.getAttributeValue(null, ELEMENT_ATTRIBUTE_CHECKED))).orElse(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Boolean getSpecialtyFilterEnable(FlowElement flowElement){
|
||||||
|
return defaultValid(flowElement, CONFIG_SPECIALTY_FILTER_ENABLE).map(element -> Boolean.valueOf(element.getAttributeValue(null, ELEMENT_ATTRIBUTE_CHECKED))).orElse(false);
|
||||||
|
}
|
||||||
|
|
||||||
private static Optional<ExtensionElement> defaultValid(FlowElement flowElement, String elementName) {
|
private static Optional<ExtensionElement> defaultValid(FlowElement flowElement, String elementName) {
|
||||||
if (Objects.isNull(flowElement)) {
|
if (Objects.isNull(flowElement)) {
|
||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
|
|||||||
@ -39,6 +39,7 @@ import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_APPROVE_SPEC
|
|||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_APPROVE_SPECIFY_RANGE;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_APPROVE_SPECIFY_RANGE;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_APPROVE_SPECIFY_RANGE_ORG_LIMIT;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_APPROVE_SPECIFY_RANGE_ORG_LIMIT;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_APPROVE_SPECIFY_RANGE_UNIT;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_APPROVE_SPECIFY_RANGE_UNIT;
|
||||||
|
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_AREA_FILTER_ENABLE;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_BUTTON;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_BUTTON;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_BUTTON_TYPE_CARBON_COPY;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_BUTTON_TYPE_CARBON_COPY;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_BUTTON_TYPE_CURRENT;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_BUTTON_TYPE_CURRENT;
|
||||||
@ -53,6 +54,7 @@ import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_INITIATOR_SP
|
|||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_SIGN_APPROVER_LIMIT;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_SIGN_APPROVER_LIMIT;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_SIGN_APPROVER_ORG_LIMIT;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_SIGN_APPROVER_ORG_LIMIT;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_SIGN_APPROVER_ROLE_LIMIT;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_SIGN_APPROVER_ROLE_LIMIT;
|
||||||
|
import static cn.axzo.workflow.common.constant.BpmnConstants.CONFIG_SPECIALTY_FILTER_ENABLE;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.ELEMENT_ATTRIBUTE_APPROVER_SPECIFY;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.ELEMENT_ATTRIBUTE_APPROVER_SPECIFY;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.ELEMENT_ATTRIBUTE_CHECKED;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.ELEMENT_ATTRIBUTE_CHECKED;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.ELEMENT_ATTRIBUTE_DESC;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.ELEMENT_ATTRIBUTE_DESC;
|
||||||
@ -163,9 +165,24 @@ public class UserTaskJsonConverter extends AbstractBpmnJsonConverter<UserTask> {
|
|||||||
buildMetaButton(buttonConf.getHistory(), CONFIG_BUTTON_TYPE_HISTORY, buttonConfigElement);
|
buildMetaButton(buttonConf.getHistory(), CONFIG_BUTTON_TYPE_HISTORY, buttonConfigElement);
|
||||||
buildMetaButton(buttonConf.getCarbonCopy(), CONFIG_BUTTON_TYPE_CARBON_COPY, buttonConfigElement);
|
buildMetaButton(buttonConf.getCarbonCopy(), CONFIG_BUTTON_TYPE_CARBON_COPY, buttonConfigElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
userTask.addExtensionElement(buttonConfigElement);
|
userTask.addExtensionElement(buttonConfigElement);
|
||||||
|
|
||||||
|
ExtensionElement areaFilterEnableElement = new ExtensionElement();
|
||||||
|
areaFilterEnableElement.setName(CONFIG_AREA_FILTER_ENABLE);
|
||||||
|
ExtensionAttribute areaFilterEnableAttribute = new ExtensionAttribute();
|
||||||
|
areaFilterEnableAttribute.setName(ELEMENT_ATTRIBUTE_CHECKED);
|
||||||
|
areaFilterEnableAttribute.setValue(String.valueOf(Boolean.TRUE.equals(node.getProperty().getAreaFilterEnable())));
|
||||||
|
areaFilterEnableElement.addAttribute(areaFilterEnableAttribute);
|
||||||
|
userTask.addExtensionElement(areaFilterEnableElement);
|
||||||
|
|
||||||
|
ExtensionElement specialtyFilterEnableElement = new ExtensionElement();
|
||||||
|
specialtyFilterEnableElement.setName(CONFIG_SPECIALTY_FILTER_ENABLE);
|
||||||
|
ExtensionAttribute specialtyFilterEnableAttribute = new ExtensionAttribute();
|
||||||
|
specialtyFilterEnableAttribute.setName(ELEMENT_ATTRIBUTE_CHECKED);
|
||||||
|
specialtyFilterEnableAttribute.setValue(String.valueOf(Boolean.TRUE.equals(node.getProperty().getSpecialtyFilterEnable())));
|
||||||
|
specialtyFilterEnableElement.addAttribute(specialtyFilterEnableAttribute);
|
||||||
|
userTask.addExtensionElement(specialtyFilterEnableElement);
|
||||||
|
|
||||||
//添加自动审批配置
|
//添加自动审批配置
|
||||||
ExtensionElement autoApprovalExtensionElement = new ExtensionElement();
|
ExtensionElement autoApprovalExtensionElement = new ExtensionElement();
|
||||||
ExtensionAttribute pendingMessageAttribute = new ExtensionAttribute();
|
ExtensionAttribute pendingMessageAttribute = new ExtensionAttribute();
|
||||||
|
|||||||
@ -8,8 +8,6 @@ import cn.axzo.orggateway.api.nodeuser.req.FlowTaskAssignerV2Req;
|
|||||||
import cn.axzo.orggateway.api.nodeuser.resp.FlowTaskAssignerV2Resp;
|
import cn.axzo.orggateway.api.nodeuser.resp.FlowTaskAssignerV2Resp;
|
||||||
import cn.axzo.workflow.common.enums.ApproverSpecifyEnum;
|
import cn.axzo.workflow.common.enums.ApproverSpecifyEnum;
|
||||||
import cn.axzo.workflow.common.enums.ApproverSpecifyRangeEnum;
|
import cn.axzo.workflow.common.enums.ApproverSpecifyRangeEnum;
|
||||||
import cn.axzo.workflow.common.enums.ApproverSpecifyRangeUnitEnum;
|
|
||||||
import cn.axzo.workflow.common.enums.CooperateShipTypeEnum;
|
|
||||||
import cn.axzo.workflow.common.enums.SignApproverOrgLimitEnum;
|
import cn.axzo.workflow.common.enums.SignApproverOrgLimitEnum;
|
||||||
import cn.axzo.workflow.common.exception.WorkflowEngineException;
|
import cn.axzo.workflow.common.exception.WorkflowEngineException;
|
||||||
import cn.axzo.workflow.common.model.dto.CooperationOrgDTO;
|
import cn.axzo.workflow.common.model.dto.CooperationOrgDTO;
|
||||||
@ -31,20 +29,18 @@ import java.util.Optional;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static cn.axzo.workflow.common.code.FlowableEngineRespCode.ENGINE_IDENTITY_V2_CONFIG_INVALID;
|
|
||||||
import static cn.axzo.workflow.common.code.FlowableEngineRespCode.ENGINE_ROLE_V2_CONFIG_INVALID;
|
import static cn.axzo.workflow.common.code.FlowableEngineRespCode.ENGINE_ROLE_V2_CONFIG_INVALID;
|
||||||
import static cn.axzo.workflow.common.code.FlowableEngineRespCode.ENGINE_USER_TASK_TYPE_NOT_SUPPORT;
|
import static cn.axzo.workflow.common.code.FlowableEngineRespCode.ENGINE_USER_TASK_TYPE_NOT_SUPPORT;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.BIZ_ORG_RELATION;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.BIZ_ORG_RELATION;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.CLOSE_PROCESS_ASSIGNER;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.CLOSE_PROCESS_ASSIGNER;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.INTERNAL_INITIATOR;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.INTERNAL_INITIATOR;
|
||||||
import static cn.axzo.workflow.common.enums.ApproverEmptyHandleTypeEnum.transferToAdmin;
|
import static cn.axzo.workflow.common.enums.ApproverEmptyHandleTypeEnum.transferToAdmin;
|
||||||
import static cn.axzo.workflow.common.enums.ApproverSpecifyRangeUnitEnum.in_project;
|
|
||||||
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverEmptyHandleType;
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverEmptyHandleType;
|
||||||
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverSpecifyRange;
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverSpecifyRange;
|
||||||
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverSpecifyRangeOrgLimit;
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverSpecifyRangeOrgLimit;
|
||||||
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverSpecifyRangeUnit;
|
|
||||||
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverSpecifyValueV2;
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverSpecifyValueV2;
|
||||||
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getCooperateShipType;
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getAreaFilterEnable;
|
||||||
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getSpecialtyFilterEnable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基于新版配置的身份查询审批人
|
* 基于新版配置的身份查询审批人
|
||||||
@ -79,9 +75,9 @@ public class BasedIdentityV2TaskAssigneeSelector extends AbstractBpmnTaskAssigne
|
|||||||
.scene(FlowTaskAssignerQuerySceneEnum.BY_ROLE)
|
.scene(FlowTaskAssignerQuerySceneEnum.BY_ROLE)
|
||||||
.identities(getApproverSpecifyValue(flowElement))
|
.identities(getApproverSpecifyValue(flowElement))
|
||||||
.initiatorPersonId(initiator.parsePersonId())
|
.initiatorPersonId(initiator.parsePersonId())
|
||||||
.areaCodes(Sets.newHashSet(ListUtils.emptyIfNull(orgDTO.getIncludeAreaCodes())))
|
.areaCodes(getAreaFilterEnable(flowElement) ? Sets.newHashSet(ListUtils.emptyIfNull(orgDTO.getIncludeAreaCodes())) : Sets.newHashSet())
|
||||||
.specialtyCodes(Sets.newHashSet(ListUtils.emptyIfNull(orgDTO.getIncludeSpecialtyCodes())))
|
.specialtyCodes(getSpecialtyFilterEnable(flowElement) ? Sets.newHashSet(ListUtils.emptyIfNull(orgDTO.getIncludeSpecialtyCodes())) : Sets.newHashSet())
|
||||||
.querySupervisorWhileMissMatched(getApproverEmptyHandleType(flowElement).filter(type -> Objects.equals(type, transferToAdmin)).isPresent());
|
.querySupervisorWhileMissMatched(getApproverEmptyHandleType(flowElement).filter(type -> Objects.equals(type, transferToAdmin)).isPresent());
|
||||||
switch (optRange.get()) {
|
switch (optRange.get()) {
|
||||||
case within_the_project:
|
case within_the_project:
|
||||||
log.info("executing role v2 with within_the_project");
|
log.info("executing role v2 with within_the_project");
|
||||||
|
|||||||
@ -41,7 +41,9 @@ import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApprove
|
|||||||
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverSpecifyRangeOrgLimit;
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverSpecifyRangeOrgLimit;
|
||||||
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverSpecifyRangeUnit;
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverSpecifyRangeUnit;
|
||||||
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverSpecifyValueV2;
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverSpecifyValueV2;
|
||||||
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getAreaFilterEnable;
|
||||||
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getCooperateShipType;
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getCooperateShipType;
|
||||||
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getSpecialtyFilterEnable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基于新版配置的岗位查询审批人
|
* 基于新版配置的岗位查询审批人
|
||||||
@ -73,12 +75,13 @@ public class BasedPositionV2TaskAssigneeSelector extends AbstractBpmnTaskAssigne
|
|||||||
BpmnTaskDelegateAssigner initiator =
|
BpmnTaskDelegateAssigner initiator =
|
||||||
BpmnTaskDelegateAssigner.toObjectCompatible(execution.getVariables().get(INTERNAL_INITIATOR));
|
BpmnTaskDelegateAssigner.toObjectCompatible(execution.getVariables().get(INTERNAL_INITIATOR));
|
||||||
|
|
||||||
|
;
|
||||||
FlowTaskAssignerV2Req.FlowTaskAssignerV2ReqBuilder v2ReqBuilder = FlowTaskAssignerV2Req.builder()
|
FlowTaskAssignerV2Req.FlowTaskAssignerV2ReqBuilder v2ReqBuilder = FlowTaskAssignerV2Req.builder()
|
||||||
.scene(FlowTaskAssignerQuerySceneEnum.BY_JOB)
|
.scene(FlowTaskAssignerQuerySceneEnum.BY_JOB)
|
||||||
.jobCodes(getApproverSpecifyValue(flowElement))
|
.jobCodes(getApproverSpecifyValue(flowElement))
|
||||||
.initiatorPersonId(initiator.parsePersonId())
|
.initiatorPersonId(initiator.parsePersonId())
|
||||||
.areaCodes(Sets.newHashSet(ListUtils.emptyIfNull(orgDTO.getIncludeAreaCodes())))
|
.areaCodes(getAreaFilterEnable(flowElement) ? Sets.newHashSet(ListUtils.emptyIfNull(orgDTO.getIncludeAreaCodes())) : Sets.newHashSet())
|
||||||
.specialtyCodes(Sets.newHashSet(ListUtils.emptyIfNull(orgDTO.getIncludeSpecialtyCodes())))
|
.specialtyCodes(getSpecialtyFilterEnable(flowElement) ? Sets.newHashSet(ListUtils.emptyIfNull(orgDTO.getIncludeSpecialtyCodes())) : Sets.newHashSet())
|
||||||
.querySupervisorWhileMissMatched(getApproverEmptyHandleType(flowElement).filter(type -> Objects.equals(type, transferToAdmin)).isPresent());
|
.querySupervisorWhileMissMatched(getApproverEmptyHandleType(flowElement).filter(type -> Objects.equals(type, transferToAdmin)).isPresent());
|
||||||
switch (optRange.get()) {
|
switch (optRange.get()) {
|
||||||
case within_the_project:
|
case within_the_project:
|
||||||
|
|||||||
@ -30,7 +30,6 @@ import java.util.Optional;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static cn.axzo.workflow.common.code.FlowableEngineRespCode.ENGINE_POSITION_V2_CONFIG_INVALID;
|
|
||||||
import static cn.axzo.workflow.common.code.FlowableEngineRespCode.ENGINE_ROLE_V2_CONFIG_INVALID;
|
import static cn.axzo.workflow.common.code.FlowableEngineRespCode.ENGINE_ROLE_V2_CONFIG_INVALID;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.BIZ_ORG_RELATION;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.BIZ_ORG_RELATION;
|
||||||
import static cn.axzo.workflow.common.constant.BpmnConstants.CLOSE_PROCESS_ASSIGNER;
|
import static cn.axzo.workflow.common.constant.BpmnConstants.CLOSE_PROCESS_ASSIGNER;
|
||||||
@ -42,7 +41,9 @@ import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApprove
|
|||||||
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverSpecifyRangeOrgLimit;
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverSpecifyRangeOrgLimit;
|
||||||
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverSpecifyRangeUnit;
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverSpecifyRangeUnit;
|
||||||
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverSpecifyValueV2;
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getApproverSpecifyValueV2;
|
||||||
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getAreaFilterEnable;
|
||||||
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getCooperateShipType;
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getCooperateShipType;
|
||||||
|
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getSpecialtyFilterEnable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基于新版配置的角色查询审批人
|
* 基于新版配置的角色查询审批人
|
||||||
@ -77,9 +78,9 @@ public class BasedRoleV2TaskAssigneeSelector extends AbstractBpmnTaskAssigneeSel
|
|||||||
.scene(FlowTaskAssignerQuerySceneEnum.BY_ROLE)
|
.scene(FlowTaskAssignerQuerySceneEnum.BY_ROLE)
|
||||||
.roleIds(getApproverSpecifyValue(flowElement))
|
.roleIds(getApproverSpecifyValue(flowElement))
|
||||||
.initiatorPersonId(initiator.parsePersonId())
|
.initiatorPersonId(initiator.parsePersonId())
|
||||||
.areaCodes(Sets.newHashSet(ListUtils.emptyIfNull(orgDTO.getIncludeAreaCodes())))
|
.areaCodes(getAreaFilterEnable(flowElement) ? Sets.newHashSet(ListUtils.emptyIfNull(orgDTO.getIncludeAreaCodes())) : Sets.newHashSet())
|
||||||
.specialtyCodes(Sets.newHashSet(ListUtils.emptyIfNull(orgDTO.getIncludeSpecialtyCodes())))
|
.specialtyCodes(getSpecialtyFilterEnable(flowElement) ? Sets.newHashSet(ListUtils.emptyIfNull(orgDTO.getIncludeSpecialtyCodes())) : Sets.newHashSet())
|
||||||
.querySupervisorWhileMissMatched(getApproverEmptyHandleType(flowElement).filter(type -> Objects.equals(type, transferToAdmin)).isPresent());
|
.querySupervisorWhileMissMatched(getApproverEmptyHandleType(flowElement).filter(type -> Objects.equals(type, transferToAdmin)).isPresent());
|
||||||
switch (optRange.get()) {
|
switch (optRange.get()) {
|
||||||
case within_the_project:
|
case within_the_project:
|
||||||
log.info("executing role v2 with within_the_project");
|
log.info("executing role v2 with within_the_project");
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -20,6 +20,8 @@
|
|||||||
// "initiatorSpecifiedFilter": true,
|
// "initiatorSpecifiedFilter": true,
|
||||||
// "excludeIdentityTypes": ["1", "2"],
|
// "excludeIdentityTypes": ["1", "2"],
|
||||||
// "excludeCooperateShipTypes": ["3","4"],
|
// "excludeCooperateShipTypes": ["3","4"],
|
||||||
|
"areaFilterEnable":true,
|
||||||
|
"specialtyFilterEnable":true,
|
||||||
"approvalMethod": "human",
|
"approvalMethod": "human",
|
||||||
"multiMode": "AND",
|
"multiMode": "AND",
|
||||||
"sign": false,
|
"sign": false,
|
||||||
@ -416,7 +418,7 @@
|
|||||||
"approvalMethod": "human",
|
"approvalMethod": "human",
|
||||||
"approverScope": "projectWorkspace",
|
"approverScope": "projectWorkspace",
|
||||||
"approverSpecify": "position_v2",
|
"approverSpecify": "position_v2",
|
||||||
"approverSpecifyRange": "positions_within_the_project",
|
"approverSpecifyRange": "within_the_project",
|
||||||
"cooperateShipType": null,
|
"cooperateShipType": null,
|
||||||
"approverSpecifyRangeOrgLimit": null,
|
"approverSpecifyRangeOrgLimit": null,
|
||||||
"approverSpecifyRangeUnit": null,
|
"approverSpecifyRangeUnit": null,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user