修改BC任务新增,增加计费日期

master
jianghaiqing 7 months ago
parent 3095686ac5
commit 4da5751ed9

@ -391,5 +391,10 @@ namespace Myshipping.Application
/// 处理时间
/// </summary>
public Nullable<DateTime> PROCESS_DATE { get; set; }
/// <summary>
/// 计费日期
/// </summary>
public Nullable<DateTime> PRICE_CALCULATION_DATE { get; set; }
}
}

@ -28,10 +28,10 @@ namespace Myshipping.Application
[Description("直达转为中转")]
ChangeTransfer,
/// <summary>
/// 船名变化
/// 船名航次变化
/// </summary>
[Description("船名变化")]
ChangeVessel,
[Description("船名航次变化")]
ChangeVesselVoyno,
/// <summary>
/// 截止时间提前
/// </summary>

@ -2297,15 +2297,15 @@ namespace Myshipping.Application
{
if (bcSrcDto.CarrierId.Equals("MSK", StringComparison.OrdinalIgnoreCase))
{
var bookingList = _repAllocation.AsQueryable().Filter(null, true)
.Where(x => x.BOOKING_SLOT_ID == slotId && x.IsDeleted == false && x.TenantId == UserManager.TENANT_ID).ToList();
string srcWeek = bcSrcDto.WeekAt ?? "";
string targetWeek = bcTargetDto.WeekAt ?? "";
//如果计费周不一致需要推送推送任务台生成重要提醒
if (!srcWeek.Equals(targetWeek, StringComparison.OrdinalIgnoreCase))
{
var bookingList = _repAllocation.AsQueryable().Filter(null, true)
.Where(x => x.BOOKING_SLOT_ID == slotId && x.IsDeleted == false && x.TenantId == UserManager.TENANT_ID).ToList();
if (bookingList.Count > 0)
{
bookingList.ForEach(async ca =>
@ -2348,9 +2348,6 @@ namespace Myshipping.Application
if (!srcPriceCalcDate.Equals(targePriceCalcDate, StringComparison.OrdinalIgnoreCase))
{
var bookingList = _repAllocation.AsQueryable().Filter(null, true)
.Where(x => x.BOOKING_SLOT_ID == slotId && x.IsDeleted == false && x.TenantId == UserManager.TENANT_ID).ToList();
if (bookingList.Count > 0)
{
bookingList.ForEach(async ca =>
@ -2387,6 +2384,97 @@ namespace Myshipping.Application
}));
}
}
string srcVessel = bcSrcDto.Vessel ?? "";
string targetVessel = bcTargetDto.Vessel ?? "";
string srcVoyno = bcSrcDto.VoyNo ?? "";
string targetVoyno = bcTargetDto.VoyNo ?? "";
//船名航次出现变化需要做重要提醒
if (!srcVessel.Equals(targetVessel, StringComparison.OrdinalIgnoreCase) || !srcVoyno.Equals(targetVoyno, StringComparison.OrdinalIgnoreCase))
{
if (bookingList.Count > 0)
{
bookingList.ForEach(async ca =>
{
await _publisher.PublishAsync(new ChannelEventSource("CautionNoticeTask:Add",
new CautionNoticeTaskDto
{
cautionNoticeType = CautionNoticeTaskEnum.ChangeVesselVoyno,
bookingId = ca.BOOKING_ID,
bookingSlotId = ca.BOOKING_SLOT_ID,
createTime = DateTime.Now,
origVal = $"{srcVessel}/{srcVoyno}",
newVal = $"{targetVessel}/{targetVoyno}",
tenentId = UserManager.TENANT_ID,
userId = UserManager.UserId,
userName = UserManager.Name,
}));
});
}
else
{
await _publisher.PublishAsync(new ChannelEventSource("CautionNoticeTask:Add",
new CautionNoticeTaskDto
{
cautionNoticeType = CautionNoticeTaskEnum.ChangeVesselVoyno,
bookingSlotId = slotId,
createTime = DateTime.Now,
origVal = srcWeek,
newVal = targetWeek,
tenentId = UserManager.TENANT_ID,
userId = UserManager.UserId,
userName = UserManager.Name,
}));
}
}
string srcCarrierType = bcSrcDto.CarriageType ?? "";
string targetCarrierType = bcTargetDto.CarriageType ?? "";
//如果原来是直航现在变成了中转需要做重要提醒
if (!srcVessel.Equals(targetVessel, StringComparison.OrdinalIgnoreCase)
&& srcVessel.Equals("DIRECT_SHIP", StringComparison.OrdinalIgnoreCase)
&& targetCarrierType.Equals("TRANSFER_SHIP", StringComparison.OrdinalIgnoreCase))
{
if (bookingList.Count > 0)
{
bookingList.ForEach(async ca =>
{
await _publisher.PublishAsync(new ChannelEventSource("CautionNoticeTask:Add",
new CautionNoticeTaskDto
{
cautionNoticeType = CautionNoticeTaskEnum.ChangeTransfer,
bookingId = ca.BOOKING_ID,
bookingSlotId = ca.BOOKING_SLOT_ID,
createTime = DateTime.Now,
origVal = srcCarrierType,
newVal = targetCarrierType,
tenentId = UserManager.TENANT_ID,
userId = UserManager.UserId,
userName = UserManager.Name,
}));
});
}
else
{
await _publisher.PublishAsync(new ChannelEventSource("CautionNoticeTask:Add",
new CautionNoticeTaskDto
{
cautionNoticeType = CautionNoticeTaskEnum.ChangeTransfer,
bookingSlotId = slotId,
createTime = DateTime.Now,
origVal = srcCarrierType,
newVal = targetCarrierType,
tenentId = UserManager.TENANT_ID,
userId = UserManager.UserId,
userName = UserManager.Name,
}));
}
}
}
}
#endregion

@ -817,7 +817,8 @@ namespace Myshipping.Application
.Map(dest => dest.SECOND_ETD, src => src.SecondETD)
.Map(dest => dest.SECOND_ETA, src => src.SecondETA)
.Map(dest => dest.BOOKING_COMFIRM_DATE, src => src.BookingConfirmDate)
.Map(dest => dest.BATCH_NO, src => src.BatchNo);
.Map(dest => dest.BATCH_NO, src => src.BatchNo)
.Map(dest => dest.PRICE_CALCULATION_DATE, src => src.PriceCalculationDate);
config.ForType<TaskBCCTNInfo, TaskBCCTNInfoDto>()
.Map(dest => dest.CtnCode, src => src.CTNCODE)

@ -346,5 +346,10 @@ namespace Myshipping.Application
/// 批次号
/// </summary>
public string BatchNo { get; set; }
/// <summary>
/// 计费时间
/// </summary>
public Nullable<DateTime> PriceCalculationDate { get; set; }
}
}

@ -1431,7 +1431,7 @@ namespace Myshipping.Application
{
taskCautionNoticeInfo.IS_PRICE_DATE_DIFF = true;
}
else if (info.Main.CautionNoticeInfo.CautionNoticeType == CautionNoticeTaskEnum.ChangeVessel)
else if (info.Main.CautionNoticeInfo.CautionNoticeType == CautionNoticeTaskEnum.ChangeVesselVoyno)
{
taskCautionNoticeInfo.IS_VESSEL_CHANGE = true;
}

Loading…
Cancel
Save