东胜封账日志

master
wanghaomei 4 months ago
parent 32fc82aa38
commit ed19e5e983

@ -2396,7 +2396,8 @@ namespace Myshipping.Application
_logger.LogInformation($"回写订舱编号:{custNO},系统编号:{model.BOOKINGNO}");
bkOrder.CUSTNO = custNO;
await _repOrder.AsUpdateable(bkOrder).UpdateColumns(x => new { x.CUSTNO }).ExecuteCommandAsync();
bkOrder.BSSTATUS = "已订舱";
await _repOrder.AsUpdateable(bkOrder).UpdateColumns(x => new { x.CUSTNO, x.BSSTATUS }).ExecuteCommandAsync();
CustomerBookingSyncHelper.SendCustomerBookingSync(bkOrder.Id, BookingOrderSyncTypeEnum.CC.ToString());
_logger.LogInformation($"回写订舱号并回推客户端:{bkOrder.Id} {custNO}");
}
@ -2410,7 +2411,8 @@ namespace Myshipping.Application
_logger.LogInformation($"回写订舱编号:{custNO},系统编号:{model.BOOKINGNO}");
bkOrder.CUSTNO = custNO;
await _repOrder.AsUpdateable(bkOrder).UpdateColumns(x => new { x.CUSTNO }).ExecuteCommandAsync();
bkOrder.BSSTATUS = "已订舱";
await _repOrder.AsUpdateable(bkOrder).UpdateColumns(x => new { x.CUSTNO, x.BSSTATUS }).ExecuteCommandAsync();
CustomerBookingSyncHelper.SendCustomerBookingSync(bkOrder.Id, BookingOrderSyncTypeEnum.CC.ToString());
_logger.LogInformation($"回写订舱号并回推客户端:{bkOrder.Id} {bkOrder.CUSTNO}");

@ -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 ? "已封账" : "未封账"
});
}
}

@ -19,5 +19,10 @@ namespace Myshipping.Application.Service.DataSync.Dto
/// 锁定状态 false 解锁 true 锁定
/// </summary>
public bool LockStatus { get; set; }
/// <summary>
/// 操作用户名称
/// </summary>
public string UserName { get; set; }
}
}

Loading…
Cancel
Save