|
|
@ -28,10 +28,8 @@ package com.yxt.anrui.flowable.biz.flow; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.yxt.anrui.flowable.api.flow.*; |
|
|
|
import com.yxt.anrui.flowable.api.flowcomment.FlowComment; |
|
|
|
import com.yxt.anrui.flowable.api.flowtask.FlowRecordVo; |
|
|
|
import com.yxt.anrui.flowable.api.flowtask.LatestTaskVo; |
|
|
|
import com.yxt.anrui.flowable.biz.flowtask.FlowTaskService; |
|
|
|
import com.yxt.anrui.flowable.biz.process.ProcessService; |
|
|
@ -44,7 +42,6 @@ import com.yxt.common.core.query.PagerQuery; |
|
|
|
import com.yxt.common.core.result.ResultBean; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiParam; |
|
|
|
import org.flowable.bpmn.model.ExtensionAttribute; |
|
|
|
import org.flowable.bpmn.model.FlowElement; |
|
|
|
import org.flowable.bpmn.model.UserTask; |
|
|
|
import org.flowable.engine.TaskService; |
|
|
@ -119,6 +116,7 @@ public class FlowableRest implements FlowableFeign { |
|
|
|
public ResultBean<String> getNextNodeUserSidsOfCreate(BusinessVariables bv) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
String orgSidPath=bv.getOrgSidPath(); |
|
|
|
String orgPath = bv.getOrgPath(); |
|
|
|
//根据业务参数取流程流转的环节 信息
|
|
|
|
List<Map<String, Object>> list = (List<Map<String, Object>>) flowtaskService.getProcessCirculationNodesByMap(bv).getData(); |
|
|
|
if(list==null||list.size()<2){ |
|
|
@ -129,16 +127,17 @@ public class FlowableRest implements FlowableFeign { |
|
|
|
if(o==null){ |
|
|
|
return rb.setMsg("流程设计问题"); |
|
|
|
} |
|
|
|
return getNextUserSids(rb, orgSidPath, o); |
|
|
|
return getNextUserSids(rb, orgSidPath, o,orgPath); |
|
|
|
} |
|
|
|
|
|
|
|
private ResultBean getNextUserSids(ResultBean rb, String orgSidPath, Object o) { |
|
|
|
private ResultBean getNextUserSids(ResultBean rb, String orgSidPath, Object o,String orgPath) { |
|
|
|
JSONArray jsonArray = JSONArray.parseArray(JSON.toJSONString(o)); |
|
|
|
String roleSid = jsonArray.get(0).toString(); |
|
|
|
//根据组织架构、角色两个参数取相关符合条件的用户信息
|
|
|
|
UserQuery userQuery = new UserQuery(); |
|
|
|
userQuery.setRoleSid(roleSid); |
|
|
|
userQuery.setOrgSidPath(orgSidPath); |
|
|
|
userQuery.setOrgPath(orgPath); |
|
|
|
List<SysUserVo> sysUserVos = sysUserFeign.getUserByRole(userQuery).getData(); |
|
|
|
if(sysUserVos==null||sysUserVos.size()<1){ |
|
|
|
return rb.fail().setMsg("环节没有用户"); |
|
|
@ -160,6 +159,7 @@ public class FlowableRest implements FlowableFeign { |
|
|
|
ResultBean rb = ResultBean.fireSuccess(); |
|
|
|
String orgSidPath=bv.getOrgSidPath(); |
|
|
|
String taskDefKey=bv.getTaskDefKey(); |
|
|
|
String orgPath = bv.getOrgPath(); |
|
|
|
//根据业务参数取流程流转的环节 信息
|
|
|
|
List<Map<String, Object>> list = (List<Map<String, Object>>) |
|
|
|
flowtaskService.getProcessCirculationNodesByMap(bv).getData(); |
|
|
@ -178,7 +178,7 @@ public class FlowableRest implements FlowableFeign { |
|
|
|
return rb.setData(""); |
|
|
|
}else{ |
|
|
|
Object o = task_map.get("candidateGroups"); |
|
|
|
return getNextUserSids(rb, orgSidPath, o); |
|
|
|
return getNextUserSids(rb, orgSidPath, o,orgPath); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|