| | |
| | | { |
| | | // è·å该æç»å¯¹åºçæ¡ç ä¿¡æ¯ï¼ä»éå®è®°å½ï¼ |
| | | var detailLocks = await _outStockLockInfoService.Db.Queryable<Dt_OutStockLockInfo>() |
| | | .Where(x => x.OrderNo == orderNo && detailids.Contains(x.OrderDetailId) && |
| | | .Where(x => x.OrderNo == orderNo && detail.Id == x.OrderDetailId && |
| | | x.Status == (int)OutLockStockStatusEnum.æ£é宿) |
| | | .ToListAsync(); |
| | | var detailModel = new FeedbackOutboundDetailsModel |
| | |
| | | qty = detail.BarcodeQty, // 使ç¨è®¢åæç»çå·²åºåºæ°é |
| | | currentDeliveryQty = detail.BarcodeQty, |
| | | unit = detail.BarcodeUnit, |
| | | barcodes = new List<WIDESEA_DTO.Outbound.BarcodesModel> () |
| | | barcodes = new List<WIDESEA_DTO.Outbound.BarcodesModel>() |
| | | }; |
| | | |
| | | if (detailLocks.Any(x => x.BarcodeUnit != x.Unit)) |
| | | foreach (var item in detailLocks) |
| | | { |
| | | foreach (var item in detailLocks) |
| | | var barmodel = new WIDESEA_DTO.Outbound.BarcodesModel |
| | | { |
| | | var barmodel = new WIDESEA_DTO.Outbound.BarcodesModel |
| | | { |
| | | barcode = item.CurrentBarcode, |
| | | supplyCode = item.SupplyCode, |
| | | batchNo = item.BatchNo, |
| | | unit = item.BarcodeUnit, |
| | | qty = item.BarcodeQty // æ¡ç 级å«çæ°éä»ç¨éå®è®°å½ |
| | | }; |
| | | if (item.BarcodeUnit != item.Unit) |
| | | { |
| | | var issueoStockResult = await _materialUnitService.ConvertAsync(item.MaterielCode, item.BarcodeQty, item.Unit,item.BarcodeUnit); |
| | | barmodel.unit = issueoStockResult.Unit; |
| | | barmodel.qty = issueoStockResult.Quantity; |
| | | } |
| | | detailModel.qty = barmodel.qty; |
| | | detailModel.currentDeliveryQty = barmodel.qty; |
| | | detailModel.barcodes.Add(barmodel); |
| | | barcode = item.CurrentBarcode, |
| | | supplyCode = item.SupplyCode, |
| | | batchNo = item.BatchNo, |
| | | unit = item.BarcodeUnit, |
| | | qty = item.BarcodeQty // æ¡ç 级å«çæ°éä»ç¨éå®è®°å½ |
| | | }; |
| | | if (item.BarcodeUnit != item.Unit) |
| | | { |
| | | var issueoStockResult = await _materialUnitService.ConvertAsync(item.MaterielCode, item.BarcodeQty, item.Unit, item.BarcodeUnit); |
| | | barmodel.unit = issueoStockResult.Unit; |
| | | barmodel.qty = issueoStockResult.Quantity; |
| | | } |
| | | } |
| | | detailModel.qty += barmodel.qty; |
| | | detailModel.currentDeliveryQty += barmodel.qty; |
| | | detailModel.barcodes.Add(barmodel); |
| | | } |
| | | |
| | | feedmodel.details.Add(detailModel); |
| | | } |
| | | |
| | |
| | | .LeftJoin<Dt_OutboundOrder>((o, item) => o.OrderId == item.Id) |
| | | .Where((o, item) => item.OrderNo == orderNo && item.ReturnToMESStatus != 1) |
| | | .Select((o, item) => o) |
| | | .ToListAsync(); |
| | | .ToListAsync(); |
| | | var secallCompleted = true; |
| | | foreach (var detail in orderDetails.Where(x => x.ReturnToMESStatus == 0).ToList()) |
| | | { |
| | |
| | | materialCode = detail.MaterielCode, |
| | | lineNo = detail.lineNo, // 注æï¼è¿éå¯è½éè¦è°æ´å段å |
| | | warehouseCode = detail.WarehouseCode, |
| | | qty = detail.BarcodeQty, |
| | | qty = detail.BarcodeQty, |
| | | currentDeliveryQty = detail.BarcodeQty, |
| | | unit = detail.BarcodeUnit, |
| | | barcodes = detailLocks.Select(lockInfo => new WIDESEA_DTO.Outbound.BarcodesModel |