/// <summary> /// 寻找该节点执行人 /// </summary> /// <param name="node"></param> /// <returns></returns> private string GetNodeMarkers(FlowNode node) { string makerList = ""; if (node.setInfo != null) { if (node.setInfo.NodeDesignate == Setinfo.ALL_USER)//所有成员 { makerList = "1"; } else if (node.setInfo.NodeDesignate == Setinfo.SPECIAL_USER)//指定成员 { makerList = JsonHelper.ArrayToString(node.setInfo.NodeDesignateData.users, makerList); } else if (node.setInfo.NodeDesignate == Setinfo.SPECIAL_ROLE) //指定角色 { List <UserEntity> list = new List <UserEntity>(); List <string> users = new List <string>(); foreach (var item in node.setInfo.NodeDesignateData.roles) { var temp = uniwork.IQueryable <UserEntity>(a => a.F_RoleId.Contains(item)).ToList(); var tempList = new List <UserEntity>(); if (node.setInfo.NodeDesignateData.currentDepart) { var currentDepartment = currentuser.DepartmentId.Split(',').ToList(); foreach (var user in temp) { var nextCurrentDepartment = user.F_DepartmentId.Split(',').ToList(); if (TextHelper.IsArrayIntersection(currentDepartment, nextCurrentDepartment)) { tempList.Add(user); } } } else { tempList = temp; } var tempFinal = tempList.Select(a => a.F_Id).ToList(); users.AddRange(tempFinal); } users = users.Distinct().ToList(); makerList = JsonHelper.ArrayToString(users, makerList); } } else //如果没有设置节点信息,默认所有人都可以审核 { makerList = "1"; } return(makerList); }