| | |
| | | } |
| | | if (result.Item1 != null && result.Item1.Count > 0) |
| | | { |
| | | Dt_Task? task = BaseDal.QueryData(x=>x.TaskType==TaskTypeEnum.OutProduct.ObjToInt()).OrderByDescending(x=>x.Grade).FirstOrDefault(); |
| | | Dt_Task? task = BaseDal.QueryData(x=>x.TaskType==TaskTypeEnum.OutProduct.ObjToInt()).OrderBy(x=>x.Grade).FirstOrDefault(); |
| | | //æ´æ°åºåºç®çä½ç½® |
| | | result.Item1.ForEach(x => |
| | | { |
| | |
| | | TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)), |
| | | PalletType = stockInfo.PalletType, |
| | | WarehouseId = stockInfo.WarehouseId, |
| | | GroupId= groupId |
| | | GroupId= groupId, |
| | | MaterielCode = stockInfo.proStockInfoDetails.Where(x => x.ProStockId == stockInfo.Id).FirstOrDefault()?.ProductCode, |
| | | Quantity = (float)stockInfo.proStockInfoDetails.Where(x => x.ProStockId == stockInfo.Id).Sum(x=> x.StockPcsQty) |
| | | }; |
| | | tasks.Add(task); |
| | | } |
| | |
| | | TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)), |
| | | PalletType = stockInfo.PalletType, |
| | | WarehouseId = stockInfo.WarehouseId, |
| | | |
| | | }; |
| | | if (taskType != TaskTypeEnum.OutEmpty) |
| | | { |
| | | task.MaterielCode = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode; |
| | | task.Quantity = (float)stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity); |
| | | } |
| | | if (stockInfo.StockLength>0) |
| | | { |
| | | task.TaskLength = stockInfo.StockLength; |
| | | } |
| | | tasks.Add(task); |
| | | } |
| | | } |
| | |
| | | StockId = x.Id, |
| | | TaskNum = 0, |
| | | OrderQuantity = OrderDetail.OrderQuantity, |
| | | Unit = OrderDetail.Unit |
| | | Unit = OrderDetail.Unit, |
| | | ProductionDate = v.ProductionDate, |
| | | EffectiveDate = v.EffectiveDate |
| | | }; |
| | | outStockLockInfos.Add(outStockLockInfo); |
| | | } |
| | |
| | | { |
| | | x.StockStatus = StockStatusEmun.åºåºéå®.ObjToInt(); |
| | | }); |
| | | outboundOrderDetails.ForEach(x => |
| | | { |
| | | x.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt(); |
| | | }); |
| | | Dt_OutboundOrder outboundOrder = _outboundRepository.OutboundOrderRepository.QueryFirst(x => x.Id == outboundOrderDetails.FirstOrDefault().OrderId); |
| | | if (outboundOrder.OrderStatus != OutOrderStatusEnum.åºåºä¸.ObjToInt()) |
| | | { |
| | | _outboundRepository.OutboundOrderRepository.UpdateData(outboundOrder); |
| | | } |
| | | WebResponseContent content = _outboundService.OutboundOrderDetailService.LockOutboundStockDataUpdate(stockInfos, outboundOrderDetails, outStockLockInfos, locationInfos, tasks: tasks); |
| | | |
| | | if (!content.Status) |