| | |
| | | var actQty = CurPrepDtl.QTY_PREP > CurPREP.BizType.GetActReqQty(CurPrepDtl) ? 0 : (CurPREP.BizType.GetActReqQty(CurPrepDtl) - CurPrepDtl.QTY_PREP); |
| | | Result<List<SuggestItem>> result = Suggest(CurPrepDtl.ORDER_NO, CurPrepDtl.ITEM_CODE, option, input.AuthOption, actQty); |
| | | action.LocaleMsg = result.LocaleMsg; |
| | | if (result.IsException) |
| | | if (result.IsException || result.IsFailed) |
| | | { |
| | | action.IsSuccessed = false; |
| | | return action; |
| | |
| | | { |
| | | var prepDtl = MainDB.Queryable<BIZ_WMS_PREP_DTL>().Where(q => q.ID == CurPrepDtl.ID).First(); |
| | | prepDtl.Suggests = Suggests; |
| | | CurPrepDtl = prepDtl; |
| | | prepDtl.Deliverys = MainDB.Queryable<BIZ_WMS_PREP_SN>().Where(q => q.ORDER_NO == CurPrepDtl.ORDER_NO && q.ORDER_LINE == CurPrepDtl.ORDER_LINE && q.STATUS == WMS_ITEM.STATUSs.OffShelf.GetValue()).ToList(); |
| | | CurPrepDtl = prepDtl; |
| | | CurPREP.Order.Details.RemoveAll(q => q.ID == CurPrepDtl.ID); |
| | | CurPREP.Order.Details.Add(CurPrepDtl); |
| | | action.Data = CurPrepDtl; |
| | |
| | | action.LocaleMsg = Biz.L("WMS.Out_BIZ_WMS_PREP.ScanItem.NoNeedItemCode", inv.CurPkg.SN, CurPrepDtl.ITEM_CODE); |
| | | return action; |
| | | } |
| | | //判断是否在备料数量已经超过需求数量则不允许继续发料 |
| | | if (CurPrepDtl.QTY_PREP > CurPREP.BizType.GetActReqQty(CurPrepDtl)) |
| | | { |
| | | action.IsSuccessed = false; |
| | | //action.LocaleMsg = Biz.L($"当前物料[{0}]实际需求[{1}]已备料[{2}],无需继续下架,请放回原储位并选择其他物料行继续操作"); |
| | | action.LocaleMsg = Biz.L("WMS.Out_BIZ_WMS_PREP.ScanItem.PrepQtyEnough", CurPrepDtl.ITEM_CODE, CurPREP.BizType.GetActReqQty(CurPrepDtl), CurPrepDtl.QTY_PREP); |
| | | return action; |
| | | } |
| | | //判断是否在备料中的物料 |
| | | //if (!CurPREP.Order.Details.Any(q => q.ITEM_CODE == inv.ItemInfo.ITEM_CODE)) |
| | | //{ |
| | |
| | | // action.LocaleMsg = Biz.L("WMS.Out_BIZ_WMS_PREP.ScanItem.NoNeedItemCode", inv.ItemInfo.ITEM_CODE.IsNullOrEmpty(inv.Barcode.ItemCode)); |
| | | // return action; |
| | | //} |
| | | |
| | | |
| | | //ProcessingOrderDetail = input.SN; |
| | | //if (WMSContext.TransactionDic.Where(q => !string.IsNullOrWhiteSpace(q.Value.ProcessingSn)).Any(q => q.Value.ProcessingSn == ProcessingSn && q.Value.TransID != this.TransID)) |
| | | //{ |
| | |
| | | public async Task<ApiAction> GenerateDlvyBatch(BaseInput input) |
| | | { |
| | | var range = input.Data.ToInt32().GetEnum<BIZ_WMS_PREP_BTH.BATCH_RANGEs>(); |
| | | //从数据库更新当前单据的所有信息 |
| | | CurPREP.Order = MainDB.Queryable<BIZ_WMS_PREP>().Where(q => q.ID == CurPREP.Order.ID).IncludesAllFirstLayer().First(); |
| | | var action = await CurPREP.Order.BIZ_TYPE.GetEnum<BIZ_WMS_PREP.BIZ_TYPEs>() .GenerateDlvyBatch(this, range); |
| | | return action; |
| | | } |