|
|
@ -2074,4 +2074,36 @@ public class FlowTaskService extends MybatisBaseService<FlowTaskMapper, FlowTask |
|
|
|
ResultBean<Page<FlowTaskDto>> rb = new ResultBean<Page<FlowTaskDto>>(); |
|
|
|
return rb.success().setData(page); |
|
|
|
} |
|
|
|
|
|
|
|
public ResultBean<List<Map<String,Object>>> yuyanTest(FlowableQuery flowableQuery) { |
|
|
|
ResultBean<List<Map<String,Object>>> rb = ResultBean.fireFail(); |
|
|
|
List<Map<String,Object>> list = new ArrayList<>(); |
|
|
|
String modelId = flowableQuery.getModelId(); |
|
|
|
Map<String,Object> map = flowableQuery.getMap(); |
|
|
|
List<FlowElement> flowElements = processService.calApprovePath("", modelId,map); |
|
|
|
List<FlowElement> collect = flowElements.stream().filter(item -> item.getId().length() > 0).collect(Collectors.toList()); |
|
|
|
for (int i = 0; i < collect.size(); i++) { |
|
|
|
Map<String,Object> itemMap = new HashMap<>(); |
|
|
|
FlowElement item = collect.get(i); |
|
|
|
log.info("flowElement:{}", item); |
|
|
|
log.info("nodeName:{}", item.getName()); |
|
|
|
itemMap.put("nodeName",item.getName()); |
|
|
|
log.info("nodeId:{}", item.getId()); |
|
|
|
itemMap.put("nodeId",item.getId()); |
|
|
|
String s = JSON.toJSONString(item); |
|
|
|
JSONObject jsonObject = JSONObject.parseObject(s); |
|
|
|
log.info("item:{}", jsonObject); |
|
|
|
Object candidateGroups = jsonObject.get("candidateGroups"); |
|
|
|
JSONArray candidateGroups_arr = new JSONArray(); |
|
|
|
if (candidateGroups != null) { |
|
|
|
candidateGroups_arr = JSONArray.parseArray(candidateGroups.toString()); |
|
|
|
} |
|
|
|
if (candidateGroups_arr.size() > 0) { |
|
|
|
log.info("candidateGroups_sid:{}", candidateGroups_arr.get(0)); |
|
|
|
} |
|
|
|
log.info("candidateGroups:{}", candidateGroups_arr); |
|
|
|
list.add(itemMap); |
|
|
|
} |
|
|
|
return rb.success().setData(list); |
|
|
|
} |
|
|
|
} |