From 0eb39dcd70d82900f36eaccb547dafc53a276127 Mon Sep 17 00:00:00 2001 From: Rodney Chen <rodney.chen@hotmail.com> Date: 星期二, 11 三月 2025 15:34:10 +0800 Subject: [PATCH] 优化了一些已知问题 --- Tiger.Business.WMS/Transaction/Yada/Count_BIZ_U9_ASN.cs | 23 ++++++++++++----------- 1 files changed, 12 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 775502d..300048d 100644 --- a/Tiger.Business.WMS/Transaction/Yada/Count_BIZ_U9_ASN.cs +++ b/Tiger.Business.WMS/Transaction/Yada/Count_BIZ_U9_ASN.cs @@ -366,12 +366,12 @@ { var order = item.TRANS_CODE; item.STATUS = WMS_ITEM.STATUSs.Incoming.GetValue(); - item.TRANS_CODE = item.SOURCE_CODE; - item.TRANS_NO = item.SOURCE_ORDER; - item.TRANS_LINE = item.SOURCE_LINE; item.SOURCE_CODE = ""; item.SOURCE_ORDER = ""; item.SOURCE_LINE = ""; + item.TRANS_CODE = item.SOURCE_CODE; + item.TRANS_NO = item.SOURCE_ORDER; + item.TRANS_LINE = item.SOURCE_LINE; historys.Add(new WMS_ITEM_HIS(item, $"鏉$爜[{item.SN}]鍙栨秷娓呯偣锛屾搷浣滃崟鎹甗{order}]")); } @@ -414,12 +414,13 @@ var item = await Biz.Db.Queryable<WMS_ITEM>().Where(q => q.SN == input.SN).FirstAsync(); var order = item.TRANS_CODE; item.STATUS = WMS_ITEM.STATUSs.Incoming.GetValue(); - item.TRANS_CODE = item.SOURCE_CODE; - item.TRANS_NO = item.SOURCE_ORDER; - item.TRANS_LINE = item.SOURCE_LINE; item.SOURCE_CODE = ""; item.SOURCE_ORDER = ""; item.SOURCE_LINE = ""; + item.TRANS_CODE = item.SOURCE_CODE; + item.TRANS_NO = item.SOURCE_ORDER; + item.TRANS_LINE = item.SOURCE_LINE; + //浣跨敤缁熶竴鐨勪簨鍔B瀵硅薄 var db = GetCommitDB(); var dbTran = db.UseTran(() => @@ -523,7 +524,7 @@ var orderNo = input.Data; try { - var order = await Biz.Db.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).IncludesAllFirstLayer().FirstAsync(); if (order.IsNullOrEmpty()) { action.IsSuccessed = false; @@ -572,17 +573,17 @@ throw new NotImplementedException(); //鏇存柊搴撳瓨琛ㄤ俊鎭� - var items = Biz.Db.Queryable<WMS_ITEM>().Where(q => SqlFunc.Subqueryable<BIZ_U9_ASN_SN>().Where(s => s.SN == q.SN && s.ORDER_NO == order.ORDER_NO).Any()).ToList(); + var items = MainDB.Queryable<WMS_ITEM>().Where(q => SqlFunc.Subqueryable<BIZ_U9_ASN_SN>().Where(s => s.SN == q.SN && s.ORDER_NO == order.ORDER_NO).Any()).ToList(); var historys = new List<WMS_ITEM_HIS>(); foreach (var item in items) { item.STATUS = WMS_ITEM.STATUSs.WaitIn.GetValue(); - item.TRANS_CODE = nameof(BIZ_U9_RECEIPT); - item.TRANS_NO = receipt.ORDER_NO; - item.TRANS_LINE = receipt.SnList.First(q => q.SN == item.SN).LINE_NO; item.SOURCE_CODE = item.TRANS_CODE; item.SOURCE_ORDER = item.TRANS_NO; item.SOURCE_LINE = item.TRANS_LINE; + item.TRANS_CODE = nameof(BIZ_U9_RECEIPT); + item.TRANS_NO = receipt.ORDER_NO; + item.TRANS_LINE = receipt.SnList.First(q => q.SN == item.SN).LINE_NO; historys.Add(new WMS_ITEM_HIS(item, $"閫佽揣鍗昜{order.ORDER_NO}]鐨勬潯鐮乕{item.SN}]鐢熸垚鏀惰揣鍗昜{receipt.ORDER_NO}]锛屽緟妫�楠屽畬鎴愬悗鍙叆搴�")); } -- Gitblit v1.9.3