|
|
@ -1679,14 +1679,16 @@ namespace Myshipping.Application
|
|
|
|
await _vesselinfo.AsUpdateable(model).IgnoreColumns().ExecuteCommandAsync();
|
|
|
|
await _vesselinfo.AsUpdateable(model).IgnoreColumns().ExecuteCommandAsync();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var order = await _rep.AsQueryable().Filter(null, true).Where(x => x.VESSEL == item.Vessel && x.VOYNO == item.Voyno && x.TenantId == UserManager.TENANT_ID&&x.IsDeleted==false).ToListAsync();
|
|
|
|
var order = await _rep.AsQueryable().Filter(null, true).Where(x => x.VESSEL == item.Vessel && x.VOYNO == item.Voyno && x.TenantId == UserManager.TENANT_ID && x.IsDeleted == false).ToListAsync();
|
|
|
|
|
|
|
|
bool issend = false;
|
|
|
|
if (order != null)
|
|
|
|
if (order != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
foreach (var it in order)
|
|
|
|
foreach (var it in order)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
bool flag = false;
|
|
|
|
if (it.StartETA != item.ETA)
|
|
|
|
if (it.StartETA != item.ETA)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
flag = true;
|
|
|
|
////添加booking日志
|
|
|
|
////添加booking日志
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1708,6 +1710,7 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (it.YgtETD != item.ETD)
|
|
|
|
if (it.YgtETD != item.ETD)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
flag = true;
|
|
|
|
////添加booking日志
|
|
|
|
////添加booking日志
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1729,6 +1732,7 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (it.ATD != item.ATD)
|
|
|
|
if (it.ATD != item.ATD)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
flag = true;
|
|
|
|
////添加booking日志
|
|
|
|
////添加booking日志
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1750,6 +1754,7 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (it.StartATA != item.ATA)
|
|
|
|
if (it.StartATA != item.ATA)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
flag = true;
|
|
|
|
////添加booking日志
|
|
|
|
////添加booking日志
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1769,21 +1774,34 @@ namespace Myshipping.Application
|
|
|
|
});
|
|
|
|
});
|
|
|
|
it.StartATA = item.ATA;
|
|
|
|
it.StartATA = item.ATA;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
await _rep.AsUpdateable(it).IgnoreColumns().ExecuteCommandAsync();
|
|
|
|
if (flag)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
issend = true;
|
|
|
|
|
|
|
|
await _rep.AsUpdateable(it).IgnoreColumns().ExecuteCommandAsync();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var itemcode = _cache.GetAllTenantParam().Result.Where(x => x.ParaCode == "BOOKING_DATA_PUSH" && x.TenantId == UserManager.TENANT_ID).Select(x => x.ItemCode).FirstOrDefault();
|
|
|
|
if (issend)
|
|
|
|
if (!string.IsNullOrEmpty(itemcode))
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (itemcode == "true") {
|
|
|
|
|
|
|
|
List<long> list = new List<long>();
|
|
|
|
var itemcode = _cache.GetAllTenantParam().Result.Where(x => x.ParaCode == "BOOKING_DATA_PUSH" && x.TenantId == UserManager.TENANT_ID).Select(x => x.ItemCode).FirstOrDefault();
|
|
|
|
list = order.Where(x=>x.ParentId==0).Select(x => x.Id).ToList();
|
|
|
|
if (!string.IsNullOrEmpty(itemcode))
|
|
|
|
if (list!=null&&list.Count>0) {
|
|
|
|
{
|
|
|
|
await _bookingorderservice.SendBookingOrder(list.ToArray());
|
|
|
|
if (itemcode == "true")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
List<long> list = new List<long>();
|
|
|
|
|
|
|
|
list = order.Where(x => x.ParentId == 0).Select(x => x.Id).ToList();
|
|
|
|
|
|
|
|
if (list != null && list.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
await _bookingorderservice.SendBookingOrder(list.ToArray());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1806,14 +1824,18 @@ namespace Myshipping.Application
|
|
|
|
//model.ETD = item.ETD;
|
|
|
|
//model.ETD = item.ETD;
|
|
|
|
//model.ATD = item.ATD;
|
|
|
|
//model.ATD = item.ATD;
|
|
|
|
//await _vesselinfo.AsUpdateable(model).IgnoreColumns().ExecuteCommandAsync();
|
|
|
|
//await _vesselinfo.AsUpdateable(model).IgnoreColumns().ExecuteCommandAsync();
|
|
|
|
var order = await _rep.AsQueryable().Filter(null, true).Where(x => x.VESSEL == item.Vessel && x.VOYNO == item.Voyno && x.TenantId == UserManager.TENANT_ID&&x.IsDeleted==false).ToListAsync();
|
|
|
|
var order = await _rep.AsQueryable().Filter(null, true).Where(x => x.VESSEL == item.Vessel && x.VOYNO == item.Voyno && x.TenantId == UserManager.TENANT_ID && x.IsDeleted == false).ToListAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool issend = false;
|
|
|
|
if (order != null)
|
|
|
|
if (order != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
foreach (var it in order)
|
|
|
|
foreach (var it in order)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
bool flag = false;
|
|
|
|
|
|
|
|
|
|
|
|
if (it.ETA != item.ETA)
|
|
|
|
if (it.ETA != item.ETA)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
flag = true;
|
|
|
|
////添加booking日志
|
|
|
|
////添加booking日志
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1835,6 +1857,7 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (it.MiddleETA != item.MiddleETA)
|
|
|
|
if (it.MiddleETA != item.MiddleETA)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
flag = true;
|
|
|
|
////添加booking日志
|
|
|
|
////添加booking日志
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1856,6 +1879,7 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (it.MiddleETD != item.MiddleETD)
|
|
|
|
if (it.MiddleETD != item.MiddleETD)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
flag = true;
|
|
|
|
////添加booking日志
|
|
|
|
////添加booking日志
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1877,6 +1901,7 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (item.MiddleATA != it.MiddleATA)
|
|
|
|
if (item.MiddleATA != it.MiddleATA)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
flag = true;
|
|
|
|
////添加booking日志
|
|
|
|
////添加booking日志
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1899,6 +1924,7 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
if (item.MiddleATD != it.MiddleATD)
|
|
|
|
if (item.MiddleATD != it.MiddleATD)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
flag = true;
|
|
|
|
////添加booking日志
|
|
|
|
////添加booking日志
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1921,6 +1947,7 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
if (item.ATA != it.ATA)
|
|
|
|
if (item.ATA != it.ATA)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
flag = true;
|
|
|
|
////添加booking日志
|
|
|
|
////添加booking日志
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1941,15 +1968,25 @@ namespace Myshipping.Application
|
|
|
|
it.ATA = item.ATA;
|
|
|
|
it.ATA = item.ATA;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
await _rep.AsUpdateable(it).IgnoreColumns().ExecuteCommandAsync();
|
|
|
|
if (flag)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
issend = true;
|
|
|
|
|
|
|
|
await _rep.AsUpdateable(it).IgnoreColumns().ExecuteCommandAsync();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var itemcode = _cache.GetAllTenantParam().Result.Where(x => x.ParaCode == "BOOKING_DATA_PUSH" && x.TenantId == UserManager.TENANT_ID).Select(x => x.ItemCode).FirstOrDefault();
|
|
|
|
if (issend)
|
|
|
|
if (!string.IsNullOrEmpty(itemcode))
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (itemcode == "true")
|
|
|
|
|
|
|
|
await _bookingorderservice.SendBookingOrder(order.Where(x => x.ParentId == 0).Select(x => x.Id).ToArray());
|
|
|
|
var itemcode = _cache.GetAllTenantParam().Result.Where(x => x.ParaCode == "BOOKING_DATA_PUSH" && x.TenantId == UserManager.TENANT_ID).Select(x => x.ItemCode).FirstOrDefault();
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(itemcode))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (itemcode == "true")
|
|
|
|
|
|
|
|
await _bookingorderservice.SendBookingOrder(order.Where(x => x.ParentId == 0).Select(x => x.Id).ToArray());
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|