[ { "id": "0ac020c7380665e7", "type": "tab", "label": "测试流程", "disabled": false, "info": "", "env": [] }, { "id": "78d15f59dee4b6d8", "type": "tab", "label": "流程 2", "disabled": false, "info": "", "env": [] }, { "id": "8aaa24cf39b5742a", "type": "http proxy", "name": "https", "url": "https://10.22.98.21:8080", "noproxy": [] }, { "id": "97353ed49f690c0b", "type": "http proxy", "name": "http", "url": "http://10.22.98.21:8080", "noproxy": [] }, { "id": "be9c605d4cdaa297", "type": "http request", "z": "0ac020c7380665e7", "name": "创建井", "method": "POST", "ret": "txt", "paytoqs": "ignore", "url": "https://www.dev.ideas.cnpc/api/dms/well_kd_wellbore_ideas01/v1/cd_well", "tls": "", "persist": true, "proxy": "", "insecureHTTPParser": false, "authType": "", "senderr": false, "headers": [], "x": 1030, "y": 560, "wires": [ [ "6f07c9e60472a814", "2220f90bcc99b3a4", "df389955c2ae3156" ] ] }, { "id": "96fbb1fa63a1cb8b", "type": "inject", "z": "0ac020c7380665e7", "name": "创建", "props": [ { "p": "payload" }, { "p": "headers", "v": "{\"Content-Type\":\"application/json\",\"Authorization\":\"1\",\"Dataregion\":\"ZZLH\"}", "vt": "json" }, { "p": "rejectUnauthorized", "v": "false", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "{\"version\":\"1.0.0\",\"act\":-1,\"data\":[{\"dsid\":\"testid2\",\"wellId\":\"WELL-zzlhTEST-002\",\"wellCommonName\":\"zzlh测试用井名\",\"wellLegalName\":\"zzlh-test-01\",\"wellPurpose\":\"开发井\",\"wellType\":\"直井\",\"dataRegion\":\"ZZLH\",\"projectId\":\"PROJ-ZZLH-001\",\"projectName\":\"zzlh测试地质单元\",\"orgId\":\"ORG-ZZLH-01\",\"orgName\":\"zzlh采油厂\",\"bsflag\":1,\"wellState\":\"生产中\",\"spudDate\":\"2024-01-15\",\"completionDate\":\"2024-05-20\",\"prodDate\":\"2024-06-01\",\"egl\":145.5,\"kbd\":5.2,\"kb\":150.7,\"actualXAxis\":550123.45,\"actualYAxis\":4998765.32,\"coordinateSystemName\":\"zzlh测试坐标系\",\"geoDescription\":\"位于zzlh测试区域\",\"remarks\":\"这是一口用于系统测试的生产井。\",\"createUserId\":\"testuser001\",\"createDate\":\"2025-09-12T10:00:00Z\",\"updateUserId\":\"testuser001\",\"updateDate\":\"2025-09-12T10:00:00Z\"}]}", "payloadType": "json", "x": 850, "y": 400, "wires": [ [ "013f3a0718a44e18" ] ] }, { "id": "6f07c9e60472a814", "type": "debug", "z": "0ac020c7380665e7", "name": "创建结果", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 1180, "y": 440, "wires": [] }, { "id": "1b18d7419c63f2b5", "type": "inject", "z": "0ac020c7380665e7", "name": "查询详情", "props": [ { "p": "headers", "v": "{\"Content-Type\":\"application/json\",\"Authorization\":\"1\",\"Dataregion\":\"ZZLH\"}", "vt": "json" }, { "p": "rejectUnauthorized", "v": "false", "vt": "str" }, { "p": "url", "v": "https://www.dev.ideas.cnpc/api/dms/well_kd_wellbore_ideas01/v1/cd_well/1.0.0/testid2", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "x": 160, "y": 220, "wires": [ [ "70a49687f823bf4e" ] ] }, { "id": "88cf35d496381288", "type": "debug", "z": "0ac020c7380665e7", "name": "查询", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 470, "y": 220, "wires": [] }, { "id": "70a49687f823bf4e", "type": "http request", "z": "0ac020c7380665e7", "name": "查询井详情", "method": "GET", "ret": "txt", "paytoqs": "ignore", "url": "", "tls": "", "persist": true, "proxy": "", "insecureHTTPParser": false, "authType": "basic", "senderr": false, "headers": [], "x": 330, "y": 240, "wires": [ [ "88cf35d496381288" ] ] }, { "id": "ae5c8d27d69b77ed", "type": "http request", "z": "0ac020c7380665e7", "name": "更新井", "method": "PUT", "ret": "txt", "paytoqs": "ignore", "url": "https://www.dev.ideas.cnpc/api/dms/well_kd_wellbore_ideas01/v1/cd_well", "tls": "", "persist": true, "proxy": "", "insecureHTTPParser": false, "authType": "", "senderr": false, "headers": [], "x": 270, "y": 340, "wires": [ [ "2b37a50f557b48ff" ] ] }, { "id": "7f1ff1fda219baaa", "type": "inject", "z": "0ac020c7380665e7", "name": "更新", "props": [ { "p": "payload" }, { "p": "headers", "v": "{\"Content-Type\":\"application/json\",\"Authorization\":\"1\",\"Dataregion\":\"ZZLH\"}", "vt": "json" }, { "p": "rejectUnauthorized", "v": "false", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "{\"version\":\"1.0.0\",\"act\":-1,\"data\":[{\"dsid\":\"testid2\",\"wellId\":\"WELL-zzlhTEST-002\",\"wellCommonName\":\"zzlh测试用井名\",\"wellLegalName\":\"zzlh-test-01\",\"wellPurpose\":\"开发井---更新16\",\"wellType\":\"直井\",\"dataRegion\":\"ZZLH\",\"projectId\":\"PROJ-ZZLH-001\",\"projectName\":\"zzlh测试地质单元\",\"orgId\":\"ORG-ZZLH-01\",\"orgName\":\"zzlh采油厂\",\"bsflag\":1,\"wellState\":\"生产中\",\"spudDate\":\"2024-01-15\",\"completionDate\":\"2024-05-20\",\"prodDate\":\"2024-06-01\",\"egl\":145.5,\"kbd\":5.2,\"kb\":150.7,\"actualXAxis\":550123.45,\"actualYAxis\":4998765.32,\"coordinateSystemName\":\"zzlh测试坐标系\",\"geoDescription\":\"位于zzlh测试区域\",\"remarks\":\"这是一口用于系统测试的生产井。\",\"createUserId\":\"testuser001\",\"createDate\":\"2025-09-12T10:00:00Z\",\"updateUserId\":\"testuser001\",\"updateDate\":\"2025-09-12T10:00:00Z\"}]}", "payloadType": "json", "x": 110, "y": 280, "wires": [ [ "ae5c8d27d69b77ed" ] ] }, { "id": "2b37a50f557b48ff", "type": "debug", "z": "0ac020c7380665e7", "name": "更新结果", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 460, "y": 340, "wires": [] }, { "id": "c3514fbf44147aed", "type": "inject", "z": "0ac020c7380665e7", "name": "删除", "props": [ { "p": "headers", "v": "{\"Content-Type\":\"application/json\",\"Authorization\":\"1\",\"Dataregion\":\"ZZLH\"}", "vt": "json" }, { "p": "rejectUnauthorized", "v": "false", "vt": "str" }, { "p": "url", "v": "https://www.dev.ideas.cnpc/api/dms/well_kd_wellbore_ideas01/v1/cd_well", "vt": "str" }, { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "{\"version\":\"1.0.0\",\"data\":[\"testid2\"]}", "payloadType": "json", "x": 90, "y": 380, "wires": [ [ "0d437a2a77570c57" ] ] }, { "id": "647fd9a7f8fc214c", "type": "debug", "z": "0ac020c7380665e7", "name": "删除结果", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 500, "y": 420, "wires": [] }, { "id": "0d437a2a77570c57", "type": "http request", "z": "0ac020c7380665e7", "name": "删除井", "method": "DELETE", "ret": "txt", "paytoqs": "ignore", "url": "", "tls": "", "persist": true, "proxy": "", "insecureHTTPParser": false, "authType": "", "senderr": false, "headers": [], "x": 230, "y": 420, "wires": [ [ "647fd9a7f8fc214c" ] ] }, { "id": "044945e983586ce5", "type": "inject", "z": "0ac020c7380665e7", "name": "查询列表", "props": [ { "p": "headers", "v": "{\"Content-Type\":\"application/json\",\"Authorization\":\"1\",\"Dataregion\":\"ZZLH\"}", "vt": "json" }, { "p": "rejectUnauthorized", "v": "false", "vt": "str" }, { "p": "url", "v": "https://www.dev.ideas.cnpc/api/dms/well_kd_wellbore_ideas01/v1/cd_well/1.0.0", "vt": "str" }, { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "{}", "payloadType": "json", "x": 120, "y": 480, "wires": [ [ "5921574867140eb3" ] ] }, { "id": "286d3b129ca1b756", "type": "debug", "z": "0ac020c7380665e7", "name": "查询", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 490, "y": 480, "wires": [] }, { "id": "5921574867140eb3", "type": "http request", "z": "0ac020c7380665e7", "name": "查询井列表", "method": "POST", "ret": "txt", "paytoqs": "ignore", "url": "", "tls": "", "persist": true, "proxy": "", "insecureHTTPParser": false, "authType": "", "senderr": false, "headers": [], "x": 290, "y": 500, "wires": [ [ "286d3b129ca1b756", "819906f13bb83e88" ] ] }, { "id": "819906f13bb83e88", "type": "function", "z": "0ac020c7380665e7", "name": "function 1", "func": "try {\n \n const payload = JSON.parse(msg.payload);\n if (payload && payload.data && Array.isArray(payload.data.list)) {\n msg.isEmpty = payload.data.list.length === 0;\n } else {\n msg.isEmpty = false; \n }\n} catch (e) {\n \n \n msg.isEmpty = false\n}\n\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 300, "y": 600, "wires": [ [ "7b828761c4ae4f35" ] ] }, { "id": "7b828761c4ae4f35", "type": "switch", "z": "0ac020c7380665e7", "name": "", "property": "isEmpty", "propertyType": "msg", "rules": [ { "t": "eq", "v": "true", "vt": "jsonata" }, { "t": "neq", "v": "true", "vt": "jsonata" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 470, "y": 580, "wires": [ [ "e308201b5e361b2e", "013f3a0718a44e18" ], [ "5712828285fd7a38" ] ] }, { "id": "5712828285fd7a38", "type": "debug", "z": "0ac020c7380665e7", "name": "debug 1", "active": true, "tosidebar": true, "console": true, "tostatus": false, "complete": "\"初始不为空,错误\"", "targetType": "jsonata", "statusVal": "", "statusType": "auto", "x": 490, "y": 680, "wires": [] }, { "id": "e308201b5e361b2e", "type": "debug", "z": "0ac020c7380665e7", "name": "debug 2", "active": true, "tosidebar": true, "console": true, "tostatus": false, "complete": "\"初始为空,正确\"", "targetType": "jsonata", "statusVal": "", "statusType": "auto", "x": 690, "y": 640, "wires": [] }, { "id": "013f3a0718a44e18", "type": "change", "z": "0ac020c7380665e7", "name": "", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "{\"version\":\"1.0.0\",\"act\":-1,\"data\":[{\"dsid\":\"testid2\",\"wellId\":\"WELL-zzlhTEST-002\",\"wellCommonName\":\"zzlh测试用井名\",\"wellLegalName\":\"zzlh-test-01\",\"wellPurpose\":\"开发井\",\"wellType\":\"直井\",\"dataRegion\":\"ZZLH\",\"projectId\":\"PROJ-ZZLH-001\",\"projectName\":\"zzlh测试地质单元\",\"orgId\":\"ORG-ZZLH-01\",\"orgName\":\"zzlh采油厂\",\"bsflag\":1,\"wellState\":\"生产中\",\"spudDate\":\"2024-01-15\",\"completionDate\":\"2024-05-20\",\"prodDate\":\"2024-06-01\",\"egl\":145.5,\"kbd\":5.2,\"kb\":150.7,\"actualXAxis\":550123.45,\"actualYAxis\":4998765.32,\"coordinateSystemName\":\"zzlh测试坐标系\",\"geoDescription\":\"位于zzlh测试区域\",\"remarks\":\"这是一口用于系统测试的生产井。\",\"createUserId\":\"testuser001\",\"createDate\":\"2025-09-12T10:00:00Z\",\"updateUserId\":\"testuser001\",\"updateDate\":\"2025-09-12T10:00:00Z\"}]}", "tot": "json" }, { "t": "set", "p": "headers", "pt": "msg", "to": "{\"Content-Type\":\"application/json\",\"Authorization\":\"1\",\"Dataregion\":\"ZZLH\"}", "tot": "json" }, { "t": "set", "p": "rejectUnauthorized", "pt": "msg", "to": "false", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 880, "y": 560, "wires": [ [ "be9c605d4cdaa297" ] ] }, { "id": "8f574d489345a331", "type": "switch", "z": "0ac020c7380665e7", "name": "", "property": "isCreated", "propertyType": "msg", "rules": [ { "t": "eq", "v": "true", "vt": "jsonata" }, { "t": "eq", "v": "false", "vt": "jsonata" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 1330, "y": 620, "wires": [ [ "23f668f265c1db5c", "8f280fa3aac33505" ], [ "4fd140a8f2df7e53" ] ] }, { "id": "2220f90bcc99b3a4", "type": "function", "z": "0ac020c7380665e7", "name": "function 2", "func": "try {\n const payloadObject = JSON.parse(msg.payload);\n msg.isCreated = (payloadObject.code === 0);\n\n} catch (e) {\n msg.isCreated = false;\n}\n\n// 返回更新后的 msg 对象\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1160, "y": 620, "wires": [ [ "8f574d489345a331" ] ] }, { "id": "23f668f265c1db5c", "type": "debug", "z": "0ac020c7380665e7", "name": "debug 3", "active": true, "tosidebar": true, "console": true, "tostatus": false, "complete": "\"创建成功\"", "targetType": "jsonata", "statusVal": "", "statusType": "auto", "x": 1390, "y": 460, "wires": [] }, { "id": "4fd140a8f2df7e53", "type": "debug", "z": "0ac020c7380665e7", "name": "debug 4", "active": true, "tosidebar": true, "console": true, "tostatus": false, "complete": "创建失败", "targetType": "jsonata", "statusVal": "", "statusType": "auto", "x": 1410, "y": 740, "wires": [] }, { "id": "df389955c2ae3156", "type": "debug", "z": "0ac020c7380665e7", "name": "debug 6", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "msg", "targetType": "jsonata", "statusVal": "", "statusType": "auto", "x": 1000, "y": 680, "wires": [] }, { "id": "39c28a10430cce71", "type": "debug", "z": "0ac020c7380665e7", "name": "debug 5", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 800, "y": 740, "wires": [] }, { "id": "551a78c76ae2bccf", "type": "http request", "z": "0ac020c7380665e7", "name": "删除井", "method": "DELETE", "ret": "txt", "paytoqs": "ignore", "url": "", "tls": "", "persist": true, "proxy": "", "insecureHTTPParser": false, "authType": "", "senderr": false, "headers": [], "x": 1770, "y": 660, "wires": [ [ "99f3d98419231d12", "e3cc68ad6021510f" ] ] }, { "id": "99f3d98419231d12", "type": "debug", "z": "0ac020c7380665e7", "name": "删除结果", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 1960, "y": 540, "wires": [] }, { "id": "7d94b96bcc85d684", "type": "inject", "z": "0ac020c7380665e7", "name": "删除", "props": [ { "p": "headers", "v": "{\"Content-Type\":\"application/json\",\"Authorization\":\"1\",\"Dataregion\":\"ZZLH\"}", "vt": "json" }, { "p": "rejectUnauthorized", "v": "false", "vt": "str" }, { "p": "url", "v": "https://www.dev.ideas.cnpc/api/dms/well_kd_wellbore_ideas01/v1/cd_well", "vt": "str" }, { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "{\"version\":\"1.0.0\",\"data\":[\"testid2\"]}", "payloadType": "json", "x": 1710, "y": 480, "wires": [ [ "551a78c76ae2bccf" ] ] }, { "id": "8f280fa3aac33505", "type": "change", "z": "0ac020c7380665e7", "name": "", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "{\"version\":\"1.0.0\",\"data\":[\"testid2\"]}", "tot": "json" }, { "t": "set", "p": "headers", "pt": "msg", "to": "{\"Content-Type\":\"application/json\",\"Authorization\":\"1\",\"Dataregion\":\"ZZLH\"}", "tot": "json" }, { "t": "set", "p": "rejectUnauthorized", "pt": "msg", "to": "false", "tot": "str" }, { "t": "set", "p": "url", "pt": "msg", "to": "https://www.dev.ideas.cnpc/api/dms/well_kd_wellbore_ideas01/v1/cd_well", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1580, "y": 620, "wires": [ [ "551a78c76ae2bccf" ] ] }, { "id": "6585c529e8732137", "type": "debug", "z": "0ac020c7380665e7", "name": "debug 7", "active": true, "tosidebar": true, "console": true, "tostatus": false, "complete": "\"删除成功\"", "targetType": "jsonata", "statusVal": "", "statusType": "auto", "x": 2170, "y": 540, "wires": [] }, { "id": "3b9a9af3fb68645f", "type": "switch", "z": "0ac020c7380665e7", "name": "", "property": "isDeleted", "propertyType": "msg", "rules": [ { "t": "eq", "v": "true", "vt": "jsonata" }, { "t": "eq", "v": "false", "vt": "jsonata" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 2110, "y": 700, "wires": [ [ "6585c529e8732137", "cfbf5ff4275a974e" ], [ "f80987279214f312" ] ] }, { "id": "f80987279214f312", "type": "debug", "z": "0ac020c7380665e7", "name": "debug 8", "active": true, "tosidebar": true, "console": true, "tostatus": false, "complete": "删除失败", "targetType": "jsonata", "statusVal": "", "statusType": "auto", "x": 2190, "y": 820, "wires": [] }, { "id": "e3cc68ad6021510f", "type": "function", "z": "0ac020c7380665e7", "name": "function 3", "func": "try {\n const payloadObject = JSON.parse(msg.payload);\n msg.isDeleted = (payloadObject.code === 0);\n\n} catch (e) {\n msg.isDeleted = false;\n}\n\n// 返回更新后的 msg 对象\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1920, "y": 700, "wires": [ [ "3b9a9af3fb68645f", "f92150ebdd4ca3ff" ] ] }, { "id": "f92150ebdd4ca3ff", "type": "debug", "z": "0ac020c7380665e7", "name": "debug 9", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "msg", "targetType": "jsonata", "statusVal": "", "statusType": "auto", "x": 2000, "y": 760, "wires": [] }, { "id": "c281f9583e262827", "type": "function", "z": "0ac020c7380665e7", "name": "function 4", "func": "msg.headers = { \"Content-Type\": \"application/json\", \"Authorization\": \"1\", \"Dataregion\": \"ZZLH\" }\nmsg.body={}\nmsg.rejectUnauthorized=false\nmsg.url = \"https://www.dev.ideas.cnpc/api/dms/well_kd_wellbore_ideas01/v1/cd_well/1.0.0\"\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 100, "y": 580, "wires": [ [ "5921574867140eb3" ] ] }, { "id": "ea8a01974cede86a", "type": "http in", "z": "0ac020c7380665e7", "name": "", "url": "/test", "method": "get", "upload": false, "skipBodyParsing": false, "swaggerDoc": "", "x": 80, "y": 660, "wires": [ [ "c281f9583e262827" ] ] }, { "id": "fdf4a7a6166cf05c", "type": "http response", "z": "0ac020c7380665e7", "name": "", "statusCode": "", "headers": {}, "x": 2370, "y": 700, "wires": [] }, { "id": "cfbf5ff4275a974e", "type": "function", "z": "0ac020c7380665e7", "name": "function 5", "func": "msg.payload = { \"code\": 0, \"message\": \"井创建删除流程测试成功\",}\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 2260, "y": 640, "wires": [ [ "fdf4a7a6166cf05c" ] ] }, { "id": "fd3672b8ebb314ee", "type": "http in", "z": "78d15f59dee4b6d8", "name": "单接口测试", "url": "/single_test", "method": "post", "upload": false, "skipBodyParsing": false, "swaggerDoc": "", "x": 200, "y": 240, "wires": [ [ "f414ed448fcf544b" ] ] }, { "id": "d666851b16cf6482", "type": "http response", "z": "78d15f59dee4b6d8", "name": "", "statusCode": "", "headers": {}, "x": 670, "y": 240, "wires": [] }, { "id": "f414ed448fcf544b", "type": "function", "z": "78d15f59dee4b6d8", "name": "function 6", "func": "msg.payload = { \"code\": 0, \"message\": \"单接口测试成功\",}\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 460, "y": 300, "wires": [ [ "d666851b16cf6482" ] ] } ]