自动箱号引入开关

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>
@ -2197,7 +2199,7 @@ namespace Myshipping.Application
await VgmLink(input.BookingId);
}
await SendLetterYard(input.BookingId);
await SendLetterYard(input.BookingId);
return rtnId;
}
@ -2207,8 +2209,8 @@ namespace Myshipping.Application
/// <returns></returns>
public async Task<dynamic> SendLetterYard(long bookingId)
{
var entity= _repLetterYard.AsQueryable().Filter(null, true).First(x => x.BookingId == bookingId);
var json = entity.ToJsonString();
var entity = _repLetterYard.AsQueryable().Filter(null, true).First(x => x.BookingId == bookingId);
var json = entity.ToJsonString();
try
{
const string MqActionExchangeName = "djy.output.dingcang.ds6";
@ -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