From 971da18f57cceda2f6fe7e05357d5e5b4f585706 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Mon, 13 May 2024 13:55:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9SI=E5=9B=9E=E6=89=A7=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E6=9B=B4=E6=96=B0=E8=AE=A2=E8=88=B1=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TaskManagePlat/TaskManageSISubmittedService.cs | 9 +++++++-- .../Service/TaskManagePlat/TaskManageService.cs | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) 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) {