|
|
@@ -109,7 +109,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers |
|
|
|
public ActionResult IndexLessonTermTeach() |
|
|
|
{ |
|
|
|
var LogInfo = LoginUserInfo.Get(); |
|
|
|
if (LogInfo.Description=="教师") |
|
|
|
if (LogInfo.Description == "教师") |
|
|
|
{ |
|
|
|
var empInfo = empInfoIbll.GetAllList().Where(x => x.EmpNo == LogInfo.account); |
|
|
|
if (empInfo != null) |
|
|
@@ -308,24 +308,46 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers |
|
|
|
.ToString("yyyy-MM-dd");// StartTime.AddDays(((curWeek - 1) * 14)).AddDays(10).ToString("yyyy-MM-dd"); |
|
|
|
|
|
|
|
var timeTableList = new List<TimeTable>(); |
|
|
|
|
|
|
|
//课程表 |
|
|
|
var data = arrangeLessonTermIBLL.GetTimeTableInEducation(startDate, endDate, classNo, "", ""); |
|
|
|
|
|
|
|
if (userInfo.Description == "学生") |
|
|
|
if (!string.IsNullOrEmpty(classNo)) |
|
|
|
{ |
|
|
|
data = arrangeLessonTermIBLL.GetTimeTableInEducation(startDate, endDate, classNo, "", ""); |
|
|
|
} |
|
|
|
else if (userInfo.Description == "教师") |
|
|
|
{ |
|
|
|
var empInfo = empInfoIbll.GetAllList().Where(x => x.EmpNo == userInfo.account); |
|
|
|
if (empInfo != null) |
|
|
|
var PKRoleId = Config.GetValue("PKRoleId"); |
|
|
|
var loginInfoRoleIds = LoginUserInfo.Get().roleIds; |
|
|
|
if (loginInfoRoleIds.IndexOf(',') == -1) |
|
|
|
{ |
|
|
|
data = arrangeLessonTermIBLL.GetTimeTableInEducation(startDate, endDate, "", empInfo.FirstOrDefault().EmpNo, ""); |
|
|
|
if (loginInfoRoleIds == PKRoleId) |
|
|
|
{ |
|
|
|
data = arrangeLessonTermIBLL.GetTimeTableInEducation(startDate, endDate, classNo, "", ""); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if (loginInfoRoleIds.Split(',').Contains(PKRoleId)) |
|
|
|
{ |
|
|
|
data = arrangeLessonTermIBLL.GetTimeTableInEducation(startDate, endDate, classNo, "", ""); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
data = arrangeLessonTermIBLL.GetTimeTableInEducation(startDate, endDate, classNo, "", ""); |
|
|
|
if (userInfo.Description == "学生") |
|
|
|
{ |
|
|
|
data = arrangeLessonTermIBLL.GetTimeTableInEducation(startDate, endDate, classNo, "", ""); |
|
|
|
} |
|
|
|
else if (userInfo.Description == "教师") |
|
|
|
{ |
|
|
|
var empInfo = empInfoIbll.GetAllList().Where(x => x.EmpNo == userInfo.account); |
|
|
|
if (empInfo != null) |
|
|
|
{ |
|
|
|
data = arrangeLessonTermIBLL.GetTimeTableInEducation(startDate, endDate, "", empInfo.FirstOrDefault().EmpNo, ""); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
data = arrangeLessonTermIBLL.GetTimeTableInEducation(startDate, endDate, classNo, "", ""); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
timeTableList.AddRange(data); |
|
|
|