Преглед на файлове

Merge branch '长阳分支中职' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into 长阳分支中职

临城职教中职
dyy преди 2 години
родител
ревизия
b44a384562
променени са 26 файла, в които са добавени 2546 реда и са изтрити 273 реда
  1. +50
    -18
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs
  2. +19
    -105
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanTeachController.cs
  3. +117
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermItemNewController.cs
  4. +166
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermNewController.cs
  5. +196
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamLessonController.cs
  6. +376
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanController.cs
  7. +396
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanLessonController.cs
  8. +179
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamRoomController.cs
  9. +187
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamStudentController.cs
  10. +117
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamTeacherTimeController.cs
  11. +187
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_InvigilateTeacherController.cs
  12. +28
    -16
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.cshtml
  13. +43
    -11
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js
  14. +11
    -7
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.cshtml
  15. +77
    -40
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js
  16. +44
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/IndexSchool.cshtml
  17. +129
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/IndexSchool.js
  18. +15
    -7
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.cshtml
  19. +69
    -50
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js
  20. +2
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachForm.js
  21. +3
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachFormQZ.js
  22. +11
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  23. +30
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanBLL.cs
  24. +2
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanIBLL.cs
  25. +89
    -13
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanService.cs
  26. +3
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj

+ 50
- 18
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs Целия файл

@@ -42,6 +42,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
return View();
}
/// <summary>
/// 全校开课计划
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult IndexSchool()
{
return View();
}

#endregion

@@ -68,6 +77,28 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
};
return Success(jsonData);
}
/// <summary>
/// 全校开课计划
/// </summary>
/// <param name="pagination"></param>
/// <param name="queryJson"></param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageListForSchool(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = classPlanIBLL.GetPageListForSchool(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}

/// <summary>
/// 获取表单数据
/// </summary>
@@ -121,7 +152,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
entity.LessonSortNo = "1";
entity.CheckMark = "1";
entity.MakeDate = DateTime.Now;
var model = classPlanIBLL.GetRepetitions(entity.F_SchoolId, entity.AcademicYearNo, entity.Semester, entity.MajorNo, entity.Grade, entity.LessonNo);
var model = classPlanIBLL.GetRepetitions(entity.F_SchoolId, entity.AcademicYearNo, entity.Semester, entity.DeptNo, entity.MajorNo, entity.Grade, entity.LessonNo);
if (model != null)
{
if (keyValue != model.ID.ToString())
@@ -146,29 +177,30 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
public ActionResult CourseArranging(string keyValue)
{
var entity = classPlanIBLL.GetListById(keyValue);

List<TeachClassEntity> TeachList = new List<TeachClassEntity>();

for (int i = 0; i < entity.Count; i++)
{
var classList = classInfoIBLL.GetAllClass().
Where(x => x.MajorNo == entity[i].MajorNo && x.Grade == entity[i].Grade)
.OrderBy(x => x.ClassNo).Select(stringClass => new { stringClass.ClassNo, stringClass.ClassName }).ToList();
if (classList.Count > 0)
var lessonList = classInfoIBLL.GetAllClass().
Where(x => x.DeptNo == entity[i].DeptNo && x.MajorNo == entity[i].MajorNo && x.Grade == entity[i].Grade)
.OrderBy(x => x.ClassNo).Select(field1 => new { field1.ClassNo, field1.ClassName }).ToList();
if (lessonList.Count > 0)
{
for (int j = 0; j < classList.Count; j++)
for (int j = 0; j < lessonList.Count; j++)
{
TeachClassEntity TeachEntity = new TeachClassEntity
{
TeachClassNo = classList[j].ClassNo,
AcademicYearNo = entity[i].AcademicYearNo,
MajorNo = entity[i].MajorNo,
Grade = entity[i].Grade,
Semester = entity[i].Semester,
LessonNo = entity[i].LessonNo,
StuNum = entity[i].StuNum,
LessonSortNo = entity[i].LessonSortNo,
F_SchoolId = entity[i].F_SchoolId
};
TeachClassEntity TeachEntity = new TeachClassEntity();
TeachEntity.TeachClassNo = lessonList[j].ClassNo;
TeachEntity.AcademicYearNo = entity[i].AcademicYearNo;
TeachEntity.DeptNo = entity[i].DeptNo;
TeachEntity.MajorNo = entity[i].MajorNo;
TeachEntity.Grade = entity[i].Grade;
TeachEntity.Semester = entity[i].Semester;
TeachEntity.LessonNo = entity[i].LessonNo;
TeachEntity.StuNum = entity[i].StuNum;
TeachEntity.LessonSortNo = entity[i].LessonSortNo;
TeachEntity.F_SchoolId = entity[i].F_SchoolId;
TeachList.Add(TeachEntity);
}
}


+ 19
- 105
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanTeachController.cs Целия файл

@@ -22,8 +22,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
private TeachClassIBLL teachClassIBLL = new TeachClassBLL();
private StuSelectLessonListIBLL StuSelectLesson = new StuSelectLessonListBLL();
private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL();
private StuScoreIBLL stuScoreIBLL = new StuScoreBLL();
private LessonInfoIBLL lessonInfoIBLL = new LessonInfoBLL();
#region 视图功能

/// <summary>
@@ -71,6 +72,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = teachClassIBLL.GetPageList(paginationobj, queryJson);
var studata = stuInfoBasicIBLL.GetAllList();
foreach (var item in data)
{
item.StuNum = studata.Where(o =>
o.DeptNo == item.DeptNo && o.MajorNo == item.MajorNo
&& o.ClassNo == item.TeachClassNo && o.Grade == item.Grade
).Count();
}
var jsonData = new
{
rows = data,
@@ -146,11 +155,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
var lessonData = lessonInfoIBLL.GetAllLesson();

List<StuSelectLessonListEntity> TeachList = new List<StuSelectLessonListEntity>();

for (int i = 0; i < entityList.Count; i++)
{
var stuDataList = stuInfoBasicIBLL.GetAllList().Where(
s => s.DeptNo == entityList[i].DeptNo && s.MajorNo == entityList[i].MajorNo
&& s.F_SchoolId == entityList[i].F_SchoolId && s.ClassNo == entityList[i].TeachClassNo
var stuDataList = stuInfoBasicIBLL.GetAllList().Where(s => s.DeptNo == entityList[i].DeptNo
&& s.MajorNo == entityList[i].MajorNo && s.F_SchoolId == entityList[i].F_SchoolId
&& s.ClassNo == entityList[i].TeachClassNo
).ToList();
if (stuDataList.Count > 0)
{
@@ -187,6 +197,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
TeachEntity.F_SchoolId = entityList[i].F_SchoolId;
TeachEntity.CheckMark = "1";
TeachEntity.InsertTime = DateTime.Now;
TeachList.Add(TeachEntity);
}
}
else
@@ -203,111 +214,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
}
public ActionResult QzSetTeach(string keyValue, string EmpNo)
{
var entityList = teachClassIBLL.GetTeachListById(keyValue);
string Nid = "";
if (entityList.Count > 0)
var entityList = teachClassIBLL.GetTeachListById(keyValue).ToList();
foreach (var item in entityList)
{
for (int i = 0; i < entityList.Count; i++)
{
List<string> ssList = StuSelectLesson.GetAllList().Where(
y => y.MajorNo == entityList[i].MajorNo
&& y.F_SchoolId == entityList[i].F_SchoolId
&& y.ClassNo == entityList[i].TeachClassNo
&& y.LessonNo == entityList[i].LessonNo
).Select(x => x.SelectId.ToString()).ToList();
Nid += string.Join(",", ssList) + ",";
}
//teachClassIBLL.UpEmpNos(item.AcademicYearNo, item.Semester, item.TeachClassNo, item.LessonNo, EmpNo, item.EmpNo,item.Grade);
//stuScoreIBLL.UpEmpNos(item.AcademicYearNo, item.Semester, item.TeachClassNo, item.LessonNo, EmpNo, item.EmpNo, item.Grade);
}

Nid = Nid.TrimEnd(',');
StuSelectLesson.DeleteEntity(Nid);

List<StuSelectLessonListEntity> TeachList = new List<StuSelectLessonListEntity>();
for (int i = 0; i < entityList.Count; i++)
{
var stuDataList = stuInfoBasicIBLL.GetAllList().Where(s =>
s.MajorNo == entityList[i].MajorNo
&& s.F_SchoolId == entityList[i].F_SchoolId
&& s.ClassNo == entityList[i].TeachClassNo
).ToList();
if (stuDataList.Count > 0)
{
for (int j = 0; j < stuDataList.Count; j++)
{
StuSelectLessonListEntity TeachEntity = new StuSelectLessonListEntity();
TeachEntity.StuNo = stuDataList[j].StuNo;
TeachEntity.MajorNo = entityList[i].MajorNo;
TeachEntity.ClassNo = stuDataList[j].ClassNo;
TeachEntity.MajorDetailNo = entityList[i].MajorDetailNo;
TeachEntity.MajorDetailName = entityList[i].MajorDetailName;
TeachEntity.StuName = stuDataList[j].StuName;
TeachEntity.GenderNo = stuDataList[j].GenderNo == true ? "0" : "1";
TeachEntity.AcademicYearNo = entityList[i].AcademicYearNo;
TeachEntity.Semester = entityList[i].Semester;
TeachEntity.OpenLessonDeptNo = entityList[i].DeptNo;
TeachEntity.OpenLessonMajorNo = entityList[i].MajorNo;
TeachEntity.LessonNo = entityList[i].LessonNo;
TeachEntity.PartCode = entityList[i].PartCode;
TeachEntity.OrdinaryScoreScale = 0;
TeachEntity.TermInScoreScale = 0;
TeachEntity.TermEndScoreScale = 0;
TeachEntity.OtherScoreScale = 0;
TeachEntity.TeachClassNo = entityList[i].TeachClassNo;
TeachEntity.LessonSortNo = entityList[i].LessonSortNo;
TeachEntity.StuSortNo = entityList[i].LessonSortNo;
TeachEntity.Grade = entityList[i].Grade;
TeachEntity.StudyScore = 2;
TeachEntity.TotalStudyHour = 2;
TeachEntity.IsInEffect = "1";
TeachEntity.IsPitchOn = "1";
TeachEntity.F_SchoolId = entityList[i].F_SchoolId;
TeachEntity.InsertTime = DateTime.Now;
TeachList.Add(TeachEntity);
}
}
else
{
return Fail("设置失败,未发现相关学生!");
}
}

StuSelectLesson.SaveEntityList(TeachList);

teachClassIBLL.UpEmpNo(keyValue, EmpNo); //更改当前教师

return Success("设置成功!");
}

[HttpPost]
[AjaxOnly]
public ActionResult UpTeach(string keyValue, string EmpNo)
{
var entityList = teachClassIBLL.GetTeachListById(keyValue);
if (entityList != null)
{
var res = teachClassIBLL.UpSetTeach(keyValue, EmpNo); //更改当前教师
if (!string.IsNullOrEmpty(res))
{
return Fail(res);
}
}
else
{
return Fail("设置失败");
}

return Success("设置成功!");
}

[HttpPost]
[AjaxOnly]
public ActionResult QzUpTeach(string keyValue, string EmpNo)
{
var entityList = teachClassIBLL.GetTeachListById(keyValue);
if (entityList != null)
{
teachClassIBLL.UpQzSetTeach(keyValue, EmpNo); //更改当前教师
}
return Success("设置成功!");
}
#endregion


+ 117
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermItemNewController.cs Целия файл

@@ -0,0 +1,117 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Web.Mvc;
using System.Collections.Generic;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-22 16:51
/// 描 述:考场安排明细
/// </summary>
public class Exam_ArrangeExamTermItemNewController : MvcControllerBase
{
private Exam_ArrangeExamTermItemNewIBLL exam_ArrangeExamTermItemNewIBLL = new Exam_ArrangeExamTermItemNewBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = exam_ArrangeExamTermItemNewIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var Exam_ArrangeExamTermItemNewData = exam_ArrangeExamTermItemNewIBLL.GetExam_ArrangeExamTermItemNewEntity( keyValue );
var jsonData = new {
Exam_ArrangeExamTermItemNew = Exam_ArrangeExamTermItemNewData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
exam_ArrangeExamTermItemNewIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
Exam_ArrangeExamTermItemNewEntity entity = strEntity.ToObject<Exam_ArrangeExamTermItemNewEntity>();
exam_ArrangeExamTermItemNewIBLL.SaveEntity(keyValue,entity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}
#endregion

}
}

+ 166
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermNewController.cs Целия файл

@@ -0,0 +1,166 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Web.Mvc;
using System.Collections.Generic;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-22 16:00
/// 描 述:排考安排
/// </summary>
public class Exam_ArrangeExamTermNewController : MvcControllerBase
{
private Exam_ArrangeExamTermNewIBLL exam_ArrangeExamTermNewIBLL = new Exam_ArrangeExamTermNewBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult IndexForClass()
{
return View();
}
[HttpGet]
public ActionResult IndexItem()
{
return View();
}
#endregion

#region 获取数据
[HttpGet]
[AjaxOnly]
public ActionResult GetPageListForClass(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = exam_ArrangeExamTermNewIBLL.GetPageListForClass(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
[HttpGet]
public ActionResult GetClassTree()
{
return Success(exam_ArrangeExamTermNewIBLL.GetClassTree());
}
[HttpGet]
[AjaxOnly]
public ActionResult GetItemPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = exam_ArrangeExamTermNewIBLL.GetItemPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = exam_ArrangeExamTermNewIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var ArrangeExamTermNewData = exam_ArrangeExamTermNewIBLL.GetExam_ArrangeExamTermNewEntity( keyValue );
var jsonData = new {
ArrangeExamTermNew = ArrangeExamTermNewData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
exam_ArrangeExamTermNewIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
Exam_ArrangeExamTermNewEntity entity = strEntity.ToObject<Exam_ArrangeExamTermNewEntity>();
exam_ArrangeExamTermNewIBLL.SaveEntity(keyValue,entity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}
#endregion

}
}

+ 196
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamLessonController.cs Целия файл

@@ -0,0 +1,196 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Web.Mvc;
using System.Collections.Generic;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-12 15:47
/// 描 述:考试课程表
/// </summary>
public class Exam_ExamLessonController : MvcControllerBase
{
private Exam_ExamLessonIBLL exam_ExamLessonIBLL = new Exam_ExamLessonBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
/// <summary>
/// 导入/清空数据
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormYearSemester()
{
return View();
}
/// <summary>
/// 设置考试时长
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormExamTime()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = exam_ExamLessonIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var Exam_ExamLessonData = exam_ExamLessonIBLL.GetExam_ExamLessonEntity(keyValue);
var jsonData = new
{
Exam_ExamLesson = Exam_ExamLessonData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
exam_ExamLessonIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}

/// <summary>
/// 导入开课计划
/// </summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult Import(string AcademicYearNo, string Semester,string ExamTime)
{
int res = exam_ExamLessonIBLL.Import(AcademicYearNo, Semester, ExamTime);
return Success("导入" + res + "条数据!");
}
/// <summary>
/// 按条件清空数据
/// </summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteWhere(string AcademicYearNo, string Semester)
{
int res = exam_ExamLessonIBLL.DeleteWhere(AcademicYearNo, Semester);
return Success("清空" + res + "条数据!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
Exam_ExamLessonEntity entity = strEntity.ToObject<Exam_ExamLessonEntity>();
//判断课程编号有无重复
var model = exam_ExamLessonIBLL.GetEntityByLessonNo(entity.LessonNo, entity.AcademicYearNo, entity.Semester);
if (model != null && string.IsNullOrEmpty(keyValue))
{
return Fail("课程编号重复!");
}
else if (model != null && !string.IsNullOrEmpty(keyValue) && keyValue != model.ELId)
{
return Fail("课程编号重复!");
}

exam_ExamLessonIBLL.SaveEntity(keyValue, entity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}

/// <summary>
/// 设置考试时长
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult SaveExamTime(string keyValue, int ExamTime)
{
exam_ExamLessonIBLL.SaveExamTime(keyValue, ExamTime);
return Success("设置成功!");
}
/// <summary>
/// 启用/停用
/// </summary>
/// <param name="keyValue"></param>
/// <param name="ELEnabled"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult Lock(string keyValue, int ELEnabled)
{
exam_ExamLessonIBLL.Lock(keyValue, ELEnabled);
return Success("操作成功!");
}
#endregion

}
}

+ 376
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanController.cs Целия файл

@@ -0,0 +1,376 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Web.Mvc;
using System.Collections.Generic;
using System;
using System.Linq;
using Newtonsoft.Json;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-14 18:12
/// 描 述:考试记录表
/// </summary>
public class Exam_ExamPlanController : MvcControllerBase
{
private Exam_ExamPlanIBLL exam_ExamPlanIBLL = new Exam_ExamPlanBLL();
private Exam_ExamPlanLessonIBLL exam_ExamPlanLessonIBLL = new Exam_ExamPlanLessonBLL();
private Exam_ExamPlanClassIBLL exam_ExamPlanClassIBLL = new Exam_ExamPlanClassBLL();
private Exam_ExamPlanRoomIBLL exam_ExamPlanRoomIBLL = new Exam_ExamPlanRoomBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult GenerateForm()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult ClearForm()
{
return View();
}
/// <summary>
/// 安排时间
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormTime()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = exam_ExamPlanIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var Exam_ExamPlanData = exam_ExamPlanIBLL.GetExam_ExamPlanEntity(keyValue);
var jsonData = new
{
Exam_ExamPlan = Exam_ExamPlanData,
};
return Success(jsonData);
}

/// <summary>
/// 安排时间
/// </summary>
/// <param name="EPId"></param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPlanTimeList(string EPId)
{
var data = exam_ExamPlanIBLL.GetPlanTimeList(EPId);
return Success(data);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
exam_ExamPlanIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 生成排考名单
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult Generate(string keyValue)
{
var data = exam_ExamPlanIBLL.IsGenerate(keyValue);
if (!data.flag)
{
return Fail(data.str);
}

exam_ExamPlanIBLL.Generate(keyValue);
return Success("生成成功!");
}

/// <summary>
/// 安排考试
/// </summary>
/// <param name="EPId"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult SavePlanTime(string EPId, List<Exam_ExamPlanTimeEntity> list)
{
if (list.Count <= 0)
{
return Fail("请安排时间!");
}

foreach (var entity in list)
{
DateTime time;
if (!DateTime.TryParse(entity.ExamTimeStart, out time))
{
return Fail("开始时间格式不正确!");
}
if (!DateTime.TryParse(entity.ExamTimeEnd, out time))
{
return Fail("结束时间格式不正确!");
}

var startTime = Convert.ToDateTime(entity.ExamDate.Value.ToString("yyyy-MM-dd") + " " + entity.ExamTimeStart);
var endTime = Convert.ToDateTime(entity.ExamDate.Value.ToString("yyyy-MM-dd") + " " + entity.ExamTimeEnd);
if (endTime <= startTime)
{
return Fail("结束时间必须大于开始时间!");
}
//考试时长
entity.ExamTimeLength = (endTime - startTime).TotalMinutes;
}
exam_ExamPlanIBLL.SavePlanTime(EPId, list);
return Success("保存成功!");
}

/// <summary>
/// 清除排考名单/清除所有排考记录
/// </summary>
/// <param name="keyValue">排考记录主表Id</param>
/// <param name="type">1:清除排考名单;2:清除所有排考记录</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult ClearGenerate(string keyValue, int type)
{
exam_ExamPlanIBLL.ClearGenerate(keyValue, type);
return Success("操作成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
Exam_ExamPlanEntity entity = strEntity.ToObject<Exam_ExamPlanEntity>();
exam_ExamPlanIBLL.SaveEntity(keyValue, entity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}

/// <summary>
/// 生成排考名单
/// </summary>
/// <param name="AcademicYearNo"></param>
/// <param name="Semester"></param>
/// <param name="PlanType"></param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult GenerateForm(string AcademicYearNo, string Semester, string PlanType)
{
int res = exam_ExamPlanIBLL.ClaerForm(AcademicYearNo, Semester, PlanType);
return Success("清空(" + res + ")条数据成功!");
}
/// <summary>
/// 清除排考名单
/// </summary>
/// <param name="AcademicYearNo"></param>
/// <param name="Semester"></param>
/// <param name="PlanType"></param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult ClearForm(string AcademicYearNo, string Semester, string PlanType)
{
int res = exam_ExamPlanIBLL.GenerateForm(AcademicYearNo, Semester, PlanType);
return Success("清空(" + res + ")条数据成功!");
}
/// <summary>
/// 一键安排课程
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult PlanLessonByEPId(string keyValue)
{
exam_ExamPlanLessonIBLL.InitExamPlanLesson(keyValue);
return Success("操作成功!");
}
/// <summary>
/// 一键安排班级
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult PlanClassByEPId(string keyValue)
{
var count = exam_ExamPlanLessonIBLL.GetListByEPId(keyValue).Count();
if (count <= 0)
{
return Fail("请先安排课程!");
}

exam_ExamPlanClassIBLL.PlanClassByEPId(keyValue);
return Success("操作成功!");
}
/// <summary>
/// 自动生成考试课程排考时间
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult PlanLessonTimeByEPId(string keyValue)
{
var count = exam_ExamPlanLessonIBLL.GetListByEPId(keyValue).Count();
if (count <= 0)
{
return Fail("请先安排课程!");
}
var res = exam_ExamPlanLessonIBLL.PlanLessonTimeByEPId(keyValue);
if (res.flag)
{
return Success("操作成功!");
}
else
{
return Fail(res.msg);
}

return Success("操作成功!");
}

/// <summary>
/// 一键安排考场
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult PlanRoomByEPId(string keyValue)
{
var res = exam_ExamPlanRoomIBLL.PlanRoomByEPId(keyValue);
if (!res.flag)
{
return Fail(res.str);
}

return Success("操作成功!");
}

/// <summary>
/// 一键安排监考老师
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult PlanTeacherByEPId(string keyValue)
{
var res = exam_ExamPlanRoomIBLL.PlanTeacherByEPId(keyValue);
if (!res.flag)
{
return Fail(res.str);
}

return Success("操作成功!");
}

/// <summary>
/// 审核所有考试课程
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult CheckAllPlanLesson(string keyValue)
{
var res = exam_ExamPlanLessonIBLL.CheckAllPlanLesson(keyValue);
if (!res.flag)
{
return Fail(res.str);
}

return Success("操作成功!");
}
#endregion

}
}

+ 396
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanLessonController.cs Целия файл

@@ -0,0 +1,396 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Web.Mvc;
using System.Collections.Generic;
using System;
using System.Linq;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-15 15:03
/// 描 述:排考安排课程
/// </summary>
public class Exam_ExamPlanLessonController : MvcControllerBase
{
private Exam_ExamPlanLessonIBLL exam_ExamPlanLessonIBLL = new Exam_ExamPlanLessonBLL();
private Exam_ExamPlanClassIBLL exam_ExamPlanClassIBLL = new Exam_ExamPlanClassBLL();
private Exam_ExamStudentIBLL exam_ExamStudentIBLL = new Exam_ExamStudentBLL();
private Exam_ExamPlanRoomIBLL exam_ExamPlanRoomIBLL = new Exam_ExamPlanRoomBLL();

#region 视图功能

/// <summary>
/// 主页面
/// </summary>
/// <param name="EPId">排考记录主表Id</param>
/// <returns></returns>
[HttpGet]
public ActionResult Index(string EPId)
{
exam_ExamPlanLessonIBLL.InitExamPlanLesson(EPId);
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
[HttpGet]
public ActionResult FormClass()
{
return View();
}

[HttpGet]
public ActionResult FormRoom()
{
return View();
}
[HttpGet]
public ActionResult FormTeacher()
{
return View();
}

[HttpGet]
public ActionResult FormRoomTeacher()
{
return View();
}

#endregion

#region 获取数据
/// <summary>
/// 获取班级分页列表
/// </summary>
/// <param name="pagination"></param>
/// <param name="queryJson"></param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetClassInfoPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = exam_ExamStudentIBLL.GetPageListForExam(paginationobj, queryJson);
//var stuList = StuInfoBasicIBLL.GetAllList();
//foreach (var item in data)
//{
// item.StuNum = stuList.Count(x => x.ClassNo == item.ClassNo);
//}
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetListForClass(string queryJson)
{
var data = exam_ExamPlanClassIBLL.GetList(queryJson);

return Success(data);
}
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetListForRoom(string pagination, string queryJson)
{
var data = exam_ExamPlanRoomIBLL.GetList(queryJson);

return Success(data);
}
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = exam_ExamPlanLessonIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 排考计划
/// </summary>
/// <param name="pagination"></param>
/// <param name="queryJson"></param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageListForLesson(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = exam_ExamPlanLessonIBLL.GetPageListForLesson(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
[HttpGet]
[AjaxOnly]
public ActionResult GetFormRoom(string keyValue)
{
var data = exam_ExamPlanRoomIBLL.GetEntity(keyValue);

var jsonData = new
{
Exam_ExamPlanRoom = data,
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var Exam_ExamPlanLessonData = exam_ExamPlanLessonIBLL.GetExam_ExamPlanLessonEntity(keyValue);
if (!string.IsNullOrEmpty(Exam_ExamPlanLessonData.ExamTime))
{
var etime = Exam_ExamPlanLessonData.ExamTime.Split('-');
Exam_ExamPlanLessonData.ExamTimeStart = etime[0];
Exam_ExamPlanLessonData.ExamTimeEnd = etime[1];
}

if ((Exam_ExamPlanLessonData.ClassNum == null || Exam_ExamPlanLessonData.ClassNum <= 0) ||
(Exam_ExamPlanLessonData.SeatCount == null || Exam_ExamPlanLessonData.SeatCount <= 0))
{
exam_ExamPlanLessonIBLL.UpdateClassNumAndStuCount(Exam_ExamPlanLessonData.EPLId);
}

var jsonData = new
{
Exam_ExamPlanLesson = Exam_ExamPlanLessonData,
};
return Success(jsonData);
}
/// <summary>
/// 获取左侧树形数据
/// </summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetTree(string EPId)
{
var data = exam_ExamPlanLessonIBLL.GetTree(EPId);
return Success(data);
}
[HttpGet]
[AjaxOnly]
public ActionResult ValidateRoom(string EPLId, string ClassroomNo)
{
var data = exam_ExamPlanRoomIBLL.ValidateRoom(EPLId, ClassroomNo);
return Success(data);
}


/// <summary>
/// 获取考试记录安排时间数据
/// </summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetExamDateSel(string EPLId)
{
var data = exam_ExamPlanLessonIBLL.GetExamDateSel(EPLId);
return Success(data);
}
#endregion

#region 提交数据

/// <summary>
/// 初始化Exam_ExamPlanLesson,如果表中没有数据,将考试课程表数据添加进去
/// </summary>
/// <param name="EPId">排考记录主表Id</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult InitExamPlanLesson(string EPId)
{
exam_ExamPlanLessonIBLL.InitExamPlanLesson(EPId);
return Success("初始化成功!");
}

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
exam_ExamPlanLessonIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
[HttpPost]
[AjaxOnly]
public ActionResult DeleteClass(string keyValue)
{
exam_ExamPlanClassIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}

[HttpPost]
[AjaxOnly]
public ActionResult DeleteRoom(string keyValue)
{
exam_ExamPlanRoomIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 审核
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult Check(string keyValue, int ELCheckMark)
{
if (ELCheckMark == 1)
{
var entity = exam_ExamPlanLessonIBLL.GetExam_ExamPlanLessonEntity(keyValue);
if (entity.ExamDate == null || entity.ExamTime == null)
{
return Fail("请先设置考试时间!");
}

if ((entity.RealClassNum == null || entity.RealClassNum == 0) ||
(entity.SeatCount == null || entity.SeatCount == 0))
{
return Fail("请先安排班级和考场!");
}

if (entity.SeatCount < entity.RealStuCount)
{
return Fail("考场座位数不足!");
}

}

exam_ExamPlanLessonIBLL.Check(keyValue, ELCheckMark);
return Success("操作成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// 设置考试时间
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
Exam_ExamPlanLessonEntity entity = strEntity.ToObject<Exam_ExamPlanLessonEntity>();
DateTime time;
bool flag = DateTime.TryParse(entity.ExamTimeStart, out time);
if (!flag)
{
return Fail("考试开始时间格式不正确!");
}
if (!DateTime.TryParse(entity.ExamTimeEnd, out time))
{
return Fail("考试结束时间格式不正确!");
}

if (!string.IsNullOrEmpty(entity.ExamTimeStart) && !string.IsNullOrEmpty(entity.ExamTimeEnd))
{
entity.ExamTime = entity.ExamTimeStart.Trim() + "-" + entity.ExamTimeEnd;
}

entity.EPLId = keyValue;

//判断考试时间是否冲突,同一专业同一时间段只能安排一门考试课程
var res = exam_ExamPlanLessonIBLL.IsAllowSave(entity);
if (!res.flag && !string.IsNullOrEmpty(res.str))
{
return Fail(res.str);
}

//保存
exam_ExamPlanLessonIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}

[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveClass(string EPLId, string strEntity)
{
var list = strEntity.ToObject<List<Exam_ExamPlanClassEntity>>();
//判断排考班级的考试时间是否冲突
var res = exam_ExamPlanClassIBLL.IsExamConflict(list);
if (res.flag && !string.IsNullOrEmpty(res.msg))
{
return Fail(res.msg);
}

exam_ExamPlanClassIBLL.SaveList(list);
return Success("保存成功!");
}

[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveRoomAndTeacher(string keyValue, string strEntity, string Exam_ExamPlanTeacherList)
{
var entity = strEntity.ToObject<Exam_ExamPlanRoomEntity>();
var teacherList = Exam_ExamPlanTeacherList.ToObject<List<Exam_InvigilateTeacherEntity>>();
entity.EmpNo = string.Join(",", teacherList.Select(x => x.EmpNo).ToList());
entity.EmpName = string.Join(",", teacherList.Select(x => x.EmpName).ToList());
exam_ExamPlanRoomIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}



#endregion

}
}

+ 179
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamRoomController.cs Целия файл

@@ -0,0 +1,179 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Web.Mvc;
using System.Collections.Generic;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-12 15:47
/// 描 述:考场表
/// </summary>
public class Exam_ExamRoomController : MvcControllerBase
{
private Exam_ExamRoomIBLL exam_ExamRoomIBLL = new Exam_ExamRoomBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
/// <summary>
/// 导入/清空数据
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormYearSemester()
{
return View();
}

#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = exam_ExamRoomIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var Exam_ExamRoomData = exam_ExamRoomIBLL.GetExam_ExamRoomEntity(keyValue);
var jsonData = new
{
Exam_ExamRoom = Exam_ExamRoomData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
exam_ExamRoomIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}

/// <summary>
/// 导入教室
/// </summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult Import(string AcademicYearNo, string Semester, int SeatRows, int SeatColumns)
{
int res = exam_ExamRoomIBLL.Import(AcademicYearNo, Semester,SeatRows,SeatColumns);
return Success("导入" + res + "条数据!");
}
/// <summary>
/// 按条件清空数据
/// </summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteWhere(string AcademicYearNo, string Semester)
{
int res = exam_ExamRoomIBLL.DeleteWhere(AcademicYearNo, Semester);
return Success("清空" + res + "条数据!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
Exam_ExamRoomEntity entity = strEntity.ToObject<Exam_ExamRoomEntity>();
//判断考场编号有无重复
var model = exam_ExamRoomIBLL.GetEntityByClassroomNo(entity.ClassroomNo,entity.AcademicYearNo,entity.Semester);
if (model != null && string.IsNullOrEmpty(keyValue))
{
return Fail("考场编号重复!");
}
else if (model != null && !string.IsNullOrEmpty(keyValue) && keyValue != model.ERId)
{
return Fail("考场编号重复!");
}

//计算考场座位数
entity.SeatCount = entity.SeatRows * entity.SeatColumns;
exam_ExamRoomIBLL.SaveEntity(keyValue, entity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}

/// <summary>
/// 启用/停用
/// </summary>
/// <param name="keyValue"></param>
/// <param name="EREnabled"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult Lock(string keyValue, int EREnabled)
{
exam_ExamRoomIBLL.Lock(keyValue, EREnabled);
return Success("操作成功!");
}
#endregion

}
}

+ 187
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamStudentController.cs Целия файл

@@ -0,0 +1,187 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Web.Mvc;
using System.Collections.Generic;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-12 15:47
/// 描 述:考试课程表
/// </summary>
public class Exam_ExamStudentController : MvcControllerBase
{
private Exam_ExamStudentIBLL exam_ExamStudentIBLL = new Exam_ExamStudentBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
/// <summary>
/// 导入
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormImport()
{
return View();
}
/// <summary>
/// 按条件清空
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormClear()
{
return View();
}

#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = exam_ExamStudentIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var Exam_ExamStudentData = exam_ExamStudentIBLL.GetExam_ExamStudentEntity(keyValue);
var jsonData = new
{
Exam_ExamStudent = Exam_ExamStudentData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
exam_ExamStudentIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
Exam_ExamStudentEntity entity = strEntity.ToObject<Exam_ExamStudentEntity>();
#region 去重
var model = exam_ExamStudentIBLL.GetExam_ExamStudentbyStuNo(entity.StuNo);
if (string.IsNullOrEmpty(keyValue))
{
if (model != null && model.AcademicYearNo == entity.AcademicYearNo && model.Semester == entity.Semester && model.ESType == entity.ESType)
{
return Fail("此学生考试数据已存在!");
}
}
else
{
if (model != null && model.ESId != keyValue && model.AcademicYearNo == entity.AcademicYearNo && model.Semester == entity.Semester && model.ESType == entity.ESType)
{
return Fail("此学生考试数据已存在!");
}
}
#endregion
exam_ExamStudentIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}

/// <summary>
/// 启用/停用
/// </summary>
/// <param name="keyValue"></param>
/// <param name="ESEnabled"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult Lock(string keyValue, int ESEnabled)
{
exam_ExamStudentIBLL.Lock(keyValue, ESEnabled);
return Success("操作成功!");
}
/// <summary>
/// 清空数据
/// </summary>
/// <param name="AcademicYearNo"></param>
/// <param name="Semester"></param>
/// <param name="ESType"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
[ValidateAntiForgeryToken]
public ActionResult ClearTable(string AcademicYearNo, string Semester, string ESType)
{
int res = exam_ExamStudentIBLL.ClaerForm(AcademicYearNo, Semester, ESType);
return Success("清空(" + res + ")条数据成功!");
}

public ActionResult ImportTable(string AcademicYearNo, int Semester, string ESType)
{
int res = exam_ExamStudentIBLL.ImportForm(AcademicYearNo, Semester, ESType);
return Success("同步(" + res + ")条数据成功!");
}

#endregion

}
}

+ 117
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamTeacherTimeController.cs Целия файл

@@ -0,0 +1,117 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Web.Mvc;
using System.Collections.Generic;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-06-13 15:41
/// 描 述:老师时间管理
/// </summary>
public class Exam_ExamTeacherTimeController : MvcControllerBase
{
private Exam_ExamTeacherTimeIBLL exam_ExamTeacherTimeIBLL = new Exam_ExamTeacherTimeBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = exam_ExamTeacherTimeIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var Exam_ExamTeacherTimeData = exam_ExamTeacherTimeIBLL.GetExam_ExamTeacherTimeEntity( keyValue );
var jsonData = new {
Exam_ExamTeacherTime = Exam_ExamTeacherTimeData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
exam_ExamTeacherTimeIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
Exam_ExamTeacherTimeEntity entity = strEntity.ToObject<Exam_ExamTeacherTimeEntity>();
exam_ExamTeacherTimeIBLL.SaveEntity(keyValue,entity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}
#endregion

}
}

+ 187
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_InvigilateTeacherController.cs Целия файл

@@ -0,0 +1,187 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Web.Mvc;
using System.Collections.Generic;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-14 09:49
/// 描 述:监考老师
/// </summary>
public class Exam_InvigilateTeacherController : MvcControllerBase
{
private Exam_InvigilateTeacherIBLL exam_InvigilateTeacherIBLL = new Exam_InvigilateTeacherBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormYearSemester()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = exam_InvigilateTeacherIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var Exam_InvigilateTeacherData = exam_InvigilateTeacherIBLL.GetExam_InvigilateTeacherEntity( keyValue );
var jsonData = new {
Exam_InvigilateTeacher = Exam_InvigilateTeacherData,
};
return Success(jsonData);
}

/// <summary>
/// 获取监考老师数据
/// </summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetList(string AcademicYearNo, int? Semester)
{
var data = exam_InvigilateTeacherIBLL.GetList(AcademicYearNo, Semester);
return Success(data);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
exam_InvigilateTeacherIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
Exam_InvigilateTeacherEntity entity = strEntity.ToObject<Exam_InvigilateTeacherEntity>();
//判断教师编号有无重复
var model = exam_InvigilateTeacherIBLL.GetEntityByWhere(entity.AcademicYearNo, entity.Semester,entity.EmpNo);
if (model != null && string.IsNullOrEmpty(keyValue))
{
return Fail("教师编号重复!");
}
else if (model != null && !string.IsNullOrEmpty(keyValue) && keyValue != model.ITId)
{
return Fail("教师编号重复!");
}
exam_InvigilateTeacherIBLL.SaveEntity(keyValue,entity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}

/// <summary>
/// 启用/停用
/// </summary>
/// <param name="keyValue"></param>
/// <param name="ITEnabled"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult Lock(string keyValue, int ITEnabled)
{
exam_InvigilateTeacherIBLL.Lock(keyValue, ITEnabled);
return Success("操作成功!");
}

/// <summary>
/// 导入教师基础数据
/// </summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult Import(string AcademicYearNo, string Semester)
{
int res = exam_InvigilateTeacherIBLL.Import(AcademicYearNo, Semester);
return Success("导入" + res + "条数据!");
}
/// <summary>
/// 按条件清空数据
/// </summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteWhere(string AcademicYearNo, string Semester)
{
int res = exam_InvigilateTeacherIBLL.DeleteWhere(AcademicYearNo, Semester);
return Success("清空" + res + "条数据!");
}

#endregion

}
}

+ 28
- 16
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.cshtml Целия файл

@@ -15,58 +15,70 @@
<div class="lr-form-item-title">学期<font face="宋体">*</font></div>
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="ClassPlan">
<div class="lr-form-item-title">专业<font face="宋体">*</font></div>
<div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div>
<div class="col-xs-4 lr-form-item" data-table="ClassPlan">
<div class="lr-form-item-title">考试类型<font face="宋体">*</font></div>
<div id="ExamType" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="ClassPlan">
<div class="col-xs-4 lr-form-item" data-table="ClassPlan">
<div class="lr-form-item-title">年级<font face="宋体">*</font></div>
<div id="Grade" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-4 lr-form-item" data-table="ClassPlan">
<div class="lr-form-item-title">系部<font face="宋体">*</font></div>
<div id="DeptNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="ClassPlan">
<div class="lr-form-item-title">专业<font face="宋体">*</font></div>
<div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="ClassPlan">
<div class="lr-form-item-title">课程<font face="宋体">*</font></div>
<div id="LessonNo" isvalid="yes" checkexpession="NotNull"></div>
<input id="LessonName" type="hidden" />
</div>
<div class="col-xs-6 lr-form-item" data-table="ClassPlan">
<div class="col-xs-4 lr-form-item" data-table="ClassPlan">
<div class="lr-form-item-title">课程细类码</div>
<div id="LessonSortDetailNo"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="ClassPlan" style="display: none; ">
<div class="col-xs-4 lr-form-item" data-table="ClassPlan" style="display: none; ">
<div class="lr-form-item-title">开合课</div>
<input id="StuSortNo" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="ClassPlan">
<div class="col-xs-4 lr-form-item" data-table="ClassPlan">
<div class="lr-form-item-title">拟开教学班数</div>
<input id="TeachClassNum" type="text" class="form-control" isvalid="yes" checkexpession="NumOrNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="ClassPlan">
<div class="col-xs-3 lr-form-item" data-table="ClassPlan">
<div class="lr-form-item-title">人数</div>
<input id="StuNum" type="text" class="form-control" isvalid="yes" checkexpession="NumOrNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="ClassPlan">
<div class="col-xs-3 lr-form-item" data-table="ClassPlan">
<div class="lr-form-item-title">学分</div>
<input id="StudyScore" type="text" class="form-control" checkexpession="NumOrNull" />
</div>
<div class="col-xs-3 lr-form-item" data-table="ClassPlan">
<div class="lr-form-item-title">周课时</div>
<input id="WeekLessonHour" type="text" class="form-control" isvalid="yes" checkexpession="NumOrNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="ClassPlan">
<div class="col-xs-3 lr-form-item" data-table="ClassPlan">
<div class="lr-form-item-title">教室课时</div>
<input id="WeekHourClassroom" type="text" class="form-control" checkexpession="NumOrNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="ClassPlan">
<div class="col-xs-3 lr-form-item" data-table="ClassPlan">
<div class="lr-form-item-title">上机课时</div>
<input id="PracticeHour" type="text" class="form-control" checkexpession="NumOrNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="ClassPlan">
<div class="col-xs-4 lr-form-item" data-table="ClassPlan">
<div class="lr-form-item-title">起始周次</div>
<input id="StartWeek" type="text" class="form-control" icheckexpession="NumOrNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="ClassPlan">
<div class="col-xs-4 lr-form-item" data-table="ClassPlan">
<div class="lr-form-item-title">结束周次</div>
<input id="EndWeek" type="text" class="form-control" checkexpession="NumOrNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="ClassPlan">
<div class="lr-form-item-title">学分</div>
<input id="StudyScore" type="text" class="form-control" checkexpession="NumOrNull" />
<div class="col-xs-4 lr-form-item" data-table="ClassPlan">
<div class="lr-form-item-title">负责开课院系</div>
<div id="TeachDeptNo"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="ClassPlan">
<div class="lr-form-item-title">备注</div>


+ 43
- 11
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js Целия файл

@@ -32,17 +32,49 @@ var bootstrap = function ($, learun) {
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "请选择学期",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData',
value: 'value',
text: 'text'
$('#Semester').lrDataItemSelect({ code: 'Semester' });
$('#DeptNo').lrselect({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
value: 'deptno',
text: 'deptname',
maxHeight: 200,
select: function (item) {
var NDeptNo = $("#DeptNo").lrselectGet();
if (NDeptNo != null && NDeptNo != "" && NDeptNo != 'undefined') {
$('#MajorNo').lrselectRefresh({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" },
value: "majorno",
text: "majorname",
maxHeight: 200
});
} else {
$('#MajorNo').lrselectRefresh({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
param: { strWhere: " 1=1 and CheckMark=1 " },
value: "majorno",
text: "majorname",
maxHeight: 200
});
}
}
})
$("#MajorNo").lrselect({
select: function (item) {
if (item) {
$('#LessonNo').lrselectRefresh({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=LessonInfo',
param: { strWhere: " 1=1 and CheckMark=1 and teachmajorno='" + item.majorno + "'" },
value: "lessonno",
text: "lessonname",
maxHeight: 200
});
}
}
});
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#LessonNo').lrselect();
$('#TeachDeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
$('#ExamType').lrDataItemSelect({ code: 'ExamType' });
},
initData: function () {
if (!!keyValue) {
@@ -58,7 +90,7 @@ var bootstrap = function ($, learun) {
});
}
$('#StuSortNo').val('02');
$('#LessonSortNo').val('2');
$('#LessonSortNo').val('1');
$('#CheckStyleNo').val('1');
$('#ScoreRecordStyleNo').val('1');
$('#CheckMark').val('1');
@@ -72,7 +104,7 @@ var bootstrap = function ($, learun) {
return false;
}
var nName = $("#LessonNo").find(".lr-select-placeholder").text();
var Narray= nName.split("(");
var Narray = nName.split("(");
$("#LessonName").val(Narray[0]);
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())


+ 11
- 7
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.cshtml Целия файл

@@ -5,23 +5,23 @@
<div class="lr-layout lr-layout-left-center" id="lr_layout">
<div class="lr-layout-left">
<div class="lr-layout-wrap">
<div class="lr-layout-title lrlt ">专业信息</div>
<div id="cdmajorTree" class="lr-layout-body"></div>
<div class="lr-layout-title lrlt ">系部信息</div>
<div id="cddeptTree" class="lr-layout-body"></div>
</div>
</div>
<div class="lr-layout-center">
<div class="lr-layout-wrap">
<div class="lr-layout-title">
<span id="titleinfo" class="lrlt">未选择专业</span> - <span class="lrlt">专业信息</span>
<span id="titleinfo" class="lrlt">未选择系部</span> - <span class="lrlt">系部信息</span>
</div>
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">学校</div>
<div id="F_SchoolId"></div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">专业</div>
<div id="MajorNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学年</div>
@@ -31,7 +31,11 @@
<div class="lr-form-item-title">学期</div>
<div id="Semester"></div>
</div>
<div class="col-xs-12 lr-form-item">
@*<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">系部</div>
<div id="DeptNo"></div>
</div>*@
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">年级</div>
<div id="Grade"></div>
</div>


+ 77
- 40
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js Целия файл

@@ -7,7 +7,7 @@
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var cdmajorname = '';
var cddeptname = '';
var page = {
init: function () {
page.inittree();
@@ -18,7 +18,7 @@ var bootstrap = function ($, learun) {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 250, 400);
$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' });
//$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' });
$('#AcademicYearNo').lrselect({
placeholder: "请选择学年",
allowSearch: true,
@@ -34,15 +34,26 @@ var bootstrap = function ($, learun) {
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "请选择学期",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData',
value: 'value',
text: 'text'
$('#Semester').lrDataItemSelect({ code: 'Semester' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
$('#MajorNo').lrselect({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
param: { strWhere: " 1=1 and CheckMark=1 " },
value: "majorno",
text: "majorname",
maxHeight: 200,
select: function (item) {
if (item) {
$('#LessonNo').lrselectRefresh({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=LessonInfo',
param: { strWhere: " 1=1 and CheckMark=1 and teachmajorno='" + item.majorno + "'" },
value: "lessonno",
text: "lessonname",
maxHeight: 200
});
}
}
});
$("#MajorNo").lrselect();
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
// 刷新
$('#lr_refresh').on('click', function () {
@@ -157,28 +168,28 @@ var bootstrap = function ($, learun) {
}
});
} else {
learun.alert.warning("不选择已排课的课程计划");
learun.alert.warning("不选择已排课的课程计划");
}
}
});
},
inittree: function () {
$('#cdmajorTree').lrtree({
url: top.$.rootUrl + '/EducationalAdministration/CdMajor/GetTree',
$('#cddeptTree').lrtree({
url: top.$.rootUrl + '/EducationalAdministration/CdDept/GetTree',
param: { parentId: '0' },
nodeClick: page.treeNodeClick
});
//$('#cdmajorTree').lrtreeSet('setValue', '53298b7a-404c-4337-aa7f-80b2a4ca6681');
//$('#cddeptTree').lrtreeSet('setValue', '53298b7a-404c-4337-aa7f-80b2a4ca6681');
},
treeNodeClick: function (item) {
cdmajorname = item.id;
cddeptname = item.id;
$('#titleinfo').text(item.text);
page.search();
var NMajorNo = item.id;
if (NMajorNo != null && NMajorNo != "" && NMajorNo != undefined) {
var NDeptNo = item.id;
if (NDeptNo != null && NDeptNo != "" && NDeptNo != 'undefined') {
$('#MajorNo').lrselectRefresh({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
param: { strWhere: " 1=1 and CheckMark=1 and majorno in (" + NMajorNo + ")" },
param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" },
value: "majorno",
text: "majorname",
maxHeight: 200
@@ -186,7 +197,7 @@ var bootstrap = function ($, learun) {
} else {
$('#MajorNo').lrselectRefresh({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
param: { strWhere: " 1=1 and CheckMark=1 and majorno ='' " },
param: { strWhere: " 1=1 and CheckMark=1 " },
value: "majorno",
text: "majorname",
maxHeight: 200
@@ -195,42 +206,43 @@ var bootstrap = function ($, learun) {
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/ClassPlan/GetPageList',
headData: [
{ label: "学年", name: "AcademicYearNo", width: 80, align: "left" },
{ label: "学期", name: "Semester", width: 50, align: "left" },
{ label: "年级", name: "Grade", width: 50, align: "left" },
{ label: "专业编码", name: "MajorNo", width: 80, align: "left" },
{
label: "校区", name: "F_SchoolId", width: 200, align: "left",
label: "专业名称", name: "MajorNo", width: 200, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company',
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
key: value,
keyId: 'f_companyid',
keyId: 'majorno',
callback: function (_data) {
callback(_data['f_fullname']);
callback(_data['majorname']);
}
});
}
},
{ label: "学年", name: "AcademicYearNo", width: 80, align: "left" },
{ label: "学期", name: "Semester", width: 50, align: "left" },
{ label: "课程编码", name: "LessonNo", width: 100, align: "left" },
{ label: "课程名称", name: "LessonName", width: 200, align: "left", },
{
label: "专业", name: "MajorNo", width: 100, align: "left",
label: "课程类型", name: "LessonTypeId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdLessonType',
key: value,
keyId: 'id',
keyId: 'ltid',
callback: function (_data) {
callback(_data['majorname']);
callback(_data['lessontypename']);
}
});
}
},
{ label: "年级", name: "Grade", width: 50, align: "left" },
{ label: "课程编码", name: "LessonNo", width: 200, align: "left" },
{ label: "课程名称", name: "LessonName", width: 200, align: "left" },
{
label: "状态", name: "State", width: 100, align: "left",
label: "状态", name: "State", width: 80, align: "left",
formatter: function (cellvalue, row) {
if (cellvalue == 0) {
return '<span class=\"label label-warning\">未排课</span>';
@@ -239,14 +251,39 @@ var bootstrap = function ($, learun) {
}
}
},
{
label: "考试类型", name: "ExamType", width: 80, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'ExamType',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "学分", name: "StudyScore", width: 80, align: "left" },
{ label: "拟开教学班数", name: "TeachClassNum", width: 100, align: "left" },
{ label: "人数", name: "StuNum", width: 80, align: "left" },
//{ label: "人数", name: "StuNum", width: 80, align: "left" },
{ label: "周课时", name: "WeekLessonHour", width: 80, align: "left" },
{ label: "教室课时", name: "WeekHourClassroom", width: 80, align: "left" },
{ label: "上机课时", name: "PracticeHour", width: 80, align: "left" },
{ label: "理论课时", name: "WeekHourClassroom", width: 80, align: "left" },
{ label: "实践课时", name: "PracticeHour", width: 80, align: "left" },
{ label: "起始周次", name: "StartWeek", width: 80, align: "left" },
{ label: "结束周次", name: "EndWeek", width: 80, align: "left" },
{ label: "学分", name: "StudyScore", width: 80, align: "left" },
//{ label: "结束周次", name: "EndWeek", width: 80, align: "left" },
//{
// label: "负责开课院系", name: "TeachDeptNo", width: 100, align: "left",
// formatterAsync: function (callback, value, row, op, $cell) {
// learun.clientdata.getAsync('custmerData', {
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
// key: value,
// keyId: 'deptno',
// callback: function (_data) {
// callback(_data['deptname']);
// }
// });
// }
//},
{ label: "备注", name: "Remark", width: 100, align: "left" },
],
mainId: 'ID',
@@ -258,7 +295,7 @@ var bootstrap = function ($, learun) {
},
search: function (param) {
param = param || {};
param.MajorNo = cdmajorname;
param.DeptNo = cddeptname;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};


+ 44
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/IndexSchool.cshtml Целия файл

@@ -0,0 +1,44 @@
@{
ViewBag.Title = "开课计划";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学年</div>
<div id="AcademicYearNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学期</div>
<div id="Semester"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">年级</div>
<div id="Grade"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">课程</div>
<div id="LessonNo"></div>
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>

@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ClassPlan/IndexSchool.js")

+ 129
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/IndexSchool.js Целия файл

@@ -0,0 +1,129 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-11-29 11:43
* 描 述:开课计划
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var cddeptname = '';
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 250, 400);
//$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' });
$('#AcademicYearNo').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//年级
$('#Grade').lrselect({
placeholder: "请选择年级",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetGradeData',
value: 'value',
text: 'text'
});
$('#Semester').lrDataItemSelect({ code: 'Semester' });
$("#MajorNo").lrselect();

$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/ClassPlan/GetPageListForSchool',
headData: [
{ label: "学年", name: "AcademicYearNo", width: 80, align: "left" },
{
label: "学期", name: "Semester", width: 50, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'Semester',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "年级", name: "Grade", width: 50, align: "left" },
{ label: "课程编码", name: "LessonNo", width: 200, align: "left" },
{ label: "课程名称", name: "LessonName", width: 200, align: "left" },
{
label: "课程类型", name: "LessonTypeId", width: 200, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdLessonType',
key: value,
keyId: 'ltid',
callback: function (_data) {
callback(_data['lessontypename']);
}
});
}
},
{
label: "状态", name: "State", width: 100, align: "left",
formatter: function (cellvalue, row) {
if (cellvalue == 0) {
return '<span class=\"label label-warning\">未排课</span>';
} if (cellvalue == 1) {
return '<span class=\"label label-success\">已排课</span>';
}
}
},
{ label: "拟开教学班数", name: "TeachClassNum", width: 100, align: "left" },
//{ label: "人数", name: "StuNum", width: 80, align: "left" },
{ label: "周课时", name: "WeekLessonHour", width: 80, align: "left" },
{ label: "理论课时", name: "WeekHourClassroom", width: 80, align: "left" },
{ label: "实践课时", name: "PracticeHour", width: 80, align: "left" },
{ label: "起始周次", name: "StartWeek", width: 80, align: "left" },
//{ label: "结束周次", name: "EndWeek", width: 80, align: "left" },
//{
// label: "负责开课院系", name: "TeachDeptNo", width: 100, align: "left",
// formatterAsync: function (callback, value, row, op, $cell) {
// learun.clientdata.getAsync('custmerData', {
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
// key: value,
// keyId: 'deptno',
// callback: function (_data) {
// callback(_data['deptname']);
// }
// });
// }
//},
{ label: "学分", name: "StudyScore", width: 80, align: "left" },
{ label: "备注", name: "Remark", width: 100, align: "left" },
],
mainId: 'ID',
sidx: 'MakeDate desc',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
param.DeptNo = cddeptname;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 15
- 7
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.cshtml Целия файл

@@ -5,23 +5,27 @@
<div class="lr-layout lr-layout-left-center" id="lr_layout">
<div class="lr-layout-left">
<div class="lr-layout-wrap">
<div class="lr-layout-title lrlt ">专业信息</div>
<div id="cdmajorTree" class="lr-layout-body"></div>
<div class="lr-layout-title lrlt ">系部信息</div>
<div id="cddeptTree" class="lr-layout-body"></div>
</div>
</div>
<div class="lr-layout-center">
<div class="lr-layout-wrap">
<div class="lr-layout-title">
<span id="titleinfo" class="lrlt">未选择专业</span> - <span class="lrlt">专业信息</span>
<span id="titleinfo" class="lrlt">未选择系部</span> - <span class="lrlt">系部信息</span>
</div>
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">学校</div>
<div id="F_SchoolId"></div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">专业</div>
<div id="MajorNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">班级</div>
<div id="ClassNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学年</div>
@@ -31,10 +35,14 @@
<div class="lr-form-item-title">学期</div>
<div id="Semester"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">年级</div>
<div id="Grade"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">教师</div>
<div id="EmpNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">课程</div>
<div id="LessonNo"></div>


+ 69
- 50
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js Целия файл

@@ -7,7 +7,7 @@
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var cdmajorname = '';
var cddeptname = '';
var page = {
init: function () {
page.inittree();
@@ -18,7 +18,6 @@ var bootstrap = function ($, learun) {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 250, 400);
$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' });
$('#AcademicYearNo').lrselect({
placeholder: "请选择学年",
allowSearch: true,
@@ -34,16 +33,14 @@ var bootstrap = function ($, learun) {
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "请选择学期",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData',
value: 'value',
text: 'text'
});
$('#Semester').lrDataItemSelect({ code: 'Semester' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
$("#MajorNo").lrselect();
$('#EmpNo').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' });
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' });

$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });

// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
@@ -92,42 +89,38 @@ var bootstrap = function ($, learun) {
$('#lr_qzteach').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认强制设置教师,请谨慎操作!!!', function (item) {
if (item) {
learun.layerForm({
id: 'form',
title: '强制设置教师',
url: top.$.rootUrl +
'/EducationalAdministration/ClassPlanTeach/TeachFormQZ?keyValue=' +
keyValue,
width: 400,
height: 300,
callBack: function (id) {
return top[id].acceptClick();
}
});
learun.layerForm({
id: 'form',
title: '强制设置教师',
url: top.$.rootUrl +
'/EducationalAdministration/ClassPlanTeach/TeachFormQZ?keyValue=' +
keyValue,
width: 400,
height: 300,
callBack: function (id) {
return top[id].acceptClick();
}
});
}
});
},
inittree: function () {
$('#cdmajorTree').lrtree({
url: top.$.rootUrl + '/EducationalAdministration/CdMajor/GetTree',
$('#cddeptTree').lrtree({
url: top.$.rootUrl + '/EducationalAdministration/CdDept/GetTree',
param: { parentId: '0' },
nodeClick: page.treeNodeClick
});
//$('#cddeptTree').lrtreeSet('setValue', '53298b7a-404c-4337-aa7f-80b2a4ca6681');
},
treeNodeClick: function (item) {
cdmajorname = item.id;
cddeptname = item.id;
$('#titleinfo').text(item.text);
page.search();
var NMajorNo = item.id;
if (NMajorNo != null && NMajorNo != "" && NMajorNo != undefined) {
var NDeptNo = item.id;
if (NDeptNo != null && NDeptNo != "" && NDeptNo != undefined) {
$('#MajorNo').lrselectRefresh({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
param: { strWhere: " 1=1 and CheckMark=1 and majorno in (" + NMajorNo + ")" },
param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" },
value: "majorno",
text: "majorname",
maxHeight: 200
@@ -135,7 +128,7 @@ var bootstrap = function ($, learun) {
} else {
$('#MajorNo').lrselectRefresh({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
param: { strWhere: " 1=1 and CheckMark=1 and majorno ='' " },
param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " },
value: "majorno",
text: "majorname",
maxHeight: 200
@@ -144,7 +137,7 @@ var bootstrap = function ($, learun) {
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/GetPageList',
headData: [
{
@@ -161,7 +154,18 @@ var bootstrap = function ($, learun) {
}
},
{ label: "学年", name: "AcademicYearNo", width: 80, align: "left" },
{ label: "学期", name: "Semester", width: 50, align: "left" },
{
label: "学期", name: "Semester", width: 50, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'Semester',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "系部", name: "DeptNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
@@ -189,24 +193,26 @@ var bootstrap = function ($, learun) {
}
},
{ label: "年级", name: "Grade", width: 50, align: "left" },
{
label: "课程", name: "LessonNo", width: 200, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo',
key: value,
keyId: 'lessonno',
callback: function (_data) {
callback(_data['lessonname']);
}
});
}
},
{ label: "课程编码", name: "LessonNo", width: 200, align: "left" },
{ label: "课程名称", name: "LessonName", width: 200, align: "left" },
//{
// label: "课程名称", name: "LessonNo", width: 200, align: "left",
// formatterAsync: function (callback, value, row, op, $cell) {
// learun.clientdata.getAsync('custmerData', {
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo',
// key: value,
// keyId: 'lessonno',
// callback: function (_data) {
// callback(_data['lessonname']);
// }
// });
// }
//},
{ label: "人数", name: "StuNum", width: 80, align: "left" },
{ label: "上机课时", name: "PracticeHour", width: 80, align: "left" },
{ label: "课程区别码", name: "PartCode", width: 80, align: "left" },
{ label: "班级编号", name: "TeachClassNo", width: 80, align: "left" },
{
label: "班级", name: "TeachClassNo", width: 110, align: "left",
label: "班级名称", name: "TeachClassNo", width: 80, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
@@ -218,8 +224,9 @@ var bootstrap = function ($, learun) {
});
}
},
{ label: "教师编号", name: "EmpNo", width: 80, align: "left" },
{
label: "教师", name: "EmpNo", width: 80, align: "left",
label: "教师名称", name: "EmpNo", width: 80, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata',
@@ -231,6 +238,18 @@ var bootstrap = function ($, learun) {
});
}
},
{
label: "考试类型", name: "ExamType", width: 80, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'ExamType',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "合上班", name: "RelatedClassNo", width: 80, align: "left" },
{ label: "拟开教学班数", name: "LessonSortNo", width: 100, align: "left" },
{ label: "备注", name: "Remark", width: 100, align: "left" },
@@ -244,7 +263,7 @@ var bootstrap = function ($, learun) {
},
search: function (param) {
param = param || {};
param.MajorNo = cdmajorname;
param.DeptNo = cddeptname;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};


+ 2
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachForm.js Целия файл

@@ -24,7 +24,8 @@ var bootstrap = function ($, learun) {
}
var postData = $('#form').lrGetFormData();
var EmpNo = postData.EmpNo;
learun.postForm(top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/UpTeach', { keyValue: keyValue, EmpNo: EmpNo}, function () {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/SetTeach', { keyValue: keyValue, EmpNo: EmpNo }, function () {
learun.frameTab.currentIframe().refreshGirdData()
});
};
page.init();


+ 3
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachFormQZ.js Целия файл

@@ -24,8 +24,10 @@ var bootstrap = function ($, learun) {
}
var postData = $('#form').lrGetFormData();
var EmpNo = postData.EmpNo;
learun.postForm(top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/QzUpTeach', { keyValue: keyValue, EmpNo: EmpNo}, function () {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/QZSetTeach', { keyValue: keyValue, EmpNo: EmpNo }, function () {
learun.frameTab.currentIframe().refreshGirdData()
});
};
page.init();

}

+ 11
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Целия файл

@@ -328,6 +328,15 @@
<Compile Include="Areas\EducationalAdministration\Controllers\EvaDormitoryInteriorController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\EvaHygieveController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\EvaViolationOfDisciplineController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ArrangeExamTermItemNewController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ArrangeExamTermNewController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamLessonController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamPlanController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamPlanLessonController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamRoomController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamStudentController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamTeacherTimeController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_InvigilateTeacherController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\LeaveSchoolAController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\LR_Base_LogoController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\MealCardRunTabController.cs" />
@@ -1019,6 +1028,7 @@
<Content Include="Areas\EducationalAdministration\Views\ClassPlanTeach\TeachFormQZ.js" />
<Content Include="Areas\EducationalAdministration\Views\ClassPlan\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\ClassPlan\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\ClassPlan\IndexSchool.js" />
<Content Include="Areas\EducationalAdministration\Views\EADateArrange\InitByConditionForm.js" />
<Content Include="Areas\EducationalAdministration\Views\EmpInfo\FormModify.js" />
<Content Include="Areas\EducationalAdministration\Views\EmpInfo\FormEdit.js" />
@@ -1210,6 +1220,7 @@
<Content Include="Areas\EducationalAdministration\Views\Exam_InvigilateTeacher\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_InvigilateTeacher\FormYearSemester.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_InvigilateTeacher\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\ClassPlan\IndexSchool.cshtml" />
<None Include="Areas\EducationalAdministration\Views\StuInfoBasic\Printxjk.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\AllocationClassDC.js" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\StatisticClassIndex.js" />


+ 30
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanBLL.cs Целия файл

@@ -43,6 +43,32 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}


/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<OpenLessonPlanEntity> GetPageListForSchool(Pagination pagination, string queryJson)
{
try
{
return classPlanService.GetPageListForSchool(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取OpenLessonPlan表实体数据
/// </summary>
@@ -128,15 +154,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="School"></param>
/// <param name="Year"></param>
/// <param name="Semester"></param>
/// <param name="Dept"></param>
/// <param name="Major"></param>
/// <param name="Grade"></param>
/// <param name="Lesson"></param>
/// <returns></returns>
public OpenLessonPlanEntity GetRepetitions(string School, string Year, string Semester, string Major, string Grade, string Lesson)
public OpenLessonPlanEntity GetRepetitions(string School, string Year, string Semester, string Dept,
string Major, string Grade, string Lesson)
{
try
{
return classPlanService.GetRepetitions(School, Year, Semester, Major, Grade, Lesson);
return classPlanService.GetRepetitions(School, Year, Semester, Dept, Major, Grade, Lesson);
}
catch (Exception ex)
{


+ 2
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanIBLL.cs Целия файл

@@ -21,6 +21,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<OpenLessonPlanEntity> GetPageList(Pagination pagination, string queryJson);
IEnumerable<OpenLessonPlanEntity> GetPageListForSchool(Pagination pagination, string queryJson);
/// <summary>
/// 获取OpenLessonPlan表实体数据
/// </summary>
@@ -58,7 +59,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="Grade">年级</param>
/// <param name="Lesson">课程</param>
/// <returns></returns>
OpenLessonPlanEntity GetRepetitions(string School, string Year, string Semester, string Major, string Grade, string Lesson);
OpenLessonPlanEntity GetRepetitions(string School, string Year, string Semester, string Dept, string Major, string Grade, string Lesson);

/// <summary>
/// 编辑时删除关联数据


+ 89
- 13
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanService.cs Целия файл

@@ -32,9 +32,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@" * ");
strSql.Append(@" t.*,l.LessonTypeId ");
strSql.Append(" FROM OpenLessonPlan t ");
strSql.Append(" WHERE 1=1 ");
strSql.Append(" left join lessoninfo l on t.lessonno=l.lessonno ");
strSql.Append(" WHERE 1=1 and l.CheckMark=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
@@ -88,6 +89,76 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 全校开课计划
/// </summary>
/// <param name="pagination"></param>
/// <param name="queryJson"></param>
/// <returns></returns>
public IEnumerable<OpenLessonPlanEntity> GetPageListForSchool(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@" t.AcademicYearNo,t.Semester,t.Grade,t.LessonNo,t.LessonName,l.LessonTypeId,t.TeachClassNum,t.WeekLessonHour,t.WeekHourClassroom,t.PracticeHour,t.StartWeek,t.StudyScore,t.Remark,t.MakeDate ");
strSql.Append(" FROM OpenLessonPlan t ");
strSql.Append(" left join lessoninfo l on t.lessonno=l.lessonno ");
strSql.Append(" where l.CheckMark=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["F_SchoolId"].IsEmpty())
{
dp.Add("F_SchoolId", queryParam["F_SchoolId"].ToString(), DbType.String);
strSql.Append(" AND t.F_SchoolId = @F_SchoolId ");
}
if (!queryParam["AcademicYearNo"].IsEmpty())
{
dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String);
strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo ");
}
if (!queryParam["Semester"].IsEmpty())
{
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String);
strSql.Append(" AND t.Semester = @Semester ");
}
if (!queryParam["DeptNo"].IsEmpty())
{
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String);
strSql.Append(" AND t.DeptNo = @DeptNo ");
}
if (!queryParam["MajorNo"].IsEmpty())
{
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
strSql.Append(" AND t.MajorNo = @MajorNo ");
}
if (!queryParam["Grade"].IsEmpty())
{
dp.Add("Grade", "%" + queryParam["Grade"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Grade Like @Grade ");
}
if (!queryParam["LessonNo"].IsEmpty())
{
dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String);
strSql.Append(" AND t.LessonNo = @LessonNo ");
}
strSql.Append(" group by t.AcademicYearNo,t.Semester,t.Grade,t.LessonNo,t.LessonName,l.LessonTypeId,t.State, t.TeachClassNum, t.WeekLessonHour, t.WeekHourClassroom, t.PracticeHour, t.StartWeek, t.StudyScore, t.Remark,t.MakeDate ");
return this.BaseRepository("CollegeMIS").FindList<OpenLessonPlanEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取OpenLessonPlan表实体数据
/// </summary>
@@ -132,7 +203,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
if (OpList != null)
{
var TeachList = this.BaseRepository("CollegeMIS").FindList<TeachClassEntity>(
x => x.MajorNo == OpList.MajorNo &&
x => x.DeptNo == OpList.DeptNo &&
x.MajorNo == OpList.MajorNo &&
x.Grade == OpList.Grade &&
x.Semester == OpList.Semester &&
x.LessonNo == OpList.LessonNo &&
@@ -145,7 +217,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
if (StrTeach.Count() > 0)
{
var LessonList = this.BaseRepository("CollegeMIS").FindList<StuSelectLessonListEntity>(
y => y.MajorNo == OpList.MajorNo &&
y => y.DeptNo == OpList.DeptNo &&
y.MajorNo == OpList.MajorNo &&
y.Grade == OpList.Grade &&
y.Semester == OpList.Semester &&
y.LessonNo == OpList.LessonNo &&
@@ -231,18 +304,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="Grade">年级</param>
/// <param name="Lesson">课程</param>
/// <returns></returns>
public OpenLessonPlanEntity GetRepetitions(string School, string Year, string Semester,
public OpenLessonPlanEntity GetRepetitions(string School, string Year, string Semester, string Dept,
string Major, string Grade, string Lesson)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<OpenLessonPlanEntity>(
x => x.F_SchoolId == School
&& x.AcademicYearNo == Year
&& x.Semester == Semester
&& x.MajorNo == Major
&& x.Grade == Grade
&& x.LessonNo == Lesson
x => x.F_SchoolId == School
&& x.AcademicYearNo == Year
&& x.Semester == Semester
&& x.DeptNo == Dept
&& x.MajorNo == Major
&& x.Grade == Grade
&& x.LessonNo == Lesson
);

}
@@ -263,7 +337,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
if (OpList != null)
{
var TeachList = this.BaseRepository("CollegeMIS").FindList<TeachClassEntity>(
x => x.MajorNo == OpList.MajorNo &&
x => x.DeptNo == OpList.DeptNo &&
x.MajorNo == OpList.MajorNo &&
x.Grade == OpList.Grade &&
x.Semester == OpList.Semester &&
x.LessonNo == OpList.LessonNo &&
@@ -276,7 +351,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
if (StrTeach.Count > 0)
{
var LessonList = this.BaseRepository("CollegeMIS").FindList<StuSelectLessonListEntity>(
y => y.MajorNo == OpList.MajorNo &&
y => y.DeptNo == OpList.DeptNo &&
y.MajorNo == OpList.MajorNo &&
y.Grade == OpList.Grade &&
y.Semester == OpList.Semester &&
y.LessonNo == OpList.LessonNo &&


+ 3
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj Целия файл

@@ -1943,7 +1943,9 @@
<Analyzer Include="..\..\..\packages\Microsoft.DependencyValidation.Analyzers.0.10.0\analyzers\dotnet\cs\Microsoft.DependencyValidation.Analyzers.resources.dll" />
<Analyzer Include="..\..\..\packages\Microsoft.DependencyValidation.Analyzers.0.10.0\analyzers\dotnet\Microsoft.DependencyValidation.Analyzers.dll" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Folder Include="EducationalAdministration\ClassPlanTeach\" />
</ItemGroup>
<ItemGroup />
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />


Зареждане…
Отказ
Запис