运踪数据接收逻辑调整:更新某单的目的港eta时,不再更新同船名、同航次、同船公司的eta

optimize
zhangxiaofeng 1 year ago
parent 0620893795
commit 59fd30a3bb

@ -2456,24 +2456,22 @@ namespace Myshipping.Application
}
if (!string.IsNullOrEmpty(o.VESSEL) && !string.IsNullOrEmpty(o.VOYNO) && !string.IsNullOrEmpty(o.CARRIERID))
{
var order = await _rep.AsQueryable().Filter(null, true).Where(x => x.VOYNO == o.VOYNO && x.VESSEL == o.VESSEL && x.CARRIERID == o.CARRIERID && x.TenantId == o.TenantId && x.IsDeleted == false && x.Id != item.BookingId).ToListAsync();
foreach (var it in order)
{
var _oldorder = it;
var _oldatd = it.ATA;
if (_oldatd != item.OpTime)
{
it.ATA = item.OpTime;
await _rep.UpdateAsync(it);
await _bookingorderservice.SendBookingOrder(new long[] { it.Id });
await _bookingorderservice.SaveLog(it, _oldorder);
}
}
}
//if (!string.IsNullOrEmpty(o.VESSEL) && !string.IsNullOrEmpty(o.VOYNO) && !string.IsNullOrEmpty(o.CARRIERID))
//{
// var order = await _rep.AsQueryable().Filter(null, true).Where(x => x.VOYNO == o.VOYNO && x.VESSEL == o.VESSEL && x.CARRIERID == o.CARRIERID && x.TenantId == o.TenantId && x.IsDeleted == false && x.Id != item.BookingId).ToListAsync();
// foreach (var it in order)
// {
// var _oldorder = it;
// var _oldatd = it.ATA;
// if (_oldatd != item.OpTime)
// {
// it.ATA = item.OpTime;
// await _rep.UpdateAsync(it);
// await _bookingorderservice.SendBookingOrder(new long[] { it.Id });
// await _bookingorderservice.SaveLog(it, _oldorder);
// }
// }
//}
}
#endregion

Loading…
Cancel
Save