已添加12个文件
已重命名1个文件
已删除1个文件
已修改53个文件
| | |
| | | { |
| | | "tool_name": "Bash", |
| | | "tool_input_preview": "{\"command\":\"cd D:\\\\Git\\\\ShanMeiXinNengYuan\\\\Code\\\\WCS\\\\WIDESEAWCS_Client && npm run build 2>&1 | head -30\",\"timeout\":120000}", |
| | | "error": "Exit code 1\n/usr/bin/bash: line 1: cd: D:GitShanMeiXinNengYuanCodeWCSWIDESEAWCS_Client: No such file or directory", |
| | | "timestamp": "2026-04-19T07:15:17.022Z", |
| | | "tool_name": "Read", |
| | | "tool_input_preview": "{\"file_path\":\"D:\\\\Git\\\\ShanMeiXinNengYuan\\\\Code\\\\WMS\\\\WIDESEA_WMSClient_Vben_v2\\\\apps\\\\web-ele\\\\src\\\\views\\\\dashboard\\\\index.vue\"}", |
| | | "error": "File does not exist. Note: your current working directory is D:\\Git\\ShanMeiXinNengYuan\\Code.", |
| | | "timestamp": "2026-04-20T01:28:36.836Z", |
| | | "retry_count": 1 |
| | | } |
| | |
| | | { |
| | | "updatedAt": "2026-04-18T08:52:24.581Z", |
| | | "updatedAt": "2026-04-20T02:13:36.765Z", |
| | | "missions": [ |
| | | { |
| | | "id": "session:9007b9ea-1eb6-4d24-8fe7-2c3a949eac88:none", |
| | |
| | | "sourceKey": "session-stop:a6a0c97facebc27a6" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | "id": "session:4a7d9ed6-773a-4962-9881-9dcda1653389:none", |
| | | "source": "session", |
| | | "name": "none", |
| | | "objective": "Session mission", |
| | | "createdAt": "2026-04-19T11:24:03.847Z", |
| | | "updatedAt": "2026-04-19T12:58:38.564Z", |
| | | "status": "done", |
| | | "workerCount": 5, |
| | | "taskCounts": { |
| | | "total": 5, |
| | | "pending": 0, |
| | | "blocked": 0, |
| | | "inProgress": 0, |
| | | "completed": 5, |
| | | "failed": 0 |
| | | }, |
| | | "agents": [ |
| | | { |
| | | "name": "general-purpose:af12f69", |
| | | "role": "general-purpose", |
| | | "ownership": "af12f692dd4a3fb28", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T12:58:38.564Z" |
| | | }, |
| | | { |
| | | "name": "general-purpose:aa2a37e", |
| | | "role": "general-purpose", |
| | | "ownership": "aa2a37e07afb9d479", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T11:24:36.379Z" |
| | | }, |
| | | { |
| | | "name": "general-purpose:a6eb9a9", |
| | | "role": "general-purpose", |
| | | "ownership": "a6eb9a903c850f24a", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T11:24:47.161Z" |
| | | }, |
| | | { |
| | | "name": "general-purpose:a9803cf", |
| | | "role": "general-purpose", |
| | | "ownership": "a9803cf811cccaa24", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T11:25:43.000Z" |
| | | }, |
| | | { |
| | | "name": "general-purpose:a9e37be", |
| | | "role": "general-purpose", |
| | | "ownership": "a9e37bec52fcbdaa5", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T11:26:55.341Z" |
| | | } |
| | | ], |
| | | "timeline": [ |
| | | { |
| | | "id": "session-start:a9803cf811cccaa24:2026-04-19T11:25:09.331Z", |
| | | "at": "2026-04-19T11:25:09.331Z", |
| | | "kind": "update", |
| | | "agent": "general-purpose:a9803cf", |
| | | "detail": "started general-purpose:a9803cf", |
| | | "sourceKey": "session-start:a9803cf811cccaa24" |
| | | }, |
| | | { |
| | | "id": "session-stop:a9803cf811cccaa24:2026-04-19T11:25:43.000Z", |
| | | "at": "2026-04-19T11:25:43.000Z", |
| | | "kind": "completion", |
| | | "agent": "general-purpose:a9803cf", |
| | | "detail": "completed", |
| | | "sourceKey": "session-stop:a9803cf811cccaa24" |
| | | }, |
| | | { |
| | | "id": "session-start:a9e37bec52fcbdaa5:2026-04-19T11:25:51.811Z", |
| | | "at": "2026-04-19T11:25:51.811Z", |
| | | "kind": "update", |
| | | "agent": "general-purpose:a9e37be", |
| | | "detail": "started general-purpose:a9e37be", |
| | | "sourceKey": "session-start:a9e37bec52fcbdaa5" |
| | | }, |
| | | { |
| | | "id": "session-stop:a9e37bec52fcbdaa5:2026-04-19T11:26:55.341Z", |
| | | "at": "2026-04-19T11:26:55.341Z", |
| | | "kind": "completion", |
| | | "agent": "general-purpose:a9e37be", |
| | | "detail": "completed", |
| | | "sourceKey": "session-stop:a9e37bec52fcbdaa5" |
| | | }, |
| | | { |
| | | "id": "session-stop:a4f2a4a86620e67ac:2026-04-19T12:58:38.564Z", |
| | | "at": "2026-04-19T12:58:38.564Z", |
| | | "kind": "completion", |
| | | "agent": "general-purpose:af12f69", |
| | | "detail": "completed", |
| | | "sourceKey": "session-stop:a4f2a4a86620e67ac" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | "id": "session:d619041b-8d2b-4d40-ac1a-9c570d800e7d:none", |
| | | "source": "session", |
| | | "name": "none", |
| | | "objective": "Session mission", |
| | | "createdAt": "2026-04-19T13:39:55.243Z", |
| | | "updatedAt": "2026-04-19T13:53:57.853Z", |
| | | "status": "running", |
| | | "workerCount": 34, |
| | | "taskCounts": { |
| | | "total": 34, |
| | | "pending": 0, |
| | | "blocked": 0, |
| | | "inProgress": 3, |
| | | "completed": 31, |
| | | "failed": 0 |
| | | }, |
| | | "agents": [ |
| | | { |
| | | "name": "agent-menu:a9260b4", |
| | | "role": "agent-menu", |
| | | "ownership": "a9260b44a0c26528b", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:41:04.664Z" |
| | | }, |
| | | { |
| | | "name": "agent-auth:a6f1e5c", |
| | | "role": "agent-auth", |
| | | "ownership": "a6f1e5c50a57e0d5d", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:40:20.808Z" |
| | | }, |
| | | { |
| | | "name": "agent-pages:a5a2a89", |
| | | "role": "agent-pages", |
| | | "ownership": "a5a2a89d2fb5f17ff", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:41:01.814Z" |
| | | }, |
| | | { |
| | | "name": "agent-scaffold:a1a6151", |
| | | "role": "agent-scaffold", |
| | | "ownership": "a1a6151ba7f364cfb", |
| | | "status": "running", |
| | | "currentStep": null, |
| | | "latestUpdate": null, |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:39:55.484Z" |
| | | }, |
| | | { |
| | | "name": "agent-api:a4ce4ef", |
| | | "role": "agent-api", |
| | | "ownership": "a4ce4ef36b3693f58", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:40:12.096Z" |
| | | }, |
| | | { |
| | | "name": "agent-layout:af02a89", |
| | | "role": "agent-layout", |
| | | "ownership": "af02a89022a18c649", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:40:15.829Z" |
| | | }, |
| | | { |
| | | "name": "agent-api:ad03467", |
| | | "role": "agent-api", |
| | | "ownership": "ad03467a75e8afc0a", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:44:15.841Z" |
| | | }, |
| | | { |
| | | "name": "agent-auth:a3cc9be", |
| | | "role": "agent-auth", |
| | | "ownership": "a3cc9be047c9352e5", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:44:29.101Z" |
| | | }, |
| | | { |
| | | "name": "agent-menu:a77fb32", |
| | | "role": "agent-menu", |
| | | "ownership": "a77fb323ad44a6284", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:43:03.806Z" |
| | | }, |
| | | { |
| | | "name": "agent-layout:a81ba9f", |
| | | "role": "agent-layout", |
| | | "ownership": "a81ba9fdad4456dfd", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:42:27.425Z" |
| | | }, |
| | | { |
| | | "name": "agent-pages:a94adb2", |
| | | "role": "agent-pages", |
| | | "ownership": "a94adb2a88c1eb29c", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:42:26.922Z" |
| | | }, |
| | | { |
| | | "name": "agent-pages:a211822", |
| | | "role": "agent-pages", |
| | | "ownership": "a2118226e3813727c", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:42:56.060Z" |
| | | }, |
| | | { |
| | | "name": "agent-layout:ab75021", |
| | | "role": "agent-layout", |
| | | "ownership": "ab750215093131b28", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:42:55.376Z" |
| | | }, |
| | | { |
| | | "name": "agent-menu:ae9ed78", |
| | | "role": "agent-menu", |
| | | "ownership": "ae9ed78222ecc6cad", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:52:27.389Z" |
| | | }, |
| | | { |
| | | "name": "agent-api:ae5c327", |
| | | "role": "agent-api", |
| | | "ownership": "ae5c327157aec2fb1", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:46:52.233Z" |
| | | }, |
| | | { |
| | | "name": "agent-auth:adc223f", |
| | | "role": "agent-auth", |
| | | "ownership": "adc223f651f1328bd", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:44:53.789Z" |
| | | }, |
| | | { |
| | | "name": "agent-pages:a756617", |
| | | "role": "agent-pages", |
| | | "ownership": "a756617ca874ac3c1", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:51:43.427Z" |
| | | }, |
| | | { |
| | | "name": "agent-layout:a4c96b8", |
| | | "role": "agent-layout", |
| | | "ownership": "a4c96b89f113f809d", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:47:11.646Z" |
| | | }, |
| | | { |
| | | "name": "agent-auth:a8a57aa", |
| | | "role": "agent-auth", |
| | | "ownership": "a8a57aa22517c31f5", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:49:10.620Z" |
| | | }, |
| | | { |
| | | "name": "agent-api:ab1d288", |
| | | "role": "agent-api", |
| | | "ownership": "ab1d2884ac7a493bd", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:47:18.573Z" |
| | | }, |
| | | { |
| | | "name": "agent-layout:a0cbc46", |
| | | "role": "agent-layout", |
| | | "ownership": "a0cbc46d413ef4196", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:47:31.885Z" |
| | | }, |
| | | { |
| | | "name": "agent-api:a8d6281", |
| | | "role": "agent-api", |
| | | "ownership": "a8d6281531b04991f", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:47:38.716Z" |
| | | }, |
| | | { |
| | | "name": "writer:a8c91fb", |
| | | "role": "writer", |
| | | "ownership": "a8c91fb2cf222b293", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:50:25.144Z" |
| | | }, |
| | | { |
| | | "name": "agent-auth:ade32f8", |
| | | "role": "agent-auth", |
| | | "ownership": "ade32f8bf35b26757", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:52:13.860Z" |
| | | }, |
| | | { |
| | | "name": "agent-pages:ac557d7", |
| | | "role": "agent-pages", |
| | | "ownership": "ac557d7e2a1b5f729", |
| | | "status": "running", |
| | | "currentStep": null, |
| | | "latestUpdate": null, |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:51:43.789Z" |
| | | }, |
| | | { |
| | | "name": "agent-layout:a9c6179", |
| | | "role": "agent-layout", |
| | | "ownership": "a9c6179a801e0e434", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:52:12.657Z" |
| | | }, |
| | | { |
| | | "name": "writer:a7627b0", |
| | | "role": "writer", |
| | | "ownership": "a7627b0b0e0b60be2", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:52:01.512Z" |
| | | }, |
| | | { |
| | | "name": "agent-api:aba045f", |
| | | "role": "agent-api", |
| | | "ownership": "aba045f68cd9f61d0", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:52:03.192Z" |
| | | }, |
| | | { |
| | | "name": "agent-auth:aeed34c", |
| | | "role": "agent-auth", |
| | | "ownership": "aeed34c94d463a92c", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:52:27.391Z" |
| | | }, |
| | | { |
| | | "name": "agent-menu:a9271b2", |
| | | "role": "agent-menu", |
| | | "ownership": "a9271b2a5525f053a", |
| | | "status": "running", |
| | | "currentStep": null, |
| | | "latestUpdate": null, |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:53:39.468Z" |
| | | }, |
| | | { |
| | | "name": "agent-api:ae5d5fc", |
| | | "role": "agent-api", |
| | | "ownership": "ae5d5fcffcb393b67", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:53:47.265Z" |
| | | }, |
| | | { |
| | | "name": "agent-auth:ad92b78", |
| | | "role": "agent-auth", |
| | | "ownership": "ad92b7876bc72bf7e", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:53:57.853Z" |
| | | }, |
| | | { |
| | | "name": "agent-layout:affcaab", |
| | | "role": "agent-layout", |
| | | "ownership": "affcaabcac0234d22", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:53:49.029Z" |
| | | }, |
| | | { |
| | | "name": "writer:ac6c4a2", |
| | | "role": "writer", |
| | | "ownership": "ac6c4a28a6422e89d", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-19T13:53:49.217Z" |
| | | } |
| | | ], |
| | | "timeline": [ |
| | | { |
| | | "id": "session-start:ad92b7876bc72bf7e:2026-04-19T13:53:42.036Z", |
| | | "at": "2026-04-19T13:53:42.036Z", |
| | | "kind": "update", |
| | | "agent": "agent-auth:ad92b78", |
| | | "detail": "started agent-auth:ad92b78", |
| | | "sourceKey": "session-start:ad92b7876bc72bf7e" |
| | | }, |
| | | { |
| | | "id": "session-start:affcaabcac0234d22:2026-04-19T13:53:42.701Z", |
| | | "at": "2026-04-19T13:53:42.701Z", |
| | | "kind": "update", |
| | | "agent": "agent-layout:affcaab", |
| | | "detail": "started agent-layout:affcaab", |
| | | "sourceKey": "session-start:affcaabcac0234d22" |
| | | }, |
| | | { |
| | | "id": "session-start:ac6c4a28a6422e89d:2026-04-19T13:53:43.519Z", |
| | | "at": "2026-04-19T13:53:43.519Z", |
| | | "kind": "update", |
| | | "agent": "writer:ac6c4a2", |
| | | "detail": "started writer:ac6c4a2", |
| | | "sourceKey": "session-start:ac6c4a28a6422e89d" |
| | | }, |
| | | { |
| | | "id": "session-stop:ae5d5fcffcb393b67:2026-04-19T13:53:47.265Z", |
| | | "at": "2026-04-19T13:53:47.265Z", |
| | | "kind": "completion", |
| | | "agent": "agent-api:ae5d5fc", |
| | | "detail": "completed", |
| | | "sourceKey": "session-stop:ae5d5fcffcb393b67" |
| | | }, |
| | | { |
| | | "id": "session-stop:affcaabcac0234d22:2026-04-19T13:53:49.029Z", |
| | | "at": "2026-04-19T13:53:49.029Z", |
| | | "kind": "completion", |
| | | "agent": "agent-layout:affcaab", |
| | | "detail": "completed", |
| | | "sourceKey": "session-stop:affcaabcac0234d22" |
| | | }, |
| | | { |
| | | "id": "session-stop:ac6c4a28a6422e89d:2026-04-19T13:53:49.217Z", |
| | | "at": "2026-04-19T13:53:49.217Z", |
| | | "kind": "completion", |
| | | "agent": "writer:ac6c4a2", |
| | | "detail": "completed", |
| | | "sourceKey": "session-stop:ac6c4a28a6422e89d" |
| | | }, |
| | | { |
| | | "id": "session-stop:ad92b7876bc72bf7e:2026-04-19T13:53:57.853Z", |
| | | "at": "2026-04-19T13:53:57.853Z", |
| | | "kind": "completion", |
| | | "agent": "agent-auth:ad92b78", |
| | | "detail": "completed", |
| | | "sourceKey": "session-stop:ad92b7876bc72bf7e" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | "id": "session:ab8c4305-0c84-43a9-bd5d-b68d5471801b:none", |
| | | "source": "session", |
| | | "name": "none", |
| | | "objective": "Session mission", |
| | | "createdAt": "2026-04-20T01:18:33.678Z", |
| | | "updatedAt": "2026-04-20T02:13:36.765Z", |
| | | "status": "done", |
| | | "workerCount": 8, |
| | | "taskCounts": { |
| | | "total": 8, |
| | | "pending": 0, |
| | | "blocked": 0, |
| | | "inProgress": 0, |
| | | "completed": 8, |
| | | "failed": 0 |
| | | }, |
| | | "agents": [ |
| | | { |
| | | "name": "general-purpose:af20345", |
| | | "role": "general-purpose", |
| | | "ownership": "af20345f5b7efdbb8", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-20T02:13:36.765Z" |
| | | }, |
| | | { |
| | | "name": "general-purpose:a9cc35c", |
| | | "role": "general-purpose", |
| | | "ownership": "a9cc35c00ad32b233", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-20T01:21:33.668Z" |
| | | }, |
| | | { |
| | | "name": "general-purpose:a3499a6", |
| | | "role": "general-purpose", |
| | | "ownership": "a3499a67931cba616", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-20T01:21:25.687Z" |
| | | }, |
| | | { |
| | | "name": "general-purpose:addde47", |
| | | "role": "general-purpose", |
| | | "ownership": "addde47ba39361d9d", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-20T01:34:11.276Z" |
| | | }, |
| | | { |
| | | "name": "general-purpose:a883f88", |
| | | "role": "general-purpose", |
| | | "ownership": "a883f88b2839bb064", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-20T02:09:43.301Z" |
| | | }, |
| | | { |
| | | "name": "general-purpose:a1cccc1", |
| | | "role": "general-purpose", |
| | | "ownership": "a1cccc11f34b62da4", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-20T02:09:46.017Z" |
| | | }, |
| | | { |
| | | "name": "general-purpose:a85bc7a", |
| | | "role": "general-purpose", |
| | | "ownership": "a85bc7aac2726a6fa", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-20T02:10:09.142Z" |
| | | }, |
| | | { |
| | | "name": "general-purpose:a921902", |
| | | "role": "general-purpose", |
| | | "ownership": "a9219020fa6ba0ef0", |
| | | "status": "done", |
| | | "currentStep": null, |
| | | "latestUpdate": "completed", |
| | | "completedSummary": null, |
| | | "updatedAt": "2026-04-20T02:08:23.745Z" |
| | | } |
| | | ], |
| | | "timeline": [ |
| | | { |
| | | "id": "session-start:a1cccc11f34b62da4:2026-04-20T02:07:02.639Z", |
| | | "at": "2026-04-20T02:07:02.639Z", |
| | | "kind": "update", |
| | | "agent": "general-purpose:a1cccc1", |
| | | "detail": "started general-purpose:a1cccc1", |
| | | "sourceKey": "session-start:a1cccc11f34b62da4" |
| | | }, |
| | | { |
| | | "id": "session-start:a85bc7aac2726a6fa:2026-04-20T02:07:02.655Z", |
| | | "at": "2026-04-20T02:07:02.655Z", |
| | | "kind": "update", |
| | | "agent": "general-purpose:a85bc7a", |
| | | "detail": "started general-purpose:a85bc7a", |
| | | "sourceKey": "session-start:a85bc7aac2726a6fa" |
| | | }, |
| | | { |
| | | "id": "session-start:a9219020fa6ba0ef0:2026-04-20T02:07:02.700Z", |
| | | "at": "2026-04-20T02:07:02.700Z", |
| | | "kind": "update", |
| | | "agent": "general-purpose:a921902", |
| | | "detail": "started general-purpose:a921902", |
| | | "sourceKey": "session-start:a9219020fa6ba0ef0" |
| | | }, |
| | | { |
| | | "id": "session-stop:a9219020fa6ba0ef0:2026-04-20T02:08:23.745Z", |
| | | "at": "2026-04-20T02:08:23.745Z", |
| | | "kind": "completion", |
| | | "agent": "general-purpose:a921902", |
| | | "detail": "completed", |
| | | "sourceKey": "session-stop:a9219020fa6ba0ef0" |
| | | }, |
| | | { |
| | | "id": "session-stop:a883f88b2839bb064:2026-04-20T02:09:43.301Z", |
| | | "at": "2026-04-20T02:09:43.301Z", |
| | | "kind": "completion", |
| | | "agent": "general-purpose:a883f88", |
| | | "detail": "completed", |
| | | "sourceKey": "session-stop:a883f88b2839bb064" |
| | | }, |
| | | { |
| | | "id": "session-stop:a1cccc11f34b62da4:2026-04-20T02:09:46.017Z", |
| | | "at": "2026-04-20T02:09:46.017Z", |
| | | "kind": "completion", |
| | | "agent": "general-purpose:a1cccc1", |
| | | "detail": "completed", |
| | | "sourceKey": "session-stop:a1cccc11f34b62da4" |
| | | }, |
| | | { |
| | | "id": "session-stop:a85bc7aac2726a6fa:2026-04-20T02:10:09.142Z", |
| | | "at": "2026-04-20T02:10:09.142Z", |
| | | "kind": "completion", |
| | | "agent": "general-purpose:a85bc7a", |
| | | "detail": "completed", |
| | | "sourceKey": "session-stop:a85bc7aac2726a6fa" |
| | | }, |
| | | { |
| | | "id": "session-stop:a6eae12446c31bdfe:2026-04-20T02:13:36.765Z", |
| | | "at": "2026-04-20T02:13:36.765Z", |
| | | "kind": "completion", |
| | | "agent": "general-purpose:af20345", |
| | | "detail": "completed", |
| | | "sourceKey": "session-stop:a6eae12446c31bdfe" |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | } |
| | |
| | | "status": "completed", |
| | | "completed_at": "2026-04-18T08:52:24.581Z", |
| | | "duration_ms": 1093052 |
| | | }, |
| | | { |
| | | "agent_id": "af12f692dd4a3fb28", |
| | | "agent_type": "general-purpose", |
| | | "started_at": "2026-04-19T11:24:03.847Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T11:24:57.433Z", |
| | | "duration_ms": 53586 |
| | | }, |
| | | { |
| | | "agent_id": "aa2a37e07afb9d479", |
| | | "agent_type": "general-purpose", |
| | | "started_at": "2026-04-19T11:24:03.863Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T11:24:36.379Z", |
| | | "duration_ms": 32516 |
| | | }, |
| | | { |
| | | "agent_id": "a6eb9a903c850f24a", |
| | | "agent_type": "general-purpose", |
| | | "started_at": "2026-04-19T11:24:03.887Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T11:24:47.161Z", |
| | | "duration_ms": 43274 |
| | | }, |
| | | { |
| | | "agent_id": "a9803cf811cccaa24", |
| | | "agent_type": "general-purpose", |
| | | "started_at": "2026-04-19T11:25:09.331Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T11:25:43.000Z", |
| | | "duration_ms": 33669 |
| | | }, |
| | | { |
| | | "agent_id": "a9e37bec52fcbdaa5", |
| | | "agent_type": "general-purpose", |
| | | "started_at": "2026-04-19T11:25:51.811Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T11:26:55.341Z", |
| | | "duration_ms": 63530 |
| | | }, |
| | | { |
| | | "agent_id": "a9260b44a0c26528b", |
| | | "agent_type": "agent-menu", |
| | | "started_at": "2026-04-19T13:39:55.243Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:41:04.664Z", |
| | | "duration_ms": 69421 |
| | | }, |
| | | { |
| | | "agent_id": "a6f1e5c50a57e0d5d", |
| | | "agent_type": "agent-auth", |
| | | "started_at": "2026-04-19T13:39:55.328Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:40:20.808Z", |
| | | "duration_ms": 25480 |
| | | }, |
| | | { |
| | | "agent_id": "a5a2a89d2fb5f17ff", |
| | | "agent_type": "agent-pages", |
| | | "started_at": "2026-04-19T13:39:55.416Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:41:01.814Z", |
| | | "duration_ms": 66398 |
| | | }, |
| | | { |
| | | "agent_id": "a1a6151ba7f364cfb", |
| | | "agent_type": "agent-scaffold", |
| | | "started_at": "2026-04-19T13:39:55.484Z", |
| | | "parent_mode": "none", |
| | | "status": "running" |
| | | }, |
| | | { |
| | | "agent_id": "a4ce4ef36b3693f58", |
| | | "agent_type": "agent-api", |
| | | "started_at": "2026-04-19T13:39:55.588Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:40:12.096Z", |
| | | "duration_ms": 16508 |
| | | }, |
| | | { |
| | | "agent_id": "af02a89022a18c649", |
| | | "agent_type": "agent-layout", |
| | | "started_at": "2026-04-19T13:39:55.655Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:40:15.829Z", |
| | | "duration_ms": 20174 |
| | | }, |
| | | { |
| | | "agent_id": "ad03467a75e8afc0a", |
| | | "agent_type": "agent-api", |
| | | "started_at": "2026-04-19T13:41:42.785Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:44:15.841Z", |
| | | "duration_ms": 153056 |
| | | }, |
| | | { |
| | | "agent_id": "a3cc9be047c9352e5", |
| | | "agent_type": "agent-auth", |
| | | "started_at": "2026-04-19T13:41:43.216Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:44:29.101Z", |
| | | "duration_ms": 165885 |
| | | }, |
| | | { |
| | | "agent_id": "a77fb323ad44a6284", |
| | | "agent_type": "agent-menu", |
| | | "started_at": "2026-04-19T13:41:43.564Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:43:03.806Z", |
| | | "duration_ms": 80242 |
| | | }, |
| | | { |
| | | "agent_id": "a81ba9fdad4456dfd", |
| | | "agent_type": "agent-layout", |
| | | "started_at": "2026-04-19T13:41:43.726Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:42:27.425Z", |
| | | "duration_ms": 43699 |
| | | }, |
| | | { |
| | | "agent_id": "a94adb2a88c1eb29c", |
| | | "agent_type": "agent-pages", |
| | | "started_at": "2026-04-19T13:41:44.247Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:42:26.922Z", |
| | | "duration_ms": 42675 |
| | | }, |
| | | { |
| | | "agent_id": "a2118226e3813727c", |
| | | "agent_type": "agent-pages", |
| | | "started_at": "2026-04-19T13:42:27.222Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:42:56.060Z", |
| | | "duration_ms": 28838 |
| | | }, |
| | | { |
| | | "agent_id": "ab750215093131b28", |
| | | "agent_type": "agent-layout", |
| | | "started_at": "2026-04-19T13:42:27.736Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:42:55.376Z", |
| | | "duration_ms": 27640 |
| | | }, |
| | | { |
| | | "agent_id": "ae9ed78222ecc6cad", |
| | | "agent_type": "agent-menu", |
| | | "started_at": "2026-04-19T13:43:04.113Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:53:39.187Z", |
| | | "duration_ms": 635074 |
| | | }, |
| | | { |
| | | "agent_id": "ae5c327157aec2fb1", |
| | | "agent_type": "agent-api", |
| | | "started_at": "2026-04-19T13:44:16.103Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:46:52.232Z", |
| | | "duration_ms": 156129 |
| | | }, |
| | | { |
| | | "agent_id": "adc223f651f1328bd", |
| | | "agent_type": "agent-auth", |
| | | "started_at": "2026-04-19T13:44:29.361Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:44:53.787Z", |
| | | "duration_ms": 24426 |
| | | }, |
| | | { |
| | | "agent_id": "a756617ca874ac3c1", |
| | | "agent_type": "agent-pages", |
| | | "started_at": "2026-04-19T13:44:31.425Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:51:43.425Z", |
| | | "duration_ms": 432000 |
| | | }, |
| | | { |
| | | "agent_id": "a4c96b89f113f809d", |
| | | "agent_type": "agent-layout", |
| | | "started_at": "2026-04-19T13:44:31.949Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:47:11.645Z", |
| | | "duration_ms": 159696 |
| | | }, |
| | | { |
| | | "agent_id": "a8a57aa22517c31f5", |
| | | "agent_type": "agent-auth", |
| | | "started_at": "2026-04-19T13:44:54.061Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:49:10.619Z", |
| | | "duration_ms": 256558 |
| | | }, |
| | | { |
| | | "agent_id": "ab1d2884ac7a493bd", |
| | | "agent_type": "agent-api", |
| | | "started_at": "2026-04-19T13:46:52.504Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:47:18.572Z", |
| | | "duration_ms": 26068 |
| | | }, |
| | | { |
| | | "agent_id": "a0cbc46d413ef4196", |
| | | "agent_type": "agent-layout", |
| | | "started_at": "2026-04-19T13:47:11.911Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:47:31.883Z", |
| | | "duration_ms": 19972 |
| | | }, |
| | | { |
| | | "agent_id": "a8d6281531b04991f", |
| | | "agent_type": "agent-api", |
| | | "started_at": "2026-04-19T13:47:18.855Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:47:38.715Z", |
| | | "duration_ms": 19860 |
| | | }, |
| | | { |
| | | "agent_id": "a8c91fb2cf222b293", |
| | | "agent_type": "writer", |
| | | "started_at": "2026-04-19T13:48:10.651Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:50:25.143Z", |
| | | "duration_ms": 134492 |
| | | }, |
| | | { |
| | | "agent_id": "ade32f8bf35b26757", |
| | | "agent_type": "agent-auth", |
| | | "started_at": "2026-04-19T13:49:10.886Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:52:13.858Z", |
| | | "duration_ms": 182972 |
| | | }, |
| | | { |
| | | "agent_id": "ac557d7e2a1b5f729", |
| | | "agent_type": "agent-pages", |
| | | "started_at": "2026-04-19T13:51:43.789Z", |
| | | "parent_mode": "none", |
| | | "status": "running" |
| | | }, |
| | | { |
| | | "agent_id": "a9c6179a801e0e434", |
| | | "agent_type": "agent-layout", |
| | | "started_at": "2026-04-19T13:51:48.859Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:52:12.656Z", |
| | | "duration_ms": 23797 |
| | | }, |
| | | { |
| | | "agent_id": "a7627b0b0e0b60be2", |
| | | "agent_type": "writer", |
| | | "started_at": "2026-04-19T13:51:48.925Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:52:01.510Z", |
| | | "duration_ms": 12585 |
| | | }, |
| | | { |
| | | "agent_id": "aba045f68cd9f61d0", |
| | | "agent_type": "agent-api", |
| | | "started_at": "2026-04-19T13:51:48.986Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:52:03.190Z", |
| | | "duration_ms": 14204 |
| | | }, |
| | | { |
| | | "agent_id": "aeed34c94d463a92c", |
| | | "agent_type": "agent-auth", |
| | | "started_at": "2026-04-19T13:52:14.179Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:52:27.389Z", |
| | | "duration_ms": 13210 |
| | | }, |
| | | { |
| | | "agent_id": "a9271b2a5525f053a", |
| | | "agent_type": "agent-menu", |
| | | "started_at": "2026-04-19T13:53:39.468Z", |
| | | "parent_mode": "none", |
| | | "status": "running" |
| | | }, |
| | | { |
| | | "agent_id": "ae5d5fcffcb393b67", |
| | | "agent_type": "agent-api", |
| | | "started_at": "2026-04-19T13:53:41.992Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:53:47.263Z", |
| | | "duration_ms": 5271 |
| | | }, |
| | | { |
| | | "agent_id": "ad92b7876bc72bf7e", |
| | | "agent_type": "agent-auth", |
| | | "started_at": "2026-04-19T13:53:42.036Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:53:57.851Z", |
| | | "duration_ms": 15815 |
| | | }, |
| | | { |
| | | "agent_id": "affcaabcac0234d22", |
| | | "agent_type": "agent-layout", |
| | | "started_at": "2026-04-19T13:53:42.701Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:53:49.028Z", |
| | | "duration_ms": 6327 |
| | | }, |
| | | { |
| | | "agent_id": "ac6c4a28a6422e89d", |
| | | "agent_type": "writer", |
| | | "started_at": "2026-04-19T13:53:43.519Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-19T13:53:49.216Z", |
| | | "duration_ms": 5697 |
| | | }, |
| | | { |
| | | "agent_id": "af20345f5b7efdbb8", |
| | | "agent_type": "general-purpose", |
| | | "started_at": "2026-04-20T01:18:33.678Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-20T01:20:19.477Z", |
| | | "duration_ms": 105799 |
| | | }, |
| | | { |
| | | "agent_id": "a9cc35c00ad32b233", |
| | | "agent_type": "general-purpose", |
| | | "started_at": "2026-04-20T01:18:33.716Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-20T01:21:33.665Z", |
| | | "duration_ms": 179949 |
| | | }, |
| | | { |
| | | "agent_id": "a3499a67931cba616", |
| | | "agent_type": "general-purpose", |
| | | "started_at": "2026-04-20T01:18:33.755Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-20T01:21:25.686Z", |
| | | "duration_ms": 171931 |
| | | }, |
| | | { |
| | | "agent_id": "addde47ba39361d9d", |
| | | "agent_type": "general-purpose", |
| | | "started_at": "2026-04-20T01:27:42.165Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-20T01:34:11.275Z", |
| | | "duration_ms": 389110 |
| | | }, |
| | | { |
| | | "agent_id": "a883f88b2839bb064", |
| | | "agent_type": "general-purpose", |
| | | "started_at": "2026-04-20T02:07:02.615Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-20T02:09:43.299Z", |
| | | "duration_ms": 160684 |
| | | }, |
| | | { |
| | | "agent_id": "a1cccc11f34b62da4", |
| | | "agent_type": "general-purpose", |
| | | "started_at": "2026-04-20T02:07:02.639Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-20T02:09:46.016Z", |
| | | "duration_ms": 163377 |
| | | }, |
| | | { |
| | | "agent_id": "a85bc7aac2726a6fa", |
| | | "agent_type": "general-purpose", |
| | | "started_at": "2026-04-20T02:07:02.655Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-20T02:10:09.140Z", |
| | | "duration_ms": 186485 |
| | | }, |
| | | { |
| | | "agent_id": "a9219020fa6ba0ef0", |
| | | "agent_type": "general-purpose", |
| | | "started_at": "2026-04-20T02:07:02.700Z", |
| | | "parent_mode": "none", |
| | | "status": "completed", |
| | | "completed_at": "2026-04-20T02:08:23.744Z", |
| | | "duration_ms": 81044 |
| | | } |
| | | ], |
| | | "total_spawned": 83, |
| | | "total_completed": 83, |
| | | "total_spawned": 118, |
| | | "total_completed": 127, |
| | | "total_failed": 0, |
| | | "last_updated": "2026-04-18T14:41:25.052Z" |
| | | "last_updated": "2026-04-20T02:13:36.867Z" |
| | | } |
| | |
| | | <strong>We're sorry but WCS doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> |
| | | </noscript> |
| | | <div id="app"></div> |
| | | <script src="/webconfig.js"></script> |
| | | <script type="module" src="/src/main.js"></script> |
| | | </body> |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | window.webConfig = { |
| | | "webApiBaseUrl": "http://localhost:9292/", |
| | | "webApiProduction":"http://192.168.60.30:9292/" |
| | | } |
| | |
| | | let loadingInstance; |
| | | let loadingStatus = false; |
| | | if (process.env.NODE_ENV == 'development') { |
| | | axios.defaults.baseURL = 'http://127.0.0.1:9292/'; |
| | | axios.defaults.baseURL = window.webConfig.webApiBaseUrl; |
| | | } |
| | | else if (process.env.NODE_ENV == 'debug') { |
| | | axios.defaults.baseURL = 'http://127.0.0.1:9292/'; |
| | | axios.defaults.baseURL = window.webConfig.webApiBaseUrl; |
| | | } |
| | | |
| | | else if (process.env.NODE_ENV == 'production') { |
| | | axios.defaults.baseURL = 'http://192.168.60.30:9292/'; |
| | | axios.defaults.baseURL = window.webConfig.webApiProduction; |
| | | } |
| | | if (!axios.defaults.baseURL.endsWith('/')) { |
| | | axios.defaults.baseURL+="/"; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // 该æ©å±æä»¶ç¨äºæºæ¢°æç¶æç®¡ç页é¢çä¸å¡æ©å±ã |
| | | |
| | | let extension = { |
| | | components: { |
| | | gridHeader: "", |
| | | gridBody: "", |
| | | gridFooter: "", |
| | | modelHeader: "", |
| | | modelBody: "", |
| | | modelFooter: "", |
| | | }, |
| | | tableAction: "", |
| | | buttons: { view: [], box: [], detail: [] }, |
| | | methods: { |
| | | onInit() {}, |
| | | |
| | | onInited() {}, |
| | | |
| | | searchBefore(param) { |
| | | return true; |
| | | }, |
| | | |
| | | searchAfter(result) { |
| | | return true; |
| | | }, |
| | | |
| | | addBefore(formData) { |
| | | return true; |
| | | }, |
| | | |
| | | addAfter(result) { |
| | | return true; |
| | | }, |
| | | |
| | | updateBefore(formData) { |
| | | return true; |
| | | }, |
| | | |
| | | updateAfter(result) { |
| | | return true; |
| | | }, |
| | | |
| | | deleteBefore(ids) { |
| | | return true; |
| | | }, |
| | | |
| | | deleteAfter(ids) { |
| | | return true; |
| | | }, |
| | | |
| | | modelOpenAfter(row) {}, |
| | | }, |
| | | }; |
| | | |
| | | export default extension; |
| | |
| | | component: () => import('@/views/taskinfo/robotTask.vue') |
| | | }, |
| | | { |
| | | path: '/robotState', |
| | | name: 'robotState', |
| | | component: () => import('@/views/taskinfo/robotState.vue') |
| | | }, |
| | | { |
| | | path: '/task', |
| | | name: 'task', |
| | | component: () => import('@/views/taskinfo/task.vue') |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view-grid |
| | | ref="grid" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend" |
| | | > |
| | | </view-grid> |
| | | </template> |
| | | |
| | | <script> |
| | | import extend from "@/extension/taskinfo/robotState.jsx"; |
| | | import { ref, defineComponent } from "vue"; |
| | | |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: "Id", |
| | | footer: "Foots", |
| | | cnName: "æºæ¢°æç¶æç®¡ç", |
| | | name: "robotState", |
| | | url: "/robotState/", |
| | | sortName: "IPAddress", |
| | | }); |
| | | |
| | | // ç¼è¾è¡¨ååæ®µ |
| | | const editFormFields = ref({ |
| | | IPAddress: "", |
| | | Version: "", |
| | | IsEventSubscribed: false, |
| | | RobotRunMode: "", |
| | | RobotControlMode: "", |
| | | RobotArmObject: "", |
| | | Homed: "", |
| | | CurrentAction: "", |
| | | OperStatus: "", |
| | | RobotTaskTotalNum: 0, |
| | | IsSplitPallet: false, |
| | | IsGroupPallet: false, |
| | | IsInFakeBatteryMode: false, |
| | | CurrentBatchIndex: 1, |
| | | ChangePalletPhase: 0, |
| | | IsScanNG: false, |
| | | BatteryArrived: false, |
| | | }); |
| | | |
| | | // ç¼è¾è¡¨åé
ç½® |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { title: "IPå°å", field: "ipAddress", type: "string", readonly: true }, |
| | | { title: "çæ¬å·", field: "version", type: "int", readonly: true }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "è¿è¡æ¨¡å¼", |
| | | field: "robotRunMode", |
| | | type: "select", |
| | | data: [ |
| | | { key: 1, value: "æå¨æ¨¡å¼" }, |
| | | { key: 2, value: "èªå¨æ¨¡å¼" }, |
| | | ], |
| | | }, |
| | | { |
| | | title: "æ§å¶æ¨¡å¼", |
| | | field: "robotControlMode", |
| | | type: "select", |
| | | data: [ |
| | | { key: 1, value: "客æ·ç«¯æ§å¶" }, |
| | | { key: 2, value: "å
¶ä»" }, |
| | | ], |
| | | }, |
| | | { |
| | | title: "æèç¶æ", |
| | | field: "robotArmObject", |
| | | type: "select", |
| | | data: [ |
| | | { key: 0, value: "空é²" }, |
| | | { key: 1, value: "æç©æ" }, |
| | | ], |
| | | }, |
| | | ], |
| | | [ |
| | | { title: "åé¶ç¶æ", field: "homed", type: "string" }, |
| | | { title: "å½åå¨ä½", field: "currentAction", type: "string" }, |
| | | { title: "è¿è¡ç¶æ", field: "operStatus", type: "string" }, |
| | | ], |
| | | [ |
| | | { title: "任塿»æ°", field: "robotTaskTotalNum", type: "int" }, |
| | | { title: "å½åæ¹æ¬¡", field: "currentBatchIndex", type: "int" }, |
| | | { title: "æ¢çé¶æ®µ", field: "changePalletPhase", type: "int" }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "æ¯å¦æç", |
| | | field: "isSplitPallet", |
| | | type: "checkbox", |
| | | }, |
| | | { |
| | | title: "æ¯å¦ç»ç", |
| | | field: "isGroupPallet", |
| | | type: "checkbox", |
| | | }, |
| | | { |
| | | title: "åçµè¯æ¨¡å¼", |
| | | field: "isInFakeBatteryMode", |
| | | type: "checkbox", |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "æ¯å¦æ«ç NG", |
| | | field: "isScanNG", |
| | | type: "checkbox", |
| | | }, |
| | | { |
| | | title: "çµè¯æ¯å¦å°ä½", |
| | | field: "batteryArrived", |
| | | type: "checkbox", |
| | | }, |
| | | { |
| | | title: "æ¶æ¯å·²è®¢é
", |
| | | field: "isEventSubscribed", |
| | | type: "checkbox", |
| | | }, |
| | | ], |
| | | ]); |
| | | |
| | | // æç´¢è¡¨ååæ®µ |
| | | const searchFormFields = ref({ |
| | | IPAddress: "", |
| | | CurrentAction: "", |
| | | OperStatus: "", |
| | | }); |
| | | |
| | | // æç´¢è¡¨åé
ç½® |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "IPå°å", field: "ipAddress", type: "string" }, |
| | | { title: "å½åå¨ä½", field: "currentAction", type: "string" }, |
| | | { title: "è¿è¡ç¶æ", field: "operStatus", type: "string" }, |
| | | ], |
| | | ]); |
| | | |
| | | // åå®ä¹ |
| | | const columns = ref([ |
| | | { field: "ipAddress", title: "IPå°å", type: "string", width: 140, align: "left" }, |
| | | { field: "version", title: "çæ¬", type: "int", width: 80, align: "left" }, |
| | | { field: "robotRunMode", title: "è¿è¡æ¨¡å¼", type: "int", width: 100, bind: { key: "robotRunMode", data: [{ key: 1, value: "æå¨æ¨¡å¼" },{ key: 2, value: "èªå¨æ¨¡å¼" }] }, align: "center" }, |
| | | { field: "robotControlMode", title: "æ§å¶æ¨¡å¼", type: "int", width: 100, bind: { key: "robotControlMode", data: [{ key: 1, value: "客æ·ç«¯æ§å¶" },{ key: 2, value: "å
¶ä»" }] }, align: "center" }, |
| | | { field: "robotArmObject", title: "æèç¶æ", type: "int", width: 90, bind: { key: "robotArmObject", data: [{ key: 0, value: "空é²"}, { key: 1, value: "æç©æ" }] }, align: "center" }, |
| | | { field: "homed", title: "åé¶ç¶æ", type: "string", width: 100, align: "center" }, |
| | | { field: "currentAction", title: "å½åå¨ä½", type: "string", width: 100, align: "center" }, |
| | | { field: "operStatus", title: "è¿è¡ç¶æ", type: "string", width: 100, align: "center" }, |
| | | { field: "robotTaskTotalNum", title: "任塿»æ°", type: "int", width: 90, align: "center" }, |
| | | { field: "isSplitPallet", title: "æç", type: "byte", width: 60, align: "center" }, |
| | | { field: "isGroupPallet", title: "ç»ç", type: "byte", width: 60, align: "center" }, |
| | | { field: "isInFakeBatteryMode", title: "åçµè¯", type: "byte", width: 70, align: "center" }, |
| | | { field: "currentBatchIndex", title: "æ¹æ¬¡", type: "int", width: 60, align: "center" }, |
| | | { field: "changePalletPhase", title: "æ¢çé¶æ®µ", type: "int", width: 80, align: "center" }, |
| | | { field: "isScanNG", title: "æ«ç NG", type: "byte", width: 80, align: "center" }, |
| | | { field: "batteryArrived", title: "çµè¯å°ä½", type: "byte", width: 80, align: "center" }, |
| | | { field: "isEventSubscribed", title: "已订é
", type: "byte", width: 70, align: "center" }, |
| | | ]); |
| | | |
| | | const detail = ref({}); |
| | | |
| | | return { |
| | | table, |
| | | columns, |
| | | detail, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | extend, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | |
| | | public const int EmptyPalletTaskType = 100; |
| | | |
| | | /// <summary> |
| | | /// 空æçä»»å¡ç±»å |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// å½ä»»å¡ç±»å为空æçåºåº/å
¥åºæ¶ï¼ä½¿ç¨æ¤ç¹æ®ç±»åå¼ä»£æ¿åä»»å¡ç±»åã |
| | | /// ç¨äºä¸ç«å°è·¯ç±é
ç½®å¹é
ã |
| | | /// </remarks> |
| | | public const int EmptyInPalletTaskType = 200; |
| | | |
| | | /// <summary> |
| | | /// ç«è¦ç¶ææ£å¸¸ |
| | | /// </summary> |
| | | /// <remarks> |
| | |
| | | return TaskTypeGroup.OutbondGroup; |
| | | } |
| | | // å°è¯å°ä»»å¡ç±»å转æ¢ä¸ºTaskInStatusEnumæä¸¾ç±»åï¼å¦ææåï¼è¿åInboundGroup |
| | | else if (!int.TryParse(Enum.Parse<TaskInStatusEnum>(taskTypeStr).ToString(), out result)) |
| | | else if (!int.TryParse(Enum.Parse<TaskInboundTypeEnum>(taskTypeStr).ToString(), out result)) |
| | | { |
| | | return TaskTypeGroup.InboundGroup; |
| | | } |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.ComponentModel; |
| | | |
| | | namespace WIDESEAWCS_Common.TaskEnum |
| | | { |
| | |
| | | /// </summary> |
| | | [Description("å
¥åº")] |
| | | Inbound = 200, |
| | | |
| | | /// <summary> |
| | | /// çç¹å
¥åº |
| | | /// </summary> |
| | | [Description("çç¹å
¥åº")] |
| | | InInventory = 201, |
| | | |
| | | /// <summary> |
| | | /// 忣å
¥åº |
| | | /// </summary> |
| | | [Description("忣å
¥åº")] |
| | | InPick = 202, |
| | | |
| | | /// <summary> |
| | | /// è´¨æ£å
¥åº |
| | | /// </summary> |
| | |
| | | /// 空箱å
¥åº |
| | | /// </summary> |
| | | [Description("空箱å
¥åº")] |
| | | InEmpty = 600, |
| | | InEmpty = 204, |
| | | } |
| | | |
| | | public enum TaskOutboundTypeEnum |
| | |
| | | /// </summary> |
| | | [Description("åºåº")] |
| | | Outbound = 100, |
| | | |
| | | /// <summary> |
| | | /// çç¹åºåº |
| | | /// </summary> |
| | | [Description("çç¹åºåº")] |
| | | OutInventory = 101, |
| | | |
| | | /// <summary> |
| | | /// 忣åºåº |
| | | /// </summary> |
| | | [Description("忣åºåº")] |
| | | OutPick = 102, |
| | | |
| | | /// <summary> |
| | | /// è´¨æ£åºåº |
| | | /// </summary> |
| | |
| | | /// </summary> |
| | | [Description("åºå
ç§»åº")] |
| | | Relocation = 300, |
| | | |
| | | /// <summary> |
| | | /// åºå¤ç§»åº |
| | | /// </summary> |
| | |
| | | /// </summary> |
| | | [Description("颿åºåº")] |
| | | Outbound = 100, |
| | | |
| | | /// <summary> |
| | | /// çç¹åºåº |
| | | /// </summary> |
| | | [Description("çç¹åºåº")] |
| | | OutInventory = 110, |
| | | |
| | | /// <summary> |
| | | /// 忣åºåº |
| | | /// </summary> |
| | | [Description("忣åºåº")] |
| | | OutPick = 120, |
| | | |
| | | /// <summary> |
| | | /// è´¨æ£åºåº |
| | | /// </summary> |
| | |
| | | /// </summary> |
| | | [Description("éè´å
¥åº")] |
| | | Inbound = 510, |
| | | |
| | | /// <summary> |
| | | /// çç¹å
¥åº |
| | | /// </summary> |
| | | [Description("çç¹å
¥åº")] |
| | | InInventory = 520, |
| | | |
| | | /// <summary> |
| | | /// 忣å
¥åº |
| | | /// </summary> |
| | | [Description("忣å
¥åº")] |
| | | InPick = 530, |
| | | |
| | | /// <summary> |
| | | /// è´¨æ£å
¥åº |
| | | /// </summary> |
| | |
| | | /// </summary> |
| | | [Description("å··éå
ç§»åº")] |
| | | Relocation = 900 |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_ITaskInfoRepository |
| | |
| | | /// å¤æå¯¹è±¡ï¼RobotCraneãCurrentTaskãæ°ç»çï¼å¨è°ç¨æ¹ä½¿ç¨å¼ºç±»åï¼ |
| | | /// 卿¤æ¥å£å±é¢ä»¥ Dt_RobotState å®ä½ä¸ºæä½åä½ã |
| | | /// </remarks> |
| | | public interface IRobotStateRepository |
| | | public interface IRobotStateRepository : IRepository<Dt_RobotState> |
| | | { |
| | | /// <summary> |
| | | /// æ ¹æ® IP å°åè·åæºæ¢°æç¶æ |
| | |
| | | /// å®å
¨æ´æ°æºæ¢°æç¶æï¼ä¹è§éï¼ |
| | | /// </summary> |
| | | /// <param name="ipAddress">è®¾å¤ IP å°å</param> |
| | | /// <param name="newState">æ°ç¶æå®ä½ï¼RowVersion ä¼è¢«æ´æ°ï¼</param> |
| | | /// <param name="expectedRowVersion">ææçè¡çæ¬å·ï¼æ´æ°åççæ¬ï¼</param> |
| | | /// <param name="newState">æ°ç¶æå®ä½ï¼Version ä¼èªå¢ï¼</param> |
| | | /// <param name="expectedVersion">ææççæ¬å·ï¼æ´æ°åççæ¬ï¼</param> |
| | | /// <returns>æ¯å¦æ´æ°æåï¼false è¡¨ç¤ºçæ¬å²çªæè®°å½ä¸åå¨</returns> |
| | | bool TryUpdate(string ipAddress, Dt_RobotState newState, byte[] expectedRowVersion); |
| | | bool TryUpdate(string ipAddress, Dt_RobotState newState, long expectedVersion); |
| | | |
| | | /// <summary> |
| | | /// å° Dt_RobotState å®ä½è½¬æ¢ä¸º RobotSocketState å
å对象 |
| | |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEAWCS_DTO\WIDESEAWCS_DTO.csproj" /> |
| | | <ProjectReference Include="..\WIDESEAWCS_Model\WIDESEAWCS_Model.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_ITaskInfoService |
| | | { |
| | | /// <summary> |
| | | /// æºæ¢°æç¶ææå¡æ¥å£ |
| | | /// </summary> |
| | | public interface IRobotStateService : IService<Dt_RobotState> |
| | | { |
| | | } |
| | | } |
| | |
| | | using Newtonsoft.Json; |
| | | using SqlSugar; |
| | | using WIDESEAWCS_Core.DB.Models; |
| | | |
| | |
| | | /// æºæ¢°æç¶ææ°æ®åºå®ä½ |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// å¯¹åºæ°æ®åºè¡¨ Dt_RobotStateï¼ä½¿ç¨ RowVersion å®ç°ä¹è§å¹¶åæ§å¶ã |
| | | /// å¯¹åºæ°æ®åºè¡¨ Dt_RobotStateï¼ä½¿ç¨ Version åæ®µå®ç°ä¹è§å¹¶åæ§å¶ã |
| | | /// å¤æå¯¹è±¡ï¼RobotCraneãCurrentTaskãæ°ç»çï¼ä»¥ JSON å符串åå¨ã |
| | | /// </remarks> |
| | | [SugarTable(nameof(Dt_RobotState), "æºæ¢°æç¶æè¡¨")] |
| | |
| | | /// <summary> |
| | | /// æºæ¢°æ IP å°åï¼å¯ä¸ç´¢å¼ |
| | | /// </summary> |
| | | [SugarColumn(Length = 50, ColumnDescription = "æºæ¢°æIPå°å", IsJsonKey = true)] |
| | | [SugarColumn(Length = 50, ColumnDescription = "æºæ¢°æIPå°å")] |
| | | public string IPAddress { get; set; } = string.Empty; |
| | | |
| | | /// <summary> |
| | | /// è¡çæ¬ï¼ç¨äºä¹è§å¹¶åæ§å¶ |
| | | /// çæ¬å·ï¼ç¨äºä¹è§å¹¶åæ§å¶ |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// SqlSugar ä¼èªå¨ç®¡çæ¤åæ®µï¼æ¯æ¬¡æ´æ°æ¶æ°æ®åºèªå¨éå¢ã |
| | | /// æ´æ°æ¶ WHERE RowVersion = @expectedRowVersionï¼æ£æ¥å½±åè¡æ°å¤ææ¯å¦å²çªã |
| | | /// æ¯æ¬¡æ´æ°æ¶èªå¢ãæ´æ°æ¶ WHERE IPAddress = @ip AND Version = @expectedVersionã |
| | | /// 妿影åè¡æ°ä¸º 0ï¼è¯´æçæ¬ä¸å¹é
ï¼è¿å falseã |
| | | /// </remarks> |
| | | [SugarColumn(ColumnDescription = "è¡çæ¬ï¼ä¹è§éï¼", IsJsonKey = true)] |
| | | public byte[] RowVersion { get; set; } = Array.Empty<byte>(); |
| | | [SugarColumn(ColumnDescription = "çæ¬å·ï¼ä¹è§éï¼")] |
| | | public long Version { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦å·²è®¢é
æ¶æ¯äºä»¶ |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "æ¯å¦å·²è®¢é
æ¶æ¯äºä»¶", IsJsonKey = true)] |
| | | [SugarColumn(ColumnDescription = "æ¯å¦å·²è®¢é
æ¶æ¯äºä»¶")] |
| | | public bool IsEventSubscribed { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æºæ¢°æè¿è¡æ¨¡å¼ |
| | | /// </summary> |
| | | /// <remarks>1: æå¨æ¨¡å¼, 2: èªå¨æ¨¡å¼</remarks> |
| | | [SugarColumn(ColumnDescription = "è¿è¡æ¨¡å¼", IsNullable = true, IsJsonKey = true)] |
| | | [SugarColumn(ColumnDescription = "è¿è¡æ¨¡å¼", IsNullable = true)] |
| | | public int? RobotRunMode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æºæ¢°ææ§å¶æ¨¡å¼ |
| | | /// </summary> |
| | | /// <remarks>1: 客æ·ç«¯æ§å¶, 2: å
¶ä»</remarks> |
| | | [SugarColumn(ColumnDescription = "æ§å¶æ¨¡å¼", IsNullable = true, IsJsonKey = true)] |
| | | [SugarColumn(ColumnDescription = "æ§å¶æ¨¡å¼", IsNullable = true)] |
| | | public int? RobotControlMode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æºæ¢°ææèæåå¯¹è±¡ç¶æ |
| | | /// </summary> |
| | | /// <remarks>0: æ ç©æï¼æè空é²ï¼, 1: æç©æï¼å·²æåè´§ç©ï¼</remarks> |
| | | [SugarColumn(ColumnDescription = "æèæåç¶æ", IsNullable = true, IsJsonKey = true)] |
| | | [SugarColumn(ColumnDescription = "æèæåç¶æ", IsNullable = true)] |
| | | public int? RobotArmObject { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æºæ¢°æè®¾å¤åºç¡ä¿¡æ¯ï¼JSON åºååï¼ |
| | | /// </summary> |
| | | [SugarColumn(Length = 2000, ColumnDescription = "设å¤ä¿¡æ¯JSON", IsJsonKey = true)] |
| | | public string RobotCraneJson { get; set; } = string.Empty; |
| | | [SugarColumn(Length = 2000, ColumnDescription = "设å¤ä¿¡æ¯JSON", IsNullable = true)] |
| | | public string? RobotCraneJson { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æºæ¢°æåå§å宿åå°å¾
æºä½ç¶æ |
| | | /// </summary> |
| | | /// <remarks>Possible values: "Homed", "Homing"</remarks> |
| | | [SugarColumn(Length = 50, ColumnDescription = "åé¶ç¶æ", IsNullable = true, IsJsonKey = true)] |
| | | [SugarColumn(Length = 50, ColumnDescription = "åé¶ç¶æ", IsNullable = true)] |
| | | public string? Homed { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æºæ¢°æå½åæ£å¨æ§è¡çå¨ä½ |
| | | /// </summary> |
| | | [SugarColumn(Length = 50, ColumnDescription = "å½åå¨ä½", IsNullable = true, IsJsonKey = true)] |
| | | [SugarColumn(Length = 50, ColumnDescription = "å½åå¨ä½", IsNullable = true)] |
| | | public string? CurrentAction { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æºæ¢°æå½åè¿è¡ç¶æ |
| | | /// </summary> |
| | | [SugarColumn(Length = 50, ColumnDescription = "è¿è¡ç¶æ", IsNullable = true, IsJsonKey = true)] |
| | | [SugarColumn(Length = 50, ColumnDescription = "è¿è¡ç¶æ", IsNullable = true)] |
| | | public string? OperStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æè¿ä¸æ¬¡åè´§å®æçä½ç½®æ°ç»ï¼JSONï¼ |
| | | /// </summary> |
| | | [SugarColumn(Length = 500, ColumnDescription = "åè´§ä½ç½®æ°ç»JSON", IsNullable = true, IsJsonKey = true)] |
| | | [SugarColumn(Length = 500, ColumnDescription = "åè´§ä½ç½®æ°ç»JSON", IsNullable = true)] |
| | | public string? LastPickPositionsJson { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æè¿ä¸æ¬¡æ¾è´§å®æçä½ç½®æ°ç»ï¼JSONï¼ |
| | | /// </summary> |
| | | [SugarColumn(Length = 500, ColumnDescription = "æ¾è´§ä½ç½®æ°ç»JSON", IsNullable = true, IsJsonKey = true)] |
| | | [SugarColumn(Length = 500, ColumnDescription = "æ¾è´§ä½ç½®æ°ç»JSON", IsNullable = true)] |
| | | public string? LastPutPositionsJson { get; set; } |
| | | |
| | | /// <summary> |
| | | /// çµæ± /è´§ä½æ¡ç å表ï¼JSONï¼ |
| | | /// </summary> |
| | | [SugarColumn(Length = 2000, ColumnDescription = "çµè¯æ¡ç å表JSON", IsNullable = true, IsJsonKey = true)] |
| | | [SugarColumn(Length = 2000, ColumnDescription = "çµè¯æ¡ç å表JSON", IsNullable = true)] |
| | | public string? CellBarcodeJson { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æºæ¢°æå½åæ£å¨æ§è¡çä»»å¡ï¼JSON åºååï¼ |
| | | /// </summary> |
| | | [SugarColumn(Length = 2000, ColumnDescription = "å½åä»»å¡JSON", IsNullable = true, IsJsonKey = true)] |
| | | [SugarColumn(Length = 2000, ColumnDescription = "å½åä»»å¡JSON", IsNullable = true)] |
| | | public string? CurrentTaskJson { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦éè¦æ§è¡æçä»»å¡ |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "æ¯å¦æçä»»å¡", IsJsonKey = true)] |
| | | [SugarColumn(ColumnDescription = "æ¯å¦æçä»»å¡")] |
| | | public bool IsSplitPallet { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦éè¦æ§è¡ç»çä»»å¡ |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "æ¯å¦ç»çä»»å¡", IsJsonKey = true)] |
| | | [SugarColumn(ColumnDescription = "æ¯å¦ç»çä»»å¡")] |
| | | public bool IsGroupPallet { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æºå¨äººå·²å¤çç任塿»æ° |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "å·²å¤ç任塿»æ°", IsJsonKey = true)] |
| | | [SugarColumn(ColumnDescription = "å·²å¤ç任塿»æ°")] |
| | | public int RobotTaskTotalNum { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦å¤äºåçµè¯è¡¥å
æ¨¡å¼ |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "æ¯å¦åçµè¯æ¨¡å¼", IsJsonKey = true)] |
| | | [SugarColumn(ColumnDescription = "æ¯å¦åçµè¯æ¨¡å¼")] |
| | | public bool IsInFakeBatteryMode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å½åæ¹æ¬¡èµ·å§ç¼å· |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "å½åæ¹æ¬¡ç¼å·", IsJsonKey = true)] |
| | | [SugarColumn(ColumnDescription = "å½åæ¹æ¬¡ç¼å·")] |
| | | public int CurrentBatchIndex { get; set; } = 1; |
| | | |
| | | /// <summary> |
| | | /// æ¢çä»»å¡å½åé¶æ®µ |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "æ¢çé¶æ®µ", IsJsonKey = true)] |
| | | [SugarColumn(ColumnDescription = "æ¢çé¶æ®µ")] |
| | | public int ChangePalletPhase { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦æ«ç NG |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "æ¯å¦æ«ç NG", IsJsonKey = true)] |
| | | [SugarColumn(ColumnDescription = "æ¯å¦æ«ç NG")] |
| | | public bool IsScanNG { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦çµè¯å°ä½ |
| | | /// </summary> |
| | | [SugarColumn(ColumnDescription = "çµè¯æ¯å¦å°ä½", IsJsonKey = true)] |
| | | [SugarColumn(ColumnDescription = "çµè¯æ¯å¦å°ä½")] |
| | | public bool BatteryArrived { get; set; } |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace WIDESEAWCS_Model.Models |
| | | { |
| | | /// <summary> |
| | | /// æºå¨äººè®¾å¤åºç¡ä¿¡æ¯ |
| | | /// </summary> |
| | | public class RobotCraneDevice |
| | | { |
| | | /// <summary> |
| | | /// è®¾å¤æ è¯ |
| | | /// </summary> |
| | | public string Device { get; set; } = string.Empty; |
| | | |
| | | /// <summary> |
| | | /// 设å¤ç¼ç |
| | | /// </summary> |
| | | public string DeviceCode { get; set; } = string.Empty; |
| | | |
| | | /// <summary> |
| | | /// 设å¤åç§° |
| | | /// </summary> |
| | | public string DeviceName { get; set; } = string.Empty; |
| | | |
| | | /// <summary> |
| | | /// IP å°å |
| | | /// </summary> |
| | | public string IPAddress { get; set; } = string.Empty; |
| | | } |
| | | } |
| ÎļþÃû´Ó Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotSocketState.cs ÐÞ¸Ä |
| | |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob; |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | namespace WIDESEAWCS_Model.Models |
| | | { |
| | | /// <summary> |
| | | /// æºæ¢°æ Socket éä¿¡ç¶ææ°æ®ç±» |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 该类ç¨äºå¨ Redis ç¼åä¸å卿ºæ¢°æç宿¶ç¶æï¼å
æ¬ä½ç½®ãä»»å¡ãæè对象çä¿¡æ¯ã |
| | | /// 该类ç¨äºå¨æ°æ®åºä¸å卿ºæ¢°æç宿¶ç¶æï¼å
æ¬ä½ç½®ãä»»å¡ãæè对象çä¿¡æ¯ã |
| | | /// ææå±æ§å设计为线ç¨å®å
¨æ´æ°ï¼éè¿ <see cref="RobotStateManager"/> ççæ¬æ§å¶æºå¶æ¥é²æ¢å¹¶åè¦çã |
| | | /// </remarks> |
| | | public class RobotSocketState |
| | |
| | | /// çæ¬å·ï¼ç¨äºä¹è§å¹¶åæ§å¶ |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// æ¯æ¬¡ä¿®æ¹ç¶ææ¶æ´æ°ä¸º DateTime.UtcNow.Ticksã |
| | | /// æ¯æ¬¡ä¿®æ¹ç¶ææ¶èªå¢ã |
| | | /// <see cref="RobotStateManager"/> ä½¿ç¨æ¤å段å®ç°ä¹è§éï¼é²æ¢å¹¶åæ´æ°æ¶æ§å¼è¦çæ°å¼ã |
| | | /// </remarks> |
| | | public long Version { get; set; } = DateTime.UtcNow.Ticks; |
| | |
| | | /// æå¸¦çº¿ä¸çµè¯æ«ç æ¯å¦NGã |
| | | /// </remarks> |
| | | public bool IsScanNG { get; set; } = false; |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦çµè¯å°ä½ |
| | |
| | | using WIDESEAWCS_Core.Caches; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_Core.LogHelper; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob.DTO; |
| | | using WIDESEAWCS_QuartzJob.Service; |
| | | |
| | |
| | | <ProjectReference Include="..\WIDESEAWCS_Common\WIDESEAWCS_Common.csproj" /> |
| | | <ProjectReference Include="..\WIDESEAWCS_Communicator\WIDESEAWCS_Communicator.csproj" /> |
| | | <ProjectReference Include="..\WIDESEAWCS_Core\WIDESEAWCS_Core.csproj" /> |
| | | <ProjectReference Include="..\WIDESEAWCS_Model\WIDESEAWCS_Model.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEAWCS_Core.BaseController; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_WCSServer.Controllers.Task |
| | | { |
| | | /// <summary> |
| | | /// æºæ¢°æç¶æç®¡çæ§å¶å¨ |
| | | /// </summary> |
| | | [Route("api/RobotState")] |
| | | [ApiController] |
| | | public class RobotStateController : ApiBaseController<IRobotStateService, Dt_RobotState> |
| | | { |
| | | public RobotStateController(IRobotStateService service) : base(service) |
| | | { |
| | | } |
| | | } |
| | | } |
| | |
| | | --> |
| | | <Project> |
| | | <PropertyGroup> |
| | | <DeleteExistingFiles>true</DeleteExistingFiles> |
| | | <DeleteExistingFiles>false</DeleteExistingFiles> |
| | | <ExcludeApp_Data>false</ExcludeApp_Data> |
| | | <LaunchSiteAfterPublish>true</LaunchSiteAfterPublish> |
| | | <LastUsedBuildConfiguration>Debug</LastUsedBuildConfiguration> |
| | | <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> |
| | | <LastUsedPlatform>Any CPU</LastUsedPlatform> |
| | | <PublishProvider>FileSystem</PublishProvider> |
| | | <PublishUrl>bin\Debug\net6.0\publish\</PublishUrl> |
| | | <PublishUrl>E:\IISText\HuanAn\WCS</PublishUrl> |
| | | <WebPublishMethod>FileSystem</WebPublishMethod> |
| | | <_TargetId>Folder</_TargetId> |
| | | <SiteUrlToLaunchAfterPublish /> |
| | |
| | | //5.PostgreSQL |
| | | "DBType": "SqlServer", |
| | | //è¿æ¥å符串 |
| | | "ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWCS_ShanMei;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | "ConnectionString": "Data Source=192.168.60.30;Initial Catalog=WIDESEAWCS_ShanMei;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //"ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWCS_ShanMei;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | |
| | | //è·¨å |
| | |
| | | using Newtonsoft.Json; |
| | | using SqlSugar; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Core.UnitOfWork; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_ITaskInfoRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | |
| | | /// <summary> |
| | | /// æºæ¢°æç¶æ SqlSugar ä»å¨å®ç° |
| | | /// </summary> |
| | | public class RobotStateRepository : IUnitOfWork, IRobotStateRepository |
| | | public class RobotStateRepository : RepositoryBase<Dt_RobotState>, IRobotStateRepository |
| | | { |
| | | private readonly IUnitOfWorkManage _unitOfWork; |
| | | private readonly SqlSugarClient _db; |
| | | |
| | | public RobotStateRepository(IUnitOfWorkManage unitOfWork) |
| | | public RobotStateRepository(IUnitOfWorkManage unitOfWork) : base(unitOfWork) |
| | | { |
| | | _unitOfWork = unitOfWork; |
| | | _db = unitOfWork.GetDbClient(); |
| | | } |
| | | |
| | | public Dt_RobotState? GetByIp(string ipAddress) |
| | | { |
| | | return _db.Queryable<Dt_RobotState>() |
| | | return Db.Queryable<Dt_RobotState>() |
| | | .Where(x => x.IPAddress == ipAddress) |
| | | .First(); |
| | | } |
| | |
| | | var newState = new Dt_RobotState |
| | | { |
| | | IPAddress = ipAddress, |
| | | Version = DateTime.UtcNow.Ticks, |
| | | RobotCraneJson = JsonConvert.SerializeObject(robotCrane), |
| | | CreateTime = DateTime.Now, |
| | | UpdateTime = DateTime.Now |
| | | CreateDate = DateTime.Now, |
| | | ModifyDate = DateTime.Now |
| | | }; |
| | | |
| | | _db.Insertable(newState).ExecuteCommand(); |
| | | Db.Insertable(newState).ExecuteCommand(); |
| | | return newState; |
| | | } |
| | | |
| | | public bool TryUpdate(string ipAddress, Dt_RobotState newState, byte[] expectedRowVersion) |
| | | public bool TryUpdate(string ipAddress, Dt_RobotState newState, long expectedVersion) |
| | | { |
| | | newState.UpdateTime = DateTime.Now; |
| | | newState.ModifyDate = DateTime.Now; |
| | | |
| | | var affectedRows = _db.Updateable<Dt_RobotState>(newState) |
| | | // ä¹è§éï¼WHERE IPAddress = @ip AND Version = @expectedVersionï¼çæ¬å¹é
ææ´æ° |
| | | var affectedRows = Db.Updateable<Dt_RobotState>(newState) |
| | | .Where(x => x.IPAddress == ipAddress) |
| | | .WhereRowVersion(x => x.RowVersion, expectedRowVersion) |
| | | .ExecuteCommand(); |
| | | |
| | | return affectedRows > 0; |
| | |
| | | var state = new RobotSocketState |
| | | { |
| | | IPAddress = entity.IPAddress, |
| | | Version = BitConverter.ToInt64(entity.RowVersion.Length >= 8 ? entity.RowVersion.Take(8).ToArray() : new byte[8], 0), |
| | | Version = entity.Version, |
| | | IsEventSubscribed = entity.IsEventSubscribed, |
| | | RobotRunMode = entity.RobotRunMode, |
| | | RobotControlMode = entity.RobotControlMode, |
| | |
| | | CurrentBatchIndex = state.CurrentBatchIndex, |
| | | ChangePalletPhase = state.ChangePalletPhase, |
| | | IsScanNG = state.IsScanNG, |
| | | BatteryArrived = state.BatteryArrived |
| | | BatteryArrived = state.BatteryArrived, |
| | | CellBarcodeJson = state.CellBarcode.ToJson(), |
| | | LastPickPositionsJson = state.LastPickPositions.ToJson(), |
| | | CurrentTaskJson = state.CurrentTask.ToJson(), |
| | | LastPutPositionsJson = state.LastPutPositions.ToJson(), |
| | | }; |
| | | |
| | | // åºååå¤æå¯¹è±¡ä¸º JSON |
| | |
| | | |
| | | return entity; |
| | | } |
| | | |
| | | public SqlSugarClient GetDbClient() => _db; |
| | | |
| | | public void BeginTran() => _unitOfWork.BeginTran(); |
| | | |
| | | public void CommitTran() => _unitOfWork.CommitTran(); |
| | | |
| | | public void RollbackTran() => _unitOfWork.RollbackTran(); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using WIDESEA_Core; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_ITaskInfoRepository; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_TaskInfoService |
| | | { |
| | | /// <summary> |
| | | /// æºæ¢°æç¶ææå¡å®ç° |
| | | /// </summary> |
| | | public class RobotStateService : ServiceBase<Dt_RobotState, IRobotStateRepository>, IRobotStateService |
| | | { |
| | | public RobotStateService(IRobotStateRepository repository) : base(repository) |
| | | { |
| | | } |
| | | } |
| | | } |
| | |
| | | public Dt_Task QueryManualInboundTask(string sourceAddress) |
| | | { |
| | | return BaseDal.QueryFirst(x => |
| | | x.TaskType == (int)TaskInboundTypeEnum.Inbound && |
| | | (x.TaskType == (int)TaskInboundTypeEnum.Inbound || x.TaskType == (int)TaskInboundTypeEnum.InEmpty) && |
| | | x.TaskStatus == (int)TaskInStatusEnum.InNew && |
| | | x.SourceAddress == sourceAddress); |
| | | } |
| | |
| | | { |
| | | // 没æä»»å¡ï¼å WMS 请æ±åºåºæçä»»å¡ |
| | | var position = checkPalletPositions.FirstOrDefault(x => x.Code == childDeviceCode); |
| | | QuartzLogHelper.LogInfo(_logger, "Executeï¼æ£æ¥æçä½ç½® {ChildDeviceCode}ï¼è¯·æ±WMSåºåºæçä»»å¡", $"æ£æ¥æçä½ç½® {childDeviceCode}ï¼è¯·æ±WMSåºåºæçä»»å¡", conveyorLine.DeviceCode, childDeviceCode); |
| | | //QuartzLogHelper.LogInfo(_logger, "Executeï¼æ£æ¥æçä½ç½® {ChildDeviceCode}ï¼è¯·æ±WMSåºåºæçä»»å¡", $"æ£æ¥æçä½ç½® {childDeviceCode}ï¼è¯·æ±WMSåºåºæçä»»å¡", conveyorLine.DeviceCode, childDeviceCode); |
| | | |
| | | var responseResult = _httpClientHelper.Post<WebResponseContent>("GetOutBoundTrayTaskAsync", new CreateTaskDto() |
| | | { |
| | |
| | | conveyorLine.SetValue(ConveyorLineDBNameNew.Source, short.Parse(task.SourceAddress ?? "0"), childDeviceCode); |
| | | // åå
¥ç®æ å°å |
| | | conveyorLine.SetValue(ConveyorLineDBNameNew.Target, short.Parse(task.NextAddress ?? "0"), childDeviceCode); |
| | | // åå
¥æçå· |
| | | conveyorLine.SetValue(ConveyorLineDBNameNew.Barcode, task.PalletCode, childDeviceCode); |
| | | |
| | | // æ´æ°ä»»å¡ç¶æå°ä¸ä¸é¶æ®µ |
| | | var updateResult = _taskService.UpdateTaskStatusToNext(task); |
| | |
| | | using System.Net.Sockets; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_Tasks.Workflow.Abstractions |
| | | { |
| | |
| | | /// <param name="client">TCP 客æ·ç«¯è¿æ¥</param> |
| | | /// <param name="state">æºå¨äººå½åç¶æ</param> |
| | | /// <returns>ååºæ¶æ¯ï¼å¦ææ éåå¤åè¿å null</returns> |
| | | Task<string?> HandleMessageReceivedAsync(string message, bool isJson, TcpClient client, RobotSocketState state); |
| | | Task<string?> HandleMessageReceivedAsync(string message, bool isJson, TcpClient client); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_Tasks.Workflow.Abstractions |
| | | { |
| | | public interface IRobotNgLineCommandHandler |
| | | { |
| | | Task<bool> HandleAsync(string message, RobotSocketState state); |
| | | } |
| | | } |
| | |
| | | using System.Net.Sockets; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_Tasks.Workflow.Abstractions |
| | | { |
| | |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_Tasks.Workflow.Abstractions |
| | | { |
| | | /// <summary> |
| | |
| | | using System.Net.Sockets; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob; |
| | | |
| | | namespace WIDESEAWCS_Tasks.Workflow.Abstractions |
| | |
| | | using System.Net.Sockets; |
| | | using Microsoft.Extensions.Logging; |
| | | using WIDESEAWCS_Core.LogHelper; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob; |
| | | using WIDESEAWCS_Tasks.SocketServer; |
| | | |
| | |
| | | using WIDESEAWCS_Core.LogHelper; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | | using WIDESEAWCS_QuartzJob; |
| | | using WIDESEAWCS_RedisService; |
| | | using WIDESEAWCS_ITaskInfoRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_Tasks.SocketServer; |
| | | using WIDESEAWCS_Tasks.Workflow; |
| | | using WIDESEAWCS_Tasks.Workflow.Abstractions; |
| | |
| | | var prefixCommandHandler = new RobotPrefixCommandHandler(robotTaskService, _taskProcessor, _stateManager, socketGateway, fakeBatteryPositionService); |
| | | |
| | | // åå§åæ¶æ¯è·¯ç±å¨ |
| | | _messageRouter = new RobotMessageHandler(socketGateway, _stateManager, cache, simpleCommandHandler, prefixCommandHandler, logger); |
| | | _messageRouter = new RobotMessageHandler(socketGateway, _stateManager, simpleCommandHandler, prefixCommandHandler, logger); |
| | | |
| | | // åå§å工使µç¼æå¨ |
| | | _workflowOrchestrator = new RobotWorkflowOrchestrator(_stateManager, _clientManager, _taskProcessor, robotTaskService, _logger); |
| | |
| | | using Microsoft.Extensions.Logging; |
| | | using System.Net.Sockets; |
| | | using WIDESEAWCS_Common; |
| | | using WIDESEAWCS_Core.Caches; |
| | | using WIDESEAWCS_Core.LogHelper; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_Tasks.Workflow.Abstractions; |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// æ ¸å¿èè´£ï¼ |
| | | /// 1. ç¼åç¶æè¯»åï¼ä» Redis ä¸è·åæºå¨äººææ°çç¶æ |
| | | /// 1. ç¶ææ¥æ¶ï¼ä»è°ç¨æ¹è·åæºå¨äººææ°çç¶æ |
| | | /// 2. å½ä»¤ååï¼æ ¹æ®æ¶æ¯ç±»åååç»ä¸åçå¤çå¨ |
| | | /// - ç®åå½ä»¤ï¼å¦ homingãrunningï¼ï¼ç± <see cref="IRobotSimpleCommandHandler"/> å¤ç |
| | | /// - åç¼å½ä»¤ï¼å¦ pickfinishedãputfinishedï¼ï¼ç± <see cref="IRobotPrefixCommandHandler"/> å¤ç |
| | |
| | | /// <summary> |
| | | /// Socket 客æ·ç«¯ç½å
³æ¥å£ |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// ç¨äºå客æ·ç«¯åéååºæ¶æ¯ã |
| | | /// </remarks> |
| | | private readonly ISocketClientGateway _socketClientGateway; |
| | | |
| | | /// <summary> |
| | | /// æºæ¢°æç¶æç®¡çå¨ |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// ç¨äºè¯»ååæ´æ°æºå¨äººçç¶æã |
| | | /// </remarks> |
| | | private readonly RobotStateManager _stateManager; |
| | | |
| | | /// <summary> |
| | | /// ç¼åæå¡ |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// ç´æ¥ä½¿ç¨ç¼åæå¡æ£æ¥ç¶ææ¯å¦åå¨ã |
| | | /// </remarks> |
| | | private readonly ICacheService _cache; |
| | | |
| | | /// <summary> |
| | | /// ç®åå½ä»¤å¤çå¨ |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// å¤çç®åçç¶ææ´æ°å½ä»¤ï¼å¦è¿è¡ç¶æã模å¼åæ¢çã |
| | | /// </remarks> |
| | | private readonly IRobotSimpleCommandHandler _simpleCommandHandler; |
| | | |
| | | /// <summary> |
| | | /// åç¼å½ä»¤å¤çå¨ |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// å¤ç另忰çåç¼å½ä»¤ï¼å¦ pickfinishedï¼åè´§å®æï¼ãputfinishedï¼æ¾è´§å®æï¼ã |
| | | /// </remarks> |
| | | private readonly IRobotPrefixCommandHandler _prefixCommandHandler; |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | /// <param name="socketClientGateway">Socket ç½å
³</param> |
| | | /// <param name="stateManager">ç¶æç®¡çå¨</param> |
| | | /// <param name="cache">ç¼åæå¡</param> |
| | | /// <param name="simpleCommandHandler">ç®åå½ä»¤å¤çå¨</param> |
| | | /// <param name="prefixCommandHandler">åç¼å½ä»¤å¤çå¨</param> |
| | | /// <param name="logger">æ¥å¿è®°å½å¨</param> |
| | | public RobotMessageHandler( |
| | | ISocketClientGateway socketClientGateway, |
| | | RobotStateManager stateManager, |
| | | ICacheService cache, |
| | | IRobotSimpleCommandHandler simpleCommandHandler, |
| | | IRobotPrefixCommandHandler prefixCommandHandler, |
| | | ILogger<RobotJob> logger) |
| | | { |
| | | _socketClientGateway = socketClientGateway; |
| | | _stateManager = stateManager; |
| | | _cache = cache; |
| | | _simpleCommandHandler = simpleCommandHandler; |
| | | _prefixCommandHandler = prefixCommandHandler; |
| | | _logger = logger; |
| | |
| | | /// <remarks> |
| | | /// å¤çæµç¨ï¼ |
| | | /// 1. è®°å½æ¥å¿ï¼è®°å½åå§æ¶æ¯å
å®¹ï¼ |
| | | /// 2. éªè¯ç¼å䏿¯å¦åå¨è¯¥è®¾å¤çç¶æ |
| | | /// 3. å°è¯ç¨ç®åå½ä»¤å¤çå¨å¤çï¼ç¶ææ´æ°ç±»å½ä»¤ï¼ |
| | | /// 2. å°è¯ç¨ç®åå½ä»¤å¤çå¨å¤çï¼ç¶ææ´æ°ç±»å½ä»¤ï¼ |
| | | /// - 妿å¤çæåï¼åååæ¶æ¯å¹¶æ´æ°ç¶æ |
| | | /// 4. 妿䏿¯ç®åå½ä»¤ï¼æ£æ¥æ¯å¦æ¯åç¼å½ä»¤ï¼pickfinished/putfinishedï¼ |
| | | /// 3. 妿䏿¯ç®åå½ä»¤ï¼æ£æ¥æ¯å¦æ¯åç¼å½ä»¤ï¼pickfinished/putfinishedï¼ |
| | | /// - 妿æ¯ï¼è°ç¨åç¼å½ä»¤å¤çå¨å¤ç |
| | | /// 5. ä¿æåæè¡ä¸ºï¼ç®åå½ä»¤ååç¼å½ä»¤é½åååæ¶æ¯ |
| | | /// 4. ä¿æåæè¡ä¸ºï¼ç®åå½ä»¤ååç¼å½ä»¤é½åååæ¶æ¯ |
| | | /// |
| | | /// 注æï¼æ¤æ¹æ³å¯è½å¨ TCP æ¶æ¯æ¥æ¶çä¸ä¸æä¸è¢«é¢ç¹è°ç¨ï¼éæ³¨ææ§è½ã |
| | | /// </remarks> |
| | |
| | | /// <param name="client">TCP 客æ·ç«¯è¿æ¥</param> |
| | | /// <param name="state">æºå¨äººå½åç¶æ</param> |
| | | /// <returns>ååºæ¶æ¯ï¼å¦ææ éåå¤åè¿å null</returns> |
| | | public async Task<string?> HandleMessageReceivedAsync(string message, bool isJson, TcpClient client, RobotSocketState state) |
| | | public async Task<string?> HandleMessageReceivedAsync(string message, bool isJson, TcpClient client) |
| | | { |
| | | var state = _stateManager.GetState(client.Client.RemoteEndPoint.ToString()); |
| | | if(state.OperStatus == message) |
| | | { |
| | | // å¤çæååï¼å°åæ¶æ¯ååå°å®¢æ·ç«¯ï¼ä¿æåæè¡ä¸ºï¼ |
| | | await _socketClientGateway.SendMessageAsync(client, message); |
| | | } |
| | | // è®°å½æ¥æ¶å°çæ¶æ¯æ¥å¿ |
| | | _logger.LogInformation($"æ¥æ¶å°å®¢æ·ç«¯ã{state.RobotCrane.DeviceName}ãåéæ¶æ¯ã{message}ã"); |
| | | QuartzLogger.Info($"æ¥æ¶å°å®¢æ·ç«¯æ¶æ¯ã{message}ã", state.RobotCrane.DeviceName); |
| | | _logger.LogInformation($"æ¥æ¶å°å®¢æ·ç«¯ã{state.RobotCrane?.DeviceName}ãåéæ¶æ¯ã{message}ã"); |
| | | QuartzLogger.Info($"æ¥æ¶å°å®¢æ·ç«¯æ¶æ¯ã{message}ã", state.RobotCrane?.DeviceName); |
| | | |
| | | // æ£æ¥ä»»å¡æ»æ°æ¯å¦æªè¾¾å°ä¸é |
| | | if (state.RobotTaskTotalNum > RobotConst.MaxTaskTotalNum) |
| | | { |
| | | // è®°å½æ¥æ¶å°çæ¶æ¯æ¥å¿ |
| | | _logger.LogInformation($"æ¥æ¶å°å®¢æ·ç«¯ã{state.RobotCrane.DeviceName}ãåéæ¶æ¯ã{message}ã"); |
| | | QuartzLogger.Info($"æ¥æ¶å°å®¢æ·ç«¯æ¶æ¯ã{message}ã", state.RobotCrane.DeviceName); |
| | | // å¤çæååï¼å°åæ¶æ¯ååå°å®¢æ·ç«¯ï¼ä¿æåæè¡ä¸ºï¼ |
| | | _logger.LogInformation($"æ¥æ¶å°å®¢æ·ç«¯ã{state.RobotCrane?.DeviceName}ãåéæ¶æ¯ã{message}ã"); |
| | | QuartzLogger.Info($"æ¥æ¶å°å®¢æ·ç«¯æ¶æ¯ã{message}ã", state.RobotCrane?.DeviceName); |
| | | await _socketClientGateway.SendMessageAsync(client, message); |
| | | return null; |
| | | } |
| | | |
| | | // æå»ºç¼åé®ï¼æ£æ¥ Redis 䏿¯å¦åå¨è¯¥è®¾å¤çç¶æ |
| | | var cacheKey = $"{RedisPrefix.Code}:{RedisName.SocketDevices}:{client.Client.RemoteEndPoint}"; |
| | | |
| | | // 妿ç¼åä¸ä¸åå¨æç¶æä¸º nullï¼å¿½ç¥æ¤æ¶æ¯ |
| | | if (!_cache.TryGetValue(cacheKey, out RobotSocketState? cachedState) || cachedState == null) |
| | | { |
| | | _logger.LogInformation($"ç¼åä¸ä¸åå¨æç¶æä¸º nullï¼å¿½ç¥æ¤æ¶æ¯"); |
| | | return null; |
| | | } |
| | | |
| | | // 使ç¨ç¼åä¸è·åçç¶æ |
| | | var activeState = cachedState; |
| | | |
| | | // å°æ¶æ¯è½¬æ¢ä¸ºå°åï¼ç¨äºç®åå½ä»¤å¹é
ï¼ |
| | | string messageLower = message.ToLowerInvariant(); |
| | | |
| | | // å°è¯ç¨ç®åå½ä»¤å¤çå¨å¤ç |
| | | // ç®åå½ä»¤å
æ¬ï¼homingãhomedãrunningãpausingãrunmodeãcontrolmode ç |
| | | if (await _simpleCommandHandler.HandleAsync(messageLower, activeState)) |
| | | if (await _simpleCommandHandler.HandleAsync(messageLower, state)) |
| | | { |
| | | // å¤çæååï¼å°åæ¶æ¯ååå°å®¢æ·ç«¯ï¼ä¿æåæè¡ä¸ºï¼ |
| | | await _socketClientGateway.SendMessageAsync(client, message); |
| | | QuartzLogger.Info($"åéæ¶æ¯ï¼ã{message}ã", state.RobotCrane.DeviceName); |
| | | if(messageLower != "batteryarrived") |
| | | { |
| | | // å¤çæååï¼å°åæ¶æ¯ååå°å®¢æ·ç«¯ï¼ä¿æåæè¡ä¸ºï¼ |
| | | await _socketClientGateway.SendMessageAsync(client, message); |
| | | QuartzLogger.Info($"åéæ¶æ¯ï¼ã{message}ã", state.RobotCrane?.DeviceName); |
| | | } |
| | | |
| | | // å®å
¨æ´æ°ç¶æå° Redis |
| | | _stateManager.TryUpdateStateSafely(activeState.IPAddress, activeState); |
| | | // å®å
¨æ´æ°ç¶æå°æ°æ®åº |
| | | _stateManager.TryUpdateStateSafely(state.IPAddress, state); |
| | | return null; |
| | | } |
| | | |
| | |
| | | if (_prefixCommandHandler.IsPrefixCommand(messageLower)) |
| | | { |
| | | // è°ç¨åç¼å½ä»¤å¤çå¨ |
| | | // åç¼å½ä»¤å¤çå¨ä¼è§£æä½ç½®åæ°å¹¶æ´æ°ç¶æ |
| | | await _prefixCommandHandler.HandleAsync(message, activeState, client); |
| | | await _prefixCommandHandler.HandleAsync(message, state, client); |
| | | } |
| | | |
| | | // é»è®¤è¿å nullï¼ä¸äº§çååºæ¶æ¯ |
| | | return null; |
| | | } |
| | | } |
| | |
| | | using Microsoft.Extensions.Logging; |
| | | using Newtonsoft.Json; |
| | | using WIDESEAWCS_Common; |
| | | using WIDESEAWCS_Core.LogHelper; |
| | | using WIDESEAWCS_ITaskInfoRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// æ ¸å¿åè½æ¯éè¿ IRobotStateRepository ç®¡çæ°æ®åºä¸çæºæ¢°æç¶æã |
| | | /// æä¾ä¹è§å¹¶åæ§å¶ï¼éè¿ RowVersion 鲿¢å¹¶åæ´æ°æ¶çæ°æ®è¦çé®é¢ã |
| | | /// æä¾ä¹è§å¹¶åæ§å¶ï¼éè¿ Version åæ®µé²æ¢å¹¶åæ´æ°æ¶çæ°æ®è¦çé®é¢ã |
| | | /// </remarks> |
| | | public class RobotStateManager |
| | | { |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å®å
¨æ´æ° RobotSocketState ç¼åï¼é²æ¢å¹¶åè¦ç |
| | | /// å®å
¨æ´æ° RobotSocketStateï¼é²æ¢å¹¶åè¦ç |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 使ç¨ä¹è§å¹¶å模å¼ï¼å
读åå½å RowVersionï¼æ§è¡æ´æ°æ¶æ£æ¥çæ¬æ¯å¦ä¸è´ã |
| | | /// 妿 RowVersion ä¸å¹é
ï¼è¯´ææå
¶ä»çº¿ç¨å·²æ´æ°ï¼ï¼åæ´æ°å¤±è´¥è¿å falseã |
| | | /// 使ç¨ä¹è§å¹¶å模å¼ï¼å
读åå½å Versionï¼æ§è¡æ´æ°æ¶æ£æ¥çæ¬æ¯å¦ä¸è´ã |
| | | /// 妿 Version ä¸å¹é
ï¼è¯´ææå
¶ä»çº¿ç¨å·²æ´æ°ï¼ï¼åæ´æ°å¤±è´¥è¿å falseã |
| | | /// </remarks> |
| | | /// <param name="ipAddress">è®¾å¤ IP å°å</param> |
| | | /// <param name="updateAction">æ´æ°ç¶æç姿彿°ï¼ä¼ å
¥å½åç¶æå¯æ¬ï¼è¿åä¿®æ¹åçæ°ç¶æ</param> |
| | |
| | | return false; |
| | | } |
| | | |
| | | // è®°å½å½ååå¨ç RowVersionï¼ä½ä¸ºæ´æ°æ¶çææçæ¬ |
| | | var expectedRowVersion = currentEntity.RowVersion; |
| | | // è®°å½å½ååå¨ç Versionï¼ä½ä¸ºæ´æ°æ¶çææçæ¬ |
| | | var expectedVersion = currentEntity.Version; |
| | | |
| | | // åå»ºç¶æçæ·±æ·è´å¯æ¬ï¼ä½¿ç¨ JSON åºååå®ç°ï¼ |
| | | var stateCopy = CloneState(_repository.ToSocketState(currentEntity)); |
| | |
| | | |
| | | // å°æ°ç¶æè½¬æ¢ä¸ºæ°æ®åºå®ä½ |
| | | var newEntity = _repository.ToEntity(newState); |
| | | newEntity.RowVersion = Array.Empty<byte>(); // SqlSugar ä¼èªå¨ç®¡ç |
| | | newEntity.Id = currentEntity.Id; |
| | | newEntity.Version = expectedVersion + 1; // çæ¬èªå¢ |
| | | |
| | | // è°ç¨ä»å¨çå®å
¨æ´æ°æ¹æ³ï¼ä¼ å
¥ææ RowVersion |
| | | // 妿 RowVersion ä¸ä¸è´ï¼å·²è¢«å
¶ä»çº¿ç¨æ´æ°ï¼ï¼åæ´æ°å¤±è´¥ |
| | | return _repository.TryUpdate(ipAddress, newEntity, expectedRowVersion); |
| | | // è°ç¨ä»å¨çå®å
¨æ´æ°æ¹æ³ï¼ä¼ å
¥ææ Version |
| | | // 妿 Version ä¸ä¸è´ï¼å·²è¢«å
¶ä»çº¿ç¨æ´æ°ï¼ï¼åæ´æ°å¤±è´¥ |
| | | return _repository.TryUpdate(ipAddress, newEntity, expectedVersion); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | // 妿å½åä¸åå¨è¯¥è®¾å¤çç¶æï¼å建æ°è®°å½ |
| | | if (currentEntity == null) |
| | | { |
| | | var entity = _repository.ToEntity(newState); |
| | | entity.CreateTime = DateTime.Now; |
| | | entity.UpdateTime = DateTime.Now; |
| | | _repository.GetOrCreate(newState.IPAddress, newState.RobotCrane ?? new RobotCraneDevice()); |
| | | _logger.LogDebug("TryUpdateStateSafelyï¼å建æ°ç¶æï¼IP: {IpAddress}", ipAddress); |
| | | QuartzLogger.Debug($"å建æ°ç¶æï¼IP: {ipAddress}", ipAddress); |
| | | return true; |
| | | } |
| | | |
| | | // å½ååå¨ç¶æï¼è®°å½ææ RowVersion ç¨äºä¹è§éæ£æ¥ |
| | | var expectedRowVersion = currentEntity.RowVersion; |
| | | // å½ååå¨ç¶æï¼è®°å½ææ Version ç¨äºä¹è§éæ£æ¥ |
| | | var expectedVersion = currentEntity.Version; |
| | | |
| | | // å°æ°ç¶æè½¬æ¢ä¸ºæ°æ®åºå®ä½ |
| | | var newEntity = _repository.ToEntity(newState); |
| | | newEntity.Id = currentEntity.Id; |
| | | newEntity.RowVersion = Array.Empty<byte>(); |
| | | newEntity.Version = expectedVersion + 1; // çæ¬èªå¢ |
| | | |
| | | // å°è¯å®å
¨æ´æ°ï¼å¦æçæ¬å²çªåè¿å false |
| | | bool success = _repository.TryUpdate(ipAddress, newEntity, expectedRowVersion); |
| | | bool success = _repository.TryUpdate(ipAddress, newEntity, expectedVersion); |
| | | |
| | | if (!success) |
| | | { |
| | | _logger.LogWarning("TryUpdateStateSafelyï¼çæ¬å²çªï¼æ´æ°å¤±è´¥ï¼IP: {IpAddress}ï¼ææçæ¬åèé¿åº¦: {ExpectedLength}", ipAddress, expectedRowVersion.Length); |
| | | _logger.LogWarning("TryUpdateStateSafelyï¼çæ¬å²çªï¼æ´æ°å¤±è´¥ï¼IP: {IpAddress}ï¼ææçæ¬: {ExpectedVersion}", ipAddress, expectedVersion); |
| | | QuartzLogger.Warn($"çæ¬å²çªï¼æ´æ°å¤±è´¥ï¼IP: {ipAddress}", ipAddress); |
| | | } |
| | | |
| | |
| | | // } |
| | | //} |
| | | |
| | | return false; |
| | | return true; |
| | | } |
| | | |
| | | /// <summary> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_Tasks.Workflow.Abstractions; |
| | | |
| | | namespace WIDESEAWCS_Tasks.Workflow |
| | | { |
| | | public class RobotNgLineCommandHandler : IRobotNgLineCommandHandler |
| | | { |
| | | public Task<bool> HandleAsync(string message, RobotSocketState state) |
| | | { |
| | | // ä½¿ç¨ switch 表达å¼è¿è¡æ¨¡å¼å¹é
ï¼æé«å¯è¯»æ§åæ§è½ |
| | | switch (message) |
| | | { |
| | | case "PutNGFinished1": |
| | | |
| | | return Task.FromResult(true); |
| | | |
| | | case "PutNGFinished2": |
| | | |
| | | return Task.FromResult(true); |
| | | |
| | | case "PickNGFinished1": |
| | | |
| | | return Task.FromResult(true); |
| | | |
| | | case "PickNGFinished2": |
| | | |
| | | return Task.FromResult(true); |
| | | |
| | | default: |
| | | return Task.FromResult(true); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | var parts = message.Split(','); |
| | | |
| | | // æ£æ¥æ¶æ¯æ ¼å¼æ¯å¦ææï¼è³å°è¦æå½ä»¤åç¼ï¼ä¸ç¶æä¸æå½åä»»å¡ |
| | | if (parts.Length < 1 || state.CurrentTask == null) |
| | | if (parts.Length < 1) |
| | | { |
| | | return; |
| | | } |
| | |
| | | .ToArray(); |
| | | |
| | | // 仿°æ®åºéæ°æ¥è¯¢å½åä»»å¡ï¼ç¡®ä¿è·åææ°ç¶æï¼ |
| | | var task = await _robotTaskService.Repository.QueryFirstAsync(x => x.RobotTaskId == state.CurrentTask.RobotTaskId); |
| | | var task = await _robotTaskService.Repository.QueryFirstAsync(x => x.RobotTaskState == TaskRobotStatusEnum.RobotExecuting.GetHashCode() && x.RobotRoadway == state.RobotCrane.DeviceName); |
| | | |
| | | if (task != null) |
| | | { |
| | |
| | | using WIDESEAWCS_Common.TaskEnum; |
| | | using WIDESEAWCS_Core.LogHelper; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_Tasks.Workflow.Abstractions; |
| | | |
| | | namespace WIDESEAWCS_Tasks.Workflow |
| | |
| | | state.BatteryArrived = true; |
| | | return true; |
| | | |
| | | // æ¯å¦çµè¯å°ä½ |
| | | case "batteryarrivedno": |
| | | state.BatteryArrived = false; |
| | | return true; |
| | | |
| | | // ==================== å
¨é¨å®æå½ä»¤ ==================== |
| | | |
| | | // å
¨é¨åè´§å®æ |
| | |
| | | // 1. è¿è¡æ¨¡å¼ä¸ºèªå¨ï¼2ï¼ |
| | | // 2. æ§å¶æ¨¡å¼ä¸ºå®¢æ·ç«¯æ§å¶ï¼1ï¼ |
| | | // 3. è¿è¡ç¶ææ¯ Running |
| | | if (latestState.RobotRunMode == 2 /*&& latestState.RobotControlMode == 1*/ && latestState.OperStatus == "Running" && (latestState.Homed == "Homed" || latestState.Homed.IsNullOrEmpty())) |
| | | if (latestState.RobotRunMode == 2 /*&& latestState.RobotControlMode == 1*/ /*&& latestState.OperStatus == "Running"*/ && (latestState.Homed == "Homed" || latestState.Homed.IsNullOrEmpty())) |
| | | { |
| | | // ========== åè´§å®æåçæ¾è´§å¤ç ========== |
| | | // æ¡ä»¶ï¼ |
| | |
| | | // - ä»»å¡ç¶æä¸º RobotPutFinish æä¸æ¯ RobotExecuting |
| | | else if ((latestState.CurrentAction == "PutFinished" || latestState.CurrentAction == "AllPutFinished" || latestState.CurrentAction.IsNullOrEmpty()) |
| | | && (latestState.RobotArmObject.IsNullOrEmpty() || latestState.RobotArmObject == 0) |
| | | && (task.RobotTaskState == TaskRobotStatusEnum.RobotPutFinish.GetHashCode() |
| | | || task.RobotTaskState != TaskRobotStatusEnum.RobotExecuting.GetHashCode())) |
| | | && (task.RobotTaskState == TaskRobotStatusEnum.RobotPutFinish.GetHashCode() || task.RobotTaskState != TaskRobotStatusEnum.RobotExecuting.GetHashCode()) |
| | | && latestState.BatteryArrived) |
| | | { |
| | | _logger.LogInformation("ExecuteAsyncï¼æ»¡è¶³åè´§æ¡ä»¶ï¼å¼å§ä¸ååè´§ä»»å¡ï¼ä»»å¡å·: {TaskNum}", task.RobotTaskNum); |
| | | QuartzLogger.Info($"ExecuteAsyncï¼æ»¡è¶³åè´§æ¡ä»¶ï¼å¼å§ä¸ååè´§ä»»å¡", latestState.RobotCrane?.DeviceName ?? ipAddress); |
| | |
| | | private async Task HandlePutFinishedStateAsync(Dt_RobotTask task, string ipAddress) |
| | | { |
| | | // è·åææ°ç¶æ |
| | | var stateForUpdate = _stateManager.GetState(ipAddress); |
| | | RobotSocketState? stateForUpdate = _stateManager.GetState(ipAddress); |
| | | if (stateForUpdate == null) |
| | | { |
| | | _logger.LogWarning("HandlePutFinishedStateAsyncï¼è·åç¶æå¤±è´¥ï¼IP: {IpAddress}", ipAddress); |
| | |
| | | using System.Net.Sockets; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob; |
| | | using WIDESEAWCS_Tasks.Workflow.Abstractions; |
| | | |
| | |
| | | using System.Text; |
| | | using System.Text.Json; |
| | | using System.IO; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | | namespace WIDESEAWCS_Tasks.SocketServer |
| | | { |
| | |
| | | { |
| | | // 夿æ¯å¦ä¸º JSON æ ¼å¼ |
| | | bool isJsonFormat = TryParseJsonSilent(message); |
| | | _ = MessageReceived.Invoke(message, isJsonFormat, client, robotCrane); |
| | | _ = MessageReceived.Invoke(message, isJsonFormat, client); |
| | | } |
| | | catch { } |
| | | } |
| | |
| | | using System.Text; |
| | | using System.Threading; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob; |
| | | |
| | | namespace WIDESEAWCS_Tasks.SocketServer |
| | |
| | | /// 彿å¡å¨æ¥æ¶å°æ¶æ¯æ¶è§¦åã |
| | | /// åæ°ï¼æ¶æ¯å
å®¹ãæ¯å¦ JSON æ ¼å¼ãTCP 客æ·ç«¯ãæºå¨äººç¶æ |
| | | /// </remarks> |
| | | public event Func<string, bool, TcpClient, RobotSocketState, Task<string?>>? MessageReceived; |
| | | public event Func<string, bool, TcpClient, Task<string?>>? MessageReceived; |
| | | |
| | | /// <summary> |
| | | /// æºå¨äººè¿æ¥æå¼äºä»¶ |
| | |
| | | { |
| | | taskType = StackerCraneConst.EmptyPalletTaskType; |
| | | } |
| | | else if(task.TaskType == (int)TaskInboundTypeEnum.InEmpty) |
| | | { |
| | | taskType = StackerCraneConst.EmptyInPalletTaskType; |
| | | } |
| | | else |
| | | taskType = task.TaskType; |
| | | |
| | |
| | | { |
| | | // 没æä¸ä¸ä»»å¡ç±»åï¼æ¥è¯¢æ®éä»»å¡ |
| | | candidateTask = _taskService.QueryStackerCraneTask(deviceCode); |
| | | QuartzLogHelper.LogDebug(_logger, "SelectTaskï¼æ¥è¯¢æ®éä»»å¡ï¼è®¾å¤: {DeviceCode}ï¼ç»æ: {TaskNum}", $"æ¥è¯¢æ®éä»»å¡ï¼è®¾å¤: {deviceCode}ï¼ç»æ: {candidateTask?.TaskNum}", deviceCode, deviceCode, candidateTask?.TaskNum); |
| | | //QuartzLogHelper.LogDebug(_logger, "SelectTaskï¼æ¥è¯¢æ®éä»»å¡ï¼è®¾å¤: {DeviceCode}ï¼ç»æ: {TaskNum}", $"æ¥è¯¢æ®éä»»å¡ï¼è®¾å¤: {deviceCode}ï¼ç»æ: {candidateTask?.TaskNum}", deviceCode, deviceCode, candidateTask?.TaskNum); |
| | | } |
| | | else if (commonStackerCrane.LastTaskType.GetValueOrDefault().GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) |
| | | { |
| | |
| | | candidateTask = _taskService.QueryStackerCraneInTask(deviceCode); |
| | | // å¦ææ²¡æå
¥åºä»»å¡ï¼åæ¥ä¸ä¸åºåºä»»å¡ |
| | | candidateTask ??= _taskService.QueryStackerCraneOutTask(deviceCode); |
| | | QuartzLogHelper.LogDebug(_logger, "SelectTaskï¼åºåºåä¼å
æ¥å
¥åºï¼è®¾å¤: {DeviceCode}ï¼ç»æ: {TaskNum}", $"åºåºåä¼å
æ¥å
¥åºï¼è®¾å¤: {deviceCode}ï¼ç»æ: {candidateTask?.TaskNum}", deviceCode, deviceCode, candidateTask?.TaskNum); |
| | | //QuartzLogHelper.LogDebug(_logger, "SelectTaskï¼åºåºåä¼å
æ¥å
¥åºï¼è®¾å¤: {DeviceCode}ï¼ç»æ: {TaskNum}", $"åºåºåä¼å
æ¥å
¥åºï¼è®¾å¤: {deviceCode}ï¼ç»æ: {candidateTask?.TaskNum}", deviceCode, deviceCode, candidateTask?.TaskNum); |
| | | } |
| | | else |
| | | { |
| | | // ä¸ä¸ä»»å¡æ¯å
¥åºï¼éåºåºï¼ï¼ä¼å
æ¥åºåºä»»å¡ |
| | | candidateTask = _taskService.QueryStackerCraneOutTask(deviceCode); |
| | | QuartzLogHelper.LogDebug(_logger, "SelectTaskï¼å
¥åºåä¼å
æ¥åºåºï¼è®¾å¤: {DeviceCode}ï¼ç»æ: {TaskNum}", $"å
¥åºåä¼å
æ¥åºåºï¼è®¾å¤: {deviceCode}ï¼ç»æ: {candidateTask?.TaskNum}", deviceCode, deviceCode, candidateTask?.TaskNum); |
| | | //QuartzLogHelper.LogDebug(_logger, "SelectTaskï¼å
¥åºåä¼å
æ¥åºåºï¼è®¾å¤: {DeviceCode}ï¼ç»æ: {TaskNum}", $"å
¥åºåä¼å
æ¥åºåºï¼è®¾å¤: {deviceCode}ï¼ç»æ: {candidateTask?.TaskNum}", deviceCode, deviceCode, candidateTask?.TaskNum); |
| | | } |
| | | |
| | | // å¦ææ²¡æåéä»»å¡ï¼è¿å null |
| | | if (candidateTask == null) |
| | | { |
| | | QuartzLogHelper.LogDebug(_logger, "SelectTaskï¼æ²¡æåéä»»å¡ï¼è®¾å¤: {DeviceCode}", $"没æåéä»»å¡ï¼è®¾å¤: {deviceCode}", deviceCode, deviceCode); |
| | | //QuartzLogHelper.LogDebug(_logger, "SelectTaskï¼æ²¡æåéä»»å¡ï¼è®¾å¤: {DeviceCode}", $"没æåéä»»å¡ï¼è®¾å¤: {deviceCode}", deviceCode, deviceCode); |
| | | return null; |
| | | } |
| | | |
| | |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEAWCS_Model\WIDESEAWCS_Model.csproj" /> |
| | | <ProjectReference Include="..\WIDESEAWCS_QuartzJob\WIDESEAWCS_QuartzJob.csproj" /> |
| | | <ProjectReference Include="..\WIDESEAWCS_TaskInfoService\WIDESEAWCS_TaskInfoService.csproj" /> |
| | | </ItemGroup> |
| | |
| | | let loadingInstance; |
| | | let loadingStatus = false; |
| | | if (process.env.NODE_ENV == 'development') { |
| | | axios.defaults.baseURL = window.webConfig.webApiBaseUrl; |
| | | axios.defaults.baseURL = 'http://127.0.0.1:9291/'; |
| | | } |
| | | else if (process.env.NODE_ENV == 'debug') { |
| | | axios.defaults.baseURL = window.webConfig.webApiBaseUrl; |
| | |
| | | <template> |
| | | <div> |
| | | <vol-box |
| | | v-model="showBox" |
| | | :lazy="true" |
| | | width="500px" |
| | | :padding="15" |
| | | title="æå¨å建任å¡" |
| | | > |
| | | <vol-box v-model="showBox" :lazy="true" width="500px" :padding="15" title="æå¨å建任å¡"> |
| | | <el-form :model="formData" ref="form" label-width="100px"> |
| | | <el-form-item label="ä»»å¡ç±»å" prop="taskType" required> |
| | | <el-select v-model="formData.taskType" placeholder="è¯·éæ©ä»»å¡ç±»å"> |
| | | <el-option label="å
¥åº" value="å
¥åº"></el-option> |
| | | <el-option label="空箱å
¥åº" value="空箱å
¥åº"></el-option> |
| | | <el-option label="åºåº" value="åºåº"></el-option> |
| | | <el-option label="ç§»åº" value="ç§»åº"></el-option> |
| | | </el-select> |
| | |
| | | <el-form-item label="ä»»å¡ç±»å" prop="taskType" required> |
| | | <el-select v-model="manualFormData.taskType" placeholder="è¯·éæ©ä»»å¡ç±»å"> |
| | | <el-option label="å
¥åº" value="å
¥åº"></el-option> |
| | | <el-option label="空箱å
¥åº" value="空箱å
¥åº"></el-option> |
| | | <el-option label="åºåº" value="åºåº"></el-option> |
| | | <el-option label="ç§»åº" value="ç§»åº"></el-option> |
| | | </el-select> |
| | |
| | | const TEXT = { |
| | | pageName: "åºåä¿¡æ¯", |
| | | palletCode: "æçç¼å·", |
| | | stockStatus: "åºåç¶æ", |
| | | locationCode: "è´§ä½ç¼å·", |
| | | warehouse: "ä»åº", |
| | | creator: "å建人", |
| | |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "stockStatus", |
| | | title: TEXT.stockStatus, |
| | | type: "int", |
| | | width: 120, |
| | | align: "left", |
| | | bind: { key: "stockStatusEmun", data: [] }, |
| | | }, |
| | | { |
| | | field: "mesUploadStatus", |
| | | title: "MESç¶æ", |
| | | type: "int", |
| | | width: 120, |
| | | align: "left", |
| | | bind: { key: "mesUploadStatusEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "locationCode", |
| | |
| | | |
| | | const loadStockStatusOptions = async () => { |
| | | try { |
| | | const result = await proxy.http.post("/api/Sys_Dictionary/GetVueDictionary", ["stockStatusEmun"]); |
| | | const result = await proxy.http.post("/api/Sys_Dictionary/GetVueDictionary", ["stockStatusEmun", "mesUploadStatusEnum"]); |
| | | const matched = (result || []).find((item) => item.dicNo === "stockStatusEmun"); |
| | | stockStatusOptions.value = matched ? matched.data || [] : []; |
| | | } catch (error) { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | Subproject commit 07c4ad05f40507d7d797619814bf75a47c29a9f4 |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | -- Dt_StockInfo 表æ°å¢ MesUploadStatus åæ®µ |
| | | IF NOT EXISTS (SELECT * FROM sys.columns WHERE object_id = OBJECT_ID('[dbo].[Dt_StockInfo]') AND name = 'MesUploadStatus') |
| | | BEGIN |
| | | ALTER TABLE [dbo].[Dt_StockInfo] ADD [MesUploadStatus] TINYINT NOT NULL DEFAULT 0; |
| | | END |
| | | GO |
| | |
| | | { |
| | | Headers = new Dictionary<string, string> |
| | | { |
| | | { "Authorization", _authorization } |
| | | { "Authorization","Bearer "+ _authorization } |
| | | }, |
| | | TimeoutMs = 30000, |
| | | MaxRetryCount = 0, |
| | |
| | | { |
| | | Headers = new Dictionary<string, string> |
| | | { |
| | | { "Authorization", token } |
| | | { "Authorization","Bearer "+ token } |
| | | }, |
| | | TimeoutMs = 30000, |
| | | MaxRetryCount = 0, |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System.ComponentModel; |
| | | |
| | | namespace WIDESEA_Common.StockEnum |
| | | { |
| | | /// <summary> |
| | | /// MESä¸ä¼ ç¶ææä¸¾ |
| | | /// </summary> |
| | | public enum MesUploadStatusEnum |
| | | { |
| | | /// <summary> |
| | | /// æªä¸ä¼ ï¼ä»æªè°ç¨è¿MESï¼ |
| | | /// </summary> |
| | | [Description("æªä¸ä¼ ")] |
| | | æªä¸ä¼ = 0, |
| | | |
| | | /// <summary> |
| | | /// ç»çä¸ä¼ æå |
| | | /// </summary> |
| | | [Description("ç»çä¸ä¼ æå")] |
| | | ç»çä¸ä¼ æå = 1, |
| | | |
| | | /// <summary> |
| | | /// ç»çä¸ä¼ 失败 |
| | | /// </summary> |
| | | [Description("ç»çä¸ä¼ 失败")] |
| | | ç»çä¸ä¼ 失败 = 2, |
| | | |
| | | /// <summary> |
| | | /// æçä¸ä¼ æå |
| | | /// </summary> |
| | | [Description("æçä¸ä¼ æå")] |
| | | æçä¸ä¼ æå = 3, |
| | | |
| | | /// <summary> |
| | | /// æçä¸ä¼ 失败 |
| | | /// </summary> |
| | | [Description("æçä¸ä¼ 失败")] |
| | | æçä¸ä¼ 失败 = 4, |
| | | |
| | | /// <summary> |
| | | /// è¿ç«ä¸ä¼ æå |
| | | /// </summary> |
| | | [Description("è¿ç«ä¸ä¼ æå")] |
| | | è¿ç«ä¸ä¼ æå = 5, |
| | | |
| | | /// <summary> |
| | | /// è¿ç«ä¸ä¼ 失败 |
| | | /// </summary> |
| | | [Description("è¿ç«ä¸ä¼ 失败")] |
| | | è¿ç«ä¸ä¼ 失败 = 6, |
| | | |
| | | /// <summary> |
| | | /// åºç«ä¸ä¼ æå |
| | | /// </summary> |
| | | [Description("åºç«ä¸ä¼ æå")] |
| | | åºç«ä¸ä¼ æå = 7, |
| | | |
| | | /// <summary> |
| | | /// åºç«ä¸ä¼ 失败 |
| | | /// </summary> |
| | | [Description("åºç«ä¸ä¼ 失败")] |
| | | åºç«ä¸ä¼ 失败 = 8, |
| | | |
| | | /// <summary> |
| | | /// NG䏿¥æå |
| | | /// </summary> |
| | | [Description("NG䏿¥æå")] |
| | | NG䏿¥æå = 9, |
| | | |
| | | /// <summary> |
| | | /// NG䏿¥å¤±è´¥ |
| | | /// </summary> |
| | | [Description("NG䏿¥å¤±è´¥")] |
| | | NG䏿¥å¤±è´¥ = 10 |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | /// <param name="warehouseId">ä»åºID</param> |
| | | /// <returns>3Då¸å±DTO</returns> |
| | | Task<Stock3DLayoutDTO> Get3DLayoutAsync(int warehouseId);
|
| | |
|
| | | Task<Stock3DLayoutDTO> Get3DLayoutAsync(int warehouseId); |
| | | |
| | | /// <summary> |
| | | /// 使ç¨äºå¡å é¤åºååæç»ä¿¡æ¯ï¼å
æ¥è¯¢åå é¤ï¼ |
| | | /// </summary> |
| | | /// <param name="stockId">åºåID</param> |
| | | /// <returns>å é¤ç»æ</returns> |
| | | Task<WebResponseContent> DeleteStockWithDetailsAsync(int stockId); |
| | | |
| | | /// <summary> |
| | | /// æ´æ°MESä¸ä¼ ç¶æ |
| | | /// </summary> |
| | | /// <param name="palletCode">æçå·</param> |
| | | /// <param name="status">MESä¸ä¼ ç¶æå¼</param> |
| | | /// <returns>æ´æ°æ¯å¦æå</returns> |
| | | Task<bool> UpdateMesUploadStatusAsync(string palletCode, int status); |
| | | } |
| | | } |
| | |
| | | public string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// MESä¸ä¼ ç¶æï¼0=æªä¸ä¼ ï¼1=ç»çæåï¼2=ç»ç失败ï¼3=æçæåï¼4=æç失败ï¼5=è¿ç«æåï¼6=è¿ç«å¤±è´¥ï¼7=åºç«æåï¼8=åºç«å¤±è´¥ï¼9=NG䏿¥æåï¼10=NG䏿¥å¤±è´¥ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "MESä¸ä¼ ç¶æ")] |
| | | public int MesUploadStatus { get; set; } = 0; |
| | | |
| | | /// <summary> |
| | | /// åºåºæ¥æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "åºåºæ¥æ")] |
| | |
| | | return WebResponseContent.Instance.Error($"å é¤åºååæç»æ¶åçå¼å¸¸: {ex.Message}"); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// æ´æ°MESä¸ä¼ ç¶æ |
| | | /// </summary> |
| | | /// <param name="palletCode">æçå·</param> |
| | | /// <param name="status">MESä¸ä¼ ç¶æå¼</param> |
| | | /// <returns>æ´æ°æ¯å¦æå</returns> |
| | | public async Task<bool> UpdateMesUploadStatusAsync(string palletCode, int status) |
| | | { |
| | | try |
| | | { |
| | | var stockInfo = await BaseDal.QueryDataFirstAsync(x => x.PalletCode == palletCode); |
| | | if (stockInfo == null) |
| | | return false; |
| | | |
| | | stockInfo.MesUploadStatus = status; |
| | | return await BaseDal.UpdateDataAsync(stockInfo); |
| | | } |
| | | catch |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | using Newtonsoft.Json; |
| | | using SqlSugar; |
| | | using System.Diagnostics; |
| | | using WIDESEA_Common.Constants; |
| | | using WIDESEA_Common.StockEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO.MES; |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_IBasicService; |
| | |
| | | /// </summary> |
| | | public IMesService _mesService { get; } |
| | | |
| | | private readonly IMesLogService _mesLogService; |
| | | |
| | | /// <summary> |
| | | /// æé 彿° |
| | | /// </summary> |
| | |
| | | IStockInfo_HtyService stockInfo_HtyService, |
| | | IMesService mesService, |
| | | IWarehouseService warehouseService, |
| | | ISqlSugarClient sqlSugarClient) |
| | | ISqlSugarClient sqlSugarClient, |
| | | IMesLogService mesLogService) |
| | | { |
| | | StockInfoDetailService = stockInfoDetailService; |
| | | StockInfoService = stockInfoService; |
| | |
| | | _mesService = mesService; |
| | | _warehouseService = warehouseService; |
| | | SqlSugarClient = sqlSugarClient; |
| | | _mesLogService = mesLogService; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | public async Task<WebResponseContent> GroupPalletConfirmAsync(string palletCode, string deviceName) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | var stopwatch = Stopwatch.StartNew(); |
| | | try |
| | | { |
| | | if (string.IsNullOrWhiteSpace(palletCode)) |
| | |
| | | Location = d.InboundOrderRowNo.ToString() |
| | | }).ToList() |
| | | }; |
| | | string requestJson = bindRequest.ToJson(); |
| | | var bindResult = string.IsNullOrWhiteSpace(token) |
| | | ? _mesService.BindContainer(bindRequest) |
| | | : _mesService.BindContainer(bindRequest, token); |
| | | stopwatch.Stop(); |
| | | await _mesLogService.LogAsync(new MesApiLogDto |
| | | { |
| | | ApiType = "BindContainer", |
| | | RequestJson = requestJson, |
| | | ResponseJson = System.Text.Json.JsonSerializer.Serialize(bindResult), |
| | | IsSuccess = bindResult.IsSuccess, |
| | | ErrorMessage = bindResult.ErrorMessage, |
| | | ElapsedMs = (int)stopwatch.ElapsedMilliseconds, |
| | | Creator = "systeam" |
| | | }); |
| | | if (bindResult == null || bindResult.Data == null || !bindResult.Data.IsSuccess) |
| | | { |
| | | return content.Error($"MESç»å®å¤±è´¥: {bindResult?.Data?.Msg ?? bindResult?.ErrorMessage ?? "æªç¥é误"}"); |
| | |
| | | using WIDESEA_DTO.MES; |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_DTO.Task; |
| | | using Newtonsoft.Json; |
| | | using System.Diagnostics; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IRecordService; |
| | | using WIDESEA_IStockService; |
| | |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | private readonly IRecordService _recordService; |
| | | private readonly IMESDeviceConfigService _mesDeviceConfigService; |
| | | private readonly IMesLogService _mesLogService; |
| | | |
| | | public IRepository<Dt_Task> Repository => BaseDal; |
| | | |
| | |
| | | IStockInfo_HtyService stockInfo_HtyService, |
| | | IUnitOfWorkManage unitOfWorkManage, |
| | | IRecordService recordService, |
| | | IMESDeviceConfigService mesDeviceConfigService) : base(BaseDal) |
| | | IMESDeviceConfigService mesDeviceConfigService, |
| | | IMesLogService mesLogService) : base(BaseDal) |
| | | { |
| | | _mapper = mapper; |
| | | _stockInfoService = stockInfoService; |
| | |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | _recordService = recordService; |
| | | _mesDeviceConfigService = mesDeviceConfigService; |
| | | _mesLogService = mesLogService; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | // Remark 为空æ¶ï¼åéå°å··éé
ç½® |
| | | return DetermineTargetAddress(roadway, addressMap); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 弿¥æ§è¡MESä¸ä¼ - ä¸é»å¡ä¸»ä¸å¡é»è¾ |
| | | /// </summary> |
| | | /// <param name="palletCode">æçå·</param> |
| | | /// <param name="successStatus">æåæ¶çç¶ææä¸¾å¼ï¼å¥æ°ï¼</param> |
| | | /// <param name="uploadFunc">å
·ä½çMESè°ç¨å½æ°</param> |
| | | private async Task MesUploadAsync(string palletCode, MesUploadStatusEnum successStatus, Func<Task<HttpResponseResult<MesResponse>>> uploadFunc) |
| | | { |
| | | var stopwatch = Stopwatch.StartNew(); |
| | | string requestJson = ""; |
| | | string responseJson = ""; |
| | | bool isSuccess = false; |
| | | string errorMessage = ""; |
| | | |
| | | try |
| | | { |
| | | // è°ç¨MES |
| | | var result = await uploadFunc(); |
| | | |
| | | stopwatch.Stop(); |
| | | isSuccess = result?.Data?.IsSuccess ?? false; |
| | | errorMessage = result?.Data?.Msg ?? result?.ErrorMessage ?? "æªç¥é误"; |
| | | responseJson = JsonConvert.SerializeObject(result); |
| | | |
| | | // æ ¹æ®æå/失败å³å®ç¶æå¼ï¼å¥æ°=æåï¼å¶æ°=失败 |
| | | var uploadStatus = isSuccess ? (int)successStatus : (int)successStatus + 1; |
| | | |
| | | // æ´æ°åºåè¡¨ç¶æï¼ä¸çå¾
ï¼ |
| | | _ = _stockInfoService.UpdateMesUploadStatusAsync(palletCode, uploadStatus); |
| | | |
| | | // è®°å½MESæ¥å¿ |
| | | await LogMesCallAsync(palletCode, successStatus.ToString(), requestJson, responseJson, |
| | | stopwatch.ElapsedMilliseconds, isSuccess ? "æå" : "失败", errorMessage); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | stopwatch.Stop(); |
| | | errorMessage = ex.Message; |
| | | |
| | | // æ´æ°ç¶æä¸ºå¤±è´¥ï¼successStatus+1 å³ä¸ºå¤±è´¥ç¶æï¼ |
| | | var uploadStatus = (int)successStatus + 1; |
| | | _ = _stockInfoService.UpdateMesUploadStatusAsync(palletCode, uploadStatus); |
| | | |
| | | // è®°å½å¼å¸¸æ¥å¿ |
| | | await LogMesCallAsync(palletCode, successStatus.ToString(), requestJson, responseJson, |
| | | stopwatch.ElapsedMilliseconds, "失败", errorMessage); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è®°å½MESæ¥å£è°ç¨æ¥å¿ |
| | | /// </summary> |
| | | private async Task LogMesCallAsync(string palletCode, string apiType, string requestJson, |
| | | string responseJson, long durationMs, string status, string errorMessage) |
| | | { |
| | | try |
| | | { |
| | | var mesLog = new MesApiLogDto |
| | | { |
| | | PalletCode = palletCode, |
| | | ApiType = apiType, |
| | | RequestJson = requestJson, |
| | | ResponseJson = responseJson, |
| | | IsSuccess = status == "æå", |
| | | ErrorMessage = errorMessage, |
| | | ElapsedMs = (int)durationMs, |
| | | Creator = "System" |
| | | }; |
| | | await _mesLogService.LogAsync(mesLog); |
| | | } |
| | | catch |
| | | { |
| | | // æ¥å¿è®°å½å¤±è´¥ä¸å½±å主æµç¨ |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | using Microsoft.AspNetCore.Http.HttpResults; |
| | | using Newtonsoft.Json; |
| | | using System.Diagnostics; |
| | | using WIDESEA_Common.Constants; |
| | | using WIDESEA_Common.LocationEnum; |
| | | using WIDESEA_Common.StockEnum; |
| | | using WIDESEA_Common.TaskEnum; |
| | | using WIDESEA_Common.WareHouseEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO.MES; |
| | | using WIDESEA_DTO.Task; |
| | | using WIDESEA_IBasicService; |
| | |
| | | /// </summary> |
| | | public async Task<WebResponseContent> InboundFinishTaskAsync(CreateTaskDto taskDto) |
| | | { |
| | | var stopwatch = Stopwatch.StartNew(); |
| | | try |
| | | { |
| | | var task = await BaseDal.QueryFirstAsync(s => s.PalletCode == taskDto.PalletCode); |
| | |
| | | if (location == null) return WebResponseContent.Instance.Error("æªæ¾å°å¯¹åºçè´§ä½"); |
| | | |
| | | var stockInfo = await _stockInfoService.GetStockInfoAsync(taskDto.PalletCode); |
| | | if (stockInfo == null) return WebResponseContent.Instance.Error("æªæ¾å°å¯¹åºåºåä¿¡æ¯"); |
| | | |
| | | // 夿æ¯ä¸æ¯æå·åºä»»å¡ |
| | | if (taskDto.WarehouseId == (int)WarehouseEnum.FJ1 || taskDto.WarehouseId == (int)WarehouseEnum.ZJ1) |
| | | if (stockInfo == null) |
| | | { |
| | | return await CompleteAgvInboundTaskAsync(taskDto); |
| | | return await _unitOfWorkManage.BeginTranAsync(async () => |
| | | { |
| | | stockInfo = new Dt_StockInfo |
| | | { |
| | | PalletCode = taskDto.PalletCode, |
| | | WarehouseId = task.WarehouseId, |
| | | StockStatus = StockStatusEmun.空æçåºå.GetHashCode(), |
| | | Creater = StockConstants.SYSTEM_USER, |
| | | Details = null, |
| | | LocationCode = location.LocationCode, |
| | | LocationId = location.Id |
| | | }; |
| | | var updateLocationResult = await _locationInfoService.UpdateLocationInfoAsync(location); |
| | | var updateStockResult = await _stockInfoService.Repository.AddDataAsync(stockInfo); |
| | | return await CompleteTaskAsync(task, "å
¥åºå®æ"); |
| | | }); |
| | | } |
| | | |
| | | return await _unitOfWorkManage.BeginTranAsync(async () => |
| | | else |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | stockInfo.LocationCode = location.LocationCode; |
| | | stockInfo.LocationId = location.Id; |
| | | |
| | | SetOutboundDateByRoadway(task, stockInfo); |
| | | |
| | | stockInfo.StockStatus = StockStatusEmun.å
¥åºå®æ.GetHashCode(); |
| | | |
| | | location.LocationStatus = LocationStatusEnum.InStock.GetHashCode(); |
| | | |
| | | var updateLocationResult = await _locationInfoService.UpdateLocationInfoAsync(location); |
| | | var updateStockResult = await _stockInfoService.UpdateStockAsync(stockInfo); |
| | | if (!updateLocationResult || !updateStockResult) |
| | | return WebResponseContent.Instance.Error("ä»»å¡å®æå¤±è´¥"); |
| | | // æ ¹æ®åºåRemarkéæ©é置设å¤ï¼æ¥MES卿åè¯ |
| | | string deviceName = stockInfo.Remark == "GW_1" ? "髿¸©éç½®1" |
| | | : stockInfo.Remark == "GW_2" ? "髿¸©éç½®2" |
| | | : "常温éç½®1"; |
| | | var mesConfig = _mesDeviceConfigService.GetByDeviceName(deviceName); |
| | | string equipmentCode = mesConfig?.EquipmentCode ?? StockConstants.MES_EQUIPMENT_CODE; |
| | | string resourceCode = mesConfig?.ResourceCode ?? StockConstants.MES_RESOURCE_CODE; |
| | | string token = mesConfig?.Token; |
| | | |
| | | // è°ç¨MESæçè¿ç« |
| | | var inboundRequest = new InboundInContainerRequest |
| | | // 夿æ¯ä¸æ¯æå·åºä»»å¡ |
| | | if (taskDto.WarehouseId == (int)WarehouseEnum.FJ1 || taskDto.WarehouseId == (int)WarehouseEnum.ZJ1) |
| | | { |
| | | EquipmentCode = equipmentCode, |
| | | ResourceCode = resourceCode, |
| | | LocalTime = DateTime.Now, |
| | | ContainerCode = taskDto.PalletCode |
| | | }; |
| | | var inboundResult = string.IsNullOrWhiteSpace(token) |
| | | ? _mesService.InboundInContainer(inboundRequest) |
| | | : _mesService.InboundInContainer(inboundRequest, token); |
| | | if (inboundResult == null || inboundResult.Data == null || !inboundResult.Data.IsSuccess) |
| | | { |
| | | return content.Error($"ä»»å¡å®æå¤±è´¥ï¼MESè¿ç«å¤±è´¥: {inboundResult?.Data?.Msg ?? inboundResult?.ErrorMessage ?? "æªç¥é误"}"); |
| | | return await CompleteAgvInboundTaskAsync(taskDto); |
| | | } |
| | | return await CompleteTaskAsync(task, "å
¥åºå®æ"); |
| | | }); |
| | | |
| | | return await _unitOfWorkManage.BeginTranAsync(async () => |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | stockInfo.LocationCode = location.LocationCode; |
| | | stockInfo.LocationId = location.Id; |
| | | |
| | | SetOutboundDateByRoadway(task, stockInfo); |
| | | |
| | | stockInfo.StockStatus = StockStatusEmun.å
¥åºå®æ.GetHashCode(); |
| | | |
| | | location.LocationStatus = LocationStatusEnum.InStock.GetHashCode(); |
| | | |
| | | var updateLocationResult = await _locationInfoService.UpdateLocationInfoAsync(location); |
| | | var updateStockResult = await _stockInfoService.UpdateStockAsync(stockInfo); |
| | | if (!updateLocationResult || !updateStockResult) |
| | | return WebResponseContent.Instance.Error("ä»»å¡å®æå¤±è´¥"); |
| | | |
| | | // æ ¹æ®åºåRemarkéæ©é置设å¤ï¼æ¥MES卿åè¯ |
| | | //string deviceName = stockInfo.Remark == "GW_1" ? "髿¸©éç½®1" |
| | | // : stockInfo.Remark == "GW_2" ? "髿¸©éç½®2" |
| | | // : "常温éç½®1"; |
| | | //var mesConfig = _mesDeviceConfigService.GetByDeviceName(deviceName); |
| | | //string equipmentCode = mesConfig?.EquipmentCode ?? StockConstants.MES_EQUIPMENT_CODE; |
| | | //string resourceCode = mesConfig?.ResourceCode ?? StockConstants.MES_RESOURCE_CODE; |
| | | //string token = mesConfig?.Token; |
| | | |
| | | // è°ç¨MESæçè¿ç« |
| | | //var inboundRequest = new InboundInContainerRequest |
| | | //{ |
| | | // EquipmentCode = equipmentCode, |
| | | // ResourceCode = resourceCode, |
| | | // LocalTime = DateTime.Now, |
| | | // ContainerCode = taskDto.PalletCode |
| | | //}; |
| | | //string requestJson = inboundRequest.ToJson(); |
| | | //var inboundResult = string.IsNullOrWhiteSpace(token) |
| | | // ? _mesService.InboundInContainer(inboundRequest) |
| | | // : _mesService.InboundInContainer(inboundRequest, token); |
| | | //stopwatch.Stop(); |
| | | //await _mesLogService.LogAsync(new MesApiLogDto |
| | | //{ |
| | | // ApiType = "InboundInContainer", |
| | | // RequestJson = requestJson, |
| | | // ResponseJson = JsonConvert.SerializeObject(inboundResult), |
| | | // IsSuccess = inboundResult.IsSuccess, |
| | | // ErrorMessage = inboundResult.ErrorMessage, |
| | | // ElapsedMs = (int)stopwatch.ElapsedMilliseconds, |
| | | // Creator = "systeam" |
| | | //}); |
| | | //if (inboundResult == null || inboundResult.Data == null || !inboundResult.Data.IsSuccess) |
| | | //{ |
| | | // return content.Error($"ä»»å¡å®æå¤±è´¥ï¼MESè¿ç«å¤±è´¥: {inboundResult?.Data?.Msg ?? inboundResult?.ErrorMessage ?? "æªç¥é误"}"); |
| | | //} |
| | | return await CompleteTaskAsync(task, "å
¥åºå®æ"); |
| | | }); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | |
| | | #endregion å
¥åºä»»å¡ |
| | | } |
| | | } |
| | | } |
| | |
| | | taskStatus = TaskRelocationStatusEnum.RelocationNew.GetHashCode(); |
| | | break; |
| | | |
| | | case "空箱å
¥åº": |
| | | taskType = TaskInboundTypeEnum.InEmpty.GetHashCode(); |
| | | taskStatus = TaskInStatusEnum.InNew.GetHashCode(); |
| | | break; |
| | | |
| | | default: |
| | | return WebResponseContent.Instance.Error($"䏿¯æçä»»å¡ç±»å: {dto.TaskType}"); |
| | | } |
| | |
| | | wmsTaskDtos.ToJson()); |
| | | |
| | | if (!wcsResult.IsSuccess || !wcsResult.Data.Status) |
| | | return WebResponseContent.Instance.Error($"ä»»å¡å·²å建ä½åéç»WCS失败: {wcsResult.Data?.Message}"); |
| | | return WebResponseContent.Instance.Error($"ä»»å¡å·²å建ä½åéç»WCS失败:{wcsResult.ErrorMessage}\r\n {wcsResult.Data?.Message}"); |
| | | |
| | | return WebResponseContent.Instance.OK($"æå¨åå»ºä»»å¡æåï¼ä»»å¡å·: {taskNum}"); |
| | | }); |
| | |
| | | using System.Diagnostics; |
| | | using WIDESEA_Common.Constants; |
| | | using WIDESEA_Common.LocationEnum; |
| | | using WIDESEA_Common.StockEnum; |
| | | using WIDESEA_Common.TaskEnum; |
| | | using WIDESEA_Common.WareHouseEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO.MES; |
| | | using WIDESEA_DTO.Task; |
| | | using WIDESEA_IBasicService; |
| | |
| | | /// </summary> |
| | | public async Task<WebResponseContent> OutboundFinishTaskAsync(CreateTaskDto taskDto) |
| | | { |
| | | var stopwatch = Stopwatch.StartNew(); |
| | | try |
| | | { |
| | | var task = await BaseDal.QueryFirstAsync(s => s.PalletCode == taskDto.PalletCode); |
| | |
| | | LocalTime = DateTime.Now, |
| | | ContainerCode = taskDto.PalletCode |
| | | }; |
| | | string requestJson = outboundRequest.ToJson(); |
| | | var outboundResult = string.IsNullOrWhiteSpace(token) |
| | | ? _mesService.OutboundInContainer(outboundRequest) |
| | | : _mesService.OutboundInContainer(outboundRequest, token); |
| | | stopwatch.Stop(); |
| | | await _mesLogService.LogAsync(new MesApiLogDto |
| | | { |
| | | ApiType = "UnbindContainer", |
| | | RequestJson = requestJson, |
| | | ResponseJson = System.Text.Json.JsonSerializer.Serialize(outboundResult), |
| | | IsSuccess = outboundResult.IsSuccess, |
| | | ErrorMessage = outboundResult.ErrorMessage, |
| | | ElapsedMs = (int)stopwatch.ElapsedMilliseconds, |
| | | Creator = "systeam" |
| | | }); |
| | | if (outboundResult == null || outboundResult.Data == null || !outboundResult.Data.IsSuccess) |
| | | { |
| | | return content.Error($"åºåºå®æå¤±è´¥ï¼MESåºç«å¤±è´¥: {outboundResult?.Data?.Msg ?? outboundResult?.ErrorMessage ?? "æªç¥é误"}"); |
| | |
| | | var occupiedLocations = occupiedLocationGroups.FirstOrDefault(og => og.WarehouseId == w.WarehouseId)?.OccupiedLocations ?? 0;
|
| | | var emptyLocations = totalLocations - occupiedLocations;
|
| | |
|
| | | var occupiedPercentage = totalLocations > 0 ? Math.Round((double)occupiedLocations / totalLocations * 100, 2) : 0.0;
|
| | | var emptyPercentage = totalLocations > 0 ? Math.Round((double)emptyLocations / totalLocations * 100, 2) : 0.0;
|
| | | var occupiedPercentage = totalLocations > 0 ? Math.Round((double)occupiedLocations / totalLocations * 100, 0) : 0.0;
|
| | | var emptyPercentage = totalLocations > 0 ? Math.Round((double)emptyLocations / totalLocations * 100, 0) : 0.0;
|
| | |
|
| | | return new
|
| | | {
|
| | |
| | | "MainDB": "DB_WIDESEA", //å½å项ç®ç主åºï¼æå¯¹åºçè¿æ¥å符串çEnabledå¿
须为true |
| | | //è¿æ¥å符串 |
| | | //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=", |
| | | "ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWMS_ShanMei;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | "ConnectionString": "Data Source=192.168.60.30;Initial Catalog=WIDESEAWMS_ShanMei;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //"ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWMS_ShanMei;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //"ConnectionString": "Data Source=10.30.4.92;Initial Catalog=WMS_TC;User ID=sa;Password=duo123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //æ§WMSæ°æ®åºè¿æ¥ |
| | |
| | | } |
| | | }, |
| | | "MES": { |
| | | "BaseUrl": "http://localhost:5000", |
| | | "BaseUrl": "http://192.168.98.11:20033", |
| | | "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjMwMTcyNzM5Mzk5NzYxOTIwIiwibmFtZSI6IlBBQ0voo4XphY3lt6XkvY0wMSIsIkZhY3RvcnlJZCI6IjEyMzQ1NiIsIlNpdGVJZCI6IjEyMzQ1NiIsIkNvZGUiOiJYWExQQUNLMDRBRTAzMiIsIm5iZiI6MTcwNDE4NzY5MCwiZXhwIjoyMTQ1NjkxNjkwLCJpc3MiOiJodHRwczovL3d3dy5oeW1zb24uY29tIiwiYXVkIjoiaHR0cHM6Ly93d3cuaHltc29uLmNvbSJ9.An1BE7UgfcSP--LtTOmmmWVE2RQFPDahLkDg1xy5KqY" |
| | | }, |
| | | "RobotTaskAddressRules": { |