ソースを参照

排课管理查看/编辑课表添加权限

临城职教中职
ndbs 2年前
コミット
00ff618ef7
2個のファイルの変更35行の追加11行の削除
  1. +33
    -11
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs
  2. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config

+ 33
- 11
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs ファイルの表示

@@ -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);


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config ファイルの表示

@@ -163,6 +163,8 @@
<add key="QJUrl" value="www.qj.com"/>
<!--系主任角色Id-->
<add key="DeptDirectorRoleId" value="cccde0ce-ebfe-41f2-9a78-e49aaa21cd5a" />
<!--排课管理角色Id 有权限查看所有人的课-->
<add key="PKRoleId" value="2fe2fa03-9897-4639-9bf2-8e26c4e01b01"/>
<!-- 登录次数限制:登录连续错误要禁止登录 -->
<add key="ForbidLoginNum" value="5"/>
<!-- 禁止登录时间(分钟) -->


読み込み中…
キャンセル
保存