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

---
 Tiger.Business.WMS/Transaction/In_Default.cs |   14 +++++++++++---
 Tiger.Business.WMS/Common/WmsTask.cs         |    2 +-
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/Tiger.Business.WMS/Common/WmsTask.cs b/Tiger.Business.WMS/Common/WmsTask.cs
index 8ef5ce0..62b3218 100644
--- a/Tiger.Business.WMS/Common/WmsTask.cs
+++ b/Tiger.Business.WMS/Common/WmsTask.cs
@@ -144,7 +144,7 @@
                 var location = Biz.Db.Queryable<V_WH_UNIT>().Where(q => q.LOCATION_CODE == targetLocation && q.AUTH_ORG == option.CurOrg).IncludesAllFirstLayer().First();
                 if (!location.IsNullOrEmpty())
                 {
-                    var isTransfer = CurInvItem.Location?.LOCATION_CODE != location.LOCATION_CODE;
+                    var isTransfer = CurInvItem?.Location?.LOCATION_CODE != location.LOCATION_CODE;
                     foreach (var item in CurInvItem.Items)
                     {
                         item.STATUS = WMS_ITEM.STATUSs.InStore.GetValue();
diff --git a/Tiger.Business.WMS/Transaction/In_Default.cs b/Tiger.Business.WMS/Transaction/In_Default.cs
index 4ce9e9a..1ebd202 100644
--- a/Tiger.Business.WMS/Transaction/In_Default.cs
+++ b/Tiger.Business.WMS/Transaction/In_Default.cs
@@ -427,8 +427,8 @@
             //action.LocaleMsg = Biz.L($"鎵弿鏉$爜[{0}]涓婃灦鍒板偍浣峓{1}]鎴愬姛");
             action.LocaleMsg = Biz.L("WMS.Default.ScanItem.PutOnSucceeded", CurInvItem.SN, CurInvItem.Location.LOCATION_CODE);
 
-            //閲嶇疆宸ュ簭
-            ResetScan();
+            //閲嶇疆鎵爜淇℃伅
+            ResetScanInfo();
             return action;
         }
 
@@ -440,9 +440,17 @@
         public override void ResetScan()
         {
             base.ResetScan();
+            ResetScanInfo();
+            CurScanShelf = null;
+        }
+
+        /// <summary>
+        /// 閲嶇疆鎵爜淇℃伅
+        /// </summary>
+        public void ResetScanInfo()
+        {
             Command = null;
             CurInvItem = null;
-            CurScanShelf = null;
         }
 
         public override bool Close(bool needSaveHistoryLog = false)

--
Gitblit v1.9.3