From 05bfc6861c3077a3ba6cdf86c36687eb684590aa Mon Sep 17 00:00:00 2001
From: Rodney Chen <rodney.chen@hotmail.com>
Date: 星期一, 12 五月 2025 17:17:30 +0800
Subject: [PATCH] 优化了一些已知问题

---
 Tiger.Business.WMS/Transaction/Yada/Out_BIZ_WMS_PREP.cs |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Tiger.Business.WMS/Transaction/Yada/Out_BIZ_WMS_PREP.cs b/Tiger.Business.WMS/Transaction/Yada/Out_BIZ_WMS_PREP.cs
index 9abb932..5c923fb 100644
--- a/Tiger.Business.WMS/Transaction/Yada/Out_BIZ_WMS_PREP.cs
+++ b/Tiger.Business.WMS/Transaction/Yada/Out_BIZ_WMS_PREP.cs
@@ -131,7 +131,7 @@
 
                 if (CurPREP.Order.IsNullOrEmpty() || !CurPREP.Order.SourceOrders.Any(q => q.SOURCE_ORDER == inputOrder.SOURCE_ORDER))
                 {
-                    action = CurPREP.AddOrder(inputOrder.BIZ_TYPE.GetEnum<BIZ_WMS_PREP.BIZ_TYPEs>(), inputOrder.SOURCE_CODE);
+                    action = CurPREP.AddOrder(inputOrder.BIZ_TYPE.GetEnum<BIZ_WMS_PREP.BIZ_TYPEs>(), inputOrder.SOURCE_ORDER);
                 }
                 else
                 {
@@ -158,8 +158,8 @@
         public async Task<ApiAction<BIZ_WMS_PREP>> GetPrepInfo()
         {
             var action = new ApiAction<BIZ_WMS_PREP>();
-            CurPREP.Order = MainDB.Queryable<BIZ_WMS_PREP>().Where(q => q.ID == CurPREP.Order.ID).IncludesAllFirstLayer().First();
-
+            var prepId = CurPREP?.Order?.ID;
+            CurPREP.Order = MainDB.Queryable<BIZ_WMS_PREP>().Where(q => q.ID == prepId).IncludesAllFirstLayer().First();
             action.Data = CurPREP.Order;
             return action;
         }
@@ -479,6 +479,8 @@
                     SHELF_CODE = CurInvItem.Shelf.SHELF_CODE,
                     LOCATION_ID = CurInvItem.Location.ID,
                     LOCATION_CODE = CurInvItem.Location.LOCATION_CODE,
+                    PREP_USER = UserCode,
+                    DOWN_TIME = DateTime.Now,
                     SMT_NO = CurPrepDtl.SMT_NO,
                     STATION_NO = CurPrepDtl.STATION_NO,
                     FEEDER_NO = CurPrepDtl.FEEDER_NO,

--
Gitblit v1.9.3