optimize
wet 1 year ago
parent e1ff5d051c
commit e316df562e

@ -120,9 +120,9 @@ namespace Myshipping.Application
await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
}
if ((dto.ETA != null || dto.ETD != null || dto.ATD != null) && !string.IsNullOrEmpty(dto.Vessel) && string.IsNullOrEmpty(dto.Voyno))
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).ToListAsync();
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).ToListAsync();
bool issend = false;
if (order != null)
{
@ -151,11 +151,17 @@ namespace Myshipping.Application
{
issend = true;
await _order.AsUpdateable(it).IgnoreColumns().ExecuteCommandAsync();
}
}
if (issend)
{
await _bookingorderservice.SendBookingOrder(order.Where(x => x.ParentId == 0).Select(x => x.Id).ToArray());
}
}

Loading…
Cancel
Save