Commit a86f4682 authored by liudong1993's avatar liudong1993

1

parent 9900fef6
......@@ -98,5 +98,10 @@ namespace Edu.Model.ViewModel.User
/// 用户角色
/// </summary>
public UserRoleEnum UserRole { get; set; }
/// <summary>
/// 是否显示
/// </summary>
public int IsShow { get; set; }
}
}
\ No newline at end of file
......@@ -180,7 +180,8 @@ namespace Edu.Module.Course
List<object> RList = new List<object>();
List<object> RList2 = new List<object>();
//查询所有的老师
var teacherList = accountRepository.GetAccountListExtRepository(new Model.ViewModel.User.RB_Account_ViewModel() { Group_Id = demodel.Group_Id, AccountType = Common.Enum.User.AccountTypeEnum.Teacher, IsSelectLevelNor = 1 });
var teacherList = accountRepository.GetAccountListExtRepository(new RB_Account_ViewModel() { Group_Id = demodel.Group_Id, AccountType = Common.Enum.User.AccountTypeEnum.Teacher, IsSelectLevelNor = 1 });
teacherList = teacherList.Where(x => x.IsShow == 1).ToList();
var list = scroll_PlanRepository.GetList(demodel);
if (list.Any() || teacherList.Any()) {
//查询班次
......
......@@ -150,19 +150,19 @@ FROM
(
SELECT A.Id,A.Account,A.WorkUserId,A.`Password`,A.AccountType,A.AccountId,A.CreateBy,A.CreateTime,A.UpdateBy,A.UpdateTime,A.Group_Id,B.School_Id,A.`Status`,B.LeaveStatus
,A.AnnualLeaveDay, A.DirectSupervisor,A.OpenId,A.ActivationStatus,IFNULL(B.MName,'') AS AccountName,B.MHead AS UserIcon,B.Dept_Id,B.Post_Id,IFNULL(B.Email,'') AS Email,B.IsTenCccUser
,B.UserRole
,B.UserRole,1 as IsShow
FROM rb_account AS A INNER JOIN rb_manager AS B ON A.AccountId=B.MId AND A.AccountType=1
WHERE 1=1 {0}
UNION ALL
SELECT A.Id,A.Account,A.WorkUserId,A.`Password`,A.AccountType,A.AccountId,A.CreateBy,A.CreateTime,A.UpdateBy,A.UpdateTime,A.Group_Id,B.School_Id,A.`Status`,B.LeaveStatus
,A.AnnualLeaveDay, A.DirectSupervisor,A.OpenId,A.ActivationStatus,IFNULL(B.TeacherName,'') AS AccountName,B.TeacherIcon AS UserIcon,B.Dept_Id,B.Post_Id,IFNULL(B.Email,'') AS Email,B.IsTenCccUser
,B.UserRole
,B.UserRole,B.IsShow
FROM rb_account AS A INNER JOIN rb_teacher AS B ON A.AccountId=B.TId AND A.AccountType=2
WHERE 1=1 {0}
UNION ALL
SELECT A.Id,A.Account,A.WorkUserId,A.`Password`,A.AccountType,A.AccountId,A.CreateBy,A.CreateTime,A.UpdateBy,A.UpdateTime,A.Group_Id,B.School_Id,A.`Status`,B.LeaveStatus
,A.AnnualLeaveDay, A.DirectSupervisor,A.OpenId,A.ActivationStatus,IFNULL(B.AssistName,'') AS AccountName,B.AssistIcon AS UserIcon,B.Dept_Id,B.Post_Id,IFNULL(B.Email,'') AS Email,0 AS IsTenCccUser
,0 AS UserRole
,0 AS UserRole,1 as IsShow
FROM rb_account AS A INNER JOIN rb_assist AS B ON A.AccountId=B.AId AND A.AccountType=3
WHERE 1=1 {0}
) AS A LEFT JOIN rb_group AS g ON A.Group_Id=g.GId
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment