From dc203bafb60dc9985c805c6a4ec5f8018f3d3cf6 Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期五, 10 一月 2025 11:37:00 +0800
Subject: [PATCH] 更新 Scan 方法和 ReprintLabel 相关逻辑

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

diff --git a/Tiger.Business.WMS/Transaction/In_Default.cs b/Tiger.Business.WMS/Transaction/In_Default.cs
index 677912c..f8ab470 100644
--- a/Tiger.Business.WMS/Transaction/In_Default.cs
+++ b/Tiger.Business.WMS/Transaction/In_Default.cs
@@ -48,7 +48,7 @@
         /// </summary>
         public async Task<ApiAction<ScanOutput>> Scan(BaseInput input)
         {
-            var action = new ApiAction<ScanOutput>();
+            var action = new ApiAction<ScanOutput>(new ScanOutput());
             try
             {
                 if (input.SN.IsNullOrEmpty())
@@ -61,7 +61,7 @@
                 //鍒ゆ柇鎵弿鐨勬槸鍚﹁揣鏋�
                 var whUnit = await Biz.Db.Queryable<V_WH_UNIT>().Where(t => (t.SHELF_CODE.ToUpper() == input.SN || t.LOCATION_CODE.ToUpper() == input.SN) && t.AUTH_ORG == OrgCode).IncludesAllFirstLayer().FirstAsync();
                 //if (string.IsNullOrEmpty(CurScanShelf?.ShelfCode))
-                if (!whUnit.IsNullOrEmpty())
+                if (!whUnit.IsNullOrEmpty() || string.IsNullOrEmpty(CurScanShelf?.ShelfCode))
                 {
                     action = await ScanShelf(input.SN, whUnit);
                 }

--
Gitblit v1.9.3