fix: SetOrderStatusToCompleteAsync->GetValueOrDefault<double>(nameof(IMeasuringNetWeight.NetWeight), 0)

This commit is contained in:
Loretta 2025-11-07 15:51:37 +01:00
parent 653652f4d0
commit 85125132d2
2 changed files with 3 additions and 1 deletions

View File

@ -473,7 +473,7 @@ public class FruitBankDbContext : MgDbContextBase,
if (!orderItemDto.IsMeasurable) continue;
var prevNetWeightFromGa = orderItemDto.GenericAttributes.GetValueOrDefault(nameof(IMeasuringNetWeight.NetWeight), 0);
var prevNetWeightFromGa = orderItemDto.GenericAttributes.GetValueOrDefault<double>(nameof(IMeasuringNetWeight.NetWeight), 0);
//var gaNetWeight = CommonHelper.To<double>(orderItemDto.GenericAttributes.FirstOrDefault(x => x.Key == nameof(IMeasuringNetWeight.NetWeight))?.Value ?? "0");
await _fruitBankAttributeService.InsertOrUpdateGenericAttributeAsync<OrderItem, double>

View File

@ -82,6 +82,8 @@ public class MeasurementService : MeasurementServiceBase<Logger>, IMeasurementSe
foreach (var orderItemPallet in orderItemPallets)
{
orderItemPallet.RevisorId = 0;
orderItemPallet.IsMeasured = false;
await _dbContext.OrderItemPallets.UpdateAsync(orderItemPallet);
}