Browse Source

优化流程记录接口

master
dimengzhe 2 months ago
parent
commit
211fcc3f0c
  1. 21
      anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskService.java
  2. 2
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/flow/FlowableRest.java

21
anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskService.java

@ -2421,17 +2421,18 @@ public class FlowTaskService extends MybatisBaseService<FlowTaskMapper, FlowTask
Map<String, Object> map = flowableQuery.getMap();
boolean taskKeyTrue = false;
List<FlowElement> flowElements = processService.calApprovePath("", modelId, map);
// 过滤空的节点ID
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);
if (StringUtils.isBlank(flowableQuery.getTaskDefKey())) {
log.info("flowElement:{}", item);
log.info("nodeName:{}", item.getName());
// log.info("flowElement:{}", item);
// log.info("nodeName:{}", item.getName());
itemMap.put("nodeName", item.getName());
log.info("nodeId:{}", item.getId());
// log.info("nodeId:{}", item.getId());
itemMap.put("nodeId", item.getId());
String s = JSON.toJSONString(item);
/* String s = JSON.toJSONString(item);
JSONObject jsonObject = JSONObject.parseObject(s);
log.info("item:{}", jsonObject);
Object candidateGroups = jsonObject.get("candidateGroups");
@ -2442,7 +2443,7 @@ public class FlowTaskService extends MybatisBaseService<FlowTaskMapper, FlowTask
if (candidateGroups_arr.size() > 0) {
log.info("candidateGroups_sid:{}", candidateGroups_arr.get(0));
}
log.info("candidateGroups:{}", candidateGroups_arr);
log.info("candidateGroups:{}", candidateGroups_arr);*/
list.add(itemMap);
} else {
if (flowableQuery.getTaskDefKey().equals(item.getId())) {
@ -2450,12 +2451,12 @@ public class FlowTaskService extends MybatisBaseService<FlowTaskMapper, FlowTask
continue;
}
if (taskKeyTrue) {
log.info("flowElement:{}", item);
log.info("nodeName:{}", item.getName());
// log.info("flowElement:{}", item);
// log.info("nodeName:{}", item.getName());
itemMap.put("nodeName", item.getName());
log.info("nodeId:{}", item.getId());
// log.info("nodeId:{}", item.getId());
itemMap.put("nodeId", item.getId());
String s = JSON.toJSONString(item);
/* String s = JSON.toJSONString(item);
JSONObject jsonObject = JSONObject.parseObject(s);
log.info("item:{}", jsonObject);
Object candidateGroups = jsonObject.get("candidateGroups");
@ -2466,7 +2467,7 @@ public class FlowTaskService extends MybatisBaseService<FlowTaskMapper, FlowTask
if (candidateGroups_arr.size() > 0) {
log.info("candidateGroups_sid:{}", candidateGroups_arr.get(0));
}
log.info("candidateGroups:{}", candidateGroups_arr);
log.info("candidateGroups:{}", candidateGroups_arr);*/
list.add(itemMap);
}
}

2
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/flow/FlowableRest.java

@ -256,7 +256,7 @@ public class FlowableRest implements FlowableFeign {
stringObjectMap.put("taskName", f.get("nodeName").toString());
stringObjectMap.put("finishTime", null);
stringObjectMap.put("createTime", "");
stringObjectMap.put("taskUserInfos", new ArrayList<>());
stringObjectMap.put("taskUserInfos", Collections.emptyList());
a.setFlowableRecordVo(stringObjectMap);
a.setState("3");

Loading…
Cancel
Save