修改任务台枚举

master
jianghaiqing 4 days ago
parent 5385a0d4f7
commit ae57d57aaa

@ -210,5 +210,10 @@ namespace Myshipping.Application
/// </summary>
[Description("运输计划已变更")]
TRNAS_PLAN_HAS_CHANGE,
/// <summary>
/// VerifyCopy
/// </summary>
[Description("VerifyCopy")]
VERIFY_COPY,
}
}

@ -4731,6 +4731,79 @@ namespace Myshipping.Application
return false;
}
///// <summary>
///// 比对差异
///// </summary>
///// <param name="bcSrcDto">原舱位详情</param>
///// <param name="bcTargetDto">新舱位详情</param>
///// <param name="slotId">舱位ID</param>
///// <returns></returns>
//[NonAction]
//private async Task MeasureDiff(TaskBCInfoDto bcSrcDto, TaskBCInfoDto bcTargetDto, long slotId)
//{
// var bookingSlotAllocList = _repBase.AsQueryable().Filter(null, true)
// .LeftJoin<BookingSlotAllocation>((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());
// }
// }
//}
}

Loading…
Cancel
Save