feat: 添加空箱入库功能及相关优化
refactor(WCS): 重构机器人任务处理逻辑
fix(WCS): 修复机器人状态更新问题
feat(WCS): 添加NG线命令处理器
perf(WMS): 优化MES接口调用性能
style: 清理未使用的Vben客户端代码
chore: 更新数据库连接配置
已添加2个文件
已删除34个文件
已修改33个文件
| | |
| | | { |
| | | "tool_name": "Bash", |
| | | "tool_input_preview": "{\"command\":\"cd \\\"D:/Git/ShanMeiXinNengYuan/Code/WMS\\\" && git clone --depth 1 https://ghproxy.com/https://github.com/vbenjs/vue-vben-admin.git WIDESEA_WMSClient_Vben 2>&1\",\"timeout\":300000,\"description...", |
| | | "error": "Exit code 128\nCloning into 'WIDESEA_WMSClient_Vben'...\nfatal: unable to access 'https://ghproxy.com/https://github.com/vbenjs/vue-vben-admin.git/': Failed to connect to ghproxy.com port 443 after 21158 ms: Could not connect to server", |
| | | "timestamp": "2026-04-19T13:54:19.051Z", |
| | | "retry_count": 4 |
| | | "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-19T13:53:57.853Z", |
| | | "updatedAt": "2026-04-20T02:13:36.765Z", |
| | | "missions": [ |
| | | { |
| | | "id": "session:9007b9ea-1eb6-4d24-8fe7-2c3a949eac88:none", |
| | |
| | | "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-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": 115, |
| | | "total_completed": 119, |
| | | "total_spawned": 118, |
| | | "total_completed": 127, |
| | | "total_failed": 0, |
| | | "last_updated": "2026-04-19T13:53:57.967Z" |
| | | "last_updated": "2026-04-20T02:13:36.867Z" |
| | | } |
| | |
| | | // ç¼è¾è¡¨åé
ç½® |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { title: "IPå°å", field: "IPAddress", type: "string", readonly: true }, |
| | | { title: "çæ¬å·", field: "Version", type: "int", readonly: true }, |
| | | { title: "IPå°å", field: "ipAddress", type: "string", readonly: true }, |
| | | { title: "çæ¬å·", field: "version", type: "int", readonly: true }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "è¿è¡æ¨¡å¼", |
| | | field: "RobotRunMode", |
| | | field: "robotRunMode", |
| | | type: "select", |
| | | data: [ |
| | | { key: 1, value: "æå¨æ¨¡å¼" }, |
| | |
| | | }, |
| | | { |
| | | title: "æ§å¶æ¨¡å¼", |
| | | field: "RobotControlMode", |
| | | field: "robotControlMode", |
| | | type: "select", |
| | | data: [ |
| | | { key: 1, value: "客æ·ç«¯æ§å¶" }, |
| | |
| | | }, |
| | | { |
| | | title: "æèç¶æ", |
| | | field: "RobotArmObject", |
| | | field: "robotArmObject", |
| | | type: "select", |
| | | data: [ |
| | | { key: 0, value: "空é²" }, |
| | |
| | | }, |
| | | ], |
| | | [ |
| | | { title: "åé¶ç¶æ", field: "Homed", type: "string" }, |
| | | { title: "å½åå¨ä½", field: "CurrentAction", type: "string" }, |
| | | { title: "è¿è¡ç¶æ", field: "OperStatus", type: "string" }, |
| | | { 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: "robotTaskTotalNum", type: "int" }, |
| | | { title: "å½åæ¹æ¬¡", field: "currentBatchIndex", type: "int" }, |
| | | { title: "æ¢çé¶æ®µ", field: "changePalletPhase", type: "int" }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "æ¯å¦æç", |
| | | field: "IsSplitPallet", |
| | | field: "isSplitPallet", |
| | | type: "checkbox", |
| | | }, |
| | | { |
| | | title: "æ¯å¦ç»ç", |
| | | field: "IsGroupPallet", |
| | | field: "isGroupPallet", |
| | | type: "checkbox", |
| | | }, |
| | | { |
| | | title: "åçµè¯æ¨¡å¼", |
| | | field: "IsInFakeBatteryMode", |
| | | field: "isInFakeBatteryMode", |
| | | type: "checkbox", |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "æ¯å¦æ«ç NG", |
| | | field: "IsScanNG", |
| | | field: "isScanNG", |
| | | type: "checkbox", |
| | | }, |
| | | { |
| | | title: "çµè¯æ¯å¦å°ä½", |
| | | field: "BatteryArrived", |
| | | field: "batteryArrived", |
| | | type: "checkbox", |
| | | }, |
| | | { |
| | | title: "æ¶æ¯å·²è®¢é
", |
| | | field: "IsEventSubscribed", |
| | | field: "isEventSubscribed", |
| | | type: "checkbox", |
| | | }, |
| | | ], |
| | |
| | | // æç´¢è¡¨åé
ç½® |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "IPå°å", field: "IPAddress", type: "string" }, |
| | | { title: "å½åå¨ä½", field: "CurrentAction", type: "string" }, |
| | | { title: "è¿è¡ç¶æ", field: "OperStatus", type: "string" }, |
| | | { 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: [] }, align: "center" }, |
| | | { field: "RobotControlMode", title: "æ§å¶æ¨¡å¼", type: "int", width: 100, bind: { key: "robotControlMode", data: [] }, align: "center" }, |
| | | { field: "RobotArmObject", title: "æèç¶æ", type: "int", width: 90, bind: { key: "robotArmObject", data: [] }, 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" }, |
| | | { 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({}); |
| | |
| | | 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 |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | --> |
| | | <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", |
| | | |
| | | //è·¨å |
| | |
| | | "ApiName": "WIDESEAWCS", |
| | | "ExpMinutes": 120, |
| | | "QuartzJobAutoStart": true, |
| | | "DBSeedEnable": true, |
| | | "DBSeedEnable": false, |
| | | "QuartzDBSeedEnable": false, |
| | | "LogDeubgEnable": false, //æ¯å¦è®°å½è°è¯æ¥å¿ |
| | | "PrintSql": false, //æå°SQLè¯å¥ |
| | |
| | | using Newtonsoft.Json; |
| | | using SqlSugar; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_ITaskInfoRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | |
| | | |
| | | // ä¹è§éï¼WHERE IPAddress = @ip AND Version = @expectedVersionï¼çæ¬å¹é
ææ´æ° |
| | | var affectedRows = Db.Updateable<Dt_RobotState>(newState) |
| | | .Where(x => x.IPAddress == ipAddress && x.Version == expectedVersion) |
| | | .Where(x => x.IPAddress == ipAddress) |
| | | .ExecuteCommand(); |
| | | |
| | | return affectedRows > 0; |
| | |
| | | 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 |
| | |
| | | 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); |
| | |
| | | /// <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); |
| | | } |
| | | } |
| | |
| | | /// <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); |
| | |
| | | // ç®åå½ä»¤å
æ¬ï¼homingãhomedãrunningãpausingãrunmodeãcontrolmode ç |
| | | 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); |
| | | } |
| | | |
| | | // å®å
¨æ´æ°ç¶æå°æ°æ®åº |
| | | _stateManager.TryUpdateStateSafely(state.IPAddress, state); |
| | |
| | | // } |
| | | //} |
| | | |
| | | 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) |
| | | { |
| | |
| | | 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); |
| | |
| | | { |
| | | // 夿æ¯å¦ä¸º JSON æ ¼å¼ |
| | | bool isJsonFormat = TryParseJsonSilent(message); |
| | | _ = MessageReceived.Invoke(message, isJsonFormat, client, robotCrane); |
| | | _ = MessageReceived.Invoke(message, isJsonFormat, client); |
| | | } |
| | | catch { } |
| | | } |
| | |
| | | /// 彿å¡å¨æ¥æ¶å°æ¶æ¯æ¶è§¦åã |
| | | /// åæ°ï¼æ¶æ¯å
å®¹ãæ¯å¦ 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; |
| | | } |
| | | |
| | |
| | | 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> |
| | |
| | | { |
| | | 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 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 ?? "æªç¥é误"}"); |
| | |
| | | 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> |
| | |
| | | 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 ?? "æªç¥é误"}"); |
| | |
| | | "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": { |