diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskManageSISubmittedService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskManageSISubmittedService.cs index b86c61a8..bf64d8c2 100644 --- a/Myshipping.Application/Service/TaskManagePlat/TaskManageSISubmittedService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/TaskManageSISubmittedService.cs @@ -622,8 +622,11 @@ namespace Myshipping.Application } }); - if (ctnList.Any(t => t.REMARK.IndexOf("SI Add") < 0)) - ctnList.ForEach(t => { if (t.REMARK.IndexOf("SI Add") < 0) ctnList.Remove(t); }); + if (ctnList.Any(t => string.IsNullOrWhiteSpace(t.REMARK) || t.REMARK.IndexOf("SI Add") < 0)) + { + ctnList = ctnList.Where(t => !string.IsNullOrWhiteSpace(t.REMARK) && t.REMARK.IndexOf("SI Add") >= 0).ToList(); + } + } if(ctnList.Count > 0) @@ -1002,6 +1005,8 @@ namespace Myshipping.Application x.IS_SET_AUTO_UPD_BOOKING, }).ExecuteCommandAsync(); + + new EmailNoticeHelper().SendEmailNotice($"MBLNO={siSubmitted.MBL_NO} SI回执回写失败", $"MBLNO={siSubmitted.MBL_NO} SI回执回写失败,原因:{result.msg}", App.Configuration["EmailNoticeDefaultUser"].GetUserEmailList()); } } else diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs index 3cb566a7..f8351d0b 100644 --- a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs @@ -666,7 +666,8 @@ namespace Myshipping.Application { if (ediCtnList != null && ediCtnList.Count > 0) { - var ctnCodeInfo = ediCtnList.FirstOrDefault(x => x.Name.Equals(contaInfo.CTNALL, StringComparison.OrdinalIgnoreCase)); + var ctnCodeInfo = ediCtnList.FirstOrDefault(x => !string.IsNullOrWhiteSpace(x.Name) + && x.Name.Equals(contaInfo.CTNALL, StringComparison.OrdinalIgnoreCase)); if (ctnCodeInfo != null) {