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

optimize
wanghaomei 1 year ago
parent 64fcd41ce0
commit 02c422c489

@ -851,7 +851,8 @@ namespace Myshipping.Application
entity.YgtETD = vess.YgtETD;
}
else {
else
{
entity.StartETA = null;
entity.ATD = null;
entity.YgtETD = null;
@ -7600,6 +7601,14 @@ namespace Myshipping.Application
_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)
{
var ctn = new BookingCtn();
@ -7609,7 +7618,7 @@ namespace Myshipping.Application
ctn.CTNNUM = 1;
ctn.CNTRNO = item.CNTRNO;
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.KGS = Convert.ToDecimal(item.KGS);
ctn.CBM = Convert.ToDecimal(item.CBM);

Loading…
Cancel
Save