From c90fe9b61e7c89959d6940f72dd24cebee4f0485 Mon Sep 17 00:00:00 2001 From: zhangxiaofeng <1939543722@qq.com> Date: Fri, 17 May 2024 09:32:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=88=B9=E6=9C=9F=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E5=A6=82=E6=9E=9C=E8=88=B9=E6=9C=9F=E7=9A=84=E5=90=AF?= =?UTF-8?q?=E8=BF=90=E6=B8=AFId=E4=B8=8D=E4=B8=BA=E7=A9=BA=EF=BC=8C?= =?UTF-8?q?=E5=88=99=E6=89=B9=E9=87=8F=E6=9B=B4=E6=96=B0=E6=97=B6=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=9D=A1=E4=BB=B6=EF=BC=9A=E6=A0=B9=E6=8D=AE=E5=90=AF?= =?UTF-8?q?=E8=BF=90=E6=B8=AFId=E6=9F=A5=E8=AE=A2=E8=88=B1=EF=BC=9B?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=9B=B4=E6=96=B0=E8=AE=A2=E8=88=B1=E6=97=B6?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BF=AE=E6=94=B9=E6=88=AA=E6=B8=AF=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E6=88=AA=E5=8D=95=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BookingVesselInfoService.cs | 31 ++++++++++++++++--- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/Myshipping.Application/Service/BookingVesselInfo/BookingVesselInfoService.cs b/Myshipping.Application/Service/BookingVesselInfo/BookingVesselInfoService.cs index 4f4593a7..17e9797c 100644 --- a/Myshipping.Application/Service/BookingVesselInfo/BookingVesselInfoService.cs +++ b/Myshipping.Application/Service/BookingVesselInfo/BookingVesselInfoService.cs @@ -29,8 +29,8 @@ namespace Myshipping.Application private readonly SqlSugarRepository _order; private readonly ILogger _logger; private readonly IHubContext _chatHubContext; - public BookingVesselInfoService(SqlSugarRepository rep, ILogger logger, SqlSugarRepository order, - ISysCacheService sysCacheService, + public BookingVesselInfoService(SqlSugarRepository rep, ILogger logger, SqlSugarRepository order, + ISysCacheService sysCacheService, IBookingOrderService bookingorderservice, IHubContext chatHubContext) { @@ -153,10 +153,20 @@ namespace Myshipping.Application } - if ((dto.ETA != null || dto.ETD != null || dto.ATD != null) && !string.IsNullOrEmpty(old.Vessel) && !string.IsNullOrEmpty(old.Voyno) && !string.IsNullOrEmpty(old.CARRIERID)) + if ((dto.ETA != null || dto.ETD != null || dto.ATD != null) + && !string.IsNullOrEmpty(old.Vessel) + && !string.IsNullOrEmpty(old.Voyno) + && !string.IsNullOrEmpty(old.CARRIERID)) { - var order = await _order.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID && x.IsDeleted == false && x.VESSEL == old.Vessel && x.VOYNO == old.Voyno - && x.CARRIERID == old.CARRIERID).ToListAsync(); + var order = await _order.AsQueryable() + .Filter(null, true) + .Where(x => x.TenantId == UserManager.TENANT_ID + && x.IsDeleted == false + && x.VESSEL == old.Vessel + && x.VOYNO == old.Voyno + && x.CARRIERID == old.CARRIERID) + .WhereIF(!string.IsNullOrEmpty(old.PortLoadingId), x => x.PORTLOADID == old.PortLoadingId) + .ToListAsync(); bool issend = false; if (order != null) { @@ -213,6 +223,17 @@ namespace Myshipping.Application it.ATD = dto.ATD; } + if (dto.ClosingDate != null && dto.ClosingDate != it.CLOSINGDATE) + { + flag = true; + it.CLOSINGDATE = dto.ClosingDate; + } + if (dto.CloseDocTime != null && dto.CloseDocTime != it.CLOSEDOCDATE) + { + flag = true; + it.CLOSEDOCDATE = dto.CloseDocTime; + } + if (flag) { issend = true;