fix:修复修改轨迹推送配置后引发的预警计算没有处于事务之后进行
This commit is contained in:
parent
c163a3bcc7
commit
d0c1ee8bc5
@ -90,7 +90,7 @@ public class BroadcastingService : IBroadcastingService
|
||||
OperationMan = log.OperationMan,
|
||||
PushTime = log.PushTime,
|
||||
OptionType = log.OptionType,
|
||||
IsManualPush = log.IsManualPush, //操作人不为系统用户,则认为是仍推送
|
||||
IsManualPush = log.IsManualPush, //操作人不为系统用户,则认为是人推送
|
||||
PushContent = log.PushContent,
|
||||
OrderNo = log.OrderNo,
|
||||
TrackStatus = log.TrackStatus,
|
||||
|
||||
@ -270,10 +270,11 @@ public class TrackPushService : ApplicationService, ISingletonDependency
|
||||
await _trackPushCacheService.SetPushContentConfigsAsync(pushConfig.SubSystemId, pushConfig.CustomId);
|
||||
}
|
||||
|
||||
// 引发预警计算
|
||||
await WarningCalc_PushContentConfigChanged(pushConfig, oldContentConfig, postContentConfig);
|
||||
ts.Complete();
|
||||
|
||||
// 引发预警计算
|
||||
WarningCalc_PushContentConfigChanged(pushConfig, oldContentConfig, postContentConfig);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -285,7 +286,7 @@ public class TrackPushService : ApplicationService, ISingletonDependency
|
||||
[HttpPost("SortContent")]
|
||||
public async Task<bool> SortContentAsync([FromBody] SortTrackPushContentInput input)
|
||||
{
|
||||
List<int> ids = input.SortInfo.Select(x => int.Parse(x.Key)).ToList();
|
||||
var ids = input.SortInfo.Select(x => int.Parse(x.Key)).ToList();
|
||||
|
||||
var trackPushContentEntities = await _trackPushConfigRepository.GetContentListAsync(x => ids.Contains(x.Id));
|
||||
|
||||
@ -297,9 +298,13 @@ public class TrackPushService : ApplicationService, ISingletonDependency
|
||||
|
||||
await _trackPushConfigRepository.UpdateContentRangeAsync(trackPushContentEntities);
|
||||
|
||||
var pushConfig =
|
||||
await _trackPushConfigRepository.GetFirstAsync(x =>
|
||||
x.Id == trackPushContentEntities[0].TrackPushConfigId);
|
||||
var pushConfig = await _trackPushConfigRepository.GetFirstAsync(
|
||||
x => x.Id == trackPushContentEntities[0].TrackPushConfigId,
|
||||
y => new
|
||||
{
|
||||
y.SubSystemId,
|
||||
y.CustomId
|
||||
});
|
||||
if (pushConfig != null)
|
||||
{
|
||||
await _trackPushCacheService.SetPushContentConfigsAsync(pushConfig.SubSystemId, pushConfig.CustomId);
|
||||
@ -312,7 +317,7 @@ public class TrackPushService : ApplicationService, ISingletonDependency
|
||||
}
|
||||
|
||||
|
||||
private async Task WarningCalc_PushContentConfigChanged(TrackPushConfigEntity? pushConfig, TrackPushContentConfigEntity? oldContentConfig, TrackPushContentConfigEntity? postContentConfig)
|
||||
private void WarningCalc_PushContentConfigChanged(TrackPushConfigEntity? pushConfig, TrackPushContentConfigEntity? oldContentConfig, TrackPushContentConfigEntity? postContentConfig)
|
||||
{
|
||||
// 推送配置主体不存在?
|
||||
if (pushConfig == null) return;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user