引入场站数据包装映射

master
zhangxiaofeng 8 months ago
parent 4333340f0a
commit f6b402e0eb

@ -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<List<BookingGetYardDataDto>>(rtn.data);
var contact = JsonConvert.DeserializeObject<List<YardContactDto>>(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))

@ -12802,6 +12802,11 @@
列表输出
</summary>
</member>
<member name="P:Myshipping.Core.Service.DjyTenantParamValueListOutput.Id">
<summary>
id
</summary>
</member>
<member name="P:Myshipping.Core.Service.DjyTenantParamValueListOutput.ParaCode">
<summary>
参数类别

Loading…
Cancel
Save