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/ReprintLabel.cs                  |   19 +------------------
 Tiger.Business.WMS/Transaction/In_Default.cs                    |    2 +-
 Tiger.Business.WMS/Transaction/Out_Default.cs                   |    2 +-
 Tiger.Controllers.WMS/Controllers/WMSController.RePrintLabel.cs |    2 +-
 4 files changed, 4 insertions(+), 21 deletions(-)

diff --git a/Tiger.Business.WMS/Transaction/In_Default.cs b/Tiger.Business.WMS/Transaction/In_Default.cs
index aabfa9c..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())
diff --git a/Tiger.Business.WMS/Transaction/Out_Default.cs b/Tiger.Business.WMS/Transaction/Out_Default.cs
index ad368c4..1402921 100644
--- a/Tiger.Business.WMS/Transaction/Out_Default.cs
+++ b/Tiger.Business.WMS/Transaction/Out_Default.cs
@@ -45,7 +45,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())
diff --git a/Tiger.Business.WMS/Transaction/ReprintLabel.cs b/Tiger.Business.WMS/Transaction/ReprintLabel.cs
index b47277a..02d8510 100644
--- a/Tiger.Business.WMS/Transaction/ReprintLabel.cs
+++ b/Tiger.Business.WMS/Transaction/ReprintLabel.cs
@@ -36,23 +36,9 @@
         public string UserCode { get; set; }
         public long UserId { get; set; }
         public string OrgCode { get; set; }
-        public List<SuggestItem> Suggests { get; set; } = new();
         public List<V_WMS_ITEM> Vitem { get; set; } = new();
-        public List<WMS_ITEM_POOL> CurPoolList => Suggests.Where(q => !q.poolItem.IsNullOrEmpty()).Select(q => q.poolItem).ToList();
         public Inventory CurInv { get; set; }
-        public BIZ_ERP_PROD_OUT req { get; set; }
-        public ReqType CurReqType { get; set; }
-        public List<BIZ_ERP_PROD_OUT_DTL> dtls { get; set; } = new();
-        public bool isExceed { get; set; }
-        public ProductionPickToMes toMes { get; set; }
-        public bool his_isComplete { get; set; }
-        public bool isCutting { get; set; }
-        public decimal cutQty { get; set; }
 
-        public BIZ_WMS_TRANSFER transferH = null;
-        public BIZ_WMS_TRANSFER cTransferH = null;
-        public BIZ_WMS_TRANSFER_DTL transferDtl = null;
-        public BIZ_WMS_TRANSFER_SN transferSn = null;
         #endregion
 
         #region Functions
@@ -61,7 +47,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())
@@ -73,12 +59,9 @@
                 
                 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();
                 
-                
             }
             catch (Exception ex)
             {
-                //鍙栨秷褰撳墠鎿嶄綔
-                ResetInfo();
                 //action.CatchExceptionWithLog(ex, $"鎵弿[{input.SN}]寮傚父");
                 action.CatchExceptionWithLog(ex, Biz.L("WMS.Default.Scan.ScanException", input.SN));
             }
diff --git a/Tiger.Controllers.WMS/Controllers/WMSController.RePrintLabel.cs b/Tiger.Controllers.WMS/Controllers/WMSController.RePrintLabel.cs
index 10e6f72..05d3c37 100644
--- a/Tiger.Controllers.WMS/Controllers/WMSController.RePrintLabel.cs
+++ b/Tiger.Controllers.WMS/Controllers/WMSController.RePrintLabel.cs
@@ -98,7 +98,7 @@
         /// <param name="action"></param>
         /// <returns></returns>
         [HttpPost]
-        [Route("api/[controller]/RePrintLabel/ScanItem")]
+        [Route("api/[controller]/RePrintLabel/Scan")]
         public async Task<IActionResult> RePrintLabel_ScanItemAsync([FromBody] ApiAction<BaseInput> action)
         {
             ApiAction response;

--
Gitblit v1.9.3