@@ -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); | |||
} | |||
} | |||
@@ -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 | |||
@@ -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> | |||
@@ -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()) | |||
@@ -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> | |||
@@ -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) }); | |||
} | |||
}; | |||
@@ -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") |
@@ -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(); | |||
} |
@@ -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> | |||
@@ -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) }); | |||
} | |||
}; | |||
@@ -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(); | |||
@@ -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(); | |||
} |
@@ -1028,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" /> | |||
@@ -1219,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" /> | |||
@@ -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) | |||
{ | |||
@@ -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> | |||
/// 编辑时删除关联数据 | |||
@@ -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 && | |||
@@ -1942,7 +1942,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" /> | |||