From 92cb843826dfab531b4406102fe7dcd31b6b0775 Mon Sep 17 00:00:00 2001
From: 刘磊 <1161824510@qq.com>
Date: 星期三, 08 一月 2025 14:41:12 +0800
Subject: [PATCH] 同步

---
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_BZ/CommonConveyorLine_BZJob.cs |   28 +++++++-------
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs    |   29 +++++++++++---
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs  |   14 +++++++
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MOM/CellState/TrayCellsStatusDto.cs                 |    2 
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs      |    1 
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs       |    4 +-
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Common/StationManager/StationManager.cs                 |   35 +++++++++++++++--
 7 files changed, 84 insertions(+), 29 deletions(-)

diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_BZ/CommonConveyorLine_BZJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_BZ/CommonConveyorLine_BZJob.cs
index 9aa4687..637b479 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_BZ/CommonConveyorLine_BZJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_BZ/CommonConveyorLine_BZJob.cs
@@ -112,21 +112,21 @@
                         }
 
                         #region 璋冪敤浜嬩欢鎬荤嚎閫氱煡鍓嶇
-                        var tokenInfos = _cacheService.Get<List<UserInfo>>("Cache_UserToken");
-                        if (tokenInfos == null || !tokenInfos.Any())
-                        {
-                            //throw new Exception(conveyorLine.DeviceName + "缂撳瓨涓湭鎵惧埌Token缂撳瓨");
-                            continue;
-                        }
-                        var userTokenIds = tokenInfos?.Select(x => x.Token_ID).ToList();
-                        var userIds = tokenInfos?.Select(x => x.UserId).ToList();
+                        //var tokenInfos = _cacheService.Get<List<UserInfo>>("Cache_UserToken");
+                        //if (tokenInfos == null || !tokenInfos.Any())
+                        //{
+                        //    //throw new Exception(conveyorLine.DeviceName + "缂撳瓨涓湭鎵惧埌Token缂撳瓨");
+                        //    continue;
+                        //}
+                        //var userTokenIds = tokenInfos?.Select(x => x.Token_ID).ToList();
+                        //var userIds = tokenInfos?.Select(x => x.UserId).ToList();
 
-                        object obj = new
-                        {
-                            station.stationChildCode,
-                            commandAfter = command,
-                        };
-                        _noticeService.StackerData(userIds?.FirstOrDefault(), userTokenIds, new { conveyorLine.DeviceName, data = obj });
+                        //object obj = new
+                        //{
+                        //    station.stationChildCode,
+                        //    commandAfter = command,
+                        //};
+                        //_noticeService.StackerData(userIds?.FirstOrDefault(), userTokenIds, new { conveyorLine.DeviceName, data = obj });
 
                         #endregion 璋冪敤浜嬩欢鎬荤嚎閫氱煡鍓嶇
                     }
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs
index 88deaee..1f85a2b 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs
@@ -175,13 +175,13 @@
                     //    command.ConveyorLineBarcode = taskGW.PalletCode;
                     //}
                     //}
-                    //濡傞珮娓╁嚭搴撳悗浠诲姟鏍囪NG寮傚父鍒欏皢浠诲姟鏇存柊涓哄紓甯告帓鍑轰换鍔�
-                    Dt_Task NGtask = _taskRepository.QueryFirst(x => x.Remark == "NG" && x.Roadway == stationManager.Roadway && x.Roadway.Contains("GW"));
-                    if (NGtask != null)
-                    {
-                        CreateAbNormalOutbound(conveyorLine, command, childDeviceCode, NGtask);
-                        break;
-                    }
+                    //濡傞珮娓╁嚭搴撳悗浠诲姟鏍囪NG寮傚父鍒欏皢浠诲姟鏇存柊涓哄紓甯告帓鍑轰换鍔�   --鍐犲畤鍙栨秷瓒呮椂妫�娴嬪悗  鎵樼洏瓒呮椂涓嶅湪鍑哄簱鑷冲紓甯稿彛
+                    //Dt_Task NGtask = _taskRepository.QueryFirst(x => x.Remark == "NG" && x.Roadway == stationManager.Roadway && x.Roadway.Contains("GW"));
+                    //if (NGtask != null)
+                    //{
+                    //    CreateAbNormalOutbound(conveyorLine, command, childDeviceCode, NGtask);
+                    //    break;
+                    //}
 
                     RequestWmsTask(conveyorLine, command, childDeviceCode);
                     break;
@@ -362,6 +362,21 @@
         {
             Dt_StationManager stationManager = _stationManagerRepository.QueryFirst(x => x.stationChildCode == childDeviceCode && x.stationPLC == conveyorLine.DeviceCode);
 
+            if (command.ConveyorLineBarcode.IsNullOrEmpty())
+            {
+                conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 2, childDeviceCode);
+                return;
+            }
+
+
+            if( conveyorLine.ReadValue(ConveyorLineDBName_After.InteractiveSignal, childDeviceCode).ObjToInt() ==  0) //鎵樼洏姝e弽淇″彿
+            {
+
+            }; 
+
+            conveyorLine.ReadValue(ConveyorLineDBName_After.InteractiveSignal, childDeviceCode);  //鎵樼洏鏈夋棤鐢佃姱淇″彿
+
+
 
         }
 
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
index c2bb440..d264a83 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
@@ -82,10 +82,10 @@
                                 {
                                     var taskNum = commonStackerCrane.GetValue<StackerCraneDBName, int>(StackerCraneDBName.TaskNum);
                                     //var taskBarCode = commonStackerCrane.GetValue<StackerCraneDBName, string>(StackerCraneDBName.Barcode);
-                                    ConsoleHelper.WriteColorLine($"銆恵commonStackerCrane.DeviceName}銆戝爢鍨涙満浠诲姟鍙凤細銆恵taskNum}銆戜换鍔′换鍔″彿锛氥�恵task.TaskNum}", ConsoleColor.DarkBlue);
+                                    ConsoleHelper.WriteColorLine($"銆恵commonStackerCrane.DeviceName}銆戝爢鍨涙満浠诲姟鍙凤細銆恵taskNum}銆戜换鍔′换鍔″彿锛氥�恵task.TaskNum}銆�", ConsoleColor.DarkBlue);
                                     if (taskNum == 0)
                                     {
-                                        ConsoleHelper.WriteColorLine($"銆恵commonStackerCrane.DeviceName}銆戜换鍔″彿涓恒�恵0}銆�,鎵樼洏鍙蜂笉涓�鑷村彲浠ヤ笅鍙戜换鍔�", ConsoleColor.DarkBlue);
+                                        ConsoleHelper.WriteColorLine($"銆恵commonStackerCrane.DeviceName}銆戜换鍔″彿涓恒�恵0}銆�,浠诲姟鍙蜂笉涓�鑷村彲浠ヤ笅鍙戜换鍔�", ConsoleColor.DarkBlue);
                                         bool sendFlag = commonStackerCrane.SendCommand(stackerCraneTaskCommand);
                                         if (sendFlag)
                                         {
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Common/StationManager/StationManager.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Common/StationManager/StationManager.cs
index 5251ee4..38f95f3 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Common/StationManager/StationManager.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Common/StationManager/StationManager.cs
@@ -9,21 +9,48 @@
     /// </summary>
     public enum StationManager
     {
+        /// <summary>
+        /// 鍏ュ簱鍙�
+        /// </summary>
         Inbound = 1,
+
+        /// <summary>
+        /// 鍑哄簱鍙�
+        /// </summary>
         Outbound,
-        AbnormalStation,   //鍒嗗鍑哄簱娈碉紙寮傚父鎺掑嚭鍙o級
-        NGTakeStation,
+
+        /// <summary>
+        /// 鍒嗗鍑哄簱娈碉紙寮傚父鎺掑嚭鍙o級
+        /// </summary>
+        AbnormalOutStation,   //鍒嗗鍑哄簱娈碉紙寮傚父鎺掑嚭鍙o級
+
+        /// <summary>
+        /// NG宸ョ珯鏀炬枡鍙�
+        /// </summary>
         NGPutStation,
+
+        /// <summary>
+        /// NG宸ョ珯鍙栨枡鍙�
+        /// </summary>
+        NGTakeStation,
+
+        /// <summary>
+        /// 绌烘鍏ュ簱鍙�
+        /// </summary>
         EmptyInbound,
+
+        /// <summary>
+        /// 绌烘鍑哄簱鍙�
+        /// </summary>
         EmptyOutbound,
 
-       
+
 
 
         /// <summary>
         /// 寮傚父鎺掑嚭鍙�(鍏ュ簱娈�)   --鍒嗗鍏ュ簱娈�
         /// </summary>
-        AbnormalInStation =15,
+        AbnormalInStation = 15,
 
         /// <summary>
         /// 娑堥槻绔欏彴
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MOM/CellState/TrayCellsStatusDto.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MOM/CellState/TrayCellsStatusDto.cs
index 3c6fa53..c566546 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MOM/CellState/TrayCellsStatusDto.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MOM/CellState/TrayCellsStatusDto.cs
@@ -11,7 +11,7 @@
     public string TrayBarcode { get; set; }
 
     /// <summary>
-    /// 涓婁紶绫诲瀷   1- OCV鍏ョ珯鍓嶈皟鐢�  2- OCV鍑虹珯鍚庤皟鐢� 3-锛� 4-鏅�氬嚭鍏ュ簱璋冪敤
+    /// 涓婁紶绫诲瀷   1- OCV鍏ョ珯鍓嶈皟鐢�  2- OCV鍑虹珯鍚庤皟鐢� 3-锛� 4-鏅�氬嚭鍏ュ簱璋冪敤 (濡傜┖妗嗗叆搴撳垯杩斿洖涓�:鏌ヨ鏃犵數鑺�)
     /// </summary>
     public string SceneType { get; set; } = "4";
 }
\ No newline at end of file
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs
index e6b102d..c7cc85b 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs
@@ -881,7 +881,6 @@
 
             var stockInfo = _stockInfoRepository.Db.Queryable<DtStockInfo>()
                     .Includes(x => x.LocationInfo) // 棰勫姞杞絃ocationInfo
-                    .Includes(x => x.StockInfoDetails) // 棰勫姞杞絊tockInfoDetails
                     .Where(x => x.AreaCode == "CWSC3" && x.IsFull == true) // 杩囨护鏉′欢
                     .Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock) // 杩囨护鏉′欢
                     .OrderBy(x => x.OutboundTime) // 鎺掑簭
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs
index ecc7227..d2bece9 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs
@@ -54,6 +54,20 @@
         //content = JsonConvert.DeserializeObject<WebResponseContent>(abc);
         //var num = content.Data.ObjToInt();
 
+        //濡傛灉褰撳墠搴撳唴瀛樺湪姣斿綋鍓嶆椂闂寸殑瀵瑰簲浜х嚎鐨勬枡 鍒欏叆搴撹嚦甯告俯3
+        DtStockInfo stockInfo = _stockInfoRepository.QueryFirst(x => x.AreaCode == "CWSC3" && x.IsFull == true && x.ProductionLine == input.ProductionLine && x.OutboundTime < DateTime.Now);
+        if (stockInfo != null)
+        {
+            var config = _configService.GetByConfigKey("SYS_InStacker", "CW3InStacker");
+            var strings = config.ConfigValue.Split(',').ToList();
+            // 鍏ュ簱閫佽嚦甯告俯3
+            var resultContent = await CreateNewTask(input, strings);
+            if (resultContent.Status)
+            {
+                await _boxingInfoRepository.AddDataNavAsync(boxing);
+            }
+            return resultContent;
+        }
 
         // TODO 鍒ゆ柇鍦ㄩ�旀暟閲�
         var count = BaseDal.QueryData(x => x.TargetAddress == stationManagers[0].Roadway).Count;

--
Gitblit v1.9.3