自动引入场站数据时,包装取值优化

optimize
wanghaomei 1 year ago
parent 64fcd41ce0
commit 02c422c489

@ -129,7 +129,7 @@ namespace Myshipping.Application
private readonly IBookingGoodsStatusConfigService _GoodsConfig; private readonly IBookingGoodsStatusConfigService _GoodsConfig;
private readonly SqlSugarRepository<BookingLineOpMgrConfig> _repLineOpMgrConfig; private readonly SqlSugarRepository<BookingLineOpMgrConfig> _repLineOpMgrConfig;
private readonly SqlSugarRepository<SysEmp> _repSysEmp; private readonly SqlSugarRepository<SysEmp> _repSysEmp;
const string CONST_MAPPING_MODULE = "BOOK_OR_CLOSING"; const string CONST_MAPPING_MODULE = "BOOK_OR_CLOSING";
const string CONST_MAPPING_MODULE_ROUTE = "BOOK_OR_CLOSING_RT"; const string CONST_MAPPING_MODULE_ROUTE = "BOOK_OR_CLOSING_RT";
@ -851,7 +851,8 @@ namespace Myshipping.Application
entity.YgtETD = vess.YgtETD; entity.YgtETD = vess.YgtETD;
} }
else { else
{
entity.StartETA = null; entity.StartETA = null;
entity.ATD = null; entity.ATD = null;
entity.YgtETD = null; entity.YgtETD = null;
@ -7600,6 +7601,14 @@ namespace Myshipping.Application
_logger.LogInformation($"{bookId}({order.MBLNO})的箱封号自动引入获取场站数据:{rtn.ToJsonString()}"); _logger.LogInformation($"{bookId}({order.MBLNO})的箱封号自动引入获取场站数据:{rtn.ToJsonString()}");
//场站数据的包装经常为空,因此取场站数据时,如果包装为空,从主信息或填写过的箱信息的包装中获取
var ctnKindPkg = ctns.FirstOrDefault(x => !string.IsNullOrEmpty(x.KINDPKGS));
var kindPkg = order.KINDPKGS;
if (string.IsNullOrEmpty(kindPkg) && ctnKindPkg != null)
{
kindPkg = ctnKindPkg.KINDPKGS;
}
foreach (var item in rtn) foreach (var item in rtn)
{ {
var ctn = new BookingCtn(); var ctn = new BookingCtn();
@ -7609,7 +7618,7 @@ namespace Myshipping.Application
ctn.CTNNUM = 1; ctn.CTNNUM = 1;
ctn.CNTRNO = item.CNTRNO; ctn.CNTRNO = item.CNTRNO;
ctn.SEALNO = item.SEALNO; ctn.SEALNO = item.SEALNO;
ctn.KINDPKGS = string.IsNullOrEmpty(item.KINDPKGS) ? order.KINDPKGS : item.KINDPKGS; ctn.KINDPKGS = string.IsNullOrEmpty(item.KINDPKGS) ? kindPkg : item.KINDPKGS;
ctn.PKGS = item.PKGS; ctn.PKGS = item.PKGS;
ctn.KGS = Convert.ToDecimal(item.KGS); ctn.KGS = Convert.ToDecimal(item.KGS);
ctn.CBM = Convert.ToDecimal(item.CBM); ctn.CBM = Convert.ToDecimal(item.CBM);
@ -8606,6 +8615,6 @@ namespace Myshipping.Application
await SendBookingOrder(orderlist.ToArray()); await SendBookingOrder(orderlist.ToArray());
} }
} }
} }

Loading…
Cancel
Save