|
|
|
@ -29,8 +29,8 @@ namespace Myshipping.Application
|
|
|
|
|
private readonly SqlSugarRepository<BookingOrder> _order;
|
|
|
|
|
private readonly ILogger<BookingVesselInfoService> _logger;
|
|
|
|
|
private readonly IHubContext<ChatHub, IChatClient> _chatHubContext;
|
|
|
|
|
public BookingVesselInfoService(SqlSugarRepository<DjyVesselInfo> rep, ILogger<BookingVesselInfoService> logger, SqlSugarRepository<BookingOrder> order,
|
|
|
|
|
ISysCacheService sysCacheService,
|
|
|
|
|
public BookingVesselInfoService(SqlSugarRepository<DjyVesselInfo> rep, ILogger<BookingVesselInfoService> logger, SqlSugarRepository<BookingOrder> order,
|
|
|
|
|
ISysCacheService sysCacheService,
|
|
|
|
|
IBookingOrderService bookingorderservice,
|
|
|
|
|
IHubContext<ChatHub, IChatClient> 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;
|
|
|
|
|