fix(workflow): 兼容驳回节点调用流程发起接口,工作项查询(Draft ToDo)
parent
0bb02af06d
commit
c02e0bb6fd
|
|
@ -113,8 +113,8 @@ public class WorkflowEngineApp : SqlSugarBaseApp<SysCategoryType, SugarDbContext
|
|||
// 需要查驳回和草稿
|
||||
var flowWorkItem = _sqlSugar.Queryable<ZyFlowWorkitem>()
|
||||
.Where(a => a.InstanceId == instanceId
|
||||
&& a.NodeId == startNode.NodeId
|
||||
&& (a.Status == "Draft" || a.Status == "Rejected")).First();
|
||||
//&& a.NodeId == startNode.NodeId
|
||||
&& (a.Status == "Draft" || a.Status == "ToDo")).First();
|
||||
if (flowWorkItem == null)
|
||||
{
|
||||
throw new Exception("流程工作项不存在");
|
||||
|
|
@ -252,7 +252,6 @@ public class WorkflowEngineApp : SqlSugarBaseApp<SysCategoryType, SugarDbContext
|
|||
{
|
||||
// 开启事务
|
||||
UnitWork.Db.Ado.BeginTran();
|
||||
|
||||
// 步骤1:查询待处理的工作项(仅待办状态可处理)
|
||||
var workitem = _sqlSugar.Queryable<ZyFlowWorkitem>()
|
||||
.Where(w => w.WorkitemId == requestDto.WorkitemId && w.Status == "ToDo")
|
||||
|
|
@ -910,7 +909,7 @@ public class WorkflowEngineApp : SqlSugarBaseApp<SysCategoryType, SugarDbContext
|
|||
FlowToNextNode(instanceId, parallelNode, userId, userName, "所有审核科会签完成,流转至汇总节点");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private bool IsAllAuditCompleted(long instanceId, long nodeId)
|
||||
{
|
||||
// 有一个 Pending
|
||||
|
|
@ -970,6 +969,7 @@ public class WorkflowEngineApp : SqlSugarBaseApp<SysCategoryType, SugarDbContext
|
|||
.Queryable<ZyFlowWorkitem>()
|
||||
.Where(w => w.InstanceId == flowInstance.InstanceId)
|
||||
.OrderBy(w => w.WorkitemId).First();
|
||||
// 区县角色用户有多个,为了不数据混乱,需要填充HandlerId和HandlerName
|
||||
summaryWorkitem.HandlerId = flowInstance.InstanceId;
|
||||
summaryWorkitem.HandlerName = flowInstance.InitiatorName;
|
||||
summaryWorkitem.OrgId = startWorkItem.OrgId;
|
||||
|
|
|
|||
Loading…
Reference in New Issue