From 2517f51c213384f5dcbf90314aa2f299652df019 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Tue, 12 Nov 2024 10:37:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8E=86=E6=93=8D=E4=BD=9C=20?= =?UTF-8?q?=E6=8E=A8=E8=8D=90=E3=80=81=E5=9B=9E=E6=94=B6=E3=80=81=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E9=BB=91=E5=90=8D=E5=8D=95=E5=8A=A0=E5=85=A5=E3=80=81?= =?UTF-8?q?=E4=BA=BA=E6=89=8D=E5=BA=93=E3=80=81=E6=A0=87=E7=AD=BE=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=9D=83=E9=99=90=E8=A7=92=E8=89=B2=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tiobon.Core.Services/CommonServices.cs | 104 ++++++++++++++----------- 1 file changed, 60 insertions(+), 44 deletions(-) diff --git a/Tiobon.Core.Services/CommonServices.cs b/Tiobon.Core.Services/CommonServices.cs index 394073c0..cbb76f25 100644 --- a/Tiobon.Core.Services/CommonServices.cs +++ b/Tiobon.Core.Services/CommonServices.cs @@ -1227,51 +1227,67 @@ public partial class CommonServices : BaseServices>, ICommon break; case "F_ResumeMaintenance_All": - result.JM_PageControlT1.Toolbar.Add(new Toolbar() - { - display = true, - fnKey = "TBD5YN", - fnTitle = "推荐", - fnType = "row", - icon = "ess-icon-reject", - position = "left" - }); - result.JM_PageControlT1.Toolbar.Add(new Toolbar() - { - display = true, - fnKey = "TBD6YN", - fnTitle = "标签", - fnType = "row", - icon = "ess-icon-reject", - position = "left" - }); - result.JM_PageControlT1.Toolbar.Add(new Toolbar() - { - display = true, - fnKey = "TBD7YN", - fnTitle = "回收", - fnType = "row", - icon = "ess-icon-reject", - position = "left" - }); - result.JM_PageControlT1.Toolbar.Add(new Toolbar() - { - display = true, - fnKey = "TBD8YN", - fnTitle = "加入人才库", - fnType = "row", - icon = "ess-icon-reject", - position = "left" - }); - result.JM_PageControlT1.Toolbar.Add(new Toolbar() + + sql = $@"SELECT A.RoleId, B.RoleNo, B.RoleName + FROM Ghrs_UserRole A LEFT JOIN Ghrs_Role B ON A.RoleId = B.RoleId + WHERE A.UserID = {App.User.ID} + AND A.IsEnable = 1 + AND B.IsEnable = 1 + AND B.RoleNo LIKE 'RecruitResume%'"; + toolbarRoles = DbAccess.QueryList(sql); + if (toolbarRoles != null && toolbarRoles.Any()) { - display = true, - fnKey = "TBD9YN", - fnTitle = "加入黑名单", - fnType = "row", - icon = "ess-icon-reject", - position = "left" - }); + if (toolbarRoles.Where(x => x.RoleNo == "RecruitResumeRecommend").Any()) + result.JM_PageControlT1.Toolbar.Add(new Toolbar() + { + display = true, + fnKey = "TBD5YN", + fnTitle = "推荐", + fnType = "row", + icon = "ess-icon-reject", + position = "left" + }); + if (toolbarRoles.Where(x => x.RoleNo == "RecruitResumeTag").Any()) + result.JM_PageControlT1.Toolbar.Add(new Toolbar() + { + display = true, + fnKey = "TBD6YN", + fnTitle = "标签", + fnType = "row", + icon = "ess-icon-reject", + position = "left" + }); + if (toolbarRoles.Where(x => x.RoleNo == "RecruitResumeRecycle").Any()) + result.JM_PageControlT1.Toolbar.Add(new Toolbar() + { + display = true, + fnKey = "TBD7YN", + fnTitle = "回收", + fnType = "row", + icon = "ess-icon-reject", + position = "left" + }); + if (toolbarRoles.Where(x => x.RoleNo == "RecruitResumeTalentPool").Any()) + result.JM_PageControlT1.Toolbar.Add(new Toolbar() + { + display = true, + fnKey = "TBD8YN", + fnTitle = "加入人才库", + fnType = "row", + icon = "ess-icon-reject", + position = "left" + }); + if (toolbarRoles.Where(x => x.RoleNo == "RecruitResumeBlacklist").Any()) + result.JM_PageControlT1.Toolbar.Add(new Toolbar() + { + display = true, + fnKey = "TBD9YN", + fnTitle = "加入黑名单", + fnType = "row", + icon = "ess-icon-reject", + position = "left" + }); + } break; }