|
|
@ -1029,12 +1029,14 @@ namespace Myshipping.Application
|
|
|
|
throw Oops.Bah("无权修改");
|
|
|
|
throw Oops.Bah("无权修改");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var orderCompare = await _rep.AsQueryable().Filter(null, true).FirstAsync(x => x.Id == model.Id);
|
|
|
|
|
|
|
|
|
|
|
|
model.Adapt(order);
|
|
|
|
model.Adapt(order);
|
|
|
|
order.VERSION = Guid.NewGuid().ToString();
|
|
|
|
order.VERSION = Guid.NewGuid().ToString();
|
|
|
|
await _rep.UpdateAsync(order);
|
|
|
|
await _rep.UpdateAsync(order);
|
|
|
|
|
|
|
|
|
|
|
|
//todo:记录修改日志,等待抽取方法
|
|
|
|
//记录修改日志
|
|
|
|
|
|
|
|
await SaveLog(order, orderCompare);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
@ -2207,7 +2209,7 @@ namespace Myshipping.Application
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
public async Task<dynamic> SendLetterYard(long bookingId)
|
|
|
|
public async Task<dynamic> SendLetterYard(long bookingId)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var entity= _repLetterYard.AsQueryable().Filter(null, true).First(x => x.BookingId == bookingId);
|
|
|
|
var entity = _repLetterYard.AsQueryable().Filter(null, true).First(x => x.BookingId == bookingId);
|
|
|
|
var json = entity.ToJsonString();
|
|
|
|
var json = entity.ToJsonString();
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -7585,6 +7587,14 @@ namespace Myshipping.Application
|
|
|
|
private async Task AutoYardData(long bookId)
|
|
|
|
private async Task AutoYardData(long bookId)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var order = _rep.AsQueryable().Filter(null, true).First(x => x.Id == 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();
|
|
|
|
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) //有数据填写了箱封号,不再处理
|
|
|
|
if (ctns.Count(x => !string.IsNullOrEmpty(x.CNTRNO) || !string.IsNullOrEmpty(x.SEALNO)) > 0) //有数据填写了箱封号,不再处理
|
|
|
|
{
|
|
|
|
{
|
|
|
|