From f144de3b14ef263e8f58bafc400419d35b4fa0f2 Mon Sep 17 00:00:00 2001
From: Rodney Chen <rodney.chen@hotmail.com>
Date: 星期三, 26 三月 2025 17:46:33 +0800
Subject: [PATCH] 更新U9实体

---
 Tiger.Business.WMS/Transaction/Yada/Count_BIZ_U9_ASN.cs |   25 ++++++++++++++-----------
 1 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/Tiger.Business.WMS/Transaction/Yada/Count_BIZ_U9_ASN.cs b/Tiger.Business.WMS/Transaction/Yada/Count_BIZ_U9_ASN.cs
index 9cb73f2..4e55c20 100644
--- a/Tiger.Business.WMS/Transaction/Yada/Count_BIZ_U9_ASN.cs
+++ b/Tiger.Business.WMS/Transaction/Yada/Count_BIZ_U9_ASN.cs
@@ -11,8 +11,6 @@
 using Tiger.IBusiness;
 using Tiger.Model.MES.Yada;
 using Tiger.Model.Entitys.MES.U9C;
-using System.Security.Policy;
-using Tiger.Model.Entitys.MES.Position;
 
 namespace Tiger.Business.WMS.Transaction
 {
@@ -96,7 +94,7 @@
                     action.IsSuccessed = false;
                     //action.LocaleMsg = Biz.L("鏉$爜涓洪潪娉曟潯鐮�");
                     action.LocaleMsg = Biz.L("WMS.WmsItem.Barcode.IllegalFailure", input.SN);
-                    return action;
+                    return SetOutPutMqttMsg(action, input.Locale); ;
                 }
 
                 if (barcode.Type == Barcode.Types.OuterPackage)
@@ -117,14 +115,14 @@
                     action.IsSuccessed = false;
                     //action.LocaleMsg = Biz.L("ASN鍗曚腑涓嶅瓨鍦ㄦ潯鐮乕{0}]");
                     action.LocaleMsg = Biz.L("WMS.Count_BIZ_U9_ASN.SnNotExists", input.SN);
-                    return action;
+                    return SetOutPutMqttMsg(action, input.Locale); ;
                 }
                 if (CurSn.First().AUTH_ORG != input.AuthOption.CurOrg)
                 {
                     action.IsSuccessed = false;
                     //action.LocaleMsg = Biz.L($"鏉$爜鎵�灞炵粍缁嘯{0}]涓庡綋鍓嶇櫥褰曠粍缁嘯{1}]涓嶄竴鑷达紝璇烽噸鏂伴�夋嫨缁勭粐");
                     action.LocaleMsg = Biz.L("WMS.Count_BIZ_U9_ASN.OrgNotCorrect", CurSn.First().AUTH_ORG, input.AuthOption.CurOrg);
-                    return action;
+                    return SetOutPutMqttMsg(action, input.Locale); ;
                 }
                 //楠岃瘉鏉$爜鏄惁姝g‘
                 if (CurSn.First().STATUS > WMS_ITEM.STATUSs.Incoming.GetValue())
@@ -132,7 +130,7 @@
                     action.IsSuccessed = false;
                     //action.LocaleMsg = Biz.L("鐘舵�乕{0}]寮傚父锛岃閲嶆柊鎵弿");
                     action.LocaleMsg = Biz.L("WMS.Default.ScanItem.StatusException", CurSn.First().STATUS.GetEnumDesc<WMS_ITEM.STATUSs>());
-                    return action;
+                    return SetOutPutMqttMsg(action, input.Locale); ;
                 }
 
                 //鎵ц娓呯偣鏁版嵁澶勭悊
@@ -164,7 +162,7 @@
                 //action.CatchExceptionWithLog(ex, $"鎵弿鏉$爜[{0}]澶嶆牳寮傚父");
                 action.CatchExceptionWithLog(ex, Biz.L("WMS.Default.ScanItem.ScanException", input.SN));
             }
-            return action;
+            return SetOutPutMqttMsg(action, input.Locale); 
         }
 
         /// <summary>
@@ -191,7 +189,7 @@
 
             //閲嶇疆宸ュ簭
             ResetScan();
-            return action;
+            return SetOutPutMqttMsg(action, locale); ;
         }
 
 		/// <summary>
@@ -381,7 +379,7 @@
 			var orderNo = input.Data;
 			try
 			{
-				var order = await MainDB.Queryable<BIZ_U9_ASN>().Where(q => q.ORDER_NO == orderNo).IncludesAllFirstLayer().FirstAsync();
+				var order = await MainDB.Queryable<BIZ_U9_ASN>().Where(q => q.ORDER_NO == orderNo).Includes(q => q.Details, d => d._ItemInfos).IncludesAllFirstLayer().FirstAsync();
 				if (order.IsNullOrEmpty())
 				{
 					action.IsSuccessed = false;
@@ -414,7 +412,12 @@
 					IsLogin = true,
 					CreateRcvBySrcASNParam = new ()
 					{
-						aSNToRcvTransDTOs = order.Details.Select(q => new ASNToRcvTransDTO { ASNLineKey = q.ID, TransQty = new() { m_amount1 = q.QTY } }).ToList(),
+						aSNToRcvTransDTOs = order.Details.Select(q => new ASNToRcvTransDTO 
+                        { 
+                            ASNLineKey = q.ID, 
+                            TransQty = new() { m_amount1 = q.QTY }, 
+                            BinInfoList = new() { new() { Bin = new () { m_code = q.ItemInfo.DEFAULT_LOCATION }, LocationQtySU = q.QTY, LocationQtyTU = q.QTY } },
+                        }).ToList(),
 					}
 				};
 				var result = await DI.Resolve<IWMS_U9C>().CreateRcvBySrcASN(iInput);
@@ -459,7 +462,7 @@
 							ORDER_NO = item.DocNo,
 							LINE_NO = item.DocLineNo.ToString(),
 							ITEM_CODE = item.ItemCode,
-							QTY = item.RtnFillQtyTU.ToDouble(), // mes鍗曟嵁鏁伴噺 --U9閫�琛ユ暟閲�
+							QTY = item.EyeballingQtyTU.ToDouble(), // mes鍗曟嵁鏁伴噺 --U9閫�琛ユ暟閲�
                             QTY_GIFT = asnDtl.QTY_GIFT,
                             ASN_ID = item.SrcASNDocId.ToString(),
 							ASN_NO =asnDtl.ORDER_NO,

--
Gitblit v1.9.3