自动箱号引入开关

optimize
wanghaomei 1 year ago
parent cae6b4ce13
commit ad194c37e8

@ -1029,12 +1029,14 @@ namespace Myshipping.Application
throw Oops.Bah("无权修改");
}
var orderCompare = await _rep.AsQueryable().Filter(null, true).FirstAsync(x => x.Id == model.Id);
model.Adapt(order);
order.VERSION = Guid.NewGuid().ToString();
await _rep.UpdateAsync(order);
//todo:记录修改日志,等待抽取方法
//记录修改日志
await SaveLog(order, orderCompare);
}
/// <summary>
@ -7585,6 +7587,14 @@ namespace Myshipping.Application
private async Task AutoYardData(long bookId)
{
var order = _rep.AsQueryable().Filter(null, true).First(x => x.Id == bookId);
var paraAuto = _cache.GetAllTenantParam().Result.FirstOrDefault(x => x.TenantId == order.TenantId && x.ParaCode == "AUTO_CNTRNO_SEALNO_IMPORT");
if (paraAuto == null || paraAuto.ItemCode != "YES")
{
_logger.LogInformation($"{order.TenantName}未开启自动箱号引入");
return;
}
var ctns = _repCtn.AsQueryable().Filter(null, true).Where(x => x.BILLID == bookId).ToList();
if (ctns.Count(x => !string.IsNullOrEmpty(x.CNTRNO) || !string.IsNullOrEmpty(x.SEALNO)) > 0) //有数据填写了箱封号,不再处理
{

Loading…
Cancel
Save