| | |
| | | var actQty = sumDtls.Where(x => x.ItemCode == inv.Item.ITEM_CODE).Select(x => x.actQty).First(); |
| | | if (actQty > 0) |
| | | { |
| | | inv.poolItem = inv.Item.GetPoolItem(input.AuthOption.OrgCode, nameof(req), req.BILLCODE, null, actQty, false); |
| | | inv.poolItem = inv.Item.GetPoolItem(input.AuthOption.OrgCode, TransID, nameof(req), req.BILLCODE, null, actQty, false); |
| | | } |
| | | else |
| | | { |
| | |
| | | var actQty = sumDtls.Where(x => x.ItemCode == inv.Item.ITEM_CODE).Select(x => x.actQty).First(); |
| | | if (actQty > 0) |
| | | { |
| | | inv.poolItem = inv.Item.GetPoolItem(input.AuthOption.OrgCode, nameof(req), req.BILLCODE, null, actQty, false); |
| | | inv.poolItem = inv.Item.GetPoolItem(input.AuthOption.OrgCode, TransID, nameof(req), req.BILLCODE, null, actQty, false); |
| | | } |
| | | else |
| | | { |
| | |
| | | var actQty = sumDtls.ToList().Where(x => x.ItemCode.Trim() == inv.Item.ITEM_CODE.Trim()).Select(x => x.actQty).FirstOrDefault(); |
| | | if (actQty > 0) |
| | | { |
| | | inv.poolItem = inv.Item.GetPoolItem(input.AuthOption.OrgCode, nameof(req), req.ORDER_NO, null, actQty, false); |
| | | inv.poolItem = inv.Item.GetPoolItem(input.AuthOption.OrgCode, TransID, nameof(req), req.ORDER_NO, null, actQty, false); |
| | | } |
| | | else |
| | | { |
| | |
| | | var actQty = sumDtls.Where(x => x.ItemCode == inv.Item.ITEM_CODE).Select(x => x.actQty).First(); |
| | | if (actQty > 0) |
| | | { |
| | | inv.poolItem = inv.Item.GetPoolItem(input.AuthOption.OrgCode, nameof(req), req.BILLCODE, null, actQty, false); |
| | | inv.poolItem = inv.Item.GetPoolItem(input.AuthOption.OrgCode, TransID, nameof(req), req.BILLCODE, null, actQty, false); |
| | | } |
| | | else |
| | | { |
| | |
| | | var actQty = req.Dtls.First().PRQTY - req.Dtls.First().QTY; |
| | | if (inv != null && actQty > 0) |
| | | { |
| | | inv.poolItem = inv.Item.GetPoolItem(input.AuthOption.OrgCode, nameof(req), req.BILLCODE, req.Dtls[0].BILLLINE, actQty, false); |
| | | inv.poolItem = inv.Item.GetPoolItem(input.AuthOption.OrgCode, TransID, nameof(req), req.BILLCODE, req.Dtls[0].BILLLINE, actQty, false); |
| | | } |
| | | else |
| | | { |
| | |
| | | var actQty = sumDtls.Where(x => x.ItemCode == inv.Item.ITEM_CODE).Select(x => x.actQty).First(); |
| | | if (actQty > 0) |
| | | { |
| | | inv.poolItem = inv.Item.GetPoolItem(input.AuthOption.OrgCode, nameof(req), req.BILLCODE, null, actQty, false); |
| | | inv.poolItem = inv.Item.GetPoolItem(input.AuthOption.OrgCode, TransID, nameof(req), req.BILLCODE, null, actQty, false); |
| | | } |
| | | else |
| | | { |
| | |
| | | var actQty = sumDtls.Where(x => x.ItemCode == inv.Item.ITEM_CODE).Select(x => x.actQty).First(); |
| | | if (actQty > 0) |
| | | { |
| | | inv.poolItem = inv.Item.GetPoolItem(input.AuthOption.OrgCode, nameof(req), req.BILLCODE, null, actQty, false); |
| | | inv.poolItem = inv.Item.GetPoolItem(input.AuthOption.OrgCode, TransID, nameof(req), req.BILLCODE, null, actQty, false); |
| | | } |
| | | else |
| | | { |
| | |
| | | var actQty = sumDtls.Where(x => x.ItemCode == inv.Item.ITEM_CODE).Select(x => x.actQty).First(); |
| | | if (actQty > 0) |
| | | { |
| | | inv.poolItem = inv.Item.GetPoolItem(OrgCode, nameof(req), req.BILLCODE, null, actQty, false); |
| | | inv.poolItem = inv.Item.GetPoolItem(OrgCode, TransID, nameof(req), req.BILLCODE, null, actQty, false); |
| | | } |
| | | else |
| | | { |
| | |
| | | using Tiger.Model; |
| | | using Tiger.IBusiness; |
| | | using Tiger.Business.WMS.Common; |
| | | using Org.BouncyCastle.Ocsp; |
| | | using Tiger.Model.Sharetronic.Shelf; |
| | | 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 |
| | | { |
| | |
| | | var actQty = CurPrepDtl.QTY_PREP > CurPREP.BizType.GetActReqQty(CurPrepDtl) ? 0 : (CurPREP.BizType.GetActReqQty(CurPrepDtl) - CurPrepDtl.QTY_PREP); |
| | | if (inv != null && actQty > 0) |
| | | { |
| | | inv.poolItem = inv.Item.GetPoolItem(OrgCode, nameof(CurPREP.Order), CurPrepDtl.ORDER_NO, CurPrepDtl.ORDER_LINE, actQty, true); |
| | | inv.poolItem = inv.Item.GetPoolItem(OrgCode, TransID, nameof(CurPREP.Order), CurPrepDtl.ORDER_NO, CurPrepDtl.ORDER_LINE, actQty, true); |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | if (remain > 0) |
| | | { |
| | | inv.poolItem = inv.Item.GetPoolItem(input.AuthOption.OrgCode, nameof(CurPREP.Order), CurPrepDtl.ORDER_NO, CurPrepDtl.ORDER_LINE, remain, false); |
| | | inv.poolItem = inv.Item.GetPoolItem(OrgCode, TransID, nameof(CurPREP.Order), CurPrepDtl.ORDER_NO, CurPrepDtl.ORDER_LINE, remain, false); |
| | | remain -= inv.poolItem.ALLOC_QTY; |
| | | } |
| | | else |
| | |
| | | /// <returns></returns> |
| | | public async Task<ApiAction> GenerateDlvyBatch(BaseInput input) |
| | | { |
| | | var range = input.Data.ToInt32().GetEnum<BATCH_RANGEs>(); |
| | | var range = input.Data.ToInt32().GetEnum<BIZ_WMS_PREP_BTH.BATCH_RANGEs>(); |
| | | var action = await CurPREP.Order.BIZ_TYPE.GetEnum<BIZ_WMS_PREP.BIZ_TYPEs>() .GenerateDlvyBatch(this, range); |
| | | return action; |
| | | } |
| | |
| | | //CloseLight(LocationHis).Wait(); |
| | | if (!(CurPREP?.Order?.ORDER_NO ?? "").IsNullOrEmpty()) |
| | | { |
| | | MainDB.Deleteable<WMS_ITEM_POOL>().Where(x => x.TRANS_NO == CurPREP.Order.ORDER_NO).ExecuteCommand(); |
| | | MainDB.Deleteable<WMS_ITEM_POOL>().Where(q => q.TRANS_NO == CurPREP.Order.ORDER_NO || q.TRANS_ID == TransID).ExecuteCommand(); |
| | | } |
| | | |
| | | this.IsFinished = true; |
| | |
| | | /// <param name="transLine"></param> |
| | | /// <param name="actQty"></param> |
| | | /// <param name="isFirst"></param> |
| | | public static WMS_ITEM_POOL GetPoolItem(this WMS_ITEM item, string orgCode, string transCode, string transNo, string transLine, double actQty, bool isFirst) |
| | | public static WMS_ITEM_POOL GetPoolItem(this WMS_ITEM item, string orgCode, string transId, string transCode, string transNo, string transLine, double actQty, bool isFirst) |
| | | { |
| | | var poolItem = new WMS_ITEM_POOL() |
| | | { |
| | | AUTH_ORG = orgCode, |
| | | TRANS_ID = transId, |
| | | TRANS_CODE = transCode, |
| | | TRANS_NO = transNo, |
| | | TRANS_LINE = transLine, |