| | |
| | | UpdateStockStatus(pickedDetails.Select(x => x.PalletCode).ToList(), StockStatusEmun.åºåºéå®.ObjToInt()); |
| | | UpdateLocationStatus(pickedDetails.Select(x => x.LocationCode).ToList(), LocationStatusEnum.Lock.ObjToInt()); |
| | | } |
| | | //鿣å䏿£éï¼å»æéå®è®°å½ååºï¼å次ç»çæ¶æ£é¤åæ¡ç |
| | | if (outboundOrder.OrderType != InOrderTypeEnum.ReCheck.ObjToInt()) |
| | | { |
| | | UpdateOutStockLockInfo(outStockLockInfos); |
| | | } |
| | | |
| | | if (tasks.Any()) _taskRepository.AddData(tasks); |
| | | |
| | | |
| | | _unitOfWorkManage.CommitTran(); |
| | | |
| | |
| | | x => request.StockDetailIds.Contains(x.Id) |
| | | && x.MaterielCode == materielCalc.MaterielCode |
| | | && x.StockQuantity > 0 |
| | | && (x.Status == (int)StockStatusEmun.å
¥åºå®æ || x.Status == (int)StockStatusEmun.æå¨è§£é)); |
| | | && (x.Status == (int)StockStatusEmun.å
¥åºå®æ || x.Status == (int)StockStatusEmun.æå¨å»ç»)|| x.Status == (int)StockStatusEmun.æå¨è§£é); |
| | | |
| | | if (!specifiedStockDetails.Any()) |
| | | { |
| | |
| | | decimal totalAllocatedQuantity = CalcTotalAllocatedQuantity(lockInfos, stockInfo.Id, detail.MaterielCode); |
| | | lockInfo.AssignQuantity += actualAllocatedQuantity; |
| | | lockInfo.AllocatedQuantity = totalAllocatedQuantity; |
| | | // åééå®è®°å½ä¹æ´æ°OriginalQuantity为æçæ»åºåï¼å¯éï¼ä¿ææ°æ®ä¸è´ï¼ |
| | | if (palletMaterielTotalStock > 0) |
| | | lockInfo.OriginalQuantity = palletMaterielTotalStock; |
| | | lockInfoList.Add(lockInfo); |
| | | } |
| | | else |
| | | { |
| | | // ===== æ ¸å¿ä¼å2ï¼OriginalQuantityèµå¼ä¸ºæçç©ææ»åºå ===== |
| | | decimal originalQuantity = palletMaterielTotalStock; // æ¿ä»£åæå±é¨æç»æ°é |
| | | decimal originalQuantity = palletMaterielTotalStock; |
| | | |
| | | List<string> allDetailIds = outboundOrder.Details.Where(x => |
| | | x.OrderId == outboundOrder.Id && x.MaterielCode == detail.MaterielCode |
| | |
| | | // æ´ç®±åºåºæ éæå
|
| | | PerformFullOutboundOperation(stockInfo, request, lockInfo.TaskNum.GetValueOrDefault()); |
| | | |
| | | if (outboundOrder.OrderType != 0) |
| | | if (outboundOrder.OrderType == InOrderTypeEnum.InternalAllocat.ObjToInt()) |
| | | { |
| | | Dt_AllocateOrder allocateOrder = _allocateOrderRepository.QueryFirst(x => x.OrderNo == outboundOrder.OrderNo); |
| | | if (allocateOrder != null) |
| | |
| | | } |
| | | _allocateMaterialInfoRepository.AddData(allocateMaterialInfos); |
| | | } |
| | | } |
| | | else if(outboundOrder.OrderType == InOrderTypeEnum.ReCheck.ObjToInt()) |
| | | { |
| | | List<Dt_AllocateMaterialInfo> allocateMaterialInfos = new List<Dt_AllocateMaterialInfo>(); |
| | | foreach (var item in stockInfo.Details) |
| | | { |
| | | Dt_AllocateMaterialInfo allocateMaterialInfo = new Dt_AllocateMaterialInfo() |
| | | { |
| | | Barcode = item.Barcode??"", |
| | | BatchNo = item.BatchNo, |
| | | FactoryArea = item.FactoryArea, |
| | | MaterialCode = item.MaterielCode, |
| | | MaterialName = item.MaterielName, |
| | | OrderId = outboundOrder.Id, |
| | | OrderNo = outboundOrder.OrderNo, |
| | | Quantity = item.StockQuantity, |
| | | SupplyCode = item.SupplyCode??"", |
| | | Unit = item.Unit, |
| | | WarehouseCode = item.WarehouseCode??"" |
| | | }; |
| | | allocateMaterialInfos.Add(allocateMaterialInfo); |
| | | } |
| | | _allocateMaterialInfoRepository.AddData(allocateMaterialInfos); |
| | | } |
| | | |
| | | decimal allocatedQuantity = actualOutboundQuantity; |
| | |
| | | |
| | | MaterialCodeReturnDTO returnDTO = returnDTOs.First(x => x.Barcode == newBarcode); |
| | | |
| | | if (outboundOrder.OrderType != 0) |
| | | if (outboundOrder.OrderType == InOrderTypeEnum.ReCheck.ObjToInt()||outboundOrder.OrderType == InOrderTypeEnum.InternalAllocat.ObjToInt()) |
| | | { |
| | | allocateMaterialInfo = new Dt_AllocateMaterialInfo() |
| | | { |
| | |
| | | { |
| | | PerformFullOutboundOperation(stockDetail, stockInfo, actualOutboundQuantity, request, beforeQuantity, lockInfo.TaskNum.GetValueOrDefault()); |
| | | |
| | | if (outboundOrder.OrderType != 0) |
| | | if (outboundOrder.OrderType == InOrderTypeEnum.ReCheck.ObjToInt() || outboundOrder.OrderType == InOrderTypeEnum.InternalAllocat.ObjToInt()) |
| | | { |
| | | allocateMaterialInfo = new Dt_AllocateMaterialInfo() |
| | | { |
| | |
| | | |
| | | } |
| | | |
| | | // 夿æ¯å¦æ¯è°æ¨å |
| | | if (outboundOrder.OrderType != 0) |
| | | // 夿æ¯å¦æ¯æºä»è°æºä»å |
| | | if ( outboundOrder.OrderType == InOrderTypeEnum.InternalAllocat.ObjToInt()) |
| | | { |
| | | Dt_AllocateOrder allocateOrder = _allocateOrderRepository.QueryFirst(x => x.OrderNo == outboundOrder.OrderNo); |
| | | if (allocateOrder != null) |
| | |
| | | _feedbackMesService.BarcodeFeedback(newBarcode); |
| | | } |
| | | |
| | | // å é¤éå®è®°å½ï¼å¦æåºåºæç»å
¨é¨å®æï¼ ä¸CalculateActualOutboundQuantityæ¹æ³é颿³¨é代ç 2é1ä½¿ç¨ |
| | | if (CheckOutboundOrderDetailCompletedByMatCode(request.OrderNo, lockInfo.MaterielCode, outboundOrderDetails.First())) |
| | | { |
| | | Func<Dt_OutStockLockInfo, bool> supWhere = x => string.IsNullOrEmpty(outboundOrderDetails.First().SupplyCode) ? true : x.SupplyCode == outboundOrderDetails.First().SupplyCode; |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | // æ£æ¥åºåºåæ¯å¦å®æ |
| | | if (CheckOutboundOrderCompleted(request.OrderNo)) |
| | | { |