diff --git a/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs b/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs index fa169c42..a27820d7 100644 --- a/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs +++ b/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs @@ -3093,8 +3093,8 @@ namespace Myshipping.Application if (!string.IsNullOrWhiteSpace(bk.OPID)) userIds.Add(long.Parse(bk.OPID)); - if (!string.IsNullOrWhiteSpace(bk.SALEID)) - userIds.Add(long.Parse(bk.SALEID)); + //if (!string.IsNullOrWhiteSpace(bk.SALEID)) + // userIds.Add(long.Parse(bk.SALEID)); if (!string.IsNullOrWhiteSpace(bk.CUSTSERVICEID)) userIds.Add(long.Parse(bk.CUSTSERVICEID)); @@ -3138,19 +3138,20 @@ namespace Myshipping.Application var bookingInfo = _repBookingOrder.AsQueryable().Filter(null, true).First(x => x.Id == ca.Alloc.BOOKING_ID && x.IsDeleted == false && x.TenantId == UserManager.TENANT_ID); - CreateTask(CautionNoticeTaskEnum.WeekAt, bcSrcDto, userList, bookingInfo, slotInfo, srcWeek, targetWeek, $"提单号:{bcSrcDto.MBLNo} 计费周变更了 原:{srcWeek} 新:{targetWeek}"); + CreateTask(CautionNoticeTaskEnum.WeekAt, bcSrcDto, userList, bookingInfo, slotInfo, srcWeek, targetWeek, $"提单号:{bcSrcDto.MBLNo} \r\n计费周变更了 \r\n原:{srcWeek} \r\n新:{targetWeek}"); }); } else if (slotInfo != null) { - CreateTask(CautionNoticeTaskEnum.WeekAt, bcSrcDto, userList, null, slotInfo, srcWeek, targetWeek, $"提单号:{bcSrcDto.MBLNo} 计费周变更了 原:{srcWeek} 新:{targetWeek}"); + CreateTask(CautionNoticeTaskEnum.WeekAt, bcSrcDto, userList, null, slotInfo, srcWeek, targetWeek, $"提单号:{bcSrcDto.MBLNo} \r\n计费周变更了 \r\n原:{srcWeek} \r\n新:{targetWeek}"); } } string srcPriceDate = bcSrcDto.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)) + //如果原始的没有解析计费日期,就不做提醒了 + if (!string.IsNullOrWhiteSpace(srcPriceDate) && !srcPriceDate.Equals(targetPriceDate, StringComparison.OrdinalIgnoreCase)) { if (bookingSlotAllocList.Count > 0) { @@ -3159,12 +3160,12 @@ namespace Myshipping.Application var bookingInfo = _repBookingOrder.AsQueryable().Filter(null, true).First(x => x.Id == ca.Alloc.BOOKING_ID && x.IsDeleted == false && x.TenantId == UserManager.TENANT_ID); - CreateTask(CautionNoticeTaskEnum.PriceCalcDate, bcSrcDto, userList, bookingInfo, slotInfo, srcPriceDate, targetPriceDate, $"提单号:{bcSrcDto.MBLNo} 计费日期变更了 原:{srcPriceDate} 新:{targetPriceDate}"); + CreateTask(CautionNoticeTaskEnum.PriceCalcDate, bcSrcDto, userList, bookingInfo, slotInfo, srcPriceDate, targetPriceDate, $"提单号:{bcSrcDto.MBLNo} \r\n计费日期变更了 \r\n原:{srcPriceDate} \r\n新:{targetPriceDate}"); }); } else if (slotInfo != null) { - CreateTask(CautionNoticeTaskEnum.PriceCalcDate, bcSrcDto, userList, null, slotInfo, srcPriceDate, targetPriceDate, $"提单号:{bcSrcDto.MBLNo} 计费日期变更了 原:{srcPriceDate} 新:{targetPriceDate}"); + CreateTask(CautionNoticeTaskEnum.PriceCalcDate, bcSrcDto, userList, null, slotInfo, srcPriceDate, targetPriceDate, $"提单号:{bcSrcDto.MBLNo} \r\n计费日期变更了 \r\n原:{srcPriceDate} \r\n新:{targetPriceDate}"); } } @@ -3180,12 +3181,12 @@ namespace Myshipping.Application var bookingInfo = _repBookingOrder.AsQueryable().Filter(null, true).First(x => x.Id == ca.Alloc.BOOKING_ID && x.IsDeleted == false && x.TenantId == UserManager.TENANT_ID); - CreateTask(CautionNoticeTaskEnum.ChangeVesselVoyno, bcSrcDto, userList, bookingInfo, slotInfo, srcVesselVoyno, targetVesselVoyno, $"提单号:{bcSrcDto.MBLNo} 船名航次变更了 原:{srcVesselVoyno} 新:{targetVesselVoyno}"); + CreateTask(CautionNoticeTaskEnum.ChangeVesselVoyno, bcSrcDto, userList, bookingInfo, slotInfo, srcVesselVoyno, targetVesselVoyno, $"提单号:{bcSrcDto.MBLNo} \r\n船名航次变更了 \r\n原:{srcVesselVoyno} \r\n新:{targetVesselVoyno}"); }); } else if (slotInfo != null) { - CreateTask(CautionNoticeTaskEnum.ChangeVesselVoyno, bcSrcDto, userList, null, slotInfo, srcVesselVoyno, targetVesselVoyno, $"提单号:{bcSrcDto.MBLNo} 船名航次变更了 原:{srcVesselVoyno} 新:{targetVesselVoyno}"); + CreateTask(CautionNoticeTaskEnum.ChangeVesselVoyno, bcSrcDto, userList, null, slotInfo, srcVesselVoyno, targetVesselVoyno, $"提单号:{bcSrcDto.MBLNo} \r\n船名航次变更了 \r\n原:{srcVesselVoyno} \r\n新:{targetVesselVoyno}"); } } @@ -3205,12 +3206,12 @@ namespace Myshipping.Application var bookingInfo = _repBookingOrder.AsQueryable().Filter(null, true).First(x => x.Id == ca.Alloc.BOOKING_ID && x.IsDeleted == false && x.TenantId == UserManager.TENANT_ID); - CreateTask(CautionNoticeTaskEnum.ChangeTransfer, bcSrcDto, userList, bookingInfo, slotInfo, "直达", "中转", $"提单号:{bcSrcDto.MBLNo} 直达变成中转了"); + CreateTask(CautionNoticeTaskEnum.ChangeTransfer, bcSrcDto, userList, bookingInfo, slotInfo, "直达", "中转", $"提单号:{bcSrcDto.MBLNo} \r\n直达变成中转了"); }); } else if (slotInfo != null) { - CreateTask(CautionNoticeTaskEnum.ChangeTransfer, bcSrcDto, userList, null, slotInfo, "直达", "中转", $"提单号:{bcSrcDto.MBLNo} 直达变成中转了"); + CreateTask(CautionNoticeTaskEnum.ChangeTransfer, bcSrcDto, userList, null, slotInfo, "直达", "中转", $"提单号:{bcSrcDto.MBLNo} \r\n直达变成中转了"); } } @@ -3231,12 +3232,12 @@ namespace Myshipping.Application var bookingInfo = _repBookingOrder.AsQueryable().Filter(null, true).First(x => x.Id == ca.Alloc.BOOKING_ID && x.IsDeleted == false && x.TenantId == UserManager.TENANT_ID); - CreateTask(CautionNoticeTaskEnum.VGMCutDateAdvanced, bcSrcDto, userList, bookingInfo, slotInfo, srcVGMCut, targeVGMCut, $"提单号:{bcSrcDto.MBLNo} VGM截单时间提前了 原:{srcVGMCut} 新:{targeVGMCut}"); + CreateTask(CautionNoticeTaskEnum.VGMCutDateAdvanced, bcSrcDto, userList, bookingInfo, slotInfo, srcVGMCut, targeVGMCut, $"提单号:{bcSrcDto.MBLNo} \r\nVGM截单时间提前了 \r\n原:{srcVGMCut} \r\n新:{targeVGMCut}"); }); } else if (slotInfo != null) { - CreateTask(CautionNoticeTaskEnum.VGMCutDateAdvanced, bcSrcDto, userList, null, slotInfo, srcVGMCut, targeVGMCut, $"提单号:{bcSrcDto.MBLNo} VGM截单时间提前了 原:{srcVGMCut} 新:{targeVGMCut}"); + CreateTask(CautionNoticeTaskEnum.VGMCutDateAdvanced, bcSrcDto, userList, null, slotInfo, srcVGMCut, targeVGMCut, $"提单号:{bcSrcDto.MBLNo} \r\nVGM截单时间提前了 \r\n原:{srcVGMCut} \r\n新:{targeVGMCut}"); } } } @@ -3259,12 +3260,12 @@ namespace Myshipping.Application var bookingInfo = _repBookingOrder.AsQueryable().Filter(null, true).First(x => x.Id == ca.Alloc.BOOKING_ID && x.IsDeleted == false && x.TenantId == UserManager.TENANT_ID); - CreateTask(CautionNoticeTaskEnum.SICutDateAdvanced, bcSrcDto, userList, bookingInfo, slotInfo, srcSICut, targeSICut, $"提单号:{bcSrcDto.MBLNo} 样单截止时间提前了 原:{srcSICut} 新:{targeSICut}"); + CreateTask(CautionNoticeTaskEnum.SICutDateAdvanced, bcSrcDto, userList, bookingInfo, slotInfo, srcSICut, targeSICut, $"提单号:{bcSrcDto.MBLNo} \r\n样单截止时间提前了 \r\n原:{srcSICut} \r\n新:{targeSICut}"); }); } else if (slotInfo != null) { - CreateTask(CautionNoticeTaskEnum.SICutDateAdvanced, bcSrcDto, userList, null, slotInfo, srcSICut, targeSICut, $"提单号:{bcSrcDto.MBLNo} 样单截止时间提前了 原:{srcSICut} 新:{targeSICut}"); + CreateTask(CautionNoticeTaskEnum.SICutDateAdvanced, bcSrcDto, userList, null, slotInfo, srcSICut, targeSICut, $"提单号:{bcSrcDto.MBLNo} \r\n样单截止时间提前了 \r\n原:{srcSICut} \r\n新:{targeSICut}"); } } } @@ -3426,10 +3427,10 @@ namespace Myshipping.Application userIdList.Add(long.Parse(bookingInfo.OPID)); } - if (!string.IsNullOrWhiteSpace(bookingInfo.SALEID)) - { - userIdList.Add(long.Parse(bookingInfo.SALEID)); - } + //if (!string.IsNullOrWhiteSpace(bookingInfo.SALEID)) + //{ + // userIdList.Add(long.Parse(bookingInfo.SALEID)); + //} if (!string.IsNullOrWhiteSpace(bookingInfo.CUSTSERVICEID)) {