| | |
| | | Customer = proOutOrderDetail.Customer, |
| | | PCode = proOutOrderDetail.PCode, |
| | | PVer = proOutOrderDetail.PVer, |
| | | PLot = proOutOrderDetail.PLot, |
| | | DateCode = proOutOrderDetail.DateCode, |
| | | PLot = proStockInfo.proStockInfoDetails.FirstOrDefault()?.LotNumber ?? "", |
| | | DateCode = proStockInfo.proStockInfoDetails.FirstOrDefault()?.DateCode ?? "", |
| | | StockId = proStockInfo.Id, |
| | | OrderQuantity = proOutOrderDetail.QtyPcs, |
| | | OriginalQuantity = proStockInfo.proStockInfoDetails.Sum(x => x.StockPcsQty), |
| | |
| | | }; |
| | | return outProStockInfo; |
| | | } |
| | | public Dt_OutProStockInfo GetOutStockLockInfo(Dt_MesRworkOutboundOrder mesOutboundOrder, Dt_ProStockInfo outStock, float assignQuantity, int? taskNum = null) |
| | | { |
| | | |
| | | Dt_OutProStockInfo outProStockInfo = new Dt_OutProStockInfo() |
| | | { |
| | | OrderNo = mesOutboundOrder.OrderNo, |
| | | OrderDetailId = mesOutboundOrder.Id, |
| | | OrderType = mesOutboundOrder.OrderType, |
| | | BatchNo = outStock.proStockInfoDetails.FirstOrDefault()?.LotNumber, |
| | | SaleOrder = mesOutboundOrder.SaleOrder, |
| | | Customer = "", |
| | | PCode = mesOutboundOrder.ProductCode, |
| | | PVer = mesOutboundOrder.ProductVersion, |
| | | PLot = outStock.proStockInfoDetails.FirstOrDefault()?.LotNumber, |
| | | DateCode = mesOutboundOrder.DateCode, |
| | | StockId = outStock.Id, |
| | | OrderQuantity = mesOutboundOrder.RequiredQuantity, |
| | | OriginalQuantity = outStock.proStockInfoDetails.Sum(x => x.StockPcsQty), |
| | | AssignQuantity = assignQuantity, |
| | | LocationCode = outStock.LocationCode, |
| | | PalletCode = outStock.PalletCode, |
| | | Unit = "PCS", |
| | | TaskNum = taskNum, |
| | | Status = taskNum == null ? OutLockStockStatusEnum.å·²åé
.ObjToInt() : OutLockStockStatusEnum.åºåºä¸.ObjToInt() |
| | | }; |
| | | |
| | | return outProStockInfo; |
| | | } |
| | | public List<Dt_OutProStockInfo> GetByOrderDetailId(int orderDetailId, OutLockStockStatusEnum? outStockStatus) |
| | | { |
| | | return BaseDal.QueryData(x => x.OrderDetailId == orderDetailId && outStockStatus == null ? true : x.Status == outStockStatus.ObjToInt()); |
| | | } |
| | | } |
| | | } |