fix:轨迹订单删除或完结不要移除以下内容
- 预警通知任务 - 完整预警明细
This commit is contained in:
parent
ed3b7940c8
commit
554236af30
@ -1,6 +1,7 @@
|
||||
using SJZY.Track.Domain.Aggregates.OrderAggregate;
|
||||
using SJZY.Track.Domain.Aggregates.WarningAggregate;
|
||||
using SJZY.Track.Domain.Dtos.Warning;
|
||||
using SJZY.Track.Domain.Enums;
|
||||
using Volo.Abp.DependencyInjection;
|
||||
|
||||
namespace SJZY.Track.Application.Services.Warning.Handlers;
|
||||
@ -33,8 +34,9 @@ public class OrderWarningHandler : IOrderWarningHandler, ITransientDependency
|
||||
var orderIds = filteredOrders.Select(x => x.Id).ToHashSet();
|
||||
// 1.移除关闭预警通知任务
|
||||
await _warningTaskRepository.CloseWarningNotifyTaskAsync(x =>
|
||||
!x.IsClosed
|
||||
&& orderIds.Contains(x.OrderId)
|
||||
!x.IsClosed
|
||||
&& orderIds.Contains(x.OrderId)
|
||||
&& x.WarningType != (int) WarningRuleType.完整预警 // tips:不要移除完整预警
|
||||
);
|
||||
|
||||
// 2.移除关闭【回传重试推送任务】,【运输预警明细生成任务】tips:无法关闭回传重试任务
|
||||
@ -56,9 +58,10 @@ public class OrderWarningHandler : IOrderWarningHandler, ITransientDependency
|
||||
{
|
||||
OrderIds = orderIds,
|
||||
});
|
||||
await _warningDetailsEsRepository.BulkCloseCompleteWarningDetailsAsync(new BulkCloseCompleteWarningDetailsVO
|
||||
{
|
||||
OrderIds = orderIds,
|
||||
});
|
||||
// tips:不要移除完整预警
|
||||
// await _warningDetailsEsRepository.BulkCloseCompleteWarningDetailsAsync(new BulkCloseCompleteWarningDetailsVO
|
||||
// {
|
||||
// OrderIds = orderIds,
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user