diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs index ea4221272..7be2dbf20 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs +++ b/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(); } + /// + /// 全校开课计划 + /// + /// + [HttpGet] + public ActionResult IndexSchool() + { + return View(); + } #endregion @@ -68,6 +77,28 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } + /// + /// 全校开课计划 + /// + /// + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListForSchool(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = classPlanIBLL.GetPageListForSchool(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// /// 获取表单数据 /// @@ -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 TeachList = new List(); 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); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanTeachController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanTeachController.cs index 0fa2695f2..d71bb6b59 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanTeachController.cs +++ b/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 视图功能 /// @@ -71,6 +72,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { Pagination paginationobj = pagination.ToObject(); 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 TeachList = new List(); + 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 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 TeachList = new List(); - 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 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.cshtml index eb807f5b4..ed3522e02 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.cshtml @@ -15,58 +15,70 @@
学期*
-
-
专业*
-
+
+
考试类型*
+
-
+
年级*
+
+
系部*
+
+
+
+
专业*
+
+
课程*
-
+
课程细类码
-