|
|
@ -2560,15 +2560,15 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (bcSrcDto.CarrierId.Equals("MSK", StringComparison.OrdinalIgnoreCase))
|
|
|
|
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 srcWeek = bcSrcDto.WeekAt ?? "";
|
|
|
|
string targetWeek = bcTargetDto.WeekAt ?? "";
|
|
|
|
string targetWeek = bcTargetDto.WeekAt ?? "";
|
|
|
|
|
|
|
|
|
|
|
|
//如果计费周不一致需要推送推送任务台生成重要提醒
|
|
|
|
//如果计费周不一致需要推送推送任务台生成重要提醒
|
|
|
|
if (!srcWeek.Equals(targetWeek, StringComparison.OrdinalIgnoreCase))
|
|
|
|
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)
|
|
|
|
if (bookingList.Count > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bookingList.ForEach(async ca =>
|
|
|
|
bookingList.ForEach(async ca =>
|
|
|
@ -2611,9 +2611,6 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
if (!srcPriceCalcDate.Equals(targePriceCalcDate, StringComparison.OrdinalIgnoreCase))
|
|
|
|
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)
|
|
|
|
if (bookingList.Count > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bookingList.ForEach(async ca =>
|
|
|
|
bookingList.ForEach(async ca =>
|
|
|
@ -2650,6 +2647,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
|
|
|
|
#endregion
|
|
|
|