From 1c309f438da2ee40a151e80a8b3a16b297e8e836 Mon Sep 17 00:00:00 2001 From: zhangxiaofeng <1939543722@qq.com> Date: Wed, 6 Nov 2024 14:04:49 +0800 Subject: [PATCH] =?UTF-8?q?ONE=E8=AE=A2=E8=88=B1=E9=82=AE=E7=AE=B1?= =?UTF-8?q?=E5=B0=86=E8=AE=A2=E5=8D=95=E9=87=8C=E7=9A=84=E9=82=AE=E7=AE=B1?= =?UTF-8?q?=E4=B8=8E=E6=A8=A1=E6=9D=BF=E9=87=8C=E7=9A=84=E9=82=AE=E7=AE=B1?= =?UTF-8?q?=E7=BB=93=E5=90=88=E8=B5=B7=E6=9D=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EDI/BookingHelper/ONESoApiHelper.cs | 34 ++++++++++++------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/Myshipping.Application/EDI/BookingHelper/ONESoApiHelper.cs b/Myshipping.Application/EDI/BookingHelper/ONESoApiHelper.cs index 96efda85..fc0dbb5f 100644 --- a/Myshipping.Application/EDI/BookingHelper/ONESoApiHelper.cs +++ b/Myshipping.Application/EDI/BookingHelper/ONESoApiHelper.cs @@ -225,22 +225,32 @@ namespace Myshipping.Application.EDI }; postModel.copyNum = custOrder.CopyNum; + // 邮箱 + postModel.emailList = new List(); if (!string.IsNullOrWhiteSpace(custOrder.OpMail)) { - var mailStr = custOrder.OpMail.Replace(",", ","); + var mailStr = custOrder.OpMail.Replace(",", ",").Replace(";", ",").Replace(";", ","); var mailList = mailStr.Split(',').Where(x => !string.IsNullOrWhiteSpace(x)).Select(x => x.Trim()).ToList(); - postModel.emailList = mailList; + postModel.emailList.AddRange(mailList); } - //else if (!string.IsNullOrEmpty(custContact.Email)) - //{ - // postModel.emailList = new List() { custContact.Email }; - //} - //else if (!string.IsNullOrEmpty(template.BcReceiveEmail)) - //{ - // postModel.emailList = new List() { template.BcReceiveEmail }; - //} - - var apiUrl = sCfgSpiderUrl.Value; + if (!string.IsNullOrEmpty(template.BcReceiveEmail)) + { + var mailStr = template.BcReceiveEmail.Replace(",", ",").Replace(";", ",").Replace(";", ","); + var mailList = template.BcReceiveEmail.Split(',').Where(x => !string.IsNullOrWhiteSpace(x)).Select(x => x.Trim()).ToList(); + postModel.emailList.AddRange(mailList); + } + postModel.emailList = postModel.emailList.Distinct().ToList(); + + //else if (!string.IsNullOrEmpty(custContact.Email)) + //{ + // postModel.emailList = new List() { custContact.Email }; + //} + //else if (!string.IsNullOrEmpty(template.BcReceiveEmail)) + //{ + // postModel.emailList = new List() { template.BcReceiveEmail }; + //} + + var apiUrl = sCfgSpiderUrl.Value; if (!apiUrl.EndsWith("/")) { apiUrl += "/";