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

---
 Tiger.Business.WMS/Transaction/PrintSemiProdLabel.cs |   37 +++++++++++++++++++------------------
 1 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/Tiger.Business.WMS/Transaction/PrintSemiProdLabel.cs b/Tiger.Business.WMS/Transaction/PrintSemiProdLabel.cs
index d5f772b..9b74fea 100644
--- a/Tiger.Business.WMS/Transaction/PrintSemiProdLabel.cs
+++ b/Tiger.Business.WMS/Transaction/PrintSemiProdLabel.cs
@@ -68,19 +68,20 @@
                     var temp = new SemiTemplateInput
                     {
                         RcvRptDocId = item.ID.ToString(),
-                        ItemCode= item.ItemCode,
-                        ItemDesc= item.ItemDescription,
-                        SapItemCode= "",
-                        PackQty= item.PackQty.ToDecimal(),
-                        Qty=0,
-                        DocNo= item.DocNo,
-                        WorkOrder= item.Mo
+                        ItemCode = item.ItemCode,
+                        ItemDesc = item.ItemDescription,
+                        SapItemCode = "",
+                        WoBatch = item.LotCode,
+                        PackQty = item.PackQty.ToDouble(),
+                        Qty = item.RcvQtyByWhUOM.ToDouble(),
+                        DocNo = item.DocNo,
+                        WorkOrder = item.Mo
                     };
                     temps.Add(temp);
                 }
 
                 action.Data.Data = temps;
-                action.LocaleMsg = Biz.L("WMS.PrintSemiProdLabel.Scan.ScanSuccessed");
+                action.LocaleMsg = Biz.L("WMS.PrintSemiProdLabel.Scan.ScanSuccessed", input.SN);
             }
             catch (Exception ex)
             {
@@ -100,13 +101,6 @@
             var action = new ApiAction<ScanOutput>(new ScanOutput());
             try
             {
-                if (input.SN.IsNullOrEmpty())
-                {
-                    action.IsSuccessed = false;
-                    //action.LocaleMsg = Biz.L("鏉$爜涓嶈兘涓虹┖");
-                    action.LocaleMsg = Biz.L("WMS.Default.ScanItem.SnEmptyFailure");
-                    return SetOutPutMqttMsg(action, input.Locale);
-                }
                 var semiTemplate = (input.Data ?? "").JsonToObject<SemiTemplateInput>() ?? new SemiTemplateInput();
 
                 //鐢熸垚鏉$爜
@@ -116,12 +110,19 @@
                     userId = input.AuthOption.UserId,
                     token = "",
                     IsLogin = true,
-                    CreateBarCodeItemQty = semiTemplate.PackQty,
-                    LabelQty = semiTemplate.Qty,
+                    CreateBarCodeItemQty = semiTemplate.Qty,
+                    LabelQty = semiTemplate.PackQty,
                 };
-               
+
                 var snList = await _IMES_U9C.U9CCreateBarCodeByAssignQty(barcodeCreateInput);
                 action.Data.Data = snList;
+                //action.Data.Data = new List<string> {
+                //    "YDRKD241200014/10/20051210.0013.00/YDMB241254400/0001",
+                //    "YDRKD241200014/10/20051210.0013.00/YDMB241254400/0002",
+                //    "YDRKD241200014/10/20051210.0013.00/YDMB241254400/0003",
+                //    "YDRKD241200014/10/20051210.0013.00/YDMB241254400/0004"
+
+                //};
             }
             catch (Exception ex)
             {

--
Gitblit v1.9.3