From b8cd98f0a2d8a7e644563eb67d4c88371279a729 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <1247017146@qq.com>
Date: 星期三, 09 四月 2025 10:17:23 +0800
Subject: [PATCH] 1

---
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs |   12 +++++
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Common/HttpClient/HttpsClient.cs                  |    2 
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/ProcessParameters/Platform.cs     |    9 ++++
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs        |   44 +++++++++++++++++++++-
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/Const/ConfigConst.cs                         |    5 ++
 Code Management/WCS/WIDESEAWCS_Client/src/api/http.js                                           |    2 
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Helper/HttpHelper.cs                      |    2 
 7 files changed, 70 insertions(+), 6 deletions(-)

diff --git a/Code Management/WCS/WIDESEAWCS_Client/src/api/http.js b/Code Management/WCS/WIDESEAWCS_Client/src/api/http.js
index a92c0c7..084d5c7 100644
--- a/Code Management/WCS/WIDESEAWCS_Client/src/api/http.js
+++ b/Code Management/WCS/WIDESEAWCS_Client/src/api/http.js
@@ -20,7 +20,7 @@
 }
 
 else if (process.env.NODE_ENV == 'production') {
-    axios.defaults.baseURL = 'http://192.168.20.253:9291/';
+    axios.defaults.baseURL = 'http://192.168.15.253:9291/';
 }
 if (!axios.defaults.baseURL.endsWith('/')) {
     axios.defaults.baseURL+="/";
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Helper/HttpHelper.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Helper/HttpHelper.cs
index 8b31e8c..91f38e6 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Helper/HttpHelper.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Helper/HttpHelper.cs
@@ -60,7 +60,7 @@
                     // 妫�鏌ヨ姹傛鏁板拰鏃堕棿闄愬埗
                     if (requestTracker.TryGetValue(requestKey, out var requestInfo))
                     {
-                        if (requestInfo.Count >= 5 && DateTime.Now < requestInfo.LastRequestTime.AddMinutes(10))
+                        if (requestInfo.Count >= 5 && DateTime.Now < requestInfo.LastRequestTime.AddMinutes(3))
                         {
                             // 濡傛灉璇锋眰娆℃暟瓒呰繃闄愬埗涓旀湭瓒呰繃10鍒嗛挓锛屾姏鍑哄紓甯�
                             throw new InvalidOperationException("璇锋眰娆℃暟宸茶揪鍒伴檺鍒讹紝璇风◢鍚庡啀璇曘��");
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/ProcessParameters/Platform.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/ProcessParameters/Platform.cs
index b99d08d..c7391c7 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/ProcessParameters/Platform.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/ProcessParameters/Platform.cs
@@ -99,6 +99,15 @@
         [ExporterHeader(DisplayName = "鐢熶骇浜х嚎")]
         [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "鐢熶骇浜х嚎")]
         public string ProductionLine { get; set; }
+
+        /// <summary>
+        /// 宸烽亾
+        /// </summary>
+        [ImporterHeader(Name = "宸烽亾")]
+        [ExporterHeader(DisplayName = "宸烽亾")]
+        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "宸烽亾")]
+        public string Roadway { get; set; }
         
+
     }
 }
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
index 23dc750..19b2a12 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
@@ -23,6 +23,7 @@
 using WIDESEAWCS_QuartzJob;
 using WIDESEAWCS_QuartzJob.DeviceBase;
 using WIDESEAWCS_QuartzJob.DTO;
+using WIDESEAWCS_QuartzJob.Models;
 using WIDESEAWCS_QuartzJob.Repository;
 using WIDESEAWCS_QuartzJob.Service;
 using WIDESEAWCS_SignalR;
@@ -768,7 +769,16 @@
                 }
                 var wmsIpAddress = wmsBase + requestTrayOutTask;
 
-                var device = _deviceInfoRepository.QueryData(x => x.DeviceStatus == "1");
+                List<string> strings = platform.Roadway.Split(',').ToList();
+                List<Dt_DeviceInfo> device;
+                if (strings.Count > 0)
+                {
+                    device = _deviceInfoRepository.QueryData(x => x.DeviceStatus == "1" && strings.Contains(x.DeviceCode));
+                }
+                else
+                {
+                    device = _deviceInfoRepository.QueryData(x => x.DeviceStatus == "1");
+                }
                 var deviceCode = device.Select(x => x.DeviceCode).ToList();
 
                 // 鍙戦�丠TTP POST璇锋眰鑾峰彇浠诲姟鏁版嵁
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Common/HttpClient/HttpsClient.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Common/HttpClient/HttpsClient.cs
index 4058397..332ae9a 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Common/HttpClient/HttpsClient.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Common/HttpClient/HttpsClient.cs
@@ -54,7 +54,7 @@
         // 妫�鏌ヨ姹傛鏁板拰鏃堕棿闄愬埗
         if (requestTracker.TryGetValue(requestKey, out var requestInfo))
         {
-            if (requestInfo.Count >= 5 && DateTime.Now < requestInfo.LastRequestTime.AddMinutes(10))
+            if (requestInfo.Count >= 5 && DateTime.Now < requestInfo.LastRequestTime.AddMinutes(3))
             {
                 // 濡傛灉璇锋眰娆℃暟瓒呰繃闄愬埗涓旀湭瓒呰繃10鍒嗛挓锛屾姏鍑哄紓甯�
                 throw new InvalidOperationException("璇锋眰娆℃暟宸茶揪鍒伴檺鍒讹紝璇风◢鍚庡啀璇曘��");
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/Const/ConfigConst.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/Const/ConfigConst.cs
index 7f0c418..eab5c38 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/Const/ConfigConst.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/Const/ConfigConst.cs
@@ -146,5 +146,10 @@
         /// 鏄惁鍏ュ簱绌烘墭鐩�
         /// </summary>
         public const string InboundIsEmpty = "InboundIsEmpty";
+
+        public const string CHInboundEmptyProductLineOne = "CHInboundEmptyProductLineOne";
+
+
+        public const string CHInboundEmptyProductLineTwo = "CHInboundEmptyProductLineTwo";
     }
 }
\ No newline at end of file
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
index f497bd2..3b62b3b 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
@@ -819,7 +819,39 @@
                 if (stationManagers == null)
                     throw new Exception("鏈壘鍒扮┖鎵樼洏鍏ュ簱绔欏彴鍜屽叆搴撶珯鍙伴厤缃�");
             }
-            List<string> strings = stationManagers.Roadway.Split(',').ToList();
+            List<string> strings;
+            if (input.Position == "1016-3")
+            {
+                var configOne = _configService.GetByConfigKey(CateGoryConst.CONFIG_SYS_InStacker, SysConfigConst.CHInboundEmptyProductLineOne);
+                var configTwo = _configService.GetByConfigKey(CateGoryConst.CONFIG_SYS_InStacker, SysConfigConst.CHInboundEmptyProductLineTwo);
+
+                List<string>  productLineconfigOne = configOne.ConfigValue.Split(',').ToList();
+                List<string>  productLineconfigTwo = configTwo.ConfigValue.Split(',').ToList();
+
+                if (productLineconfigOne.Count == 0 && productLineconfigTwo.Count() == 0)
+                {
+                    ConsoleHelper.WriteErrorLine($"鏈壘鍒伴厤缃枃浠朵骇绾块厤缃�");
+                    return content.Error("鏈壘鍒伴厤缃枃浠朵骇绾块厤缃�");
+                }
+                if (productLineconfigOne.Contains(result.ProductionLine))
+                {
+                    strings = configOne.Remark.Split(',').ToList();
+                }
+                else if (productLineconfigTwo.Contains(result.ProductionLine))
+                {
+                    strings = configTwo.Remark.Split(',').ToList();
+                }
+                else
+                {
+                    ConsoleHelper.WriteErrorLine($"鏈壘鍒皗result.ProductionLine}瀵瑰簲閰嶇疆宸烽亾");
+                    return content.Error($"鏈壘鍒皗result.ProductionLine}瀵瑰簲閰嶇疆宸烽亾");
+                }   
+            }
+            else
+            {
+                strings = stationManagers.Roadway.Split(',').ToList();
+            }
+             
 
             return await CreateNewTask(input, result.ProductionLine, result.ProcessCode, strings, 1);
         }
@@ -1231,7 +1263,15 @@
             if (stockInfo.AreaCode.Contains("CH"))
             {
                 // 鍒涘缓骞舵坊鍔犱换鍔″埌鏁版嵁搴�
-                task = CreateTask(stockInfo, "1020-1", taskType);
+                if(stockInfo.LocationInfo.RoadwayNo=="CHSC1"|| stockInfo.LocationInfo.RoadwayNo == "CHSC2"|| stockInfo.LocationInfo.RoadwayNo == "CHSC3")
+                {
+                    task = CreateTask(stockInfo, "1020-1", taskType);
+                }
+                else
+                {
+                    task = CreateTask(stockInfo, "1049-1", taskType);
+                }
+                
             }
             else
             {

--
Gitblit v1.9.3