From f2de9a6526953fc46dd8b362deaacb8c7ac1e114 Mon Sep 17 00:00:00 2001 From: liguoyang Date: Thu, 14 Mar 2024 21:08:28 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=95=B0=E6=8D=AE=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E6=AF=94=E8=BE=83=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Device/EventBusHandler/CancelDuplicationTaskHandler.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Src/Dlhis.Basic/Device/EventBusHandler/CancelDuplicationTaskHandler.cs b/Src/Dlhis.Basic/Device/EventBusHandler/CancelDuplicationTaskHandler.cs index 92158487..e19cf28f 100644 --- a/Src/Dlhis.Basic/Device/EventBusHandler/CancelDuplicationTaskHandler.cs +++ b/Src/Dlhis.Basic/Device/EventBusHandler/CancelDuplicationTaskHandler.cs @@ -63,6 +63,7 @@ public class CancelDuplicationTaskHandler : IAsyncChannelHandler 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 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 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 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(); }