| | |
| | | Dt_OutboundOrderDetail outboundOrderDetail, |
| | | Dt_StockInfo outStock, |
| | | decimal assignQuantity, |
| | | string barcode = null) |
| | | string barcode = null,string outboundBatchNo = "") |
| | | { |
| | | // è·ååºåæç»ä¿¡æ¯ |
| | | var stockDetails = outStock.Details |
| | |
| | | // 使ç¨ç¬¬ä¸ä¸ªå¯ç¨æ¡ç |
| | | firstAvailableDetail = stockDetails |
| | | .Where(x => x.StockQuantity > x.OutboundQuantity) |
| | | .OrderBy(x => x.CreateDate) |
| | | .OrderByDescending(x => x.CreateDate) |
| | | .FirstOrDefault(); |
| | | |
| | | if (firstAvailableDetail == null) |
| | |
| | | MaterielCode = outboundOrderDetail.MaterielCode, |
| | | BatchNo = firstAvailableDetail.BatchNo, |
| | | Unit = firstAvailableDetail.Unit, |
| | | BarcodeQty = firstAvailableDetail.BarcodeQty, |
| | | BarcodeUnit = firstAvailableDetail.BarcodeUnit, |
| | | FactoryArea = firstAvailableDetail.FactoryArea, |
| | | lineNo = outboundOrderDetail.lineNo, |
| | | OutboundBatchNo= outboundBatchNo |
| | | }; |
| | | } |
| | | |
| | |
| | | |
| | | public List<Dt_OutStockLockInfo> GetByOrderDetailId(int orderDetailId, OutLockStockStatusEnum? outStockStatus) |
| | | { |
| | | return BaseDal.QueryData(x => x.OrderDetailId == orderDetailId && outStockStatus == null ? true : x.Status == outStockStatus.ObjToInt()); |
| | | return BaseDal.QueryData(x => x.OrderDetailId == orderDetailId ); |
| | | } |
| | | |
| | | } |