diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 7c878144..d0e3cbbd 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -2007,7 +2007,7 @@ namespace Myshipping.Application var Id = entity.Id; BookingOrderOutput ordOut = new BookingOrderOutput(); - var main = await _rep.FirstOrDefaultAsync(u => u.Id == Id); + var main = await _rep.AsQueryable().Filter(null, true).FirstAsync(u => u.Id == Id); if (!string.IsNullOrEmpty(entity.MBLNO) || !string.IsNullOrEmpty(entity.CUSTNO)) { diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskManageBCService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskManageBCService.cs index 5b74770e..d9f8b1d8 100644 --- a/Myshipping.Application/Service/TaskManagePlat/TaskManageBCService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/TaskManageBCService.cs @@ -13,6 +13,7 @@ using Microsoft.Extensions.Logging; using Myshipping.Application.ConfigOption; using Myshipping.Application.Entity; using Myshipping.Application.Enum; +using Myshipping.Application.Helper; using Myshipping.Application.Service.BookingOrder; using Myshipping.Application.Service.BookingSlot.Dto; using Myshipping.Core; @@ -1796,6 +1797,8 @@ namespace Myshipping.Application { result.succ = false; result.msg = emailRlt.msg; + + new EmailNoticeHelper().SendEmailNotice($"MBLNO={taskBCInfo.MBL_NO} 转发通知邮件失败", $"MBLNO={taskBCInfo.MBL_NO} 转发通知邮件失败,原因:{emailRlt.msg}", App.Configuration["EmailNoticeDefaultUser"].GetUserEmailList()); } } catch (Exception ex) @@ -1804,6 +1807,8 @@ namespace Myshipping.Application result.succ = false; result.msg = $"推送邮件失败,{ex.Message}"; + + new EmailNoticeHelper().SendEmailNotice($"MBLNO={taskBCInfo.MBL_NO} 转发通知邮件失败", $"MBLNO={taskBCInfo.MBL_NO} 转发通知邮件失败,原因:{ex.Message}", App.Configuration["EmailNoticeDefaultUser"].GetUserEmailList()); } return result; @@ -2578,6 +2583,10 @@ namespace Myshipping.Application { result.succ = false; result.msg = $"处理异常,原因:{ex.Message}"; + + new EmailNoticeHelper().SendEmailNotice($"taskPKId={taskPKId} 转发通知邮件失败", $"taskPKId={taskPKId} 转发通知邮件失败,原因:{ex.Message}", App.Configuration["EmailNoticeDefaultUser"].GetUserEmailList()); + + } return result; diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskManageSISubmittedService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskManageSISubmittedService.cs index 07220975..024f7114 100644 --- a/Myshipping.Application/Service/TaskManagePlat/TaskManageSISubmittedService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/TaskManageSISubmittedService.cs @@ -431,6 +431,13 @@ namespace Myshipping.Application bkModel.ChangedFields.Add(nameof(SaveBookingOrderInput.HSCODE)); } + + if (!string.IsNullOrEmpty(siSubmitted.MARKS)) + { + bkModel.MARKS = siSubmitted.MARKS; + + bkModel.ChangedFields.Add(nameof(SaveBookingOrderInput.MARKS)); + } } if (ctnList.Count > 0) @@ -659,6 +666,12 @@ namespace Myshipping.Application }).ExecuteCommandAsync(); } + + + //处理附件 + + result.succ = true; + result.msg = "处理成功"; } else { @@ -666,6 +679,9 @@ namespace Myshipping.Application siSubmitted.PROCESS_DATE = DateTime.Now; siSubmitted.PROCESS_RESULT = "更新订舱信息失败"; siSubmitted.UPDATE_BOOKING_DATE = DateTime.Now; + + result.succ = false; + result.msg = "处理失败"; } } @@ -689,25 +705,44 @@ namespace Myshipping.Application result.msg = ex.Message; } - if (!result.succ && siSubmitted != null) + if (!result.succ) { - siSubmitted.PROCESS_STATUS = "FAILURE"; - siSubmitted.PROCESS_DATE = DateTime.Now; - - if (result.msg.Length > 500) - { - siSubmitted.PROCESS_RESULT = result.msg.Substring(0,500); - } - else + if (siSubmitted != null) { - siSubmitted.PROCESS_RESULT = result.msg; - } + siSubmitted.PROCESS_STATUS = "FAILURE"; + siSubmitted.PROCESS_DATE = DateTime.Now; + if (result.msg.Length > 500) + { + siSubmitted.PROCESS_RESULT = result.msg.Substring(0, 500); + } + else + { + siSubmitted.PROCESS_RESULT = result.msg; + } + + await _taskSISubmittedRepository.AsUpdateable(siSubmitted).UpdateColumns(x => new + { + x.PROCESS_DATE, + x.PROCESS_STATUS, + x.PROCESS_RESULT, + x.DIFF_NUM, + x.IS_SET_AUTO_UPD_BOOKING, + + }).ExecuteCommandAsync(); + } + } + else + { await _taskSISubmittedRepository.AsUpdateable(siSubmitted).UpdateColumns(x => new { x.PROCESS_DATE, x.PROCESS_STATUS, x.PROCESS_RESULT, + x.IS_UPDATE_BOOKING, + x.UPDATE_BOOKING_DATE, + x.DIFF_NUM, + x.BOOKING_ID, x.IS_SET_AUTO_UPD_BOOKING }).ExecuteCommandAsync(); } diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs index 718393dd..717a615a 100644 --- a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs @@ -679,12 +679,13 @@ namespace Myshipping.Application }); } + /* var siService = _namedtaskSISubmittedServiceProvider .GetService(nameof(TaskManageSISubmittedService)); await siService.ProcessSISubmitted(taskSISubmitted.TASK_ID); - + */ } #endregion