From 52e14bf30c5ce0f5ec90db0b1410295fe19b62e8 Mon Sep 17 00:00:00 2001 From: Rodney Chen <rodney.chen@hotmail.com> Date: 星期一, 12 五月 2025 20:30:57 +0800 Subject: [PATCH] 修复了一些已知问题 --- Tiger.Business.WMS/Transaction/Yada/Out_BIZ_WMS_PREP.cs | 23 ++++++++++++++--------- 1 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Tiger.Business.WMS/Transaction/Yada/Out_BIZ_WMS_PREP.cs b/Tiger.Business.WMS/Transaction/Yada/Out_BIZ_WMS_PREP.cs index 5c923fb..509b2b0 100644 --- a/Tiger.Business.WMS/Transaction/Yada/Out_BIZ_WMS_PREP.cs +++ b/Tiger.Business.WMS/Transaction/Yada/Out_BIZ_WMS_PREP.cs @@ -15,6 +15,7 @@ using MailKit.Search; using Tiger.Business.WMS.Extensions; using static Tiger.Model.BIZ_WMS_PREP_BTH; +using Microsoft.CodeAnalysis.Options; namespace Tiger.Business.WMS.Transaction { @@ -34,7 +35,7 @@ #region Propertys & Variables public Preparation CurPREP { get; set; } private List<BIZ_WMS_PREP_SN> CurSn = new(); - private BIZ_WMS_PREP_DTL CurPrepDtl = new(); + private BIZ_WMS_PREP_DTL CurPrepDtl; public List<SuggestItem> Suggests { get; set; } = new(); public List<WMS_ITEM_POOL> CurPoolList => Suggests.Where(q => !q.poolItem.IsNullOrEmpty()).Select(q => q.poolItem).ToList(); public List<WMS_LOCATION> LocationHis { get; set; } = new(); @@ -51,7 +52,8 @@ var action = new ApiAction<ScanOutput>(new ScanOutput()); try { - + //Result<List<SuggestItem>> result = Suggest("CurPrepDtl.ORDER_NO", "CurPrepDtl.ITEM_CODE", new SuggestOption(), new(), 100.0); + //action.LocaleMsg = result.LocaleMsg; if (input.Command == "ScanOrder") { action = await ScanOrder(input); @@ -290,12 +292,15 @@ public async Task<ApiAction<BIZ_WMS_PREP_DTL>> GetCurPrepItem() { var action = new ApiAction<BIZ_WMS_PREP_DTL>(); - var prepDtl = MainDB.Queryable<BIZ_WMS_PREP_DTL>().Where(q => q.ID == CurPrepDtl.ID).First(); - prepDtl.Suggests = Suggests; - CurPrepDtl = prepDtl; - CurPREP.Order.Details.RemoveAll(q => q.ID == CurPrepDtl.ID); - CurPREP.Order.Details.Add(CurPrepDtl); - action.Data = CurPrepDtl; + if (!CurPrepDtl.IsNullOrEmpty()) + { + var prepDtl = MainDB.Queryable<BIZ_WMS_PREP_DTL>().Where(q => q.ID == CurPrepDtl.ID).First(); + prepDtl.Suggests = Suggests; + CurPrepDtl = prepDtl; + CurPREP.Order.Details.RemoveAll(q => q.ID == CurPrepDtl.ID); + CurPREP.Order.Details.Add(CurPrepDtl); + action.Data = CurPrepDtl; + } return action; } @@ -803,7 +808,7 @@ { ResetScan(); CurPREP = new(MainDB, UserCode, OrgCode); - CurPrepDtl = new(); + CurPrepDtl = null; CurScanShelf = null; base.ResetTrans(); } -- Gitblit v1.9.3