| | |
| | | } |
| | | else |
| | | { |
| | | for (int i = 0; i < outStockLockInfos.Count; i++) |
| | | foreach (var item in outStockLockInfos) |
| | | { |
| | | Dt_OutboundOrderDetail outboundOrderDetail = _outboundService.OutboundOrderDetailService.Repository.QueryFirst(x => x.Id == outStockLockInfos[i].OrderDetailId); |
| | | Dt_OutboundOrderDetail outboundOrderDetail = _outboundService.OutboundOrderDetailService.Repository.QueryFirst(x => x.Id == item.OrderDetailId); |
| | | if (outboundOrderDetail != null) |
| | | { |
| | | outboundOrderDetail.OverOutQuantity = outboundOrderDetail.LockQuantity; |
| | | if (outboundOrderDetail.LockQuantity == outboundOrderDetail.OrderQuantity) |
| | | outboundOrderDetail.OverOutQuantity = item.AssignQuantity; |
| | | if (outboundOrderDetail.OverOutQuantity == outboundOrderDetail.OrderQuantity) |
| | | { |
| | | outboundOrderDetail.OrderDetailStatus = OrderDetailStatusEnum.Over.ObjToInt(); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | if (warehouse.WarehouseCode != WarehouseEnum.HA64.ToString()) |
| | | { |
| | | //æ¨éåºåºå®æ |
| | | WebResponseContent webResponse = _outboundService.OutboundOrderService.TestOutUpload(outboundOrderDetails.FirstOrDefault().Id, stockInfo); |
| | | if (!webResponse.Status) |
| | | { |
| | | return webResponse; |
| | | } |
| | | } |
| | | |
| | | _unitOfWorkManage.BeginTran(); |
| | | if (outboundOrderDetails.Count > 0) |
| | | { |
| | |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, (LocationStatusEnum)beforeStatus, LocationChangeType.OutboundCompleted, stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", task.TaskNum); |
| | | _unitOfWorkManage.CommitTran(); |
| | | |
| | | |
| | | if (warehouse.WarehouseCode != WarehouseEnum.HA64.ToString()) |
| | | { |
| | | _outboundService.OutboundOrderService.TestOutUpload(outboundOrderDetails.FirstOrDefault().Id, outStockLockInfos); |
| | | } |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |