|
|
@ -71,11 +71,15 @@ namespace Myshipping.Application
|
|
|
|
private readonly SqlSugarRepository<CodeForwarder> _codeForwarder;
|
|
|
|
private readonly SqlSugarRepository<CodeForwarder> _codeForwarder;
|
|
|
|
private readonly SqlSugarRepository<BookingFile> _bookingfile;
|
|
|
|
private readonly SqlSugarRepository<BookingFile> _bookingfile;
|
|
|
|
private readonly SqlSugarRepository<DjyWebsiteAccountConfig> _accountconfig;
|
|
|
|
private readonly SqlSugarRepository<DjyWebsiteAccountConfig> _accountconfig;
|
|
|
|
|
|
|
|
private readonly SqlSugarRepository<BookingStatusLog> _repStatuslog;
|
|
|
|
|
|
|
|
private readonly SqlSugarRepository<BookingStatusLogDetail> _statuslogdetail;
|
|
|
|
|
|
|
|
private readonly SqlSugarRepository<BookingStatus> _repBookingStatus;
|
|
|
|
private readonly IBookingOrderService _bookingorderservice;
|
|
|
|
private readonly IBookingOrderService _bookingorderservice;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public DataSyncService(ILogger<DataSyncService> logger, ISysCacheService cache, SqlSugarRepository<BookingOrder> rep, SqlSugarRepository<BookingCtn> repCtn,
|
|
|
|
public DataSyncService(ILogger<DataSyncService> logger, ISysCacheService cache, SqlSugarRepository<BookingOrder> rep, SqlSugarRepository<BookingCtn> repCtn,
|
|
|
|
SqlSugarRepository<SysUser> repUser, SqlSugarRepository<SysTenant> repTenant, SqlSugarRepository<DjyCustomer> djycustomer,
|
|
|
|
SqlSugarRepository<SysUser> repUser, SqlSugarRepository<SysTenant> repTenant, SqlSugarRepository<DjyCustomer> djycustomer,
|
|
|
|
|
|
|
|
SqlSugarRepository<BookingStatusLog> statuslog, SqlSugarRepository<BookingStatusLogDetail> statuslogdetail, SqlSugarRepository<BookingStatus> repBookingStatus,
|
|
|
|
SqlSugarRepository<DjyCustomerContact> djycustomercontact, SqlSugarRepository<DjyVesselInfo> vesselinfo, SqlSugarRepository<BookingCtnDetail> ctndetailrep
|
|
|
|
SqlSugarRepository<DjyCustomerContact> djycustomercontact, SqlSugarRepository<DjyVesselInfo> vesselinfo, SqlSugarRepository<BookingCtnDetail> ctndetailrep
|
|
|
|
, SqlSugarRepository<BookingEDIExt> bookingEDIExt, SqlSugarRepository<BookingLog> bookinglog, SqlSugarRepository<BookingLogDetail> bookinglogdetail,
|
|
|
|
, SqlSugarRepository<BookingEDIExt> bookingEDIExt, SqlSugarRepository<BookingLog> bookinglog, SqlSugarRepository<BookingLogDetail> bookinglogdetail,
|
|
|
|
SqlSugarRepository<BookingGoodsStatus> goodsStatus, SqlSugarRepository<BookingGoodsStatusConfig> goodsStatusConfig, SqlSugarRepository<DjyTenantLine> repline,
|
|
|
|
SqlSugarRepository<BookingGoodsStatus> goodsStatus, SqlSugarRepository<BookingGoodsStatusConfig> goodsStatusConfig, SqlSugarRepository<DjyTenantLine> repline,
|
|
|
@ -109,6 +113,9 @@ namespace Myshipping.Application
|
|
|
|
this._accountconfig = accountconfig;
|
|
|
|
this._accountconfig = accountconfig;
|
|
|
|
this._bookingfile = bookingfile;
|
|
|
|
this._bookingfile = bookingfile;
|
|
|
|
this._bookingorderservice = bookingorderservice;
|
|
|
|
this._bookingorderservice = bookingorderservice;
|
|
|
|
|
|
|
|
this._repStatuslog = statuslog;
|
|
|
|
|
|
|
|
this._statuslogdetail = statuslogdetail;
|
|
|
|
|
|
|
|
this._repBookingStatus = repBookingStatus;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -465,14 +472,6 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
entity.ETA = m.ETA;
|
|
|
|
entity.ETA = m.ETA;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//if (m.ATD != null)
|
|
|
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
// entity.ATD = m.ATD;
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
//if (m.YgtETD != null)
|
|
|
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
// entity.YgtETD = m.YgtETD;
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
await _vesselinfo.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
|
|
|
|
await _vesselinfo.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
////根据船公司船名航次更新船期信息
|
|
|
|
////根据船公司船名航次更新船期信息
|
|
|
@ -486,19 +485,12 @@ namespace Myshipping.Application
|
|
|
|
_logger.LogInformation($"同步船期_查询到{UserManager.TENANT_NAME}需要更新{order.Count()}条订舱数据");
|
|
|
|
_logger.LogInformation($"同步船期_查询到{UserManager.TENANT_NAME}需要更新{order.Count()}条订舱数据");
|
|
|
|
foreach (var it in order)
|
|
|
|
foreach (var it in order)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
var old = it;
|
|
|
|
//更新订舱船期
|
|
|
|
//更新订舱船期
|
|
|
|
if (it.ETD != item.ETD && item.ETD != null)
|
|
|
|
if (it.ETD != item.ETD && item.ETD != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
it.ETD = item.ETD;
|
|
|
|
it.ETD = item.ETD;
|
|
|
|
|
|
|
|
|
|
|
|
//if (it.ATD != item.ATD && item.ATD != null)
|
|
|
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
// it.ATD = item.ATD;
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
//if (it.YgtETD != item.YgtETD && item.YgtETD != null)
|
|
|
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
// it.YgtETD = item.YgtETD;
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
await _rep.AsUpdateable(it).IgnoreColumns(it => new
|
|
|
|
await _rep.AsUpdateable(it).IgnoreColumns(it => new
|
|
|
|
{
|
|
|
|
{
|
|
|
|
it.ParentId,
|
|
|
|
it.ParentId,
|
|
|
@ -518,55 +510,14 @@ namespace Myshipping.Application
|
|
|
|
it.LstShipOrderCompareRltName,
|
|
|
|
it.LstShipOrderCompareRltName,
|
|
|
|
it.LstShipOrderCompareMode
|
|
|
|
it.LstShipOrderCompareMode
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
//记录日志
|
|
|
|
await _bookingorderservice.SaveLog(it, old);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
////添加booking日志
|
|
|
|
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Type = "Edit",
|
|
|
|
|
|
|
|
BookingId = it.Id,
|
|
|
|
|
|
|
|
TenantId = Convert.ToInt64(UserManager.TENANT_ID),
|
|
|
|
|
|
|
|
CreatedTime = DateTime.Now,
|
|
|
|
|
|
|
|
CreatedUserId = CreatedUserId,
|
|
|
|
|
|
|
|
CreatedUserName = item.CreatedUserName
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
if (it.ETD != item.ETD)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
await _bookinglogdetail.InsertReturnSnowflakeIdAsync(new BookingLogDetail
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PId = bid,
|
|
|
|
|
|
|
|
Field = "ETD",
|
|
|
|
|
|
|
|
OldValue = it.ETD != null ? it.ETD.ToSqlValue() : null,
|
|
|
|
|
|
|
|
NewValue = item.ETD != null ? item.ETD.ToSqlValue() : null,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//if (it.ATD != item.ATD)
|
|
|
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
// await _bookinglogdetail.InsertReturnSnowflakeIdAsync(new BookingLogDetail
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// PId = bid,
|
|
|
|
|
|
|
|
// Field = "ATD",
|
|
|
|
|
|
|
|
// OldValue = it.ATD != null ? it.ATD.ToSqlValue() : null,
|
|
|
|
|
|
|
|
// NewValue = item.ATD != null ? item.ATD.ToSqlValue() : null,
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
//if (it.YgtETD != item.YgtETD)
|
|
|
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
// await _bookinglogdetail.InsertReturnSnowflakeIdAsync(new BookingLogDetail
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// PId = bid,
|
|
|
|
|
|
|
|
// Field = "ETD",
|
|
|
|
|
|
|
|
// OldValue = it.YgtETD != null ? it.YgtETD.ToSqlValue() : null,
|
|
|
|
|
|
|
|
// NewValue = item.YgtETD != null ? item.YgtETD.ToSqlValue() : null,
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var ids = order.Where(x => x.ParentId == 0).Select(x => x.Id).ToArray();
|
|
|
|
var ids = order.Where(x => x.ParentId == 0).Select(x => x.Id).ToArray();
|
|
|
|
if (ids.Count()>0) {
|
|
|
|
if (ids.Count() > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
await _bookingorderservice.SendBookingOrder(ids);
|
|
|
|
await _bookingorderservice.SendBookingOrder(ids);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1696,99 +1647,33 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
foreach (var it in order)
|
|
|
|
foreach (var it in order)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
var old = it;
|
|
|
|
bool flag = false;
|
|
|
|
bool flag = false;
|
|
|
|
if (it.StartETA != item.ETA)
|
|
|
|
if (it.StartETA != item.ETA)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
flag = true;
|
|
|
|
flag = true;
|
|
|
|
////添加booking日志
|
|
|
|
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Type = "Edit",
|
|
|
|
|
|
|
|
BookingId = it.Id,
|
|
|
|
|
|
|
|
TenantId = Convert.ToInt64(UserManager.TENANT_ID),
|
|
|
|
|
|
|
|
CreatedTime = DateTime.Now,
|
|
|
|
|
|
|
|
CreatedUserId = UserManager.UserId,
|
|
|
|
|
|
|
|
CreatedUserName = UserManager.Name
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
await _bookinglogdetail.InsertReturnSnowflakeIdAsync(new BookingLogDetail
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PId = bid,
|
|
|
|
|
|
|
|
Field = "预抵日期",
|
|
|
|
|
|
|
|
OldValue = it.StartETA == null ? "" : it.StartETA.ToString(),
|
|
|
|
|
|
|
|
NewValue = item.ETA == null ? "" : item.ETA.ToString(),
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
it.StartETA = item.ETA;
|
|
|
|
it.StartETA = item.ETA;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (it.YgtETD != item.ETD)
|
|
|
|
if (it.YgtETD != item.ETD)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
flag = true;
|
|
|
|
flag = true;
|
|
|
|
////添加booking日志
|
|
|
|
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Type = "Edit",
|
|
|
|
|
|
|
|
BookingId = it.Id,
|
|
|
|
|
|
|
|
TenantId = Convert.ToInt64(UserManager.TENANT_ID),
|
|
|
|
|
|
|
|
CreatedTime = DateTime.Now,
|
|
|
|
|
|
|
|
CreatedUserId = UserManager.UserId,
|
|
|
|
|
|
|
|
CreatedUserName = UserManager.Name
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
await _bookinglogdetail.InsertReturnSnowflakeIdAsync(new BookingLogDetail
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PId = bid,
|
|
|
|
|
|
|
|
Field = "ETD",
|
|
|
|
|
|
|
|
OldValue = it.YgtETD == null ? "" : it.YgtETD.ToString(),
|
|
|
|
|
|
|
|
NewValue = item.ETD == null ? "" : item.ETD.ToString(),
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
it.YgtETD = item.ETD;
|
|
|
|
it.YgtETD = item.ETD;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (it.ATD != item.ATD && it.ATD == null)
|
|
|
|
if (it.ATD != item.ATD && it.ATD == null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
flag = true;
|
|
|
|
flag = true;
|
|
|
|
////添加booking日志
|
|
|
|
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Type = "Edit",
|
|
|
|
|
|
|
|
BookingId = it.Id,
|
|
|
|
|
|
|
|
TenantId = Convert.ToInt64(UserManager.TENANT_ID),
|
|
|
|
|
|
|
|
CreatedTime = DateTime.Now,
|
|
|
|
|
|
|
|
CreatedUserId = UserManager.UserId,
|
|
|
|
|
|
|
|
CreatedUserName = UserManager.Name
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
await _bookinglogdetail.InsertReturnSnowflakeIdAsync(new BookingLogDetail
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PId = bid,
|
|
|
|
|
|
|
|
Field = "实际开船日期",
|
|
|
|
|
|
|
|
OldValue = it.ATD == null ? "" : it.ATD.ToString(),
|
|
|
|
|
|
|
|
NewValue = item.ATD == null ? "" : item.ATD.ToString(),
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
it.ATD = item.ATD;
|
|
|
|
it.ATD = item.ATD;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (it.StartATA != item.ATA)
|
|
|
|
if (it.StartATA != item.ATA)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
flag = true;
|
|
|
|
flag = true;
|
|
|
|
////添加booking日志
|
|
|
|
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Type = "Edit",
|
|
|
|
|
|
|
|
BookingId = it.Id,
|
|
|
|
|
|
|
|
TenantId = Convert.ToInt64(UserManager.TENANT_ID),
|
|
|
|
|
|
|
|
CreatedTime = DateTime.Now,
|
|
|
|
|
|
|
|
CreatedUserId = UserManager.UserId,
|
|
|
|
|
|
|
|
CreatedUserName = UserManager.Name
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
await _bookinglogdetail.InsertReturnSnowflakeIdAsync(new BookingLogDetail
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PId = bid,
|
|
|
|
|
|
|
|
Field = "实际抵港",
|
|
|
|
|
|
|
|
OldValue = it.StartATA == null ? "" : it.StartATA.ToString(),
|
|
|
|
|
|
|
|
NewValue = item.ATA == null ? "" : item.ATA.ToString(),
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
it.StartATA = item.ATA;
|
|
|
|
it.StartATA = item.ATA;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (flag)
|
|
|
|
if (flag)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
issend = true;
|
|
|
|
issend = true;
|
|
|
|
await _rep.AsUpdateable(it).IgnoreColumns().ExecuteCommandAsync();
|
|
|
|
await _rep.AsUpdateable(it).IgnoreColumns().ExecuteCommandAsync();
|
|
|
|
|
|
|
|
await _bookingorderservice.SaveLog(it, old);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1831,140 +1716,45 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
foreach (var it in order)
|
|
|
|
foreach (var it in order)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
var old = it;
|
|
|
|
bool flag = false;
|
|
|
|
bool flag = false;
|
|
|
|
|
|
|
|
|
|
|
|
if (it.ETA != item.ETA)
|
|
|
|
if (it.ETA != item.ETA)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
flag = true;
|
|
|
|
flag = true;
|
|
|
|
////添加booking日志
|
|
|
|
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Type = "Edit",
|
|
|
|
|
|
|
|
BookingId = it.Id,
|
|
|
|
|
|
|
|
TenantId = Convert.ToInt64(UserManager.TENANT_ID),
|
|
|
|
|
|
|
|
CreatedTime = DateTime.Now,
|
|
|
|
|
|
|
|
CreatedUserId = UserManager.UserId,
|
|
|
|
|
|
|
|
CreatedUserName = UserManager.Name
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
await _bookinglogdetail.InsertReturnSnowflakeIdAsync(new BookingLogDetail
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PId = bid,
|
|
|
|
|
|
|
|
Field = "预计到港日期(目的港)",
|
|
|
|
|
|
|
|
OldValue = it.ETA == null ? "" : it.ETA.ToString(),
|
|
|
|
|
|
|
|
NewValue = item.ETA == null ? "" : item.ETA.ToString(),
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
it.ETA = item.ETA;
|
|
|
|
it.ETA = item.ETA;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (it.MiddleETA != item.MiddleETA)
|
|
|
|
if (it.MiddleETA != item.MiddleETA)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
flag = true;
|
|
|
|
flag = true;
|
|
|
|
////添加booking日志
|
|
|
|
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Type = "Edit",
|
|
|
|
|
|
|
|
BookingId = it.Id,
|
|
|
|
|
|
|
|
TenantId = Convert.ToInt64(UserManager.TENANT_ID),
|
|
|
|
|
|
|
|
CreatedTime = DateTime.Now,
|
|
|
|
|
|
|
|
CreatedUserId = UserManager.UserId,
|
|
|
|
|
|
|
|
CreatedUserName = UserManager.Name
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
await _bookinglogdetail.InsertReturnSnowflakeIdAsync(new BookingLogDetail
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PId = bid,
|
|
|
|
|
|
|
|
Field = "中转预抵",
|
|
|
|
|
|
|
|
OldValue = it.MiddleETA == null ? "" : it.MiddleETA.ToString(),
|
|
|
|
|
|
|
|
NewValue = item.MiddleETA == null ? "" : item.MiddleETA.ToString(),
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
it.MiddleETA = item.MiddleETA;
|
|
|
|
it.MiddleETA = item.MiddleETA;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (it.MiddleETD != item.MiddleETD)
|
|
|
|
if (it.MiddleETD != item.MiddleETD)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
flag = true;
|
|
|
|
flag = true;
|
|
|
|
////添加booking日志
|
|
|
|
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Type = "Edit",
|
|
|
|
|
|
|
|
BookingId = it.Id,
|
|
|
|
|
|
|
|
TenantId = Convert.ToInt64(UserManager.TENANT_ID),
|
|
|
|
|
|
|
|
CreatedTime = DateTime.Now,
|
|
|
|
|
|
|
|
CreatedUserId = UserManager.UserId,
|
|
|
|
|
|
|
|
CreatedUserName = UserManager.Name
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
await _bookinglogdetail.InsertReturnSnowflakeIdAsync(new BookingLogDetail
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PId = bid,
|
|
|
|
|
|
|
|
Field = "中转预计离港",
|
|
|
|
|
|
|
|
OldValue = it.MiddleETD == null ? "" : it.MiddleETD.ToString(),
|
|
|
|
|
|
|
|
NewValue = item.MiddleETD == null ? "" : item.MiddleETD.ToString(),
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
it.MiddleETD = item.MiddleETD;
|
|
|
|
it.MiddleETD = item.MiddleETD;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (item.MiddleATA != it.MiddleATA)
|
|
|
|
if (item.MiddleATA != it.MiddleATA)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
flag = true;
|
|
|
|
flag = true;
|
|
|
|
////添加booking日志
|
|
|
|
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Type = "Edit",
|
|
|
|
|
|
|
|
BookingId = it.Id,
|
|
|
|
|
|
|
|
TenantId = Convert.ToInt64(UserManager.TENANT_ID),
|
|
|
|
|
|
|
|
CreatedTime = DateTime.Now,
|
|
|
|
|
|
|
|
CreatedUserId = UserManager.UserId,
|
|
|
|
|
|
|
|
CreatedUserName = UserManager.Name
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
await _bookinglogdetail.InsertReturnSnowflakeIdAsync(new BookingLogDetail
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PId = bid,
|
|
|
|
|
|
|
|
Field = "中转实际到港",
|
|
|
|
|
|
|
|
OldValue = it.MiddleATA == null ? "" : it.MiddleATA.ToString(),
|
|
|
|
|
|
|
|
NewValue = item.MiddleATA == null ? "" : item.MiddleATA.ToString(),
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
it.MiddleATA = item.MiddleATA;
|
|
|
|
it.MiddleATA = item.MiddleATA;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (item.MiddleATD != it.MiddleATD)
|
|
|
|
if (item.MiddleATD != it.MiddleATD)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
flag = true;
|
|
|
|
flag = true;
|
|
|
|
////添加booking日志
|
|
|
|
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Type = "Edit",
|
|
|
|
|
|
|
|
BookingId = it.Id,
|
|
|
|
|
|
|
|
TenantId = Convert.ToInt64(UserManager.TENANT_ID),
|
|
|
|
|
|
|
|
CreatedTime = DateTime.Now,
|
|
|
|
|
|
|
|
CreatedUserId = UserManager.UserId,
|
|
|
|
|
|
|
|
CreatedUserName = UserManager.Name
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
await _bookinglogdetail.InsertReturnSnowflakeIdAsync(new BookingLogDetail
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PId = bid,
|
|
|
|
|
|
|
|
Field = "中转实际离港",
|
|
|
|
|
|
|
|
OldValue = it.MiddleATD == null ? "" : it.MiddleATD.ToString(),
|
|
|
|
|
|
|
|
NewValue = item.MiddleATD == null ? "" : item.MiddleATD.ToString(),
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
it.MiddleATD = item.MiddleATD;
|
|
|
|
it.MiddleATD = item.MiddleATD;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (item.ATA != it.ATA)
|
|
|
|
if (item.ATA != it.ATA)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
flag = true;
|
|
|
|
flag = true;
|
|
|
|
////添加booking日志
|
|
|
|
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Type = "Edit",
|
|
|
|
|
|
|
|
BookingId = it.Id,
|
|
|
|
|
|
|
|
TenantId = Convert.ToInt64(UserManager.TENANT_ID),
|
|
|
|
|
|
|
|
CreatedTime = DateTime.Now,
|
|
|
|
|
|
|
|
CreatedUserId = UserManager.UserId,
|
|
|
|
|
|
|
|
CreatedUserName = UserManager.Name
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
await _bookinglogdetail.InsertReturnSnowflakeIdAsync(new BookingLogDetail
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PId = bid,
|
|
|
|
|
|
|
|
Field = "实际到港(目的港)",
|
|
|
|
|
|
|
|
OldValue = it.ATA == null ? "" : it.ATA.ToString(),
|
|
|
|
|
|
|
|
NewValue = item.ATA == null ? "" : item.ATA.ToString(),
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
it.ATA = item.ATA;
|
|
|
|
it.ATA = item.ATA;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1972,6 +1762,7 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
issend = true;
|
|
|
|
issend = true;
|
|
|
|
await _rep.AsUpdateable(it).IgnoreColumns().ExecuteCommandAsync();
|
|
|
|
await _rep.AsUpdateable(it).IgnoreColumns().ExecuteCommandAsync();
|
|
|
|
|
|
|
|
await _bookingorderservice.SaveLog(it, old);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (issend)
|
|
|
|
if (issend)
|
|
|
@ -2246,6 +2037,200 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 插入货运动态
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
[SqlSugarUnitOfWork]
|
|
|
|
|
|
|
|
[HttpPost("/DataSync/AddBookingStatusLog"), ApiUser(ApiCode = "AddBookingStatusLog")]
|
|
|
|
|
|
|
|
public async Task AddBookingStatusLog(List<BookingStatusLogDto> all)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
try
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var old = await _repStatuslog.AsQueryable().Filter(null, true).Where(x => x.BookingId == all[0].BookingId && x.Category == "yunzong" && x.IsDeleted == false).ToListAsync();
|
|
|
|
|
|
|
|
await _repStatuslog.DeleteAsync(x => x.BookingId == all[0].BookingId && x.Category == "yunzong");
|
|
|
|
|
|
|
|
foreach (var ot in old)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
await _statuslogdetail.DeleteAsync(x => x.PId == ot.Id);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var dicdatalist = _cache.GetAllDictData().Result;
|
|
|
|
|
|
|
|
foreach (var item in all)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
#region 日志
|
|
|
|
|
|
|
|
//新增数据
|
|
|
|
|
|
|
|
var bookingStatusLog = new BookingStatusLog();
|
|
|
|
|
|
|
|
bookingStatusLog.BookingId = item.BookingId;
|
|
|
|
|
|
|
|
bookingStatusLog.Category = "yunzong";
|
|
|
|
|
|
|
|
bookingStatusLog.CreatedTime = DateTime.Now;
|
|
|
|
|
|
|
|
bookingStatusLog.Status = item.Status;
|
|
|
|
|
|
|
|
bookingStatusLog.OpTime = item.OpTime;
|
|
|
|
|
|
|
|
bookingStatusLog.MBLNO = item.MBLNO;
|
|
|
|
|
|
|
|
await _repStatuslog.InsertAsync(bookingStatusLog);
|
|
|
|
|
|
|
|
var list = await _repBookingStatus.AsQueryable().Filter(null, true).InnerJoin<SysDictData>((d, t) => d.StaCode == t.Code && d.StaCate == "book_sta_cate_billtrace" && d.BookingId == item.BookingId).Select((d, t) => new
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
BookingId = d.BookingId,
|
|
|
|
|
|
|
|
StaCode = d.StaCode,
|
|
|
|
|
|
|
|
StaName = d.StaName,
|
|
|
|
|
|
|
|
StaTime = d.StaTime,
|
|
|
|
|
|
|
|
Code = t.Code,
|
|
|
|
|
|
|
|
Value = t.Value
|
|
|
|
|
|
|
|
}).ToListAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (item.detail != null && item.detail.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
foreach (var dt in item.detail)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var BookingStatusLogDetail = new BookingStatusLogDetail();
|
|
|
|
|
|
|
|
BookingStatusLogDetail.PId = bookingStatusLog.Id;
|
|
|
|
|
|
|
|
BookingStatusLogDetail.Status = dt.Status;
|
|
|
|
|
|
|
|
BookingStatusLogDetail.CNTRNO = dt.CNTRNO;
|
|
|
|
|
|
|
|
BookingStatusLogDetail.OPTime = dt.OPTime;
|
|
|
|
|
|
|
|
await _statuslogdetail.InsertAsync(BookingStatusLogDetail);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 订舱状态
|
|
|
|
|
|
|
|
if (item.Status == "舱单")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (list.Where(x => x.Code == "sta_cangdan").FirstOrDefault() == null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
BookingStatus bookingStatus = new BookingStatus();
|
|
|
|
|
|
|
|
bookingStatus.BookingId = item.BookingId;
|
|
|
|
|
|
|
|
bookingStatus.StaCode = "sta_cangdan";
|
|
|
|
|
|
|
|
bookingStatus.StaName = dicdatalist.Where(x => x.Code == "sta_cangdan").Select(x => x.Value).FirstOrDefault();
|
|
|
|
|
|
|
|
bookingStatus.StaTime = item.OpTime;
|
|
|
|
|
|
|
|
bookingStatus.StaCate = "book_sta_cate_billtrace";
|
|
|
|
|
|
|
|
await _repBookingStatus.InsertAsync(bookingStatus);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (item.Status == "海关放行")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (list.Where(x => x.Code == "sta_haifang").FirstOrDefault() == null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
BookingStatus bookingStatus = new BookingStatus();
|
|
|
|
|
|
|
|
bookingStatus.BookingId = item.BookingId;
|
|
|
|
|
|
|
|
bookingStatus.StaCode = "sta_haifang";
|
|
|
|
|
|
|
|
bookingStatus.StaName = dicdatalist.Where(x => x.Code == "sta_haifang").Select(x => x.Value).FirstOrDefault();
|
|
|
|
|
|
|
|
bookingStatus.StaTime = item.OpTime;
|
|
|
|
|
|
|
|
bookingStatus.StaCate = "book_sta_cate_billtrace";
|
|
|
|
|
|
|
|
await _repBookingStatus.InsertAsync(bookingStatus);
|
|
|
|
|
|
|
|
await _bookingorderservice.SetGoodsStatus("BG", item.BookingId);
|
|
|
|
|
|
|
|
await _bookingorderservice.SendBookingOrder(new long[] { item.BookingId });
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (item.Status == "装载")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (list.Where(x => x.Code == "sta_zhuangzai").FirstOrDefault() == null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
BookingStatus bookingStatus = new BookingStatus();
|
|
|
|
|
|
|
|
bookingStatus.BookingId = item.BookingId;
|
|
|
|
|
|
|
|
bookingStatus.StaCode = "sta_zhuangzai";
|
|
|
|
|
|
|
|
bookingStatus.StaName = dicdatalist.Where(x => x.Code == "sta_zhuangzai").Select(x => x.Value).FirstOrDefault();
|
|
|
|
|
|
|
|
bookingStatus.StaTime = item.OpTime;
|
|
|
|
|
|
|
|
bookingStatus.StaCate = "book_sta_cate_billtrace";
|
|
|
|
|
|
|
|
await _repBookingStatus.InsertAsync(bookingStatus);
|
|
|
|
|
|
|
|
await _bookingorderservice.SetGoodsStatus("ZZFX", item.BookingId);
|
|
|
|
|
|
|
|
await _bookingorderservice.SendBookingOrder(new long[] { item.BookingId });
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (item.Status == "码放")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (list.Where(x => x.Code == "sta_mafang").FirstOrDefault() == null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
BookingStatus bookingStatus = new BookingStatus();
|
|
|
|
|
|
|
|
bookingStatus.BookingId = item.BookingId;
|
|
|
|
|
|
|
|
bookingStatus.StaCode = "sta_mafang";
|
|
|
|
|
|
|
|
bookingStatus.StaName = dicdatalist.Where(x => x.Code == "sta_mafang").Select(x => x.Value).FirstOrDefault();
|
|
|
|
|
|
|
|
bookingStatus.StaTime = item.OpTime;
|
|
|
|
|
|
|
|
bookingStatus.StaCate = "book_sta_cate_billtrace";
|
|
|
|
|
|
|
|
await _repBookingStatus.InsertAsync(bookingStatus);
|
|
|
|
|
|
|
|
await _bookingorderservice.SetGoodsStatus("MTFX", item.BookingId);
|
|
|
|
|
|
|
|
await _bookingorderservice.SendBookingOrder(new long[] { item.BookingId });
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (item.Status == "装船")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (list.Where(x => x.Code == "sta_zhuangchuan").FirstOrDefault() == null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
BookingStatus bookingStatus = new BookingStatus();
|
|
|
|
|
|
|
|
bookingStatus.BookingId = item.BookingId;
|
|
|
|
|
|
|
|
bookingStatus.StaCode = "sta_zhuangchuan";
|
|
|
|
|
|
|
|
bookingStatus.StaName = dicdatalist.Where(x => x.Code == "sta_zhuangchuan").Select(x => x.Value).FirstOrDefault();
|
|
|
|
|
|
|
|
bookingStatus.StaTime = item.detail.Max(x => x.OPTime);
|
|
|
|
|
|
|
|
bookingStatus.StaCate = "book_sta_cate_billtrace";
|
|
|
|
|
|
|
|
await _repBookingStatus.InsertAsync(bookingStatus);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (item.Status == "ATD")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (list.Where(x => x.Code == "sta_atd").FirstOrDefault() == null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
BookingStatus bookingStatus = new BookingStatus();
|
|
|
|
|
|
|
|
bookingStatus.BookingId = item.BookingId;
|
|
|
|
|
|
|
|
bookingStatus.StaCode = "sta_atd";
|
|
|
|
|
|
|
|
bookingStatus.StaName = dicdatalist.Where(x => x.Code == "sta_atd").Select(x => x.Value).FirstOrDefault();
|
|
|
|
|
|
|
|
bookingStatus.StaTime = item.OpTime;
|
|
|
|
|
|
|
|
bookingStatus.StaCate = "book_sta_cate_billtrace";
|
|
|
|
|
|
|
|
await _repBookingStatus.InsertAsync(bookingStatus);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#region 入港时间
|
|
|
|
|
|
|
|
if (item.Status == "入港")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
await _bookingorderservice.SetGoodsStatus("YRG", item.BookingId);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region ATD
|
|
|
|
|
|
|
|
if (item.Status == "ATD")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var o = _rep.AsQueryable().Filter(null, true).Where(x => x.Id == item.BookingId && x.IsDeleted == false).First();
|
|
|
|
|
|
|
|
var oldorder = o;
|
|
|
|
|
|
|
|
var oldatd = o == null ? null : o.ATD;
|
|
|
|
|
|
|
|
if (oldatd != item.OpTime && item.OpTime != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
o.ATD = item.OpTime;
|
|
|
|
|
|
|
|
await _rep.UpdateAsync(o);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _bookingorderservice.SendBookingOrder(new long[] { o.Id });
|
|
|
|
|
|
|
|
await _bookingorderservice.SaveLog(o,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.ATD;
|
|
|
|
|
|
|
|
if (_oldatd != item.OpTime)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
it.ATD = item.OpTime;
|
|
|
|
|
|
|
|
await _rep.UpdateAsync(it);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _bookingorderservice.SendBookingOrder(new long[] { it.Id });
|
|
|
|
|
|
|
|
await _bookingorderservice.SaveLog(it, _oldorder);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_logger.LogError(ex.Message);
|
|
|
|
|
|
|
|
_logger.LogError(ex.StackTrace);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
@ -2258,7 +2243,6 @@ namespace Myshipping.Application
|
|
|
|
[HttpGet("/DataSync/GetSyncVesselDate"), ApiUser(ApiCode = "GetSyncVesselDate")]
|
|
|
|
[HttpGet("/DataSync/GetSyncVesselDate"), ApiUser(ApiCode = "GetSyncVesselDate")]
|
|
|
|
public async Task<dynamic> GetSyncVesselDate()
|
|
|
|
public async Task<dynamic> GetSyncVesselDate()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
var list = await _vesselinfo.AsQueryable().Filter(null, true).Where(x => x.Sign == false && x.ATD == null && x.TenantId == UserManager.TENANT_ID && (x.Voyno != null && x.Voyno != "")).Select(x => new
|
|
|
|
var list = await _vesselinfo.AsQueryable().Filter(null, true).Where(x => x.Sign == false && x.ATD == null && x.TenantId == UserManager.TENANT_ID && (x.Voyno != null && x.Voyno != "")).Select(x => new
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Vessel = x.Vessel,
|
|
|
|
Vessel = x.Vessel,
|
|
|
@ -2330,67 +2314,7 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var order = await _rep.AsQueryable().Filter(null, true).Where(x => x.Id == input.Id).FirstAsync();
|
|
|
|
var order = await _rep.AsQueryable().Filter(null, true).Where(x => x.Id == input.Id).FirstAsync();
|
|
|
|
if (order.MBLNO != input.MBLNO)
|
|
|
|
var old = order;
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Type = "Edit",
|
|
|
|
|
|
|
|
BookingId = order.Id,
|
|
|
|
|
|
|
|
TenantId = Convert.ToInt64(UserManager.TENANT_ID),
|
|
|
|
|
|
|
|
CreatedTime = DateTime.Now,
|
|
|
|
|
|
|
|
CreatedUserId = order.CreatedUserId,
|
|
|
|
|
|
|
|
CreatedUserName = order.CreatedUserName
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
await _bookinglogdetail.InsertReturnSnowflakeIdAsync(new BookingLogDetail
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PId = bid,
|
|
|
|
|
|
|
|
Field = "MBLNO",
|
|
|
|
|
|
|
|
OldValue = order.MBLNO,
|
|
|
|
|
|
|
|
NewValue = input.MBLNO,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (order.TMBLNO != input.TMBLNO)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Type = "Edit",
|
|
|
|
|
|
|
|
BookingId = order.Id,
|
|
|
|
|
|
|
|
TenantId = Convert.ToInt64(UserManager.TENANT_ID),
|
|
|
|
|
|
|
|
CreatedTime = DateTime.Now,
|
|
|
|
|
|
|
|
CreatedUserId = order.CreatedUserId,
|
|
|
|
|
|
|
|
CreatedUserName = order.CreatedUserName
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
await _bookinglogdetail.InsertReturnSnowflakeIdAsync(new BookingLogDetail
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PId = bid,
|
|
|
|
|
|
|
|
Field = "TMBLNO",
|
|
|
|
|
|
|
|
OldValue = order.TMBLNO,
|
|
|
|
|
|
|
|
NewValue = input.TMBLNO,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (order.BOOKINGNO != input.BOOKINGNO)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Type = "Edit",
|
|
|
|
|
|
|
|
BookingId = order.Id,
|
|
|
|
|
|
|
|
TenantId = Convert.ToInt64(UserManager.TENANT_ID),
|
|
|
|
|
|
|
|
CreatedTime = DateTime.Now,
|
|
|
|
|
|
|
|
CreatedUserId = order.CreatedUserId,
|
|
|
|
|
|
|
|
CreatedUserName = order.CreatedUserName
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
await _bookinglogdetail.InsertReturnSnowflakeIdAsync(new BookingLogDetail
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PId = bid,
|
|
|
|
|
|
|
|
Field = "BOOKINGNO",
|
|
|
|
|
|
|
|
OldValue = order.BOOKINGNO,
|
|
|
|
|
|
|
|
NewValue = input.BOOKINGNO,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
order.MBLNO = input.MBLNO;
|
|
|
|
order.MBLNO = input.MBLNO;
|
|
|
|
order.TMBLNO = input.TMBLNO;
|
|
|
|
order.TMBLNO = input.TMBLNO;
|
|
|
|
order.BOOKINGNO = input.BOOKINGNO;
|
|
|
|
order.BOOKINGNO = input.BOOKINGNO;
|
|
|
@ -2407,11 +2331,9 @@ namespace Myshipping.Application
|
|
|
|
it.TenantName,
|
|
|
|
it.TenantName,
|
|
|
|
it.IsDeleted,
|
|
|
|
it.IsDeleted,
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
await _bookingorderservice.SaveLog(order, old);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 获取接口Key 个人或公司
|
|
|
|
/// 获取接口Key 个人或公司
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
@ -2509,13 +2431,6 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|