| | |
| | | |
| | | _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfo.Details, beforeQuantity, stockInfo.Details.Sum(x => x.StockQuantity) + beforeQuantity, WIDESEA_Common.StockEnum.StockChangeType.MaterielGroup); |
| | | } |
| | | catch(Exception ex) |
| | | catch (Exception ex) |
| | | { |
| | | _logger.LogInformation($"InboundTaskCompleted AddLocationStatusChangeRecord : {ex.Message} " ); |
| | | _logger.LogInformation($"InboundTaskCompleted AddLocationStatusChangeRecord : {ex.Message} "); |
| | | } |
| | | try |
| | | try |
| | | { |
| | | foreach (var inboundOrder in inboundOrders) |
| | | { |
| | |
| | | { |
| | | _locationStatusChangeRecordService.AddLocationStatusChangeRecord(locationInfo, beforelocationStatus, StockChangeType.Inbound.ObjToInt(), "", task.TaskNum); |
| | | } |
| | | catch(Exception ex) |
| | | catch (Exception ex) |
| | | { |
| | | _logger.LogInformation($"InEmptyTaskCompleted AddLocationStatusChangeRecord : {ex.Message} "); |
| | | } |
| | |
| | | { |
| | | await Db.Deleteable(task).ExecuteCommandAsync(); |
| | | } |
| | | |
| | | |
| | | await RecalculateOrderStatus(task.OrderNo); |
| | | try |
| | | { |
| | |
| | | _logger.LogInformation($"InPickTaskCompleted AddLocationStatusChangeRecord : {ex.Message} "); |
| | | } |
| | | |
| | | _logger.LogInformation($"æçååºå®æå¤çæå - ä»»å¡å·: {task.TaskNum}, æç: {task.PalletCode}, 订å: {task.OrderNo}"); |
| | | _logger.LogInformation($"æçååºå®æå¤çæå - ä»»å¡å·: {task.TaskNum}, æç: {task.PalletCode}, 订å: {task.OrderNo} è´§ä½ç¶æï¼{locationInfo.LocationStatus}"); |
| | | _ = Task.Run(async () => |
| | | { |
| | | try |
| | |
| | | { |
| | | try |
| | | { |
| | | |
| | | |
| | | |
| | | |
| | | // è·ååå½±åç订åæç»IDï¼å»éï¼ |
| | | //var affectedDetailIds = returnLocks |
| | | // .Select(x => x.OrderDetailId) |
| | |
| | | |
| | | _logger.LogInformation($"æ´æ°è®¢åç¶æ - OrderNo: {orderNo}, æ§ç¶æ: {outboundOrder.OrderStatus}, æ°ç¶æ: {newStatus}"); |
| | | } |
| | | |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | |
| | | allocatefeedmodel.Details.Add(detailModel); |
| | | } |
| | | var groupedResult = allocatefeedmodel.Details |
| | | .GroupBy(item => new { item.WarehouseCode, item.MaterialCode, item.Unit, item.LineNo }) |
| | | .Select(group => |
| | | { |
| | | |
| | | var deduplicatedBarcodes = group.SelectMany(x => x.Barcodes) |
| | | .GroupBy(b => b.Barcode) |
| | | .Select(b => new BarcodeInfo |
| | | { |
| | | Barcode = b.Key, |
| | | BatchNo = b.First().BatchNo, |
| | | SupplyCode = b.First().SupplyCode, |
| | | Qty = b.Max(x => x.Qty), |
| | | Unit = b.First().Unit |
| | | }).ToList(); |
| | | return new AllocateDtoDetail |
| | | { |
| | | WarehouseCode = group.Key.WarehouseCode, |
| | | MaterialCode = group.Key.MaterialCode, |
| | | LineNo = group.Key.LineNo, |
| | | Qty = deduplicatedBarcodes.Sum(b => b.Qty), |
| | | Unit = group.Key.Unit, |
| | | Barcodes = deduplicatedBarcodes |
| | | }; |
| | | }).ToList(); |
| | | |
| | | allocatefeedmodel.Details = groupedResult; |
| | | |
| | | |
| | | var result = await _invokeMESService.FeedbackAllocate(allocatefeedmodel); |
| | | if (result != null && result.code == 200) |
| | |
| | | ReturnToMESStatus = 1, |
| | | }).Where(x => x.OrderNo == orderNo).ExecuteCommandAsync(); |
| | | } |
| | | else |
| | | { |
| | | await _outboundOrderDetailService.Db.Updateable<Dt_OutboundOrderDetail>() |
| | | .SetColumns(x => x.ReturnToMESStatus == 2) |
| | | .Where(x => x.OrderId == outboundOrder.Id) |
| | | .ExecuteCommandAsync(); |
| | | |
| | | await _outboundOrderService.Db.Updateable<Dt_OutboundOrder>() |
| | | .SetColumns(it => new Dt_OutboundOrder { ReturnToMESStatus = 2, Remark = result.message }) |
| | | .Where(x => x.OrderNo == orderNo) |
| | | .ExecuteCommandAsync(); |
| | | } |
| | | |
| | | } |
| | | } |
| | | else if (outboundOrder.OrderType == OutOrderTypeEnum.ReCheck.ObjToInt()) |
| | |
| | | feedmodel.details.Add(detailModel); |
| | | } |
| | | |
| | | var groupedResult = feedmodel.details |
| | | .GroupBy(item => new { item.warehouseCode, item.materialCode, item.unit, item.lineNo }) |
| | | .Select(group => |
| | | { |
| | | var deduplicatedBarcodes = group.SelectMany(x => x.barcodes) |
| | | .GroupBy(b => b.barcode) |
| | | .Select(b => new WIDESEA_DTO.Outbound.BarcodesModel |
| | | { |
| | | barcode = b.Key, |
| | | batchNo = b.First().batchNo, |
| | | supplyCode = b.First().supplyCode, |
| | | qty = b.Max(x => x.qty), |
| | | unit = b.First().unit |
| | | }).ToList(); |
| | | return new FeedbackOutboundDetailsModel |
| | | { |
| | | warehouseCode = group.Key.warehouseCode, |
| | | materialCode = group.Key.materialCode, |
| | | lineNo = group.Key.lineNo, |
| | | qty = deduplicatedBarcodes.Sum(b => b.qty), |
| | | unit = group.Key.unit, |
| | | barcodes = deduplicatedBarcodes |
| | | }; |
| | | }).ToList(); |
| | | |
| | | feedmodel.details = groupedResult; |
| | | |
| | | var result = await _invokeMESService.FeedbackOutbound(feedmodel); |
| | | if (result != null && result.code == 200) |
| | | { |