|
|
|
@ -2096,6 +2096,20 @@ namespace Myshipping.Application
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
// 当BusinessId不为空时,将BusinessId的值转为订舱主键;否则仍然使用BookingId作为订舱记录主键
|
|
|
|
|
if (!string.IsNullOrEmpty(all[0].BusinessId))
|
|
|
|
|
{
|
|
|
|
|
if (long.TryParse(all[0].BusinessId, out long businessId))
|
|
|
|
|
{
|
|
|
|
|
all[0].BookingId = businessId;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_logger.LogError($"在将BusinessId转为BookingId时发生异常,货运动态插入失败;BusinessId的值为:{all[0].BusinessId}");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
@ -2115,6 +2129,20 @@ namespace Myshipping.Application
|
|
|
|
|
bool flag = false;
|
|
|
|
|
foreach (var item in all)
|
|
|
|
|
{
|
|
|
|
|
// 当BusinessId不为空时,将BusinessId的值转为订舱主键;否则仍然使用BookingId作为订舱记录主键
|
|
|
|
|
if (!string.IsNullOrEmpty(item.BusinessId))
|
|
|
|
|
{
|
|
|
|
|
if (long.TryParse(item.BusinessId, out long itemBusinessId))
|
|
|
|
|
{
|
|
|
|
|
item.BookingId = itemBusinessId;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_logger.LogError($"在将item.BusinessId转为BookingId时发生异常,货运动态插入失败;item.BusinessId的值为:{item.BusinessId}");
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 日志
|
|
|
|
|
//新增数据
|
|
|
|
|
var bookingStatusLog = new BookingStatusLog();
|
|
|
|
|