From f6b402e0eb3d06276ac490ecae8c8fb290e96b04 Mon Sep 17 00:00:00 2001 From: zhangxiaofeng <1939543722@qq.com> Date: Thu, 11 Apr 2024 14:15:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=95=E5=85=A5=E5=9C=BA=E7=AB=99=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=8C=85=E8=A3=85=E6=98=A0=E5=B0=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BookingOrder/BookingOrderService.cs | 18 ++++++++++++++++++ Myshipping.Core/Myshipping.Core.xml | 5 +++++ 2 files changed, 23 insertions(+) diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 4f2c0274..73fd8830 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -9239,11 +9239,15 @@ namespace Myshipping.Application var ctnList = await _cache.GetAllCodeCtn(); var mapCtn = await _cache.GetAllMappingCtn(); + var packageList = await _cache.GetAllCodePackage(); + var mapPackageList = await _cache.GetAllMappingPackage(); + var listRtn = JsonConvert.DeserializeObject>(rtn.data); var contact = JsonConvert.DeserializeObject>(rtn.contact)?.FirstOrDefault(); foreach (var item in listRtn) { + // 箱型 var ctnall = item.CTNALL; var findMap = mapCtn.FirstOrDefault(x => x.Module == "YardData" && x.MapCode == ctnall); var findCtn = ctnList.FirstOrDefault(x => x.Name == ctnall); @@ -9264,6 +9268,20 @@ namespace Myshipping.Application throw Oops.Bah($"未找到箱型{ctnall}的场站引入配置"); } + // 包装 + if (!string.IsNullOrWhiteSpace(item.KINDPKGS)) + { + var findMapPkg = mapPackageList.FirstOrDefault(x => x.Module == "YardData" && x.MapCode == item.KINDPKGS.Trim()); + if (findMapPkg != null) + { + var findPkg = packageList.FirstOrDefault(x => x.Code == findMapPkg.Code); + if (findPkg != null) + { + item.KINDPKGS = findPkg.Name; + } + } + } + // 赋值联系人信息 item.contact_tel = contact?.contact_tel1?.Trim(); if (!string.IsNullOrWhiteSpace(contact?.contact_tel2)) diff --git a/Myshipping.Core/Myshipping.Core.xml b/Myshipping.Core/Myshipping.Core.xml index b072c839..820e1fbb 100644 --- a/Myshipping.Core/Myshipping.Core.xml +++ b/Myshipping.Core/Myshipping.Core.xml @@ -12802,6 +12802,11 @@ 列表输出 + + + id + + 参数类别