From 43012c89a849c15c9467e0a6c758fe8ab07e71a2 Mon Sep 17 00:00:00 2001 From: yubaolee Date: Wed, 2 Oct 2024 19:25:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BE=85=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E5=92=8C=E5=B7=B2=E5=AE=A1=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenAuth.App/FlowInstance/FlowInstanceApp.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/OpenAuth.App/FlowInstance/FlowInstanceApp.cs b/OpenAuth.App/FlowInstance/FlowInstanceApp.cs index f18e2a8f..feee06cb 100644 --- a/OpenAuth.App/FlowInstance/FlowInstanceApp.cs +++ b/OpenAuth.App/FlowInstance/FlowInstanceApp.cs @@ -852,6 +852,7 @@ namespace OpenAuth.App if (request.type == "wait") //待办事项 { + //包括加签人包含当前用户,审批人包含当前用户且没有加签节点的 var query = SugarClient.SqlQueryable($@" SELECT fi.* FROM FlowInstance fi @@ -859,6 +860,11 @@ namespace OpenAuth.App FROM FlowInstance fith WHERE (MakerList = '1' or MakerList LIKE '%{user.User.Id}%') and (fith.IsFinish = {FlowInstanceStatus.Running} or fith.IsFinish = {FlowInstanceStatus.Rejected}) + and not exists (select 1 + from flowapprover + where fith.Id = InstanceId + and fith.ActivityId = ActivityId + and Status = 0) UNION SELECT fa.InstanceId FROM FlowApprover fa @@ -877,7 +883,7 @@ namespace OpenAuth.App SELECT fi.* FROM FlowInstance fi JOIN (SELECT fith.InstanceId - FROM FlowInstanceTransitionHistory fith + FROM FlowInstanceOperationHistory fith WHERE fith.CreateUserId = '{user.User.Id}' UNION SELECT fa.InstanceId