diff --git a/Myshipping.Application/Service/BookingVesselInfo/BookingVesselInfoService.cs b/Myshipping.Application/Service/BookingVesselInfo/BookingVesselInfoService.cs index 1be99df6..358d3f02 100644 --- a/Myshipping.Application/Service/BookingVesselInfo/BookingVesselInfoService.cs +++ b/Myshipping.Application/Service/BookingVesselInfo/BookingVesselInfoService.cs @@ -12,6 +12,7 @@ using System.Collections.Generic; using System; using Myshipping.Core.Service; using Myshipping.Core.Entity; +using Microsoft.Extensions.Logging; namespace Myshipping.Application { @@ -25,12 +26,14 @@ namespace Myshipping.Application private readonly ISysCacheService _sysCacheService; private readonly IBookingOrderService _bookingorderservice; private readonly SqlSugarRepository _order; - public BookingVesselInfoService(SqlSugarRepository rep, SqlSugarRepository order,ISysCacheService sysCacheService,IBookingOrderService bookingorderservice) + private readonly ILogger _logger; + public BookingVesselInfoService(SqlSugarRepository rep, ILogger logger, SqlSugarRepository order,ISysCacheService sysCacheService,IBookingOrderService bookingorderservice) { _sysCacheService = sysCacheService; _rep = rep; _order = order; _bookingorderservice = bookingorderservice; + this._logger = logger; } ///// ///// 获取列表 @@ -123,10 +126,11 @@ namespace Myshipping.Application if ((dto.ETA != null || dto.ETD != null || dto.ATD != null) && !string.IsNullOrEmpty(dto.Vessel) && !string.IsNullOrEmpty(dto.Voyno)&&!string.IsNullOrEmpty(dto.CARRIERID)) { var order=await _order.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID && x.IsDeleted == false && x.VESSEL == dto.Vessel && x.VOYNO == dto.Voyno - &&x.CARRIERID==dto.CARRIERID&&x.CARRIER==dto.CARRIER).ToListAsync(); + &&x.CARRIERID==dto.CARRIERID).ToListAsync(); bool issend = false; if (order != null) { + _logger.LogInformation("手动更新船期:" + order.ToJsonString()); foreach (var it in order) { bool flag = false; @@ -141,7 +145,7 @@ namespace Myshipping.Application it.YgtETD = dto.YgtETD; } - if (it.ATD != dto.ATD && it.ATD == null) + if (it.ATD != dto.ATD&&dto.ATD!=null) { flag = true;