diff --git a/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs b/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs index 28c97f92..468967bb 100644 --- a/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs +++ b/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs @@ -3141,15 +3141,14 @@ namespace Myshipping.Application CreateTask(CautionNoticeTaskEnum.WeekAt, bcSrcDto, userList, bookingInfo, slotInfo, srcWeek, targetWeek, $"提单号:{bcSrcDto.MBLNo} 计费周变更了 原:{srcWeek} 新:{targetWeek}"); }); } - - if (slotInfo != null && !userIds.Any(p => p == slotInfo.CreatedUserId.Value)) + else if (slotInfo != null) { CreateTask(CautionNoticeTaskEnum.WeekAt, bcSrcDto, userList, null, slotInfo, srcWeek, targetWeek, $"提单号:{bcSrcDto.MBLNo} 计费周变更了 原:{srcWeek} 新:{targetWeek}"); } } string srcPriceDate = bcSrcDto.PriceCalculationDate.HasValue? bcSrcDto.PriceCalculationDate.Value.ToString("yyyy-MM-dd"): ""; - string targetPriceDate = bcTargetDto.PriceCalculationDate.HasValue ? bcSrcDto.PriceCalculationDate.Value.ToString("yyyy-MM-dd") : ""; + string targetPriceDate = bcTargetDto.PriceCalculationDate.HasValue ? bcTargetDto.PriceCalculationDate.Value.ToString("yyyy-MM-dd") : ""; if (!srcPriceDate.Equals(targetPriceDate, StringComparison.OrdinalIgnoreCase)) { @@ -3211,8 +3210,7 @@ namespace Myshipping.Application CreateTask(CautionNoticeTaskEnum.ChangeTransfer, bcSrcDto, userList, bookingInfo, slotInfo, "直达", "中转", $"提单号:{bcSrcDto.MBLNo} 直达变成中转了"); }); } - - if (slotInfo != null && !userIds.Any(p => p == slotInfo.CreatedUserId.Value)) + else if (slotInfo != null) { CreateTask(CautionNoticeTaskEnum.ChangeTransfer, bcSrcDto, userList, null, slotInfo, "直达", "中转", $"提单号:{bcSrcDto.MBLNo} 直达变成中转了"); } @@ -3238,8 +3236,7 @@ namespace Myshipping.Application CreateTask(CautionNoticeTaskEnum.VGMCutDateAdvanced, bcSrcDto, userList, bookingInfo, slotInfo, srcVGMCut, targeVGMCut, $"提单号:{bcSrcDto.MBLNo} VGM截单时间提前了 原:{srcVGMCut} 新:{targeVGMCut}"); }); } - - if (slotInfo != null && !userIds.Any(p => p == slotInfo.CreatedUserId.Value)) + else if (slotInfo != null) { CreateTask(CautionNoticeTaskEnum.VGMCutDateAdvanced, bcSrcDto, userList, null, slotInfo, srcVGMCut, targeVGMCut, $"提单号:{bcSrcDto.MBLNo} VGM截单时间提前了 原:{srcVGMCut} 新:{targeVGMCut}"); } @@ -3267,8 +3264,7 @@ namespace Myshipping.Application CreateTask(CautionNoticeTaskEnum.SICutDateAdvanced, bcSrcDto, userList, bookingInfo, slotInfo, srcSICut, targeSICut, $"提单号:{bcSrcDto.MBLNo} 样单截止时间提前了 原:{srcSICut} 新:{targeSICut}"); }); } - - if (slotInfo != null && !userIds.Any(p => p == slotInfo.CreatedUserId.Value)) + else if (slotInfo != null) { CreateTask(CautionNoticeTaskEnum.SICutDateAdvanced, bcSrcDto, userList, null, slotInfo, srcSICut, targeSICut, $"提单号:{bcSrcDto.MBLNo} 样单截止时间提前了 原:{srcSICut} 新:{targeSICut}"); } @@ -3278,9 +3274,9 @@ namespace Myshipping.Application } catch (Exception ex) { - _logger.LogInformation($"提单号:{bcSrcDto.MBLNo} slotId={slotId} 估算差异重要提醒发生异常"); + _logger.LogInformation($"提单号:{bcSrcDto.MBLNo} slotId={slotId} 估算差异重要提醒发生异常,原因:{ex.Message}"); - new EmailNoticeHelper().SendEmailNotice($"MBLNO={bcSrcDto.MBLNo} slotId={slotId} 估算差异重要提醒发生异常", $"MBLNO={bcSrcDto.MBLNo} slotId={slotId} 估算差异重要提醒发生异常", App.Configuration["EmailNoticeDefaultUser"].GetUserEmailList()); + new EmailNoticeHelper().SendEmailNotice($"MBLNO={bcSrcDto.MBLNo} slotId={slotId} 估算差异重要提醒发生异常", $"MBLNO={bcSrcDto.MBLNo} slotId={slotId} 估算差异重要提醒发生异常,原因:{ex.Message}", App.Configuration["EmailNoticeDefaultUser"].GetUserEmailList()); } } #endregion