From bb56b2b6f21acb7c69c02585e5bc534d2f67715f Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期四, 27 三月 2025 17:13:35 +0800 Subject: [PATCH] WMS首页优化,WCS优化AGV和产线、输送线交互逻辑 --- 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineExtend/ConveyorLineExtend.cs | 46 ++++++++++++++++++---------------------------- 1 files changed, 18 insertions(+), 28 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineExtend/ConveyorLineExtend.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineExtend/ConveyorLineExtend.cs" index c1d4169..bc2fa25 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineExtend/ConveyorLineExtend.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineExtend/ConveyorLineExtend.cs" @@ -44,36 +44,26 @@ } else if (childDeviceCode == "1008" && command.Status == (ushort)ConveyorStatus.Stored) { - ConveyorLineOutFinish(conveyorLine, command, childDeviceCode); + Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode); + if (task != null) + { + List<Dt_Router> routers = _routerRepository.QueryData(x => x.StartPosi == task.NextAddress && x.ChildPosiDeviceCode == "AGV" && x.Remark == "鏈崰鐢�"); + if (routers != null && routers.Count > 0) + { + var router = routers.FirstOrDefault(); + if (router != null) + { + task.TaskState = TaskOutStatusEnum.Line_OutFinish.ObjToInt(); + task.CurrentAddress = childDeviceCode; + task.NextAddress = router.NextPosi; + router.Remark = "鍗犵敤"; + _routerRepository.UpdateData(router); + _taskService.UpdateData(task); + } + } + } } } - #region MyRegion - - //if (command != null && command.Status == (ushort)ConveyorStatus.Stored)//娣诲姞杈撻�佺嚎鐘舵�丆onveyorLineStatus enum - //{ - // switch (childDeviceCode) - // { - // case "1002": - // { - // RequestInbound(conveyorLine, command, childDeviceCode); - // } - // break; - // case "1004": - // ConveyorLineInFinish(conveyorLine, command, childDeviceCode); - // break; - // //case "105": - // // RequestOutbound(conveyorLine, command, childDeviceCode); - // // break; - // case "1008": - // ConveyorLineOutFinish(conveyorLine, command, childDeviceCode); - // break; - // //default: - // // RequestInNextAddress(conveyorLine, command, childDeviceCode); - // // RequestOutNextAddress(conveyorLine, command, childDeviceCode); - // // break; - // } - //} - #endregion } catch (Exception ex) { -- Gitblit v1.9.3