From af7c55fc0f361bd688d2a93103034f68495193ae Mon Sep 17 00:00:00 2001 From: ndbs Date: Sat, 12 Oct 2024 17:49:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E5=85=A8=E6=8E=92=E6=9F=A5=E6=B5=81?= =?UTF-8?q?=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SafetyCheck/SafetyCheckService.cs | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckService.cs index b7cf97513..fcf4684d6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckService.cs @@ -58,13 +58,37 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var user = LoginUserInfo.Get(); if (!user.isSystem) //超管/安全办 { + var dept = this.BaseRepository().FindList(x => x.F_SchoolMaster == //user.realName); + "李明纯").ToList(); + var depts = ""; + if (user.roleIds.Contains("9593aeff-a62b-45ea-bfd1-c9766669c1a8"))//分管领导 { - strSql.Append(" AND (t.Status = 2 or t.Name = '" + user.userId + "')"); + if (dept.Count() > 0) + { + for (int i = 0; i < dept.Count(); i++) + { + if (i == dept.Count()-1) + { + depts += " t.Department= '" + dept[i].F_DepartmentId + "'"; + } + else + { + depts += "t.Department='" + dept[i].F_DepartmentId + "' or "; + } + } + strSql.Append(" and (" + depts + ")"); + } + else + { + strSql.Append(" AND t.Department = '" + user.departmentId + "' "); + } + strSql.Append(" and t.Name = '" + user.userId + "' "); } else if (user.roleIds.Contains("ab90ee97-c8e2-4bc9-80b4-68aff407c777"))//部门领导 { - strSql.Append(" AND t.Department = '" + user.departmentId + "'"); + strSql.Append(" AND t.Department = '" + user.departmentId + + "' and (t.Status = 1 or t.Name = '" + user.userId + "')"); } else if (user.roleIds.Contains("a58a6f8f-0e50-4708-ae35-1fb85761a7b1")) {