From d6e9157f5358b9a7a139fa28c7d53fd62db13967 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期六, 22 三月 2025 17:18:47 +0800
Subject: [PATCH] 修改空框回流逻辑

---
 .gitignore                                                                                           |    1 +
 CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs    |   26 +++++++++++++++++++-------
 CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs |    2 +-
 3 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/.gitignore b/.gitignore
index 8c16369..8feca85 100644
--- a/.gitignore
+++ b/.gitignore
@@ -55000,3 +55000,4 @@
 /CodeManagement/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/.suo
 /CodeManagement/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/DocumentLayout.json
 /CodeManagement/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/v17/fileList.bin
+/椤圭洰璧勬枡/椤圭洰鍥剧焊/鍓嶆绾夸綋鐐逛綅鍥�/08涓夋ゼ杈撻�佸竷灞�鐐逛綅鍥�1107.dwl2
diff --git a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
index a4a9afc..2a6d011 100644
--- a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
+++ b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
@@ -463,7 +463,7 @@
         /// <param name="command">璇诲彇鐨勮姹備俊鎭�</param>
         /// <param name="childDeviceCode">瀛愯澶囩紪鍙�</param>
         /// <param name="index">绾夸綋褰撳墠bool璇诲彇鍋忕Щ鍦板潃</param>
-        public async void EmptyTrayReturn(CommonConveyorLine_GW conveyorLine, ConveyorLineTaskCommand_After command, string childDeviceCode, int index, WIDESEAWCS_Model.Models.Platform platform)
+        public async void EmptyTrayReturn(CommonConveyorLine_GW conveyorLine, ConveyorLineTaskCommand_After command, string childDeviceCode, int index, Platform platform)
         {
             try
             {
diff --git a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs
index 57ef8c9..eeb52ee 100644
--- a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs
+++ b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs
@@ -1,4 +1,5 @@
 锘縰sing Masuit.Tools;
+using Masuit.Tools.Systems;
 using Newtonsoft.Json;
 using WIDESEAWCS_Common;
 using WIDESEAWCS_Common.TaskEnum;
@@ -219,6 +220,7 @@
         {
             if (command.ConveyorLineBarcode != "NoRead")
             {
+                #region
                 //var config = _sys_ConfigService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
                 //var wmsBase = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.MOMIP_BASE)?.ConfigValue;
                 //var ipAddress = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.TrayCellsStatus)?.ConfigValue;
@@ -226,7 +228,7 @@
                 //{
                 //    throw new InvalidOperationException("MOM IP 鏈厤缃�");
                 //}
-                //var stationManager=_stationManagerRepository.QueryFirst(x=>x.stationChildCode == childDeviceCode);
+                //var stationManager = _stationManagerRepository.QueryFirst(x => x.stationChildCode == childDeviceCode);
                 //TrayCellsStatusDto trayCells = new TrayCellsStatusDto()
                 //{
                 //    Software = "WMS",
@@ -263,9 +265,18 @@
                 //                    if (device != null)
                 //                    {
                 //                        CommonConveyorLine_After CommonConveyorLine_After = (CommonConveyorLine_After)device;
-                //                        ConveyorLineTaskCommand_After conveyorLineAfter = CommonConveyorLine_After.ReadCustomer<ConveyorLineTaskCommand_After>((Convert.ToInt32(station.stationChildCode)).ToString());
+
+                //                        ConveyorLineTaskCommand_After taskCommand = new ConveyorLineTaskCommand_After()
+                //                        {
+                //                            ConveyorLineTaskNum = Convert.ToInt32(1),
+                //                            ConveyorLineTargetAddress = Convert.ToInt16(2234),
+                //                            ConveyorLineBarcode = command.ConveyorLineBarcode.ToString(),
+                //                        };
+                //                        CommonConveyorLine_After.SendCommand(taskCommand, station.stationChildCode);
+                //                        CommonConveyorLine_After.SetValue(ConveyorLineDBName_After.ResponState, 1, station.stationChildCode);
                 //                    }
                 //                    //鍙戦�佸埌鍒嗗
+                //                    return;
                 //                }
                 //            }
                 //        }
@@ -283,9 +294,10 @@
                 //                if (device != null)
                 //                {
                 //                    CommonConveyorLine_After CommonConveyorLine_After = (CommonConveyorLine_After)device;
-                //                    ConveyorLineTaskCommand_After conveyorLineAfter = CommonConveyorLine_After.ReadCustomer<ConveyorLineTaskCommand_After>((Convert.ToInt32(station.stationChildCode)).ToString());
-                //                    if (conveyorLineAfter.HasPallet == 0)
+                //                    ConveyorLineTaskCommand_After conveyorLineAfter = CommonConveyorLine_After.ReadCustomer<ConveyorLineTaskCommand_After>(Convert.ToInt32(station.stationChildCode).ToString());
+                //                    if (conveyorLineAfter.InteractiveSignal == 16)
                 //                    {
+                //                        var TaskNum = SnowFlake.LongId;
                 //                        Dt_Task task = new Dt_Task()
                 //                        {
                 //                            TaskNum = _taskRepository.GetTaskNo().Result,
@@ -294,7 +306,7 @@
                 //                            Roadway = station.Roadway,
                 //                            SourceAddress = childDeviceCode,
                 //                            TargetAddress = station.stationChildCode,
-                //                            CurrentAddress = station.stationChildCode,
+                //                            CurrentAddress = childDeviceCode,
                 //                            NextAddress = station.stationChildCode,
                 //                            TaskState = (int)TaskInStatusEnum.InNew,
                 //                            ExceptionMessage = "",
@@ -339,7 +351,7 @@
                 //{
                 //    ConsoleHelper.WriteErrorLine(result1.MOMMessage);
                 //}
-
+                #endregion
 
                 if (_taskRepository.QueryFirst(x => x.PalletCode == command.ConveyorLineBarcode) != null)
                 {
@@ -359,7 +371,7 @@
                     {
                         var taskCommand = MapTaskCommand(task, command);
                         conveyorLine.SendCommand(taskCommand, childDeviceCode);
-                        //conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode);
+                        conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode);
                         _taskService.UpdateTaskStatusToNext(task);
                     }
                 }

--
Gitblit v1.9.3