|
|
|
@ -2995,9 +2995,8 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
foreach (var item in dto)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var extends = _bookingextstate.FirstOrDefault(x => x.bookingId == item.BookingId);
|
|
|
|
|
|
|
|
|
|
var oldSta = "";
|
|
|
|
|
if (extends == null)
|
|
|
|
|
{
|
|
|
|
|
extends = new BookingExtendState();
|
|
|
|
@ -3005,12 +3004,33 @@ namespace Myshipping.Application
|
|
|
|
|
extends.bookingId = item.BookingId;
|
|
|
|
|
extends.IsLockBooking = item.LockStatus;
|
|
|
|
|
await _bookingextstate.InsertAsync(extends);
|
|
|
|
|
|
|
|
|
|
oldSta = "未封账";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
oldSta = extends.IsLockBooking ? "已封账" : "未封账";
|
|
|
|
|
extends.IsLockBooking = item.LockStatus;
|
|
|
|
|
await _bookingextstate.AsUpdateable(extends).IgnoreColumns().ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
////添加booking日志
|
|
|
|
|
var bid = await _bookinglog.InsertReturnSnowflakeIdAsync(new BookingLog
|
|
|
|
|
{
|
|
|
|
|
Type = "Edit",
|
|
|
|
|
BookingId = item.BookingId,
|
|
|
|
|
TenantId = Convert.ToInt64(UserManager.TENANT_ID),
|
|
|
|
|
CreatedTime = DateTime.Now,
|
|
|
|
|
CreatedUserId = 0,
|
|
|
|
|
CreatedUserName = string.IsNullOrEmpty(item.UserName) ? UserManager.Name : item.UserName,
|
|
|
|
|
});
|
|
|
|
|
await _bookinglogdetail.InsertReturnSnowflakeIdAsync(new BookingLogDetail
|
|
|
|
|
{
|
|
|
|
|
PId = bid,
|
|
|
|
|
Field = "封账状态",
|
|
|
|
|
OldValue = oldSta,
|
|
|
|
|
NewValue = extends.IsLockBooking ? "已封账" : "未封账"
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|