|
@@ -73,6 +73,7 @@ import java.nio.charset.StandardCharsets;
|
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.HashSet;
|
|
|
import java.util.LinkedHashMap;
|
|
|
import java.util.LinkedHashSet;
|
|
@@ -724,7 +725,7 @@ public class FlowOperationController {
|
|
|
* @return 流程图。
|
|
|
*/
|
|
|
@GetMapping("/viewProcessBpmnS")
|
|
|
- public ResponseResult<LinkedHashMap<String, List<String>>> viewProcessBpmnS(@RequestParam String processDefinitionId, @RequestParam String processInstanceId) throws IOException {
|
|
|
+ public ResponseResult viewProcessBpmnS(@RequestParam String processDefinitionId, @RequestParam String processInstanceId) throws IOException {
|
|
|
BpmnGetElement getElement = new BpmnGetElement();
|
|
|
BpmnXMLConverter converter = new BpmnXMLConverter();
|
|
|
BpmnModel bpmnModel = flowApiService.getBpmnModelByDefinitionId(processDefinitionId);
|
|
@@ -746,17 +747,16 @@ public class FlowOperationController {
|
|
|
//已完成的任务
|
|
|
List<String> finishedTaskList = new ArrayList<>();
|
|
|
if (finishedTaskSplit.length > 0) {
|
|
|
- for (int i = 0; i < finishedTaskSplit.length; i++) {
|
|
|
- finishedTaskList.add(finishedTaskSplit[i]);
|
|
|
- }
|
|
|
+ finishedTaskList.addAll(Arrays.asList(finishedTaskSplit));
|
|
|
}
|
|
|
|
|
|
//未完成的任务
|
|
|
List<String> unfinishedTaskList = new ArrayList<>();
|
|
|
if (unfinishedTaskSplit.length > 0) {
|
|
|
- for (int i = 0; i < unfinishedTaskSplit.length; i++) {
|
|
|
- unfinishedTaskList.add(unfinishedTaskSplit[i]);
|
|
|
- }
|
|
|
+ unfinishedTaskList.addAll(Arrays.asList(unfinishedTaskSplit));
|
|
|
+ }
|
|
|
+ for (FlowTaskComment taskComment : flowTaskCommentList) {
|
|
|
+ System.err.println("**已执行Key:" + taskComment.getTaskKey() + ",:" + taskComment.getTaskName());
|
|
|
}
|
|
|
//转换进行统计
|
|
|
Set<String> strings = userTasks.keySet();
|
|
@@ -778,27 +778,18 @@ public class FlowOperationController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- for (int o = 0; o < stringsList.size(); o++) {
|
|
|
- for (int i = 0; i < unfinishedTaskList.size(); i++) {
|
|
|
- if (unfinishedTaskList.get(i).contains(userTasks.get(stringsList.get(o)))) {
|
|
|
+
|
|
|
+ for (String value : stringsList) {
|
|
|
+ for (String s : unfinishedTaskList) {
|
|
|
+ if (s.contains(userTasks.get(value))) {
|
|
|
List<String> list = new ArrayList<>();
|
|
|
list.add("未处理");
|
|
|
- countTasks.remove(stringsList.get(o));
|
|
|
- countTasks.put(stringsList.get(o), list);
|
|
|
+ countTasks.remove(value);
|
|
|
+ countTasks.put(value, list);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
System.err.println("++++++++返回的节点数据:" + countTasks);
|
|
|
- //for (FlowTaskComment taskComment : flowTaskCommentList) {
|
|
|
- // System.err.println("KeyLength:" + taskComment.getTaskKey().length());
|
|
|
- //}
|
|
|
- //for (String s : finishedTaskList) {
|
|
|
- // System.err.println("++++++++已通过节点:" + s + ",KeyLength:" + s.length());
|
|
|
- //}
|
|
|
- //for (String s : unfinishedTaskList) {
|
|
|
- // System.err.println("++++++++未执行节点:" + s + ",KeyLength:" + s.length());
|
|
|
- //}
|
|
|
return ResponseResult.success(countTasks);
|
|
|
}
|
|
|
|