|
@@ -15,7 +15,6 @@ import com.dragonsoft.dcuc.approve.model.resp.TaskOperateRespVO;
|
|
|
import com.dragonsoft.dcuc.approve.model.resp.TaskOutgoingVo;
|
|
|
import com.dragonsoft.dcuc.approve.properties.ApproveProperties;
|
|
|
import com.dragonsoft.duceap.base.exception.ApplicationException;
|
|
|
-import com.dragonsoft.duceap.commons.util.enums.EnumUtils;
|
|
|
import com.dragonsoft.duceap.core.entity.page.PageRequest;
|
|
|
import com.dragonsoft.duceap.core.search.Searchable;
|
|
|
import com.dragonsoft.duceap.core.search.enums.SearchOperator;
|
|
@@ -111,22 +110,19 @@ public class WorkFlowBusinessImpl implements IWorkFlowBusiness {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public WorkflowProcesstypeVo queryProcessType(String processTypeCode, String appCode) {
|
|
|
- if (!approveProperties.getAppCode().equals(appCode)) {
|
|
|
- return null;
|
|
|
- }
|
|
|
+ public WorkflowProcesstypeVo queryProcessType(String processTypeCode) {
|
|
|
//获取流程类别详情
|
|
|
return workflowClientFactory.getWorkflowProcessDefTypeClient().findOneByCode(processTypeCode);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<ApproveWorkflowProcessTypeVo> queryProcessTypeList(String appCode) {
|
|
|
+ public List<ApproveWorkflowProcessTypeVo> queryProcessTypeList() {
|
|
|
ApproveProperties.Workflow workflow = approveProperties.getWorkflow();
|
|
|
|
|
|
String processTypeCode = workflow.getProcessTypeCode();
|
|
|
|
|
|
//根据流程类别code获取流程类别信息
|
|
|
- WorkflowProcesstypeVo workflowProcesstypeVo = queryProcessType(processTypeCode, appCode);
|
|
|
+ WorkflowProcesstypeVo workflowProcesstypeVo = queryProcessType(processTypeCode);
|
|
|
List<ApproveWorkflowProcessTypeVo> result = new ArrayList<>();
|
|
|
if (null != workflowProcesstypeVo) {
|
|
|
//根据流程类别id查询子类别
|
|
@@ -183,7 +179,7 @@ public class WorkFlowBusinessImpl implements IWorkFlowBusiness {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public TaskOperateRespVO getTaskSupportOperate(String taskId, String pageType) {
|
|
|
+ public TaskOperateRespVO getTaskSupportOperate(String taskId, PageTypeEnum pageTypeEnum) {
|
|
|
// 判断是否是结束节点
|
|
|
TaskOperateRespVO taskOperateRespVO = new TaskOperateRespVO();
|
|
|
if (!Constants.END_STR.equals(taskId)) {
|
|
@@ -198,7 +194,7 @@ public class WorkFlowBusinessImpl implements IWorkFlowBusiness {
|
|
|
//流程出口信息
|
|
|
OutgoingVo outgoingVo = workflowClientFactory.getWorkflowTaskClient().queryStartOutgoing(processDefinitionId);
|
|
|
//设置是否显示撤回
|
|
|
- appendShowBack(taskOperateRespVO, taskId, processInstanceId, outgoingVo, pageType);
|
|
|
+ appendShowBack(taskOperateRespVO, taskId, processInstanceId, outgoingVo, pageTypeEnum);
|
|
|
//设置是否显示编辑
|
|
|
appendShowEdit(taskOperateRespVO, outgoingVo, processDefinitionId);
|
|
|
}
|
|
@@ -213,7 +209,7 @@ public class WorkFlowBusinessImpl implements IWorkFlowBusiness {
|
|
|
* @param processInstanceId 实例ID
|
|
|
*/
|
|
|
private void appendShowBack(TaskOperateRespVO taskOperateRespVO, String taskId, String processInstanceId,
|
|
|
- OutgoingVo outgoingVo, String pageType) {
|
|
|
+ OutgoingVo outgoingVo, PageTypeEnum pageTypeEnum) {
|
|
|
|
|
|
List<String> taskDefinitionKeyList = new ArrayList<>();
|
|
|
for (TaskDefinitionVo taskDefinitionVo : outgoingVo.getTaskDefinitionVoList()) {
|
|
@@ -225,7 +221,6 @@ public class WorkFlowBusinessImpl implements IWorkFlowBusiness {
|
|
|
taskOperateRespVO.setShowBack(false);
|
|
|
} else {
|
|
|
String historyTaskDefinitionKey;
|
|
|
- PageTypeEnum pageTypeEnum = EnumUtils.enumOf(PageTypeEnum.class, pageType);
|
|
|
if (pageTypeEnum != null && pageTypeEnum.equals(PageTypeEnum.REQUEST)) {
|
|
|
historyTaskDefinitionKey = outgoingVo.getTaskDefinitionVoList().get(0).getTaskDefinitionKey();
|
|
|
|