From 990afb24199ef1f7a4648728ac28ed74394e459c Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期二, 31 三月 2026 12:27:50 +0800
Subject: [PATCH] 任务服务优化与接口扩展,日志与配置调整

---
 Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/CodeChunks.db-shm              |    0 
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json                                                   |   88 ++++++++++-----------
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs                         |    2 
 Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/SemanticSymbols.db-wal         |    0 
 Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/CodeChunks.db-wal              |    0 
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs                                   |   53 ++++++++-----
 Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/SemanticSymbols.db             |    0 
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_NewCW/CommonConveyorLine_NewCWJob.cs                |    1 
 Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/CodeChunks.db-shm              |    0 
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskController.cs                                      |   18 ++++
 Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/SemanticSymbols.db-wal         |    0 
 Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/SemanticSymbols.db             |    0 
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_CW/CommonConveyorLine_CWJob.cs                      |   11 +-
 Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/CodeChunks.db                  |    0 
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageTaskService/Task/IDt_TaskService.cs                                  |    2 
 Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/CodeChunks.db                  |    0 
 Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/SemanticSymbols.db-shm         |    0 
 Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/CodeChunks.db-wal              |    0 
 Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/SemanticSymbols.db-shm         |    0 
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_ProcessService/obj/Debug/net6.0/WIDESEAWCS_ProcessService.AssemblyInfo.cs |    2 
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/RouterService.cs                                        |    8 +-
 21 files changed, 104 insertions(+), 81 deletions(-)

diff --git a/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/CodeChunks.db b/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/CodeChunks.db
index 610093d..03cb5fa 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/CodeChunks.db
+++ b/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/CodeChunks.db
Binary files differ
diff --git a/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/CodeChunks.db-shm b/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/CodeChunks.db-shm
index 07d4b7a..92dbe81 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/CodeChunks.db-shm
+++ b/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/CodeChunks.db-shm
Binary files differ
diff --git a/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/CodeChunks.db-wal b/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/CodeChunks.db-wal
index f1d7356..486f065 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/CodeChunks.db-wal
+++ b/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/CodeChunks.db-wal
Binary files differ
diff --git a/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/SemanticSymbols.db b/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/SemanticSymbols.db
index 0a56648..c7a6242 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/SemanticSymbols.db
+++ b/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/SemanticSymbols.db
Binary files differ
diff --git a/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/SemanticSymbols.db-shm b/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/SemanticSymbols.db-shm
index 52252df..7b97e6d 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/SemanticSymbols.db-shm
+++ b/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/SemanticSymbols.db-shm
Binary files differ
diff --git a/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/SemanticSymbols.db-wal b/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/SemanticSymbols.db-wal
index 069eb54..685d45f 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/SemanticSymbols.db-wal
+++ b/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.14.1569.27729/SemanticSymbols.db-wal
Binary files differ
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_ProcessService/obj/Debug/net6.0/WIDESEAWCS_ProcessService.AssemblyInfo.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_ProcessService/obj/Debug/net6.0/WIDESEAWCS_ProcessService.AssemblyInfo.cs
index ef9d7a9..cabcb05 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_ProcessService/obj/Debug/net6.0/WIDESEAWCS_ProcessService.AssemblyInfo.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_ProcessService/obj/Debug/net6.0/WIDESEAWCS_ProcessService.AssemblyInfo.cs
@@ -14,7 +14,7 @@
 [assembly: System.Reflection.AssemblyCompanyAttribute("WIDESEAWCS_ProcessService")]
 [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
 [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+29aa484d06b2d4839536034bb1033d0e60334ec2")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+02a4fdd78cef9c7d2a26bfb9aa187179cf0baac3")]
 [assembly: System.Reflection.AssemblyProductAttribute("WIDESEAWCS_ProcessService")]
 [assembly: System.Reflection.AssemblyTitleAttribute("WIDESEAWCS_ProcessService")]
 [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/RouterService.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/RouterService.cs
index daec327..32959d7 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/RouterService.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/RouterService.cs
@@ -84,12 +84,12 @@
         {
             // 鐢ㄤ簬璁板綍宸茬粡璁块棶杩囩殑璧风偣鍜岀粓鐐圭粍鍚堬紝閬垮厤閲嶅璁块棶杩涘叆姝诲惊鐜�
             HashSet<string> visitedRoutes = new HashSet<string>();
-            var stopwatch = Stopwatch.StartNew();
+            //var stopwatch = Stopwatch.StartNew();
             var rasult = QueryNextRoutesInternal(startPosi, endPosi, visitedRoutes);
             
-            stopwatch.Stop();
-            var elapsed = stopwatch.ElapsedMilliseconds;
-            QuartzLogger.WriteLogToFile("璺敱鏌ヨ", $"鏃堕暱{elapsed},璧风偣锛歿startPosi},缁堢偣{endPosi}");
+            //stopwatch.Stop();
+            //var elapsed = stopwatch.ElapsedMilliseconds;
+            //QuartzLogger.WriteLogToFile("璺敱鏌ヨ", $"鏃堕暱{elapsed},璧风偣锛歿startPosi},缁堢偣{endPosi}");
             return rasult;
         }
 
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_CW/CommonConveyorLine_CWJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_CW/CommonConveyorLine_CWJob.cs
index 0e755ba..314b55b 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_CW/CommonConveyorLine_CWJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_CW/CommonConveyorLine_CWJob.cs
@@ -151,9 +151,9 @@
 
                                     if (childDeviceCode == "1670" || childDeviceCode == "1666" || childDeviceCode == "1548" || childDeviceCode == "1448")
                                     {
-                                        if (lastUpdateTime > DateTime.Now.AddMinutes(1))
-                                        {
-                                            lastUpdateTime = DateTime.Now;
+                                        //if (lastUpdateTime > DateTime.Now.AddMinutes(1))
+                                        //{
+                                        //    lastUpdateTime = DateTime.Now;
                                             Platform platform = _platFormRepository.QueryFirst(x => x.DeviceCode == conveyorLine.DeviceCode && x.PlatCode == childDeviceCode && x.Status == "Active");
                                             if (platform != null)
                                             {
@@ -167,7 +167,7 @@
                                                     }
                                                 }
                                             }
-                                        }
+                                        //}
                                     }
 
                                     #region 璋冪敤浜嬩欢鎬荤嚎閫氱煡鍓嶇
@@ -643,10 +643,11 @@
                 List<string> strings = platform.Location.Split(',').ToList();
 
                 var result = await HttpHelper.PostAsync(wmsIpAddress, new { Position = childDeviceCode, Tag = (int)taskType, AreaCdoe = platform.Stacker, AreaCdoes = strings, platform.ProductionLine }.Serialize());
-                WriteInfo("OCV璇锋眰杩斿洖鍙傛暟", $"鏃堕棿锛氥�恵DateTime.Now}銆戣姹傜偣浣嶃�恵childDeviceCode}銆戣繑鍥炲弬鏁般�恵JsonConvert.SerializeObject(result)}銆�");
 
                 WebResponseContent content = JsonConvert.DeserializeObject<WebResponseContent>(result);
 
+                ConsoleHelper.WriteSuccessLine($"鏃堕棿锛氥�恵DateTime.Now}銆戣姹俉MS鍑哄簱浠诲姟杩斿洖缁撴灉锛氥�恵content.Serialize()}銆�");
+
                 // 妫�鏌ョ姸鎬佸苟杩斿洖
                 if (!content.Status)
                     return;
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 5ff0b39..0b9a5f2 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
@@ -345,7 +345,7 @@
                 }
                 else
                 {
-                    if (content.Message != "璇锋眰杩囦簬棰戠箒锛岃绋嶅悗鍐嶈瘯" && content.Message != "鏃犳硶鑾峰彇鐩爣鍦板潃")
+                    if (content.Message != "璇锋眰杩囦簬棰戠箒锛岃绋嶅悗鍐嶈瘯" && content.Message != "鏃犳硶鑾峰彇鐩爣鍦板潃" && !content.Message.Contains("瀛樺湪浠诲姟"))
                     {
                         WriteInfo(conveyorLine.DeviceName, content.Message);
                         conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, stationManager.stationNGChildCode, childDeviceCode);
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_NewCW/CommonConveyorLine_NewCWJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_NewCW/CommonConveyorLine_NewCWJob.cs
index d8df41f..8cc76bb 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_NewCW/CommonConveyorLine_NewCWJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_NewCW/CommonConveyorLine_NewCWJob.cs
@@ -530,7 +530,6 @@
                 List<string> strings = platform.Location.Split(',').ToList();
 
                 var result = await HttpHelper.PostAsync(wmsIpAddress, new { Position = childDeviceCode, Tag = (int)taskType, AreaCdoe = platform.Stacker, AreaCdoes = strings, platform.ProductionLine }.Serialize());
-                WriteInfo("OCV璇锋眰杩斿洖鍙傛暟", $"鏃堕棿锛氥�恵DateTime.Now}銆戣姹傜偣浣嶃�恵childDeviceCode}銆戣繑鍥炲弬鏁般�恵JsonConvert.SerializeObject(result)}銆�");
 
                 WebResponseContent content = JsonConvert.DeserializeObject<WebResponseContent>(result);
 
diff --git a/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/CodeChunks.db b/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/CodeChunks.db
index 0b8d94c..75ea823 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/CodeChunks.db
+++ b/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/CodeChunks.db
Binary files differ
diff --git a/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/CodeChunks.db-shm b/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/CodeChunks.db-shm
index 1346e5a..f2f7973 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/CodeChunks.db-shm
+++ b/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/CodeChunks.db-shm
Binary files differ
diff --git a/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/CodeChunks.db-wal b/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/CodeChunks.db-wal
index bc9bc66..bb51e43 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/CodeChunks.db-wal
+++ b/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/CodeChunks.db-wal
Binary files differ
diff --git a/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/SemanticSymbols.db b/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/SemanticSymbols.db
index 250e6e3..995c485 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/SemanticSymbols.db
+++ b/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/SemanticSymbols.db
Binary files differ
diff --git a/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/SemanticSymbols.db-shm b/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/SemanticSymbols.db-shm
index e17f42e..66eeed8 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/SemanticSymbols.db-shm
+++ b/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/SemanticSymbols.db-shm
Binary files differ
diff --git a/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/SemanticSymbols.db-wal b/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/SemanticSymbols.db-wal
index 615c1d6..ce72ce3 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/SemanticSymbols.db-wal
+++ b/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1569.27729/SemanticSymbols.db-wal
Binary files differ
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageTaskService/Task/IDt_TaskService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageTaskService/Task/IDt_TaskService.cs
index 2e46f1a..b8209d6 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageTaskService/Task/IDt_TaskService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageTaskService/Task/IDt_TaskService.cs
@@ -276,4 +276,6 @@
     /// </summary>
     /// <returns></returns>
     WebResponseContent GetLocationStatus();
+
+    Task<string> GetRoadWayAsync(List<string> process);
 }
\ 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 bce772b..8350e38 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
@@ -1060,17 +1060,17 @@
             }
 
             //var outBoundMateriel = AppSettings.app<OutBoundMateriel>("OutBoundMateriel");
-            var outBoundMateriel = _dt_ChangeoversRepository.QueryData(x => x.Status == "1").ToList();
+            //var outBoundMateriel = _dt_ChangeoversRepository.QueryData(x => x.Status == "1").ToList();
 
-            List<string>? materielCodes = outBoundMateriel.Count != 0
-                ? outBoundMateriel.Where(x => x.ProductionLine == productionLine && x.ProcessCode == area.AreaCode)
-                                  .Select(x => x.MaterielCode)
-                                  .ToList()
-                : null;
+            //List<string>? materielCodes = outBoundMateriel.Count != 0
+            //    ? outBoundMateriel.Where(x => x.ProductionLine == productionLine && x.ProcessCode == area.AreaCode)
+            //                      .Select(x => x.MaterielCode)
+            //                      .ToList()
+            //    : null;
 
-            var result = new DtStockInfo();
+            //DtStockInfo result = null;
 
-            var stockInfoList = await _stockInfoRepository.Db.Queryable<DtStockInfo>()
+            var result = await _stockInfoRepository.Db.Queryable<DtStockInfo>()
                             .Includes(x => x.LocationInfo)
                             //.Includes(x => x.StockInfoDetails)
                             .Where(x => x.AreaCode == areaCode && x.OutboundTime < DateTime.Now && x.IsFull)
@@ -1079,19 +1079,19 @@
                             .Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && x.LocationInfo.AreaId == area.AreaID && x.LocationInfo.EnalbeStatus == (int)EnableEnum.Enable)
                             //.WhereIF(!materielCodes.IsNullOrEmpty(), x => x.StockInfoDetails.Any(y => materielCodes.Contains(y.MaterielCode)))
                             .OrderBy(x => x.OutboundTime)
-                            .ToListAsync();
-            foreach (var stock in stockInfoList)
-            {
-                var hasMatchingDetail = await _stockInfoRepository.Db.Queryable<DtStockInfoDetail>()
-                    .Where(d => d.StockId == stock.Id && materielCodes.Contains(d.MaterielCode))
-                    .AnyAsync();
+                            .FirstAsync();
+            //foreach (var stock in stockInfoList)
+            //{
+            //    var hasMatchingDetail = await _stockInfoRepository.Db.Queryable<DtStockInfoDetail>()
+            //        .Where(d => d.StockId == stock.Id && materielCodes.Contains(d.MaterielCode))
+            //        .AnyAsync();
 
-                if (hasMatchingDetail)
-                {
-                    result = stock;
-                    break;
-                }
-            }
+            //    if (hasMatchingDetail)
+            //    {
+            //        result = stock;
+            //        break;
+            //    }
+            //}
 
             if (result.IsNullOrEmpty())
                 ConsoleHelper.WriteErrorLine($"{area.AreaName}-{productionLine}鏌ヨ瀹炵洏搴撳瓨淇℃伅澶辫触:鏈壘鍒扮鍚堟潯浠剁殑鏁版嵁");
@@ -1597,6 +1597,13 @@
                 ConsoleHelper.WriteErrorLine(content.ToJsonString());
                 var result = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(content.Data.ToString());
                 if (result == null || !result.Success) return content.Error(result?.MOMMessage ?? "Deserialization error");
+
+                List<string> strings = station.productLine.Split(",").ToList();
+                if (!result.ProductionLine.Contains(strings))
+                {
+                    ConsoleHelper.WriteErrorLine($"鎵樼洏鍙枫�恵palletCode}銆戣姹備骇绾裤�恵result.ProductionLine}銆戜笉鍏佽鍏ャ�恵station.Roadway}銆�");
+                    return content.Error($"鎵樼洏鍙枫�恵palletCode}銆戣姹備骇绾裤�恵result.ProductionLine}銆戜笉鍏佽鍏ャ�恵station.Roadway}銆�");
+                }
 
                 if (result.SerialNos.Count > 0)
                 {
@@ -2328,7 +2335,7 @@
              .Where(x => x.DeviceStatus == 1.ToString() && process.Contains(x.DeviceCode))
              .Select(x => x.DeviceCode).ToListAsync();
 
-        var minGroup = _locationRepository.QueryData(x => deviceCode.Contains(x.RoadwayNo) && x.LocationStatus == (int)LocationEnum.Free)
+        var minGroup = _locationRepository.QueryData(x => deviceCode.Contains(x.RoadwayNo) && x.LocationStatus == (int)LocationEnum.Free && x.EnalbeStatus == (int)EnableEnum.Enable)
              .GroupBy(x => x.RoadwayNo)
              .OrderByDescending(g => g.Count()) // 鏍规嵁姣忎釜缁勭殑鍏冪礌鏁伴噺鎺掑簭
              .ToList(); // 鍙栧嚭鏁伴噺鏈�澶氱殑缁�
@@ -2337,6 +2344,10 @@
         foreach (var item in minGroup)
         {
             var number = BaseDal.QueryData(x => x.TargetAddress == item.Key).Count();
+            if (item.Count() - number <= 0)
+            {
+                continue;
+            }
             result.Add(item.Key, item.Count() - number);
         }
 
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskController.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskController.cs
index a510ec9..769e109 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskController.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskController.cs
@@ -1,4 +1,8 @@
-锘縰sing WIDESEA_DTO;
+锘縰sing WIDESEA_Core.BaseRepository;
+using WIDESEA_DTO;
+using WIDESEA_IStorageBasicRepository;
+using WIDESEA_IStorageTaskRepository;
+using WIDESEAWCS_QuartzJob.Models;
 
 namespace WIDESEA_WMSServer.Controllers;
 
@@ -12,14 +16,18 @@
     private readonly IHttpContextAccessor _httpContextAccessor;
     private readonly IDt_TaskService _taskService;
     private readonly ILocationInfoService _locationService;
+    private readonly ILocationInfoRepository _locationRepository;
+    private readonly IDt_TaskRepository BaseDal;
 
     public TaskController(IDt_TaskService taskService,
         IHttpContextAccessor httpContextAccessor,
-        ILocationInfoService locationService) : base(taskService)
+        ILocationInfoService locationService, ILocationInfoRepository locationInfoRepository,IDt_TaskRepository repository) : base(taskService)
     {
         _httpContextAccessor = httpContextAccessor;
         _taskService = taskService;
         _locationService = locationService;
+        _locationRepository = locationInfoRepository;
+        BaseDal = repository;
     }
 
     /// <summary>
@@ -270,4 +278,10 @@
     {
         return Service.GetLocationStatus();
     }
+
+    [HttpPost, AllowAnonymous, Route("GetRoadWayAsync")]
+    public async Task<string> GetRoadWayAsync(List<string> process)
+    {
+        return await Service.GetRoadWayAsync(process);
+    }
 }
\ No newline at end of file
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
index 9003829..11e32e0 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
@@ -1,49 +1,45 @@
 {
-    "Logging": {
-        "LogLevel": {
-            "Default": "Information",
-            "Microsoft.AspNetCore": "Warning"
-        }
-    },
-    "AllowedHosts": "*",
-    "urls": "http://*:5000",
-    "MainDB": "DB_WIDESEA", //褰撳墠椤圭洰鐨勪富搴擄紝鎵�瀵瑰簲鐨勮繛鎺ュ瓧绗︿覆鐨凟nabled蹇呴』涓簍rue
-    //杩炴帴瀛楃涓�
-    //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=",
-    //"ConnectionString": "Data Source=192.168.15.253;Initial Catalog=WIDESEA_WMSDB_BBMain;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.20.253;Initial Catalog=WIDESEA_WMSDB;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
-    //"ConnectionString": "Data Source=.\\LIULEI;Initial Catalog=WIDESEA_WMSDB_BBMain;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
-    //"ConnectionString": "Data Source=192.168.20.251;Initial Catalog=WIDESEA_WMSDB;User ID=sa;Password=123456@gy;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
-    //"ConnectionStringWCS": "Data Source=192.168.15.253;Initial Catalog=WIDESEA_WCSDB_BBMain;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
-    "ConnectionStringWCS": "Data Source=192.168.20.253;Initial Catalog=WIDESEA_WCSDB;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
-    //璺ㄥ煙
-    "Cors": {
-        "PolicyName": "CorsIpAccess", //绛栫暐鍚嶇О
-        "EnableAllIPs": true, //褰撲负true鏃讹紝寮�鏀炬墍鏈塈P鍧囧彲璁块棶銆�
-        // 鏀寔澶氫釜鍩熷悕绔彛锛屾敞鎰忕鍙e彿鍚庝笉瑕佸甫/鏂滄潌锛氭瘮濡俵ocalhost:8000/锛屾槸閿欑殑
-        // 娉ㄦ剰锛宧ttp://127.0.0.1:1818 鍜� http://localhost:1818 鏄笉涓�鏍风殑
-        "IPs": "http://127.0.0.1:8080,http://localhost:8080,http://127.0.0.1:8081,http://localhost:8081"
-    },
-    "ApiName": "WIDESEA",
-    "ExpMinutes": 120,
+  "Logging": {
+    "LogLevel": {
+      "Default": "Information",
+      "Microsoft.AspNetCore": "Warning"
+    }
+  },
+  "AllowedHosts": "*",
+  "urls": "http://*:5000",
+  "MainDB": "DB_WIDESEA", //褰撳墠椤圭洰鐨勪富搴擄紝鎵�瀵瑰簲鐨勮繛鎺ュ瓧绗︿覆鐨凟nabled蹇呴』涓簍rue
+  //杩炴帴瀛楃涓�
+  //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=",
+  "ConnectionString": "Data Source=.;Initial Catalog=WIDESEA_WMSDB_BBMain;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+  "ConnectionStringWCS": "Data Source=192.168.20.253;Initial Catalog=WIDESEA_WCSDB;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+  //璺ㄥ煙
+  "Cors": {
+    "PolicyName": "CorsIpAccess", //绛栫暐鍚嶇О
+    "EnableAllIPs": true, //褰撲负true鏃讹紝寮�鏀炬墍鏈塈P鍧囧彲璁块棶銆�
+    // 鏀寔澶氫釜鍩熷悕绔彛锛屾敞鎰忕鍙e彿鍚庝笉瑕佸甫/鏂滄潌锛氭瘮濡俵ocalhost:8000/锛屾槸閿欑殑
+    // 娉ㄦ剰锛宧ttp://127.0.0.1:1818 鍜� http://localhost:1818 鏄笉涓�鏍风殑
+    "IPs": "http://127.0.0.1:8080,http://localhost:8080,http://127.0.0.1:8081,http://localhost:8081"
+  },
+  "ApiName": "WIDESEA",
+  "ExpMinutes": 120,
 
-    // 闇�瑕佺Щ搴撶殑琛�
-    "TransfertRows": "1,4,5,8",
-    "CacheSettings": {
-        "UseRedis": false,
-        "RedisSettings": {
-            "Address": "127.0.0.1:6379",
-            "Password": "123456",
-            "Db": 9,
-            "ClearRedis": true
-        }
-    },
-    // 鍏佽鍑哄簱鐨勭紪鐮�
-    "OutBoundMateriel": [
-        //{
-        //    "MaterielCode": "CC01050001348",
-        //    "ProductionLine": "ZJ-8",
-        //    "ProcessCode": "CH001"
-        //}
-    ]
+  // 闇�瑕佺Щ搴撶殑琛�
+  "TransfertRows": "1,4,5,8",
+  "CacheSettings": {
+    "UseRedis": false,
+    "RedisSettings": {
+      "Address": "127.0.0.1:6379",
+      "Password": "123456",
+      "Db": 9,
+      "ClearRedis": true
+    }
+  },
+  // 鍏佽鍑哄簱鐨勭紪鐮�
+  "OutBoundMateriel": [
+    //{
+    //    "MaterielCode": "CC01050001348",
+    //    "ProductionLine": "ZJ-8",
+    //    "ProcessCode": "CH001"
+    //}
+  ]
 }

--
Gitblit v1.9.3