From ae57d57aaafa0210969af0e254c39ee3dbbb85a3 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Tue, 26 Nov 2024 16:38:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=BB=E5=8A=A1=E5=8F=B0?= =?UTF-8?q?=E6=9E=9A=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Enum/TaskBusiTypeEnum.cs | 5 ++ .../Service/BookingSlot/BookingSlotService.cs | 73 +++++++++++++++++++ 2 files changed, 78 insertions(+) diff --git a/Myshipping.Application/Enum/TaskBusiTypeEnum.cs b/Myshipping.Application/Enum/TaskBusiTypeEnum.cs index 7bd93aba..4ee19acc 100644 --- a/Myshipping.Application/Enum/TaskBusiTypeEnum.cs +++ b/Myshipping.Application/Enum/TaskBusiTypeEnum.cs @@ -210,5 +210,10 @@ namespace Myshipping.Application /// [Description("运输计划已变更")] TRNAS_PLAN_HAS_CHANGE, + /// + /// VerifyCopy + /// + [Description("VerifyCopy")] + VERIFY_COPY, } } diff --git a/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs b/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs index 074a8060..c1e65bb6 100644 --- a/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs +++ b/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs @@ -4731,6 +4731,79 @@ namespace Myshipping.Application return false; } + + ///// + ///// 比对差异 + ///// + ///// 原舱位详情 + ///// 新舱位详情 + ///// 舱位ID + ///// + //[NonAction] + //private async Task MeasureDiff(TaskBCInfoDto bcSrcDto, TaskBCInfoDto bcTargetDto, long slotId) + //{ + // var bookingSlotAllocList = _repBase.AsQueryable().Filter(null, true) + // .LeftJoin((slot, alloc) => slot.Id == alloc.BOOKING_SLOT_ID) + // .Where((slot, alloc) => slot.Id == slotId && slot.IsDeleted == false && slot.TenantId == UserManager.TENANT_ID && alloc.IsDeleted == false) + // .Select((slot, alloc) => new { Slot = slot, Alloc = alloc }).ToList(); + + // string srcWeek = bcSrcDto.WeekAt ?? ""; + // string targetWeek = bcTargetDto.WeekAt ?? ""; + + // if (!srcWeek.Equals(targetWeek, StringComparison.OrdinalIgnoreCase)) + // { + // if (bookingSlotAllocList.Count > 0) + // { + // bookingSlotAllocList.ForEach(async ca => + // { + // 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} \r\n计费周变更了 \r\n原:{srcWeek} \r\n新:{targetWeek}", true); + // }); + // } + // else if (slotInfo != null) + // { + // //CreateTask(CautionNoticeTaskEnum.WeekAt, bcSrcDto, userList, null, slotInfo, srcWeek, targetWeek, $"提单号:{bcSrcDto.MBLNo} \r\n计费周变更了 \r\n原:{srcWeek} \r\n新:{targetWeek}", true); + // } + // } + // else + // { + // if (string.IsNullOrWhiteSpace(targetWeek)) + // { + // new EmailNoticeHelper().SendEmailNotice($"MBLNO={bcSrcDto.MBLNo} slotId={slotId} 没有提取到计费周", $"MBLNO={bcSrcDto.MBLNo} slotId={slotId} 没有提取到计费周", App.Configuration["EmailNoticeDefaultUser"].GetUserEmailList()); + // } + // } + + // 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 (!string.IsNullOrWhiteSpace(srcPriceDate) && !srcPriceDate.Equals(targetPriceDate, StringComparison.OrdinalIgnoreCase)) + // { + // if (bookingSlotAllocList.Count > 0) + // { + // bookingSlotAllocList.ForEach(async ca => + // { + // 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} \r\n计费日期变更了 \r\n原:{srcPriceDate} \r\n新:{targetPriceDate}", true); + // }); + // } + // else if (slotInfo != null) + // { + // //CreateTask(CautionNoticeTaskEnum.PriceCalcDate, bcSrcDto, userList, null, slotInfo, srcPriceDate, targetPriceDate, $"提单号:{bcSrcDto.MBLNo} \r\n计费日期变更了 \r\n原:{srcPriceDate} \r\n新:{targetPriceDate}", true); + // } + // } + // else + // { + // if (string.IsNullOrWhiteSpace(targetPriceDate)) + // { + // new EmailNoticeHelper().SendEmailNotice($"MBLNO={bcSrcDto.MBLNo} slotId={slotId} 没有提取到计费日期", $"MBLNO={bcSrcDto.MBLNo} slotId={slotId} 没有提取到计费日期", App.Configuration["EmailNoticeDefaultUser"].GetUserEmailList()); + // } + // } + //} }