| | |
| | | { |
| | | } |
| | | |
| | | public List<Dt_OutStockLockInfo> GetOutStockLockInfos(Dt_OutboundOrder outboundOrder, Dt_OutboundOrderDetail outboundOrderDetail, List<Dt_StockInfo> outStocks, int? taskNum = null) |
| | | { |
| | | List<Dt_OutStockLockInfo> outStockLockInfos = new List<Dt_OutStockLockInfo>(); |
| | | |
| | | foreach (var item in outStocks) |
| | | { |
| | | Dt_OutStockLockInfo outStockLockInfo = new Dt_OutStockLockInfo() |
| | | { |
| | | PalletCode = item.PalletCode, |
| | | AssignQuantity = item.Details.Where(x => x.MaterielCode == outboundOrderDetail.MaterielCode).Sum(x => x.OutboundQuantity), |
| | | MaterielCode = outboundOrderDetail.MaterielCode, |
| | | BatchNo = outboundOrderDetail.BatchNo, |
| | | LocationCode = item.LocationCode, |
| | | MaterielName = outboundOrderDetail.MaterielName, |
| | | OrderDetailId = outboundOrderDetail.Id, |
| | | OrderNo = outboundOrder.OrderNo, |
| | | OrderType = outboundOrder.OrderType, |
| | | OriginalQuantity = item.Details.Where(x => x.MaterielCode == outboundOrderDetail.MaterielCode).Sum(x => x.StockQuantity), |
| | | Status = taskNum == null ? OutLockStockStatusEnum.å·²åé
.ObjToInt() : OutLockStockStatusEnum.åºåºä¸.ObjToInt(), |
| | | StockId = item.Id, |
| | | TaskNum = taskNum |
| | | }; |
| | | outStockLockInfos.Add(outStockLockInfo); |
| | | } |
| | | |
| | | return outStockLockInfos; |
| | | } |
| | | |
| | | public List<Dt_OutStockLockInfo> GetByOrderDetailId(int orderDetailId) |
| | | { |
| | | return BaseDal.QueryData(x => x.OrderDetailId == orderDetailId); |
| | | } |
| | | |
| | | public List<Dt_OutStockLockInfo> GetByOrderDetailId(int orderDetailId, OutLockStockStatusEnum outStockStatus) |
| | | { |
| | | return BaseDal.QueryData(x => x.OrderDetailId == orderDetailId && x.Status == outStockStatus.ObjToInt()); |
| | | } |
| | | } |
| | | } |