| | |
| | | { |
| | | |
| | | var distinctDetails = allocateOrder.Details |
| | | .GroupBy(d => string.IsNullOrEmpty(d.Barcode) |
| | | ? $"{d.MaterielCode}_{d.BatchNo}_{d.SupplyCode}_{d.WarehouseCode}" |
| | | : d.Barcode) |
| | | .Select(g => new |
| | | { |
| | | Detail = g.First(), |
| | | //æ±æ»åç»å
çæ°é |
| | | Qty = g.Sum(x => x.BarcodeQty ?? x.OrderQuantity) |
| | | }).ToList(); |
| | | .GroupBy(d => string.IsNullOrEmpty(d.Barcode) |
| | | ? $"{d.MaterielCode}_{d.BatchNo}_{d.SupplyCode}_{d.WarehouseCode}" |
| | | : d.Barcode) |
| | | .Select(g => new |
| | | { |
| | | Detail = g.First(), |
| | | //æ±æ»åç»å
çæ°é |
| | | Qty = g.Sum(x => x.BarcodeQty ?? x.OrderQuantity) |
| | | }).ToList(); |
| | | |
| | | return new Dt_OutboundOrder() |
| | | { |
| | |
| | | MaterielName = "", |
| | | BatchNo = item.Detail.BatchNo, |
| | | OrderQuantity = item.Detail.OrderQuantity, |
| | | BarcodeQty = (decimal)item.Detail.BarcodeQty, |
| | | BarcodeUnit = item.Detail.BarcodeUnit, |
| | | BarcodeQty = item.Detail.BarcodeQty??0, |
| | | BarcodeUnit = item.Detail.BarcodeUnit??"", |
| | | LockQuantity = 0, |
| | | lineNo = item.Detail.LineNo, |
| | | OverOutQuantity = 0, |