BookingOrderService添加日志:设置货物状态、取消设置货物状态

optimize
zhangxiaofeng 10 months ago
parent 59522b37dd
commit 6fdcee2c8a

@ -9855,7 +9855,7 @@ namespace Myshipping.Application
await _rep.AsUpdateable(order).IgnoreColumns().ExecuteCommandAsync(); await _rep.AsUpdateable(order).IgnoreColumns().ExecuteCommandAsync();
// 记录日志 // 记录日志
await SaveLog(order, oldOrder, "即时刷新船期"); await SaveLog(order, oldOrder, "手动刷新船期");
await SendBookingOrder(new long[] { Id }); await SendBookingOrder(new long[] { Id });
if (!string.IsNullOrEmpty(order.VESSEL) && !string.IsNullOrEmpty(order.VOYNO)) if (!string.IsNullOrEmpty(order.VESSEL) && !string.IsNullOrEmpty(order.VOYNO))
@ -9979,7 +9979,8 @@ namespace Myshipping.Application
await _rep.UpdateAsync(x => x.Id == bookingId, x => new BookingOrder { BSSTATUSNAME = StatusName }); await _rep.UpdateAsync(x => x.Id == bookingId, x => new BookingOrder { BSSTATUSNAME = StatusName });
// 记录日志 // 记录日志
var newOrder = new BookingOrder() { BSSTATUSNAME = StatusName }; var newOrder = order.Adapt<BookingOrder>();
newOrder.BSSTATUSNAME = StatusName;
await SaveLog(newOrder, order, "更新货物状态"); await SaveLog(newOrder, order, "更新货物状态");
} }
} }
@ -10485,6 +10486,8 @@ namespace Myshipping.Application
{ {
var model = _rep.AsQueryable().Filter(null, true) var model = _rep.AsQueryable().Filter(null, true)
.First(a => a.Id == bookingId); .First(a => a.Id == bookingId);
var oldModel = model.Adapt<BookingOrder>();
model.BSSTATUSNAME = maxStatus.ShowName; model.BSSTATUSNAME = maxStatus.ShowName;
//model.VERSION = IDGen.NextID().ToString().Replace("-", ""); //model.VERSION = IDGen.NextID().ToString().Replace("-", "");
@ -10497,6 +10500,9 @@ namespace Myshipping.Application
//it.VERSION //it.VERSION
}).ExecuteCommand(); }).ExecuteCommand();
// 保存日志
await SaveLog(model, oldModel, "设置货物状态");
//推送东胜 //推送东胜
if (isAutoSyncDS) if (isAutoSyncDS)
await SendBookingOrder(new long[] { bookingId }); await SendBookingOrder(new long[] { bookingId });
@ -10577,6 +10583,8 @@ namespace Myshipping.Application
var model = _rep.AsQueryable().Filter(null, true) var model = _rep.AsQueryable().Filter(null, true)
.First(a => a.Id == bookingId); .First(a => a.Id == bookingId);
var oldModel = model.Adapt<BookingOrder>();
if (maxStatus != null) if (maxStatus != null)
{ {
model.BSSTATUSNAME = maxStatus.ShowName; model.BSSTATUSNAME = maxStatus.ShowName;
@ -10596,6 +10604,9 @@ namespace Myshipping.Application
//it.VERSION //it.VERSION
}).ExecuteCommand(); }).ExecuteCommand();
// 保存日志
await SaveLog(model, oldModel, "取消设置货物状态");
//推送东胜 //推送东胜
if (isAutoSyncDS) if (isAutoSyncDS)
//推送东胜 //推送东胜

Loading…
Cancel
Save