|
|
@@ -84,7 +84,6 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
@Autowired |
|
|
@Autowired |
|
|
private WxBillAllService wxBillAllService; |
|
|
private WxBillAllService wxBillAllService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 获取流程key |
|
|
* 获取流程key |
|
|
* @param flowType |
|
|
* @param flowType |
|
|
@@ -234,6 +233,10 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
map.put("variables",variables); |
|
|
map.put("variables",variables); |
|
|
map.put("supplement",supplement); |
|
|
map.put("supplement",supplement); |
|
|
map.put("taskAssignee",flowModel.getFlow()); |
|
|
map.put("taskAssignee",flowModel.getFlow()); |
|
|
|
|
|
List<String> assigneeList = new ArrayList<>(); |
|
|
|
|
|
assigneeList.add("243650055783841792"); |
|
|
|
|
|
assigneeList.add("204398756307664896"); |
|
|
|
|
|
map.put("assigneeList",assigneeList); |
|
|
|
|
|
|
|
|
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(flowModel.getFlowId(), map); |
|
|
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(flowModel.getFlowId(), map); |
|
|
logger.debug("流程启动,流程id:{}",processInstance.getId()); |
|
|
logger.debug("流程启动,流程id:{}",processInstance.getId()); |
|
|
@@ -396,7 +399,7 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
int total = taskQuery.taskCandidateUser(userId.toString()).list().size(); |
|
|
|
|
|
|
|
|
int total = taskQuery.taskCandidateOrAssigned(userId.toString()).list().size(); |
|
|
int pages; |
|
|
int pages; |
|
|
if(total % pageSize == 0){ |
|
|
if(total % pageSize == 0){ |
|
|
pages = total / pageSize; |
|
|
pages = total / pageSize; |
|
|
@@ -1102,13 +1105,26 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
userTask.setName("节点" + (i + 1)); |
|
|
userTask.setName("节点" + (i + 1)); |
|
|
userTask.setId("userTask" + (i + 1)); |
|
|
userTask.setId("userTask" + (i + 1)); |
|
|
List<String> userIdList = new ArrayList<>(); |
|
|
List<String> userIdList = new ArrayList<>(); |
|
|
for (FlowUserVo userVo:taskVo.getUserList()) { |
|
|
|
|
|
|
|
|
String collection = ""; |
|
|
|
|
|
for (int j = 0; j < taskVo.getUserList().size(); j++) { |
|
|
|
|
|
FlowUserVo userVo = taskVo.getUserList().get(j); |
|
|
userIdList.add(userVo.getId() + ""); |
|
|
userIdList.add(userVo.getId() + ""); |
|
|
|
|
|
if(j==taskVo.getUserList().size()-1){ |
|
|
|
|
|
collection += userVo.getId(); |
|
|
|
|
|
}else{ |
|
|
|
|
|
collection += userVo.getId()+","; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
userTask.setCandidateUsers(userIdList); |
|
|
|
|
|
if (EnumTaskType.AND.getCode().equals(taskVo.getType())) { |
|
|
|
|
|
|
|
|
collection += ""; |
|
|
|
|
|
|
|
|
|
|
|
if(EnumTaskType.NORMAL.getCode().equals(taskVo.getType()) || EnumTaskType.OR.getCode().equals(taskVo.getType())){ |
|
|
|
|
|
userTask.setCandidateUsers(userIdList); |
|
|
|
|
|
}else if (EnumTaskType.AND.getCode().equals(taskVo.getType())) { |
|
|
|
|
|
userTask.setAssignee("${assignee}"); |
|
|
MultiInstanceLoopCharacteristics mi = new MultiInstanceLoopCharacteristics(); |
|
|
MultiInstanceLoopCharacteristics mi = new MultiInstanceLoopCharacteristics(); |
|
|
mi.setLoopCardinality("1"); |
|
|
|
|
|
|
|
|
mi.setLoopCardinality(userIdList.size()+""); |
|
|
|
|
|
mi.setInputDataItem("${assigneeList}"); |
|
|
|
|
|
mi.setElementVariable("assignee"); |
|
|
userTask.setLoopCharacteristics(mi); |
|
|
userTask.setLoopCharacteristics(mi); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|