fix 数据获取需要比较时间
This commit is contained in:
@@ -63,6 +63,7 @@ public class CancelDuplicationTaskHandler : IAsyncChannelHandler<CancelDuplicati
|
||||
ignoreData = data.Where(x => x.Type == DeviceTaskEnumType.Update)
|
||||
.Where(x => x.Status == DeviceTaskStatusEnumType.Wait)
|
||||
.Where(x => x.Id != item.Id)
|
||||
.Where(x => item.CreateTime > x.CreateTime)
|
||||
.Select(x => new IdVersion { Id = x.Id, Version = x.Version }).ToList();
|
||||
}
|
||||
//最新一条删除人员信息
|
||||
@@ -78,6 +79,7 @@ public class CancelDuplicationTaskHandler : IAsyncChannelHandler<CancelDuplicati
|
||||
|| x.Type == DeviceTaskEnumType.Update)
|
||||
.Where(x => x.Status == DeviceTaskStatusEnumType.Wait)
|
||||
.Where(x => x.Id != item.Id)
|
||||
.Where(x => item.CreateTime > x.CreateTime)
|
||||
.Select(x => new IdVersion { Id = x.Id, Version = x.Version })
|
||||
);
|
||||
}
|
||||
@@ -87,6 +89,7 @@ public class CancelDuplicationTaskHandler : IAsyncChannelHandler<CancelDuplicati
|
||||
var beforeTask = data.Where(x => x.Type == DeviceTaskEnumType.Add || x.Type == DeviceTaskEnumType.Update)
|
||||
.Where(x => !currentIds.Contains(x.Id))
|
||||
.Where(x => x.Status == DeviceTaskStatusEnumType.Wait)
|
||||
.Where(x => item.CreateTime > x.CreateTime)
|
||||
.FirstOrDefault();
|
||||
|
||||
//逻辑正确,最终beforeTask.type == DeviceTaskEnumType.Add
|
||||
@@ -98,6 +101,7 @@ public class CancelDuplicationTaskHandler : IAsyncChannelHandler<CancelDuplicati
|
||||
beforeTask = data.Where(x => x.Type == DeviceTaskEnumType.Add || x.Type == DeviceTaskEnumType.Update)
|
||||
.Where(x => !currentIds.Contains(x.Id))
|
||||
.Where(x => x.Status == DeviceTaskStatusEnumType.Wait)
|
||||
.Where(x => item.CreateTime > x.CreateTime)
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user