From a8fcfbb5e5ed9a07b1a30ef2d7ef9d407e9b04dd Mon Sep 17 00:00:00 2001
From: Rodney Chen <rodney.chen@hotmail.com>
Date: 星期三, 02 四月 2025 21:44:54 +0800
Subject: [PATCH] 更新ASN实体

---
 Tiger.Business.MES/iERP/MES_U9C.cs |   32 ++++++++++++++++++++++++++------
 1 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/Tiger.Business.MES/iERP/MES_U9C.cs b/Tiger.Business.MES/iERP/MES_U9C.cs
index 608f3cc..409c02d 100644
--- a/Tiger.Business.MES/iERP/MES_U9C.cs
+++ b/Tiger.Business.MES/iERP/MES_U9C.cs
@@ -59,10 +59,29 @@
                 //    item.Status = "Y";
                 //    if (!ErpProdInBth.IsNullOrEmpty())
                 //    {
-                //        ErpProdInBth.ORDER_NO = $"YDRKD24120000{5+i}";
+                //        ErpProdInBth.ORDER_NO = $"YDRKD24120000{5 + i}";
                 //        ErpProdInBth.IS_HANDLED = "Y";
                 //        ErpProdInBth.HANDLED_DATE = DateTime.Now;
                 //    }
+                //    List<RcvRptDocCreateParam> param = new() {
+                //                    new() {
+                //                        CompleteList = new(){
+                //                           new CompleteList
+                //                           {
+                //                                MOKey = new MOKey { DocNo = item.WorkOrder },
+                //                                Wh = new Wh { Code = item.WhCode },
+                //                                DescFlexField = new DescFlexField { PrivateDescSeg1 = item.PkgQty.ToString() },
+                //                                Item = new Item { Code = item.ItemCode },
+                //                                CompleteQty = item.CompleteQty,
+                //                                OutputType = item.OutputType,
+                //                                StorageType = item.StorageType,
+                //                                DocState = item.DocState,
+                //                           }
+                //                        },
+                //                        Remark = "鎺ュ彛鐢熸垚",
+                //                        BusinessDate = DateTime.Now,
+                //                    }
+                //                };
                 //    foreach (var p in input.PrintJsons)
                 //    {
                 //        var d = p.Items.Where(q => q.WORK_ORDER == item.WorkOrder).FirstOrDefault();
@@ -83,7 +102,7 @@
                 //{
                 //    action.CatchExceptionWithLog(_dbTran.ErrorException, $"鏁版嵁澶勭悊澶辫触");
                 //    Logger.Interface.Error(action.Message);
-                //    IsSuccessed = false;
+                //    //IsSuccessed = false;
                 //}
 
                 //淇濆瓨鎴愬姛锛岃皟鐢║9C鎺ュ彛
@@ -259,10 +278,10 @@
         /// </summary>
         /// <param name="input"></param>
         /// <returns></returns>
-        public async Task<ApiAction<BarcodeCreateInput>> U9CCreateBarCodeByAssignQty(BarcodeCreateByAssignQtyInput input)
+        public async Task<ApiAction<List<string>>> U9CCreateBarCodeByAssignQty(BarcodeCreateByAssignQtyInput input)
         {
             Logger.Interface.Info($"/**\r\n *杩涘叆鍗婃垚鍝佺敓鎴愭潯鐮佹帴鍙�....\r\n */\r\n"); //鍥哄畾鍐欐硶
-            var action = new ApiAction<BarcodeCreateInput>();
+            var action = new ApiAction<List<string>>(new List<string>());
             try
             {
                 if (input.IsLogin)
@@ -279,7 +298,7 @@
                         CreateBarCodeEntitys = new(){
                                            new CreateBarCodeEntitys
                                            {
-                                                EntityID = input.RevDocId, //鍏ュ簱鍗旾D
+                                                EntityID = input.RevDocLineId, //鍏ュ簱鍗旾D
                                                 EntityType="UFIDA.U9.Complete.RCVRpt.RcvRptDocLine"
                                            }
                                         },
@@ -292,9 +311,10 @@
                 var result = JsonConvert.DeserializeObject<BarcodeCreateByAssignQtyResult>(response.Message);
                 if (result != null)
                 {
-                    if (result.Success)
+                    if (result.Success && result.Data.IsSuccess)
                     {
                         Logger.Interface.Info($"鍗婃垚鍝佺敓鎴愭潯鐮佹帴鍙f彁浜son: {JsonConvert.SerializeObject(param)}锛岃繑鍥濲son: {response.Message}");
+                        action.Data = result.Data.Data;
                     }
                     else
                     {

--
Gitblit v1.9.3