| | |
| | | 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 |
| | | { |
| | |
| | | #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(); |
| | |
| | | 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); |
| | |
| | | } |
| | | |
| | | Suggests.Clear(); |
| | | Suggests = result.Data; |
| | | var remain = actQty; |
| | | Suggests.ForEach((inv) => |
| | | { |
| | |
| | | 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; |
| | | } |
| | | |
| | |
| | | { |
| | | ResetScan(); |
| | | CurPREP = new(MainDB, UserCode, OrgCode); |
| | | CurPrepDtl = new(); |
| | | CurPrepDtl = null; |
| | | CurScanShelf = null; |
| | | base.ResetTrans(); |
| | | } |