From 7dbf72fde7069ecbe54ce7c2133eaa16424246b5 Mon Sep 17 00:00:00 2001
From: 陈勇 <chenyong@hnkhzn.com>
Date: 星期二, 19 十一月 2024 10:13:40 +0800
Subject: [PATCH] 实盘空托盘查找修改

---
 /dev/null                                                                                                   |    3 ---
 .gitignore                                                                                                  |   12 ++++++++++++
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs                    |   26 ++++++++++++++++----------
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_After/CommonConveyorLine_AfterJob.cs |    2 +-
 4 files changed, 29 insertions(+), 14 deletions(-)

diff --git a/.gitignore b/.gitignore
index 3c927c1..f6a26e8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1339,3 +1339,15 @@
 /Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/obj/Debug/net6.0/staticwebassets.build.endpoints.json
 /Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/obj/Debug/net6.0/staticwebassets.references.upToDateCheck.txt
 /Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/obj/Debug/net6.0/staticwebassets.upToDateCheck.txt
+/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/bin/Debug/net6.0/WIDESEA_WMSServer.staticwebassets.endpoints.json
+/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/Debug/net6.0/EndpointInfo/WIDESEA_WMSServer.OpenApiFiles.cache
+/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/Debug/net6.0/EndpointInfo/WIDESEA_WMSServer_V1.json
+/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/Debug/net6.0/EndpointInfo/WIDESEA_WMSServer_V2.json
+/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/Debug/net6.0/staticwebassets/msbuild.build.WIDESEA_WMSServer.props
+/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/Debug/net6.0/staticwebassets/msbuild.WIDESEA_WMSServer.Microsoft.AspNetCore.StaticWebAssetEndpoints.props
+/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/Debug/net6.0/staticwebassets/msbuild.WIDESEA_WMSServer.Microsoft.AspNetCore.StaticWebAssets.props
+/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/Debug/net6.0/staticwebassets.build.endpoints.json
+/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/Debug/net6.0/staticwebassets.references.upToDateCheck.txt
+/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/Debug/net6.0/staticwebassets.upToDateCheck.txt
+/Code Management/WMS/WIDESEA_WMSServer/LogLibrary/obj/Debug/net6.0/LogLibrary.csproj.CoreCompileInputs.cache
+/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStoragIntegrationServices/obj/Debug/net6.0/WIDESEA_IStoragIntegrationServices.csproj.FileListAbsolute.txt
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_After/CommonConveyorLine_AfterJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_After/CommonConveyorLine_AfterJob.cs
index 99de6e7..5349d1a 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_After/CommonConveyorLine_AfterJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_After/CommonConveyorLine_AfterJob.cs
@@ -113,7 +113,7 @@
             if (taskNew == null)
             {
                 string barcode = command.ConveyorLineBarcode.TrimEnd();
-                if (_taskService.RequestWMSTask(command.ConveyorLineBarcode, childDeviceCode).Status)
+                if (_taskService.RequestWMSTask(command.ConveyorLineBarcode, childDeviceCode).Result.Status)
                 {
                     Dt_Task task = _taskService.QueryConveyorLineTask(conveyorLine.DeviceCode, childDeviceCode);
                     if (task != null)
diff --git a/Code Management/WMS/WIDESEA_WMSServer/LogLibrary/obj/Debug/net6.0/LogLibrary.csproj.CoreCompileInputs.cache b/Code Management/WMS/WIDESEA_WMSServer/LogLibrary/obj/Debug/net6.0/LogLibrary.csproj.CoreCompileInputs.cache
deleted file mode 100644
index ec6296a..0000000
--- a/Code Management/WMS/WIDESEA_WMSServer/LogLibrary/obj/Debug/net6.0/LogLibrary.csproj.CoreCompileInputs.cache
+++ /dev/null
@@ -1 +0,0 @@
-c2e706d526dea4588536f14b56120b6a531ab05f183534fe8cec64c7261fcb32
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStoragIntegrationServices/obj/Debug/net6.0/WIDESEA_IStoragIntegrationServices.csproj.FileListAbsolute.txt b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStoragIntegrationServices/obj/Debug/net6.0/WIDESEA_IStoragIntegrationServices.csproj.FileListAbsolute.txt
deleted file mode 100644
index 360513e..0000000
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStoragIntegrationServices/obj/Debug/net6.0/WIDESEA_IStoragIntegrationServices.csproj.FileListAbsolute.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_IStoragIntegrationServices.deps.json
-D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_IStoragIntegrationServices.dll
-D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_IStoragIntegrationServices.pdb
-D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\LogLibrary.dll
-D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_Common.dll
-D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_Core.dll
-D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_DTO.dll
-D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_Model.dll
-D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_DTO.pdb
-D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_Common.pdb
-D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_Core.pdb
-D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_Model.pdb
-D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\WIDESEA_IStoragIntegrationServices.csproj.AssemblyReference.cache
-D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\WIDESEA_IStoragIntegrationServices.GeneratedMSBuildEditorConfig.editorconfig
-D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\WIDESEA_IStoragIntegrationServices.AssemblyInfoInputs.cache
-D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\WIDESEA_IStoragIntegrationServices.AssemblyInfo.cs
-D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\WIDESEA_IStoragIntegrationServices.csproj.CoreCompileInputs.cache
-D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\WIDESEA_.C6492554.Up2Date
-D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\WIDESEA_IStoragIntegrationServices.dll
-D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\refint\WIDESEA_IStoragIntegrationServices.dll
-D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\WIDESEA_IStoragIntegrationServices.pdb
-D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\ref\WIDESEA_IStoragIntegrationServices.dll
-E:\Code\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_IStoragIntegrationServices.deps.json
-E:\Code\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_IStoragIntegrationServices.dll
-E:\Code\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_IStoragIntegrationServices.pdb
-E:\Code\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\LogLibrary.dll
-E:\Code\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_Common.dll
-E:\Code\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_Core.dll
-E:\Code\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_DTO.dll
-E:\Code\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_Model.dll
-E:\Code\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_DTO.pdb
-E:\Code\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_Common.pdb
-E:\Code\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_Core.pdb
-E:\Code\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_Model.pdb
-E:\Code\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\WIDESEA_IStoragIntegrationServices.csproj.AssemblyReference.cache
-E:\Code\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\WIDESEA_IStoragIntegrationServices.GeneratedMSBuildEditorConfig.editorconfig
-E:\Code\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\WIDESEA_IStoragIntegrationServices.AssemblyInfoInputs.cache
-E:\Code\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\WIDESEA_IStoragIntegrationServices.AssemblyInfo.cs
-E:\Code\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\WIDESEA_IStoragIntegrationServices.csproj.CoreCompileInputs.cache
-E:\Code\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\WIDESEA_.C6492554.Up2Date
-E:\Code\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\WIDESEA_IStoragIntegrationServices.dll
-E:\Code\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\refint\WIDESEA_IStoragIntegrationServices.dll
-E:\Code\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\WIDESEA_IStoragIntegrationServices.pdb
-E:\Code\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\ref\WIDESEA_IStoragIntegrationServices.dll
-F:\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_IStoragIntegrationServices.deps.json
-F:\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_IStoragIntegrationServices.dll
-F:\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_IStoragIntegrationServices.pdb
-F:\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\LogLibrary.dll
-F:\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_Common.dll
-F:\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_Core.dll
-F:\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_DTO.dll
-F:\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_Model.dll
-F:\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_DTO.pdb
-F:\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_Common.pdb
-F:\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_Core.pdb
-F:\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\bin\Debug\net6.0\WIDESEA_Model.pdb
-F:\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\WIDESEA_IStoragIntegrationServices.csproj.AssemblyReference.cache
-F:\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\WIDESEA_IStoragIntegrationServices.GeneratedMSBuildEditorConfig.editorconfig
-F:\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\WIDESEA_IStoragIntegrationServices.AssemblyInfoInputs.cache
-F:\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\WIDESEA_IStoragIntegrationServices.AssemblyInfo.cs
-F:\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\WIDESEA_IStoragIntegrationServices.csproj.CoreCompileInputs.cache
-F:\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\WIDESEA_.C6492554.Up2Date
-F:\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\WIDESEA_IStoragIntegrationServices.dll
-F:\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\refint\WIDESEA_IStoragIntegrationServices.dll
-F:\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\WIDESEA_IStoragIntegrationServices.pdb
-F:\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_IStoragIntegrationServices\obj\Debug\net6.0\ref\WIDESEA_IStoragIntegrationServices.dll
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 177bc6e..7143a2d 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
@@ -1,6 +1,7 @@
 锘縰sing log4net.Core;
 using Mapster;
 using Masuit.Tools;
+using Masuit.Tools.Models;
 using WIDESEA_DTO.MOM;
 using WIDESEA_DTO.WMS;
 using WIDESEA_IStorageBasicRepository;
@@ -804,12 +805,15 @@
         //return _stockInfoRepository.QueryFirstNavAsync(x => x.AreaCode == areaCode && Convert.ToDateTime(x.LinedProcessFeedbackTime).AddHours(Convert.ToDouble(x.SpecialParameterDuration)) < DateTime.Now
         //                        && x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && roadways.Contains(x.LocationInfo.RoadwayNo) && x.StockInfoDetails.Any(x => x.Status == (int)StockStateEmun.宸插叆搴�) && x.LocationInfo.LocationStatus == (int)LocationEnum.InStock).Result;
 
-        var result = await _stockInfoRepository.QueryFirstNavAsync(x =>
+        var result = await _stockInfoRepository.Db.Queryable<DtStockInfo>().Where(x =>
             x.AreaCode == areaCode &&
-            Convert.ToDateTime(x.LinedProcessFeedbackTime).AddHours(Convert.ToDouble(x.SpecialParameterDuration)) < DateTime.Now &&
-            x.LocationInfo != null && x.LocationInfo.LocationStatus == (int)LocationEnum.InStock &&
-            roadways.Contains(x.LocationInfo.RoadwayNo) &&
-            x.StockInfoDetails != null && x.StockInfoDetails.Any(detail => detail.Status == (int)StockStateEmun.宸插叆搴�));
+            Convert.ToDateTime(x.LinedProcessFeedbackTime).AddHours(Convert.ToDouble(x.SpecialParameterDuration)) < DateTime.Now)
+            .Includes(x => x.LocationInfo)
+            .Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && roadways.Contains(x.LocationInfo.RoadwayNo))
+            .Includes(x => x.StockInfoDetails)
+            .Where(x => x.StockInfoDetails.Any(detail => detail.Status == (int)StockStateEmun.宸插叆搴�))
+            .OrderBy(x => x.CreateDate)
+            .FirstAsync();
         return result;
     }
 
@@ -819,11 +823,13 @@
     private async Task<DtStockInfo> QueryStockInfoForEmptyTrayAsync(string areaCode, List<string> roadways)
     {
         //return _stockInfoRepository.QueryFirstNavAsync(x => x.StockInfoDetails.Any(x => x.MaterielCode == "绌烘墭鐩�") && roadways.Contains(x.LocationInfo.RoadwayNo) && x.StockInfoDetails.Any(x => x.Status == (int)StockStateEmun.宸插叆搴�) && x.LocationInfo.LocationStatus == (int)LocationEnum.InStock).Result;
-        var result = await _stockInfoRepository.QueryFirstNavAsync(x =>
-            x.StockInfoDetails != null && x.StockInfoDetails.Any(detail => detail.MaterielCode == "绌烘墭鐩�") &&
-            roadways.Contains(x.LocationInfo.RoadwayNo) &&
-            x.StockInfoDetails.Any(detail => detail.Status == (int)StockStateEmun.宸插叆搴�) &&
-            x.LocationInfo != null && x.LocationInfo.LocationStatus == (int)LocationEnum.InStock);
+        var result = await _stockInfoRepository.Db.Queryable<DtStockInfo>()
+            .Includes(x => x.LocationInfo)
+            .Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && roadways.Contains(x.LocationInfo.RoadwayNo))
+            .Includes(x => x.StockInfoDetails)
+            .Where(x => x.StockInfoDetails.Any(detail => detail.Status == (int)StockStateEmun.宸插叆搴� && detail.MaterielCode == "绌烘墭鐩�"))
+            .OrderBy(x => x.CreateDate)
+            .FirstAsync();
         return result;
     }
 
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/Debug/net6.0/staticwebassets/msbuild.WIDESEA_WMSServer.Microsoft.AspNetCore.StaticWebAssets.props b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/Debug/net6.0/staticwebassets/msbuild.WIDESEA_WMSServer.Microsoft.AspNetCore.StaticWebAssets.props
deleted file mode 100644
index ebe7b1c..0000000
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/Debug/net6.0/staticwebassets/msbuild.WIDESEA_WMSServer.Microsoft.AspNetCore.StaticWebAssets.props
+++ /dev/null
@@ -1,84 +0,0 @@
-锘�<Project>
-  <ItemGroup>
-    <StaticWebAsset Include="$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\css\style.css))">
-      <SourceType>Package</SourceType>
-      <SourceId>WIDESEA_WMSServer</SourceId>
-      <ContentRoot>$(MSBuildThisFileDirectory)..\staticwebassets\</ContentRoot>
-      <BasePath>_content/WIDESEA_WMSServer</BasePath>
-      <RelativePath>css/style.css</RelativePath>
-      <AssetKind>All</AssetKind>
-      <AssetMode>All</AssetMode>
-      <AssetRole>Primary</AssetRole>
-      <RelatedAsset></RelatedAsset>
-      <AssetTraitName></AssetTraitName>
-      <AssetTraitValue></AssetTraitValue>
-      <CopyToOutputDirectory>Never</CopyToOutputDirectory>
-      <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
-      <OriginalItemSpec>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\css\style.css))</OriginalItemSpec>
-    </StaticWebAsset>
-    <StaticWebAsset Include="$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\js\anime.min.js))">
-      <SourceType>Package</SourceType>
-      <SourceId>WIDESEA_WMSServer</SourceId>
-      <ContentRoot>$(MSBuildThisFileDirectory)..\staticwebassets\</ContentRoot>
-      <BasePath>_content/WIDESEA_WMSServer</BasePath>
-      <RelativePath>js/anime.min.js</RelativePath>
-      <AssetKind>All</AssetKind>
-      <AssetMode>All</AssetMode>
-      <AssetRole>Primary</AssetRole>
-      <RelatedAsset></RelatedAsset>
-      <AssetTraitName></AssetTraitName>
-      <AssetTraitValue></AssetTraitValue>
-      <CopyToOutputDirectory>Never</CopyToOutputDirectory>
-      <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
-      <OriginalItemSpec>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\js\anime.min.js))</OriginalItemSpec>
-    </StaticWebAsset>
-    <StaticWebAsset Include="$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\swg-login.html))">
-      <SourceType>Package</SourceType>
-      <SourceId>WIDESEA_WMSServer</SourceId>
-      <ContentRoot>$(MSBuildThisFileDirectory)..\staticwebassets\</ContentRoot>
-      <BasePath>_content/WIDESEA_WMSServer</BasePath>
-      <RelativePath>swg-login.html</RelativePath>
-      <AssetKind>All</AssetKind>
-      <AssetMode>All</AssetMode>
-      <AssetRole>Primary</AssetRole>
-      <RelatedAsset></RelatedAsset>
-      <AssetTraitName></AssetTraitName>
-      <AssetTraitValue></AssetTraitValue>
-      <CopyToOutputDirectory>Never</CopyToOutputDirectory>
-      <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
-      <OriginalItemSpec>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\swg-login.html))</OriginalItemSpec>
-    </StaticWebAsset>
-    <StaticWebAsset Include="$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\WIDESEA_DB.DBSeed.Json\Sys_Menu.tsv))">
-      <SourceType>Package</SourceType>
-      <SourceId>WIDESEA_WMSServer</SourceId>
-      <ContentRoot>$(MSBuildThisFileDirectory)..\staticwebassets\</ContentRoot>
-      <BasePath>_content/WIDESEA_WMSServer</BasePath>
-      <RelativePath>WIDESEA_DB.DBSeed.Json/Sys_Menu.tsv</RelativePath>
-      <AssetKind>All</AssetKind>
-      <AssetMode>All</AssetMode>
-      <AssetRole>Primary</AssetRole>
-      <RelatedAsset></RelatedAsset>
-      <AssetTraitName></AssetTraitName>
-      <AssetTraitValue></AssetTraitValue>
-      <CopyToOutputDirectory>Never</CopyToOutputDirectory>
-      <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
-      <OriginalItemSpec>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\WIDESEA_DB.DBSeed.Json\Sys_Menu.tsv))</OriginalItemSpec>
-    </StaticWebAsset>
-    <StaticWebAsset Include="$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\WIDESEA_DB.DBSeed.Json\Sys_User.tsv))">
-      <SourceType>Package</SourceType>
-      <SourceId>WIDESEA_WMSServer</SourceId>
-      <ContentRoot>$(MSBuildThisFileDirectory)..\staticwebassets\</ContentRoot>
-      <BasePath>_content/WIDESEA_WMSServer</BasePath>
-      <RelativePath>WIDESEA_DB.DBSeed.Json/Sys_User.tsv</RelativePath>
-      <AssetKind>All</AssetKind>
-      <AssetMode>All</AssetMode>
-      <AssetRole>Primary</AssetRole>
-      <RelatedAsset></RelatedAsset>
-      <AssetTraitName></AssetTraitName>
-      <AssetTraitValue></AssetTraitValue>
-      <CopyToOutputDirectory>Never</CopyToOutputDirectory>
-      <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
-      <OriginalItemSpec>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\WIDESEA_DB.DBSeed.Json\Sys_User.tsv))</OriginalItemSpec>
-    </StaticWebAsset>
-  </ItemGroup>
-</Project>
\ No newline at end of file
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/Debug/net6.0/staticwebassets/msbuild.build.WIDESEA_WMSServer.props b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/Debug/net6.0/staticwebassets/msbuild.build.WIDESEA_WMSServer.props
deleted file mode 100644
index 5a6032a..0000000
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/Debug/net6.0/staticwebassets/msbuild.build.WIDESEA_WMSServer.props
+++ /dev/null
@@ -1,3 +0,0 @@
-锘�<Project>
-  <Import Project="Microsoft.AspNetCore.StaticWebAssets.props" />
-</Project>
\ No newline at end of file

--
Gitblit v1.9.3