From 441b6f8d257a01b2998253ef0515a201777d7e68 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期五, 04 七月 2025 14:06:49 +0800
Subject: [PATCH] 修改入库、移库、出库逻辑

---
 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs"
index a940808..8142e14 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs"
@@ -180,14 +180,17 @@
             }
             if (stockInfos1.Count > 0)
             {
-                Dt_LocationInfo? locationInfo2 = _basicService.LocationInfoService.AssignLocation();
-                if (locationInfo2 == null) throw new Exception("鏃犲彲绉诲簱璐т綅");
-                locationInfo2.LocationStatus = LocationStatusEnum.Relocationing.ObjToInt();
-                locationInfos.Add(locationInfo2);
+                List<string> strings = new List<string>();
                 foreach (var item in stockInfos1.GroupBy(x => x.LocationCode))
                 {
+                    Dt_LocationInfo? locationInfo2 = _basicService.LocationInfoService.AssignLocation(strings);
+                    if (locationInfo2 == null) throw new Exception("鏃犲彲绉诲簱璐т綅");
+                    locationInfo2.LocationStatus = LocationStatusEnum.Relocationing.ObjToInt();
+                    strings.Add(locationInfo2.LocationCode);
+                    locationInfos.Add(locationInfo2);
                     foreach (var item1 in item.OrderByDescending(x => x.SerialNumber))
                     {
+                        locationInfo2.CurrentQty++;
                         Dt_Task task = new()
                         {
                             CurrentAddress = item1.LocationCode,
@@ -204,8 +207,8 @@
                             TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum))
                         };
                         dt_Tasks.Add(task);
+                        item1.SerialNumber = locationInfo2.CurrentQty;
                         item1.StockStatus = StockStatusEmun.绉诲簱涓�.ObjToInt();
-                        //locationInfo2.CurrentQty++;
                     }
                 }
             }

--
Gitblit v1.9.3