| | |
| | | MaterielCode = outboundOrderdetail.MaterielCode, |
| | | Position = item.LocationCode, |
| | | PalletCode = item.PalletCode, |
| | | AreaId = Convert.ToInt32(requestOut.AreaId), |
| | | //AreaId = Convert.ToInt32(requestOut.AreaId), |
| | | AreaId = Convert.ToInt32(2), |
| | | }; |
| | | taskDtos.Add(task); |
| | | item.StockInfoDetails.Where(x => x.MaterielCode == outboundOrderdetail.MaterielCode).FirstOrDefault().Status = (int)StockStateEmun.åºåºéå®; |
| | |
| | | { |
| | | throw new Exception($"{outboundOrderdetail.MaterielCode}æªæ¾å°å¯åºåºæç"); |
| | | } |
| | | //List<DtStockInfo> stockNew = new List<DtStockInfo>(); |
| | | //List<Dt_OrderOutDetails> outDetailsNew = new List<Dt_OrderOutDetails>(); |
| | | foreach (var item in taskNews) |
| | | { |
| | | taskDTOs.Add(CreateTaskDTO(item)); |
| | |
| | | locations.AddRange(result1.Item2); |
| | | locations.AddRange(result2.Item2); |
| | | } |
| | | |
| | | outboundOrder.OrderStatus = (int)OrderStateEmun.å¼å§; |
| | | await _unitOfWorkManage.UseTranAsync(async () => |
| | | { |
| | | _taskRepository.AddData(taskNews); |
| | | _stockInfoRepository.UpdateDataNav(result.Item1); |
| | | await _locationStatusChangeRecordRepository.AddDataAsync(locationStatusChangeRecords); |
| | | await _locationRepository.UpdateDataAsync(locations); |
| | | BaseDal.UpdateData(outboundOrder); |
| | | _productionoutboundOrderDetailRepository.UpdateData(result.Item2); |
| | | _outDetailsRepository.AddData(outDetails); |
| | | }); |
| | |
| | | |
| | | } |
| | | outboundOrderdetail.OverOutQuantity = outboundOrderdetail.OrderQuantity - needQuantity; |
| | | outboundOrderdetail.NotOutQuantity = outboundOrderdetail.OrderQuantity - outboundOrderdetail.OverOutQuantity; |
| | | |
| | | if (outboundOrderdetail.OverOutQuantity != 0) |
| | | { |
| | | outboundOrderdetail.OrderDetailStatus = (int)OrderStateEmun.å¼å§; |
| | | } |
| | | if (outboundOrderdetail.OverOutQuantity == outboundOrderdetail.OrderQuantity) |
| | | { |
| | | outboundOrderdetail.OrderDetailStatus = (int)OrderStateEmun.已宿; |
| | | } |
| | | return (outStockNews, outboundOrderdetail); |
| | | } |
| | | |