车车 5 месяцев назад
Родитель
Сommit
25c011dc45

+ 470 - 1
yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/service/workdesign/WorkflowDesignNodeServiceImpl.java

@@ -118,7 +118,7 @@ public class WorkflowDesignNodeServiceImpl extends ServiceImpl<WorkflowDesignNod
                     String type = node.get("type").asText();
                     String position = node.get("position").toString();
                     String data = node.get("data").toString();
-                    String remark = node.get("data").get("remark").asText();
+                    String remark = node.get("data").get("remark") != null ? node.get("data").get("remark").asText() : null;
 
                     System.out.printf("节点%d: uuid=%s, nodeName=%s, nodeIcon=%s, 类型=%s, position=%s, 标签=%s%n",
                             ++index, uuid, nodeName, nodeIcon, type, position, remark);
@@ -139,4 +139,473 @@ public class WorkflowDesignNodeServiceImpl extends ServiceImpl<WorkflowDesignNod
         return workflowDesignNodeDOS;
     }
 
+    public static void main(String[] args) {
+
+        String aa = "{\n" +
+                "  \"generatedAt\": \"2025-12-18T02:12:57.931Z\",\n" +
+                "  \"nodeCount\": 14,\n" +
+                "  \"edgeCount\": 16,\n" +
+                "  \"adjacency\": {\n" +
+                "    \"createJob-1766023817148\": {\n" +
+                "      \"incoming\": [\n" +
+                "        \"confirm-1766023821012\"\n" +
+                "      ],\n" +
+                "      \"outgoing\": []\n" +
+                "    },\n" +
+                "    \"confirm-1766023821012\": {\n" +
+                "      \"incoming\": [\n" +
+                "        \"review-1766023825604\"\n" +
+                "      ],\n" +
+                "      \"outgoing\": [\n" +
+                "        \"createJob-1766023817148\"\n" +
+                "      ]\n" +
+                "    },\n" +
+                "    \"review-1766023825604\": {\n" +
+                "      \"incoming\": [\n" +
+                "        \"inputInfo-1766023831636\",\n" +
+                "        \"inputInfo-1766023848740\"\n" +
+                "      ],\n" +
+                "      \"outgoing\": [\n" +
+                "        \"confirm-1766023821012\"\n" +
+                "      ]\n" +
+                "    },\n" +
+                "    \"inputInfo-1766023831636\": {\n" +
+                "      \"incoming\": [\n" +
+                "        \"isolation-1766023834331\",\n" +
+                "        \"isolation-1766023839756\",\n" +
+                "        \"isolation-1766023837357\"\n" +
+                "      ],\n" +
+                "      \"outgoing\": [\n" +
+                "        \"review-1766023825604\"\n" +
+                "      ]\n" +
+                "    },\n" +
+                "    \"isolation-1766023834331\": {\n" +
+                "      \"incoming\": [\n" +
+                "        \"releaseIsolation-1766023890300\"\n" +
+                "      ],\n" +
+                "      \"outgoing\": [\n" +
+                "        \"inputInfo-1766023831636\"\n" +
+                "      ]\n" +
+                "    },\n" +
+                "    \"isolation-1766023837357\": {\n" +
+                "      \"incoming\": [\n" +
+                "        \"releaseIsolation-1766023887325\"\n" +
+                "      ],\n" +
+                "      \"outgoing\": [\n" +
+                "        \"inputInfo-1766023831636\"\n" +
+                "      ]\n" +
+                "    },\n" +
+                "    \"isolation-1766023839756\": {\n" +
+                "      \"incoming\": [\n" +
+                "        \"releaseIsolation-1766023893308\"\n" +
+                "      ],\n" +
+                "      \"outgoing\": [\n" +
+                "        \"inputInfo-1766023831636\"\n" +
+                "      ]\n" +
+                "    },\n" +
+                "    \"inputInfo-1766023848740\": {\n" +
+                "      \"incoming\": [\n" +
+                "        \"confirm-1766023875733\"\n" +
+                "      ],\n" +
+                "      \"outgoing\": [\n" +
+                "        \"review-1766023825604\"\n" +
+                "      ]\n" +
+                "    },\n" +
+                "    \"confirm-1766023875733\": {\n" +
+                "      \"incoming\": [\n" +
+                "        \"complete-1766023921996\"\n" +
+                "      ],\n" +
+                "      \"outgoing\": [\n" +
+                "        \"inputInfo-1766023848740\"\n" +
+                "      ]\n" +
+                "    },\n" +
+                "    \"releaseIsolation-1766023887325\": {\n" +
+                "      \"incoming\": [\n" +
+                "        \"returnLock-1766023906693\"\n" +
+                "      ],\n" +
+                "      \"outgoing\": [\n" +
+                "        \"isolation-1766023837357\"\n" +
+                "      ]\n" +
+                "    },\n" +
+                "    \"releaseIsolation-1766023890300\": {\n" +
+                "      \"incoming\": [\n" +
+                "        \"returnLock-1766023906693\"\n" +
+                "      ],\n" +
+                "      \"outgoing\": [\n" +
+                "        \"isolation-1766023834331\"\n" +
+                "      ]\n" +
+                "    },\n" +
+                "    \"releaseIsolation-1766023893308\": {\n" +
+                "      \"incoming\": [\n" +
+                "        \"returnLock-1766023906693\"\n" +
+                "      ],\n" +
+                "      \"outgoing\": [\n" +
+                "        \"isolation-1766023839756\"\n" +
+                "      ]\n" +
+                "    },\n" +
+                "    \"returnLock-1766023906693\": {\n" +
+                "      \"incoming\": [\n" +
+                "        \"complete-1766023921996\"\n" +
+                "      ],\n" +
+                "      \"outgoing\": [\n" +
+                "        \"releaseIsolation-1766023887325\",\n" +
+                "        \"releaseIsolation-1766023890300\",\n" +
+                "        \"releaseIsolation-1766023893308\"\n" +
+                "      ]\n" +
+                "    },\n" +
+                "    \"complete-1766023921996\": {\n" +
+                "      \"incoming\": [],\n" +
+                "      \"outgoing\": [\n" +
+                "        \"returnLock-1766023906693\",\n" +
+                "        \"confirm-1766023875733\"\n" +
+                "      ]\n" +
+                "    }\n" +
+                "  },\n" +
+                "  \"nodes\": [\n" +
+                "    {\n" +
+                "      \"uuid\": \"createJob-1766023817148\",\n" +
+                "      \"type\": \"createJob\",\n" +
+                "      \"position\": {\n" +
+                "        \"x\": -179.37266858064675,\n" +
+                "        \"y\": 114.01624952893374\n" +
+                "      },\n" +
+                "      \"nodeName\": \"创建作业\",\n" +
+                "      \"nodeIcon\": \"createJob\",\n" +
+                "      \"data\": {\n" +
+                "        \"label\": \"创建作业\",\n" +
+                "        \"type\": \"createJob\",\n" +
+                "        \"nodeId\": \"001\"\n" +
+                "      }\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"uuid\": \"confirm-1766023821012\",\n" +
+                "      \"type\": \"confirm\",\n" +
+                "      \"position\": {\n" +
+                "        \"x\": 12.385394707410981,\n" +
+                "        \"y\": 113.1978387386558\n" +
+                "      },\n" +
+                "      \"nodeName\": \"确认\",\n" +
+                "      \"nodeIcon\": \"confirm\",\n" +
+                "      \"data\": {\n" +
+                "        \"label\": \"确认\",\n" +
+                "        \"type\": \"confirm\",\n" +
+                "        \"nodeId\": \"002\"\n" +
+                "      }\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"uuid\": \"review-1766023825604\",\n" +
+                "      \"type\": \"review\",\n" +
+                "      \"position\": {\n" +
+                "        \"x\": 174.30779948049008,\n" +
+                "        \"y\": 114.0683893019519\n" +
+                "      },\n" +
+                "      \"nodeName\": \"审核\",\n" +
+                "      \"nodeIcon\": \"review\",\n" +
+                "      \"data\": {\n" +
+                "        \"label\": \"审核\",\n" +
+                "        \"type\": \"review\",\n" +
+                "        \"nodeId\": \"003\"\n" +
+                "      }\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"uuid\": \"inputInfo-1766023831636\",\n" +
+                "      \"type\": \"inputInfo\",\n" +
+                "      \"position\": {\n" +
+                "        \"x\": 323.1719458041274,\n" +
+                "        \"y\": 117.55059155513635\n" +
+                "      },\n" +
+                "      \"nodeName\": \"录入信息\",\n" +
+                "      \"nodeIcon\": \"inputInfo\",\n" +
+                "      \"data\": {\n" +
+                "        \"label\": \"录入信息\",\n" +
+                "        \"type\": \"inputInfo\",\n" +
+                "        \"nodeId\": \"004\"\n" +
+                "      }\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"uuid\": \"isolation-1766023834331\",\n" +
+                "      \"type\": \"isolation\",\n" +
+                "      \"position\": {\n" +
+                "        \"x\": 498.81722617463026,\n" +
+                "        \"y\": 126.77628558330605\n" +
+                "      },\n" +
+                "      \"nodeName\": \"隔离/方案\",\n" +
+                "      \"nodeIcon\": \"isolation\",\n" +
+                "      \"data\": {\n" +
+                "        \"label\": \"隔离/方案\",\n" +
+                "        \"type\": \"isolation\",\n" +
+                "        \"nodeId\": \"005\"\n" +
+                "      }\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"uuid\": \"isolation-1766023837357\",\n" +
+                "      \"type\": \"isolation\",\n" +
+                "      \"position\": {\n" +
+                "        \"x\": 503.44812678281187,\n" +
+                "        \"y\": 339.5770923838415\n" +
+                "      },\n" +
+                "      \"nodeName\": \"隔离/方案\",\n" +
+                "      \"nodeIcon\": \"isolation\",\n" +
+                "      \"data\": {\n" +
+                "        \"label\": \"隔离/方案\",\n" +
+                "        \"type\": \"isolation\",\n" +
+                "        \"nodeId\": \"006\"\n" +
+                "      }\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"uuid\": \"isolation-1766023839756\",\n" +
+                "      \"type\": \"isolation\",\n" +
+                "      \"position\": {\n" +
+                "        \"x\": 501.8153472207998,\n" +
+                "        \"y\": -62.06097227556609\n" +
+                "      },\n" +
+                "      \"nodeName\": \"隔离/方案\",\n" +
+                "      \"nodeIcon\": \"isolation\",\n" +
+                "      \"data\": {\n" +
+                "        \"label\": \"隔离/方案\",\n" +
+                "        \"type\": \"isolation\",\n" +
+                "        \"nodeId\": \"007\"\n" +
+                "      }\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"uuid\": \"inputInfo-1766023848740\",\n" +
+                "      \"type\": \"inputInfo\",\n" +
+                "      \"position\": {\n" +
+                "        \"x\": 173.9287877356881,\n" +
+                "        \"y\": 360.35154707809045\n" +
+                "      },\n" +
+                "      \"nodeName\": \"录入信息\",\n" +
+                "      \"nodeIcon\": \"inputInfo\",\n" +
+                "      \"data\": {\n" +
+                "        \"label\": \"录入信息\",\n" +
+                "        \"type\": \"inputInfo\",\n" +
+                "        \"nodeId\": \"008\"\n" +
+                "      }\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"uuid\": \"confirm-1766023875733\",\n" +
+                "      \"type\": \"confirm\",\n" +
+                "      \"position\": {\n" +
+                "        \"x\": 175.0774860906851,\n" +
+                "        \"y\": 622.2547720174143\n" +
+                "      },\n" +
+                "      \"nodeName\": \"确认\",\n" +
+                "      \"nodeIcon\": \"confirm\",\n" +
+                "      \"data\": {\n" +
+                "        \"label\": \"确认\",\n" +
+                "        \"type\": \"confirm\",\n" +
+                "        \"nodeId\": \"009\"\n" +
+                "      }\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"uuid\": \"releaseIsolation-1766023887325\",\n" +
+                "      \"type\": \"releaseIsolation\",\n" +
+                "      \"position\": {\n" +
+                "        \"x\": 720.709204714277,\n" +
+                "        \"y\": 353.45935694810817\n" +
+                "      },\n" +
+                "      \"nodeName\": \"解除隔离\",\n" +
+                "      \"nodeIcon\": \"releaseIsolation\",\n" +
+                "      \"data\": {\n" +
+                "        \"label\": \"解除隔离\",\n" +
+                "        \"type\": \"releaseIsolation\",\n" +
+                "        \"nodeId\": \"010\"\n" +
+                "      }\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"uuid\": \"releaseIsolation-1766023890300\",\n" +
+                "      \"type\": \"releaseIsolation\",\n" +
+                "      \"position\": {\n" +
+                "        \"x\": 727.601394844259,\n" +
+                "        \"y\": 138.65276456366257\n" +
+                "      },\n" +
+                "      \"nodeName\": \"解除隔离\",\n" +
+                "      \"nodeIcon\": \"releaseIsolation\",\n" +
+                "      \"data\": {\n" +
+                "        \"label\": \"解除隔离\",\n" +
+                "        \"type\": \"releaseIsolation\",\n" +
+                "        \"nodeId\": \"011\"\n" +
+                "      }\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"uuid\": \"releaseIsolation-1766023893308\",\n" +
+                "      \"type\": \"releaseIsolation\",\n" +
+                "      \"position\": {\n" +
+                "        \"x\": 724.1552997792679,\n" +
+                "        \"y\": -60.072050850824496\n" +
+                "      },\n" +
+                "      \"nodeName\": \"解除隔离\",\n" +
+                "      \"nodeIcon\": \"releaseIsolation\",\n" +
+                "      \"data\": {\n" +
+                "        \"label\": \"解除隔离\",\n" +
+                "        \"type\": \"releaseIsolation\",\n" +
+                "        \"nodeId\": \"012\"\n" +
+                "      }\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"uuid\": \"returnLock-1766023906693\",\n" +
+                "      \"type\": \"returnLock\",\n" +
+                "      \"position\": {\n" +
+                "        \"x\": 975.7202395236187,\n" +
+                "        \"y\": 170.81631850357962\n" +
+                "      },\n" +
+                "      \"nodeName\": \"还锁\",\n" +
+                "      \"nodeIcon\": \"returnLock\",\n" +
+                "      \"data\": {\n" +
+                "        \"label\": \"还锁\",\n" +
+                "        \"type\": \"returnLock\",\n" +
+                "        \"nodeId\": \"013\"\n" +
+                "      }\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"uuid\": \"complete-1766023921996\",\n" +
+                "      \"type\": \"complete\",\n" +
+                "      \"position\": {\n" +
+                "        \"x\": 1250.25914636791,\n" +
+                "        \"y\": 176.55981027856473\n" +
+                "      },\n" +
+                "      \"nodeName\": \"完成/结束\",\n" +
+                "      \"nodeIcon\": \"complete\",\n" +
+                "      \"data\": {\n" +
+                "        \"label\": \"完成/结束\",\n" +
+                "        \"type\": \"complete\",\n" +
+                "        \"nodeId\": \"014\"\n" +
+                "      }\n" +
+                "    }\n" +
+                "  ],\n" +
+                "  \"edges\": [\n" +
+                "    {\n" +
+                "      \"id\": \"edge-confirm-1766023821012-left-source-createJob-1766023817148-right-target-1766023856706\",\n" +
+                "      \"source\": \"confirm-1766023821012\",\n" +
+                "      \"target\": \"createJob-1766023817148\",\n" +
+                "      \"sourceHandle\": \"left-source\",\n" +
+                "      \"targetHandle\": \"right-target\",\n" +
+                "      \"type\": \"straight\"\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"id\": \"edge-review-1766023825604-left-source-confirm-1766023821012-right-target-1766023858410\",\n" +
+                "      \"source\": \"review-1766023825604\",\n" +
+                "      \"target\": \"confirm-1766023821012\",\n" +
+                "      \"sourceHandle\": \"left-source\",\n" +
+                "      \"targetHandle\": \"right-target\",\n" +
+                "      \"type\": \"straight\"\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"id\": \"edge-inputInfo-1766023831636-left-source-review-1766023825604-right-target-1766023860242\",\n" +
+                "      \"source\": \"inputInfo-1766023831636\",\n" +
+                "      \"target\": \"review-1766023825604\",\n" +
+                "      \"sourceHandle\": \"left-source\",\n" +
+                "      \"targetHandle\": \"right-target\",\n" +
+                "      \"type\": \"straight\"\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"id\": \"edge-isolation-1766023834331-left-source-inputInfo-1766023831636-right-target-1766023864226\",\n" +
+                "      \"source\": \"isolation-1766023834331\",\n" +
+                "      \"target\": \"inputInfo-1766023831636\",\n" +
+                "      \"sourceHandle\": \"left-source\",\n" +
+                "      \"targetHandle\": \"right-target\",\n" +
+                "      \"type\": \"straight\"\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"id\": \"edge-isolation-1766023839756-left-source-inputInfo-1766023831636-top-target-1766023866130\",\n" +
+                "      \"source\": \"isolation-1766023839756\",\n" +
+                "      \"target\": \"inputInfo-1766023831636\",\n" +
+                "      \"sourceHandle\": \"left-source\",\n" +
+                "      \"targetHandle\": \"top-target\",\n" +
+                "      \"type\": \"straight\"\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"id\": \"edge-isolation-1766023837357-left-source-inputInfo-1766023831636-bottom-target-1766023871330\",\n" +
+                "      \"source\": \"isolation-1766023837357\",\n" +
+                "      \"target\": \"inputInfo-1766023831636\",\n" +
+                "      \"sourceHandle\": \"left-source\",\n" +
+                "      \"targetHandle\": \"bottom-target\",\n" +
+                "      \"type\": \"straight\"\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"id\": \"edge-inputInfo-1766023848740-top-source-review-1766023825604-bottom-target-1766023873450\",\n" +
+                "      \"source\": \"inputInfo-1766023848740\",\n" +
+                "      \"target\": \"review-1766023825604\",\n" +
+                "      \"sourceHandle\": \"top-source\",\n" +
+                "      \"targetHandle\": \"bottom-target\",\n" +
+                "      \"type\": \"straight\"\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"id\": \"edge-confirm-1766023875733-top-source-inputInfo-1766023848740-bottom-target-1766023878698\",\n" +
+                "      \"source\": \"confirm-1766023875733\",\n" +
+                "      \"target\": \"inputInfo-1766023848740\",\n" +
+                "      \"sourceHandle\": \"top-source\",\n" +
+                "      \"targetHandle\": \"bottom-target\",\n" +
+                "      \"type\": \"straight\"\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"id\": \"edge-releaseIsolation-1766023893308-left-source-isolation-1766023839756-right-target-1766023897229\",\n" +
+                "      \"source\": \"releaseIsolation-1766023893308\",\n" +
+                "      \"target\": \"isolation-1766023839756\",\n" +
+                "      \"sourceHandle\": \"left-source\",\n" +
+                "      \"targetHandle\": \"right-target\",\n" +
+                "      \"type\": \"straight\"\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"id\": \"edge-releaseIsolation-1766023890300-left-source-isolation-1766023834331-right-target-1766023899346\",\n" +
+                "      \"source\": \"releaseIsolation-1766023890300\",\n" +
+                "      \"target\": \"isolation-1766023834331\",\n" +
+                "      \"sourceHandle\": \"left-source\",\n" +
+                "      \"targetHandle\": \"right-target\",\n" +
+                "      \"type\": \"straight\"\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"id\": \"edge-releaseIsolation-1766023887325-left-source-isolation-1766023837357-right-target-1766023901162\",\n" +
+                "      \"source\": \"releaseIsolation-1766023887325\",\n" +
+                "      \"target\": \"isolation-1766023837357\",\n" +
+                "      \"sourceHandle\": \"left-source\",\n" +
+                "      \"targetHandle\": \"right-target\",\n" +
+                "      \"type\": \"straight\"\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"id\": \"edge-returnLock-1766023906693-left-source-releaseIsolation-1766023887325-right-target-1766023909659\",\n" +
+                "      \"source\": \"returnLock-1766023906693\",\n" +
+                "      \"target\": \"releaseIsolation-1766023887325\",\n" +
+                "      \"sourceHandle\": \"left-source\",\n" +
+                "      \"targetHandle\": \"right-target\",\n" +
+                "      \"type\": \"straight\"\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"id\": \"edge-returnLock-1766023906693-left-source-releaseIsolation-1766023890300-right-target-1766023914698\",\n" +
+                "      \"source\": \"returnLock-1766023906693\",\n" +
+                "      \"target\": \"releaseIsolation-1766023890300\",\n" +
+                "      \"sourceHandle\": \"left-source\",\n" +
+                "      \"targetHandle\": \"right-target\",\n" +
+                "      \"type\": \"straight\"\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"id\": \"edge-returnLock-1766023906693-left-source-releaseIsolation-1766023893308-right-target-1766023917338\",\n" +
+                "      \"source\": \"returnLock-1766023906693\",\n" +
+                "      \"target\": \"releaseIsolation-1766023893308\",\n" +
+                "      \"sourceHandle\": \"left-source\",\n" +
+                "      \"targetHandle\": \"right-target\",\n" +
+                "      \"type\": \"straight\"\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"id\": \"edge-complete-1766023921996-left-source-returnLock-1766023906693-right-target-1766023926699\",\n" +
+                "      \"source\": \"complete-1766023921996\",\n" +
+                "      \"target\": \"returnLock-1766023906693\",\n" +
+                "      \"sourceHandle\": \"left-source\",\n" +
+                "      \"targetHandle\": \"right-target\",\n" +
+                "      \"type\": \"straight\"\n" +
+                "    },\n" +
+                "    {\n" +
+                "      \"id\": \"edge-complete-1766023921996-bottom-source-confirm-1766023875733-right-target-1766023930202\",\n" +
+                "      \"source\": \"complete-1766023921996\",\n" +
+                "      \"target\": \"confirm-1766023875733\",\n" +
+                "      \"sourceHandle\": \"bottom-source\",\n" +
+                "      \"targetHandle\": \"right-target\",\n" +
+                "      \"type\": \"straight\"\n" +
+                "    }\n" +
+                "  ]\n" +
+                "}";
+
+        // parseJsonToList(aa);
+    }
+
 }