From 1dd9f4bf540a74a7de2daeeebf38491f86befa08 Mon Sep 17 00:00:00 2001
From: huanghongfeng <huanghongfeng@hnkhzn.com>
Date: 星期三, 27 十一月 2024 09:31:07 +0800
Subject: [PATCH] 1

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs"
index 32d4bfa..7a886a0 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs"
@@ -427,9 +427,13 @@
                                 Dt_LocationInfo newLocation;
                                 //鏌ヨ蛋璐т綅锛岃繘琛岀敓鎴愮Щ搴撲换鍔� 
                                 int Locationtype = 9;   //榛樿涓�9
-                                if (locationInfos.LocationType== (int)LocationStatusEnum.InStock)
+                                if (dt_StockInfo.MaterialType == (int)InventoryMaterialType.鎴愬搧)
                                 {
                                     Locationtype = 11;
+                                }
+                                else if (dt_StockInfo.MaterialType == (int)InventoryMaterialType.鍘熸潗鏂�)
+                                {
+                                    Locationtype = 10;
                                 }
                                 newLocation = _basicService.LocationInfoService.GetLocation(locationInfos.RoadwayNo,Locationtype); //鎷垮埌浜嗙Щ搴撳悗鐨勮揣浣�
                                 if (newLocation != null)
@@ -506,7 +510,12 @@
                     {
                         RoadwayNo = "2";
                     }
-                    Dt_LocationInfo locationInfos = _basicService.LocationInfoService.Repository.QueryFirst(x => x.RoadwayNo == RoadwayNo && x.LocationStatus == LocationStatusEnum.Pallet.ObjToInt());
+                    Dt_LocationInfo locationInfos = _basicService.LocationInfoService.Repository.QueryFirst(x => x.RoadwayNo == RoadwayNo && x.Depth==1 && x.LocationStatus == LocationStatusEnum.Pallet.ObjToInt());
+                    if(locationInfos == null)
+                    {
+                        locationInfos = _basicService.LocationInfoService.Repository.QueryFirst(x => x.RoadwayNo == RoadwayNo && x.Depth == 2 && x.LocationStatus == LocationStatusEnum.Pallet.ObjToInt());
+                    }
+
                     if (locationInfos != null)
                     {
                         Dt_StockInfo dt_StockInfo = _stockService.StockInfoService.Repository.QueryFirst(x => x.LocationCode == locationInfos.LocationCode);
@@ -1134,7 +1143,7 @@
                 else if(task.TaskType == (int)TaskTypeEnum.Inbound || task.TaskType == (int)TaskTypeEnum.PalletInbound)
                 {
                     //澶勭悊鍑哄簱鐨勯�昏緫
-                    Dt_LocationInfo locationinfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.SourceAddress);
+                    Dt_LocationInfo locationinfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress);
                     if (locationinfo.LocationStatus == LocationStatusEnum.Lock.ObjToInt() || locationinfo.LocationStatus == LocationStatusEnum.PalletLock.ObjToInt())
                     {
                         locationinfo.LocationStatus = LocationStatusEnum.Free.ObjToInt();

--
Gitblit v1.9.3