@@ -102,6 +102,19 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
/// <summary> | |||||
/// 获取树形数据 | |||||
/// </summary> | |||||
/// <param name="parentId">父级id</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetTree(string parentId) | |||||
{ | |||||
var data = cdMajorIBLL.GetTree(parentId); | |||||
return JsonResult(data); | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -119,7 +119,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
entity.State = 0; | entity.State = 0; | ||||
entity.IsAllowEdit = true; | entity.IsAllowEdit = true; | ||||
entity.MakeDate = DateTime.Now; | entity.MakeDate = DateTime.Now; | ||||
var model = classPlanIBLL.GetRepetitions(entity.F_SchoolId, entity.AcademicYearNo, entity.Semester, entity.DeptNo, entity.MajorNo, entity.Grade, entity.LessonNo); | |||||
var model = classPlanIBLL.GetRepetitions(entity.F_SchoolId, entity.AcademicYearNo, entity.Semester, entity.MajorNo, entity.Grade, entity.LessonNo); | |||||
if (model != null) | if (model != null) | ||||
{ | { | ||||
if (keyValue != model.ID.ToString()) | if (keyValue != model.ID.ToString()) | ||||
@@ -149,7 +149,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
for (int i = 0; i < entity.Count; i++) | for (int i = 0; i < entity.Count; i++) | ||||
{ | { | ||||
var lessonList = classInfoIBLL.GetAllClass(). | var lessonList = classInfoIBLL.GetAllClass(). | ||||
Where(x => x.DeptNo == entity[i].DeptNo && x.MajorNo == entity[i].MajorNo && x.Grade == entity[i].Grade) | |||||
Where(x => x.MajorNo == entity[i].MajorNo && x.Grade == entity[i].Grade) | |||||
.OrderBy(x => x.ClassNo).Select(x => x.ClassNo).ToList(); | .OrderBy(x => x.ClassNo).Select(x => x.ClassNo).ToList(); | ||||
if (lessonList.Count > 0) | if (lessonList.Count > 0) | ||||
{ | { | ||||
@@ -158,7 +158,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
TeachClassEntity TeachEntity = new TeachClassEntity(); | TeachClassEntity TeachEntity = new TeachClassEntity(); | ||||
TeachEntity.TeachClassNo = lessonList[j]; | TeachEntity.TeachClassNo = lessonList[j]; | ||||
TeachEntity.AcademicYearNo = entity[i].AcademicYearNo; | TeachEntity.AcademicYearNo = entity[i].AcademicYearNo; | ||||
TeachEntity.DeptNo = entity[i].DeptNo; | |||||
TeachEntity.MajorNo = entity[i].MajorNo; | TeachEntity.MajorNo = entity[i].MajorNo; | ||||
TeachEntity.Grade = entity[i].Grade; | TeachEntity.Grade = entity[i].Grade; | ||||
TeachEntity.Semester = entity[i].Semester; | TeachEntity.Semester = entity[i].Semester; | ||||
@@ -155,7 +155,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | { | ||||
StuSelectLessonListEntity TeachEntity = new StuSelectLessonListEntity(); | StuSelectLessonListEntity TeachEntity = new StuSelectLessonListEntity(); | ||||
TeachEntity.StuNo = stuDataList[j].StuNo; | TeachEntity.StuNo = stuDataList[j].StuNo; | ||||
TeachEntity.DeptNo = entityList[i].DeptNo; | |||||
TeachEntity.MajorNo = entityList[i].MajorNo; | TeachEntity.MajorNo = entityList[i].MajorNo; | ||||
TeachEntity.ClassNo = stuDataList[j].ClassNo; | TeachEntity.ClassNo = stuDataList[j].ClassNo; | ||||
TeachEntity.MajorDetailNo = entityList[i].MajorDetailNo; | TeachEntity.MajorDetailNo = entityList[i].MajorDetailNo; | ||||
@@ -15,15 +15,11 @@ | |||||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | <div class="lr-form-item-title">学期<font face="宋体">*</font></div> | ||||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | <div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | ||||
</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-4 lr-form-item" data-table="ClassPlan"> | |||||
<div class="col-xs-6 lr-form-item" data-table="ClassPlan"> | |||||
<div class="lr-form-item-title">专业<font face="宋体">*</font></div> | <div class="lr-form-item-title">专业<font face="宋体">*</font></div> | ||||
<div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div> | <div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-4 lr-form-item" data-table="ClassPlan"> | |||||
<div class="col-xs-6 lr-form-item" data-table="ClassPlan"> | |||||
<div class="lr-form-item-title">年级<font face="宋体">*</font></div> | <div class="lr-form-item-title">年级<font face="宋体">*</font></div> | ||||
<div id="Grade" isvalid="yes" checkexpession="NotNull"></div> | <div id="Grade" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
@@ -32,10 +28,6 @@ | |||||
<div id="LessonNo" isvalid="yes" checkexpession="NotNull"></div> | <div id="LessonNo" isvalid="yes" checkexpession="NotNull"></div> | ||||
<input id="LessonName" type="hidden" /> | <input id="LessonName" type="hidden" /> | ||||
</div> | </div> | ||||
@*<div class="col-xs-4 lr-form-item" data-table="ClassPlan"> | |||||
<div class="lr-form-item-title">课程类别码</div> | |||||
<div id="LessonSortNo"></div> | |||||
</div>*@ | |||||
<div class="col-xs-6 lr-form-item" data-table="ClassPlan"> | <div class="col-xs-6 lr-form-item" data-table="ClassPlan"> | ||||
<div class="lr-form-item-title">课程细类码</div> | <div class="lr-form-item-title">课程细类码</div> | ||||
<div id="LessonSortDetailNo"></div> | <div id="LessonSortDetailNo"></div> | ||||
@@ -44,38 +36,34 @@ | |||||
<div class="lr-form-item-title">开合课</div> | <div class="lr-form-item-title">开合课</div> | ||||
<input id="StuSortNo" type="text" class="form-control" /> | <input id="StuSortNo" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-4 lr-form-item" data-table="ClassPlan"> | |||||
<div class="col-xs-6 lr-form-item" data-table="ClassPlan"> | |||||
<div class="lr-form-item-title">拟开教学班数</div> | <div class="lr-form-item-title">拟开教学班数</div> | ||||
<input id="TeachClassNum" type="text" class="form-control" isvalid="yes" checkexpession="NumOrNull" /> | <input id="TeachClassNum" type="text" class="form-control" isvalid="yes" checkexpession="NumOrNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-4 lr-form-item" data-table="ClassPlan"> | |||||
<div class="col-xs-6 lr-form-item" data-table="ClassPlan"> | |||||
<div class="lr-form-item-title">人数</div> | <div class="lr-form-item-title">人数</div> | ||||
<input id="StuNum" type="text" class="form-control" isvalid="yes" checkexpession="NumOrNull" /> | <input id="StuNum" type="text" class="form-control" isvalid="yes" checkexpession="NumOrNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-4 lr-form-item" data-table="ClassPlan"> | |||||
<div class="col-xs-6 lr-form-item" data-table="ClassPlan"> | |||||
<div class="lr-form-item-title">周课时</div> | <div class="lr-form-item-title">周课时</div> | ||||
<input id="WeekLessonHour" type="text" class="form-control" isvalid="yes" checkexpession="NumOrNull" /> | <input id="WeekLessonHour" type="text" class="form-control" isvalid="yes" checkexpession="NumOrNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-3 lr-form-item" data-table="ClassPlan"> | |||||
<div class="col-xs-6 lr-form-item" data-table="ClassPlan"> | |||||
<div class="lr-form-item-title">教室课时</div> | <div class="lr-form-item-title">教室课时</div> | ||||
<input id="WeekHourClassroom" type="text" class="form-control" checkexpession="NumOrNull" /> | <input id="WeekHourClassroom" type="text" class="form-control" checkexpession="NumOrNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-3 lr-form-item" data-table="ClassPlan"> | |||||
<div class="col-xs-6 lr-form-item" data-table="ClassPlan"> | |||||
<div class="lr-form-item-title">上机课时</div> | <div class="lr-form-item-title">上机课时</div> | ||||
<input id="PracticeHour" type="text" class="form-control" checkexpession="NumOrNull" /> | <input id="PracticeHour" type="text" class="form-control" checkexpession="NumOrNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-3 lr-form-item" data-table="ClassPlan"> | |||||
<div class="col-xs-6 lr-form-item" data-table="ClassPlan"> | |||||
<div class="lr-form-item-title">起始周次</div> | <div class="lr-form-item-title">起始周次</div> | ||||
<input id="StartWeek" type="text" class="form-control" icheckexpession="NumOrNull" /> | <input id="StartWeek" type="text" class="form-control" icheckexpession="NumOrNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-3 lr-form-item" data-table="ClassPlan"> | |||||
<div class="col-xs-6 lr-form-item" data-table="ClassPlan"> | |||||
<div class="lr-form-item-title">结束周次</div> | <div class="lr-form-item-title">结束周次</div> | ||||
<input id="EndWeek" type="text" class="form-control" checkexpession="NumOrNull" /> | <input id="EndWeek" type="text" class="form-control" checkexpession="NumOrNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="ClassPlan"> | |||||
<div class="lr-form-item-title">负责开课院系</div> | |||||
<div id="TeachDeptNo"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ClassPlan"> | <div class="col-xs-6 lr-form-item" data-table="ClassPlan"> | ||||
<div class="lr-form-item-title">学分</div> | <div class="lr-form-item-title">学分</div> | ||||
<input id="StudyScore" type="text" class="form-control" checkexpession="NumOrNull" /> | <input id="StudyScore" type="text" class="form-control" checkexpession="NumOrNull" /> | ||||
@@ -33,33 +33,7 @@ var bootstrap = function ($, learun) { | |||||
text: 'text' | text: 'text' | ||||
}); | }); | ||||
$('#Semester').lrDataItemSelect({ code: 'Semester' }); | $('#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 and deptno ='' " }, | |||||
value: "majorno", | |||||
text: "majorname", | |||||
maxHeight: 200 | |||||
}); | |||||
} | |||||
} | |||||
}) | |||||
$("#MajorNo").lrselect(); | |||||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||||
$('#LessonNo').lrselect({ | $('#LessonNo').lrselect({ | ||||
placeholder: "请选择课程", | placeholder: "请选择课程", | ||||
allowSearch: true, | allowSearch: true, | ||||
@@ -6,7 +6,7 @@ | |||||
<div class="lr-layout-left"> | <div class="lr-layout-left"> | ||||
<div class="lr-layout-wrap"> | <div class="lr-layout-wrap"> | ||||
<div class="lr-layout-title lrlt ">学校信息</div> | <div class="lr-layout-title lrlt ">学校信息</div> | ||||
<div id="cddeptTree" class="lr-layout-body"></div> | |||||
<div id="cdmajorTree" class="lr-layout-body"></div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="lr-layout-center"> | <div class="lr-layout-center"> | ||||
@@ -23,10 +23,6 @@ | |||||
<div class="lr-form-item-title">学校</div> | <div class="lr-form-item-title">学校</div> | ||||
<div id="F_SchoolId"></div> | <div id="F_SchoolId"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 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="col-xs-6 lr-form-item"> | ||||
<div class="lr-form-item-title">学年</div> | <div class="lr-form-item-title">学年</div> | ||||
<div id="AcademicYearNo"></div> | <div id="AcademicYearNo"></div> | ||||
@@ -35,10 +31,6 @@ | |||||
<div class="lr-form-item-title">学期</div> | <div class="lr-form-item-title">学期</div> | ||||
<div id="Semester"></div> | <div id="Semester"></div> | ||||
</div> | </div> | ||||
@*<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">系部</div> | |||||
<div id="DeptNo"></div> | |||||
</div>*@ | |||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">年级</div> | <div class="lr-form-item-title">年级</div> | ||||
<div id="Grade"></div> | <div id="Grade"></div> | ||||
@@ -7,7 +7,7 @@ | |||||
var refreshGirdData; | var refreshGirdData; | ||||
var bootstrap = function ($, learun) { | var bootstrap = function ($, learun) { | ||||
"use strict"; | "use strict"; | ||||
var cddeptname = ''; | |||||
var cdmajorname = ''; | |||||
var page = { | var page = { | ||||
init: function () { | init: function () { | ||||
page.inittree(); | page.inittree(); | ||||
@@ -163,22 +163,22 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
}, | }, | ||||
inittree: function () { | inittree: function () { | ||||
$('#cddeptTree').lrtree({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/CdDept/GetTree', | |||||
$('#cdmajorTree').lrtree({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/CdMajor/GetTree', | |||||
param: { parentId: '0' }, | param: { parentId: '0' }, | ||||
nodeClick: page.treeNodeClick | nodeClick: page.treeNodeClick | ||||
}); | }); | ||||
//$('#cddeptTree').lrtreeSet('setValue', '53298b7a-404c-4337-aa7f-80b2a4ca6681'); | |||||
//$('#cdmajorTree').lrtreeSet('setValue', '53298b7a-404c-4337-aa7f-80b2a4ca6681'); | |||||
}, | }, | ||||
treeNodeClick: function (item) { | treeNodeClick: function (item) { | ||||
cddeptname = item.id; | |||||
cdmajorname = item.id; | |||||
$('#titleinfo').text(item.text); | $('#titleinfo').text(item.text); | ||||
page.search(); | page.search(); | ||||
var NDeptNo = item.id; | |||||
if (NDeptNo != null && NDeptNo != "" && NDeptNo != undefined) { | |||||
var NMajorNo = item.id; | |||||
if (NMajorNo != null && NMajorNo != "" && NMajorNo != undefined) { | |||||
$('#MajorNo').lrselectRefresh({ | $('#MajorNo').lrselectRefresh({ | ||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | ||||
param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" }, | |||||
param: { strWhere: " 1=1 and CheckMark=1 and majorno in (" + NMajorNo + ")" }, | |||||
value: "majorno", | value: "majorno", | ||||
text: "majorname", | text: "majorname", | ||||
maxHeight: 200 | maxHeight: 200 | ||||
@@ -186,7 +186,7 @@ var bootstrap = function ($, learun) { | |||||
} else { | } else { | ||||
$('#MajorNo').lrselectRefresh({ | $('#MajorNo').lrselectRefresh({ | ||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | ||||
param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " }, | |||||
param: { strWhere: " 1=1 and CheckMark=1 and majorno ='' " }, | |||||
value: "majorno", | value: "majorno", | ||||
text: "majorname", | text: "majorname", | ||||
maxHeight: 200 | maxHeight: 200 | ||||
@@ -224,19 +224,6 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
{ | |||||
label: "系部", name: "DeptNo", 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: "MajorNo", width: 100, align: "left", | label: "专业", name: "MajorNo", width: 100, align: "left", | ||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
@@ -270,19 +257,6 @@ var bootstrap = function ($, learun) { | |||||
{ label: "上机课时", name: "PracticeHour", width: 80, align: "left" }, | { label: "上机课时", name: "PracticeHour", width: 80, align: "left" }, | ||||
{ label: "起始周次", name: "StartWeek", width: 80, align: "left" }, | { label: "起始周次", name: "StartWeek", width: 80, align: "left" }, | ||||
{ label: "结束周次", name: "EndWeek", 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: "StudyScore", width: 80, align: "left" }, | ||||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | { label: "备注", name: "Remark", width: 100, align: "left" }, | ||||
], | ], | ||||
@@ -295,7 +269,7 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
param.DeptNo = cddeptname; | |||||
param.MajorNo = cdmajorname; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
} | } | ||||
}; | }; | ||||
@@ -6,7 +6,7 @@ | |||||
<div class="lr-layout-left"> | <div class="lr-layout-left"> | ||||
<div class="lr-layout-wrap"> | <div class="lr-layout-wrap"> | ||||
<div class="lr-layout-title lrlt ">学校信息</div> | <div class="lr-layout-title lrlt ">学校信息</div> | ||||
<div id="cddeptTree" class="lr-layout-body"></div> | |||||
<div id="cdmajorTree" class="lr-layout-body"></div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="lr-layout-center"> | <div class="lr-layout-center"> | ||||
@@ -23,10 +23,6 @@ | |||||
<div class="lr-form-item-title">学校</div> | <div class="lr-form-item-title">学校</div> | ||||
<div id="F_SchoolId"></div> | <div id="F_SchoolId"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 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="col-xs-6 lr-form-item"> | ||||
<div class="lr-form-item-title">学年</div> | <div class="lr-form-item-title">学年</div> | ||||
<div id="AcademicYearNo"></div> | <div id="AcademicYearNo"></div> | ||||
@@ -35,10 +31,6 @@ | |||||
<div class="lr-form-item-title">学期</div> | <div class="lr-form-item-title">学期</div> | ||||
<div id="Semester"></div> | <div id="Semester"></div> | ||||
</div> | </div> | ||||
@*<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">系部</div> | |||||
<div id="DeptNo"></div> | |||||
</div>*@ | |||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">年级</div> | <div class="lr-form-item-title">年级</div> | ||||
<div id="Grade"></div> | <div id="Grade"></div> | ||||
@@ -7,7 +7,7 @@ | |||||
var refreshGirdData; | var refreshGirdData; | ||||
var bootstrap = function ($, learun) { | var bootstrap = function ($, learun) { | ||||
"use strict"; | "use strict"; | ||||
var cddeptname = ''; | |||||
var cdmajorname = ''; | |||||
var page = { | var page = { | ||||
init: function () { | init: function () { | ||||
page.inittree(); | page.inittree(); | ||||
@@ -108,22 +108,22 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
}, | }, | ||||
inittree: function () { | inittree: function () { | ||||
$('#cddeptTree').lrtree({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/CdDept/GetTree', | |||||
$('#cdmajorTree').lrtree({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/CdMajor/GetTree', | |||||
param: { parentId: '0' }, | param: { parentId: '0' }, | ||||
nodeClick: page.treeNodeClick | nodeClick: page.treeNodeClick | ||||
}); | }); | ||||
//$('#cddeptTree').lrtreeSet('setValue', '53298b7a-404c-4337-aa7f-80b2a4ca6681'); | //$('#cddeptTree').lrtreeSet('setValue', '53298b7a-404c-4337-aa7f-80b2a4ca6681'); | ||||
}, | }, | ||||
treeNodeClick: function (item) { | treeNodeClick: function (item) { | ||||
cddeptname = item.id; | |||||
cdmajorname = item.id; | |||||
$('#titleinfo').text(item.text); | $('#titleinfo').text(item.text); | ||||
page.search(); | page.search(); | ||||
var NDeptNo = item.id; | |||||
if (NDeptNo != null && NDeptNo != "" && NDeptNo != undefined) { | |||||
var NMajorNo = item.id; | |||||
if (NMajorNo != null && NMajorNo != "" && NMajorNo != undefined) { | |||||
$('#MajorNo').lrselectRefresh({ | $('#MajorNo').lrselectRefresh({ | ||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | ||||
param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" }, | |||||
param: { strWhere: " 1=1 and CheckMark=1 and majorno in (" + NMajorNo + ")" }, | |||||
value: "majorno", | value: "majorno", | ||||
text: "majorname", | text: "majorname", | ||||
maxHeight: 200 | maxHeight: 200 | ||||
@@ -131,7 +131,7 @@ var bootstrap = function ($, learun) { | |||||
} else { | } else { | ||||
$('#MajorNo').lrselectRefresh({ | $('#MajorNo').lrselectRefresh({ | ||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | ||||
param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " }, | |||||
param: { strWhere: " 1=1 and CheckMark=1 and majorno ='' " }, | |||||
value: "majorno", | value: "majorno", | ||||
text: "majorname", | text: "majorname", | ||||
maxHeight: 200 | maxHeight: 200 | ||||
@@ -183,7 +183,7 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
label: "专业", name: "MajorNo", width: 100, align: "left", | |||||
label: "专业", name: "MajorNo", width: 200, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('custmerData', { | learun.clientdata.getAsync('custmerData', { | ||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | ||||
@@ -239,7 +239,7 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
param.DeptNo = cddeptname; | |||||
param.MajorNo = cdmajorname; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
} | } | ||||
}; | }; | ||||
@@ -2,6 +2,8 @@ | |||||
using System; | using System; | ||||
using System.Data; | using System.Data; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using Learun.Cache.Factory; | |||||
using Learun.Cache.Base; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | namespace Learun.Application.TwoDevelopment.EducationalAdministration | ||||
{ | { | ||||
@@ -15,6 +17,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
public class CdMajorBLL : CdMajorIBLL | public class CdMajorBLL : CdMajorIBLL | ||||
{ | { | ||||
private CdMajorService cdMajorService = new CdMajorService(); | private CdMajorService cdMajorService = new CdMajorService(); | ||||
#region 缓存定义 | |||||
private ICache cache = CacheFactory.CaChe(); | |||||
private string cacheKey = "Learun_adms_cdmajor"; | |||||
#endregion | |||||
#region 获取数据 | #region 获取数据 | ||||
@@ -279,5 +285,70 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
#endregion | #endregion | ||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 获取列表数据 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public List<CdMajorEntity> GetList() | |||||
{ | |||||
try | |||||
{ | |||||
List<CdMajorEntity> list = cache.Read<List<CdMajorEntity>>(cacheKey); | |||||
if (list == null) | |||||
{ | |||||
list = (List<CdMajorEntity>)cdMajorService.GetList(); | |||||
cache.Write<List<CdMajorEntity>>(cacheKey, list, CacheId.company); | |||||
} | |||||
return list; | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public List<TreeModel> GetTree(string parentId) | |||||
{ | |||||
try | |||||
{ | |||||
List<CdMajorEntity> list = GetList(); | |||||
List<TreeModel> treeList = new List<TreeModel>(); | |||||
foreach (var item in list) | |||||
{ | |||||
TreeModel node = new TreeModel | |||||
{ | |||||
id = item.MajorNo, | |||||
text = item.MajorName, | |||||
value = item.MajorNo, | |||||
showcheck = false, | |||||
checkstate = 0, | |||||
isexpand = true, | |||||
parentId = item.ID | |||||
}; | |||||
treeList.Add(node); | |||||
} | |||||
return treeList; | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | } | ||||
} | } |
@@ -65,5 +65,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
#endregion | #endregion | ||||
IEnumerable<CdMajorEntity> GetAllList(); | IEnumerable<CdMajorEntity> GetAllList(); | ||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 获取树形数据 | |||||
/// </summary> | |||||
/// <param name="parentId">父级id</param> | |||||
/// <returns></returns> | |||||
List<TreeModel> GetTree(string parentId); | |||||
/// <summary> | |||||
/// 获取列表数据 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
List<CdMajorEntity> GetList(); | |||||
#endregion | |||||
} | } | ||||
} | } |
@@ -442,5 +442,34 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 获取公司列表信息(全部) | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public IEnumerable<CdMajorEntity> GetList() | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(" * "); | |||||
strSql.Append(" FROM CdMajor t WHERE 1=1 and CheckMark=1 "); | |||||
return this.BaseRepository("CollegeMIS").FindList<CdMajorEntity>(strSql.ToString()); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | } | ||||
} | } |
@@ -128,17 +128,15 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <param name="School"></param> | /// <param name="School"></param> | ||||
/// <param name="Year"></param> | /// <param name="Year"></param> | ||||
/// <param name="Semester"></param> | /// <param name="Semester"></param> | ||||
/// <param name="Dept"></param> | |||||
/// <param name="Major"></param> | /// <param name="Major"></param> | ||||
/// <param name="Grade"></param> | /// <param name="Grade"></param> | ||||
/// <param name="Lesson"></param> | /// <param name="Lesson"></param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public OpenLessonPlanEntity GetRepetitions(string School, string Year, string Semester, string Dept, | |||||
string Major, string Grade, string Lesson) | |||||
public OpenLessonPlanEntity GetRepetitions(string School, string Year, string Semester, string Major, string Grade, string Lesson) | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
return classPlanService.GetRepetitions(School, Year, Semester, Dept, Major, Grade, Lesson); | |||||
return classPlanService.GetRepetitions(School, Year, Semester, Major, Grade, Lesson); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -58,7 +58,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <param name="Grade">年级</param> | /// <param name="Grade">年级</param> | ||||
/// <param name="Lesson">课程</param> | /// <param name="Lesson">课程</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
OpenLessonPlanEntity GetRepetitions(string School, string Year, string Semester, string Dept, string Major, string Grade, string Lesson); | |||||
OpenLessonPlanEntity GetRepetitions(string School, string Year, string Semester, string Major, string Grade, string Lesson); | |||||
/// <summary> | /// <summary> | ||||
/// 编辑时删除关联数据 | /// 编辑时删除关联数据 | ||||
@@ -132,8 +132,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
if (OpList != null) | if (OpList != null) | ||||
{ | { | ||||
var TeachList = this.BaseRepository("CollegeMIS").FindList<TeachClassEntity>( | var TeachList = this.BaseRepository("CollegeMIS").FindList<TeachClassEntity>( | ||||
x => x.DeptNo == OpList.DeptNo && | |||||
x.MajorNo == OpList.MajorNo && | |||||
x => x.MajorNo == OpList.MajorNo && | |||||
x.Grade == OpList.Grade && | x.Grade == OpList.Grade && | ||||
x.Semester == OpList.Semester && | x.Semester == OpList.Semester && | ||||
x.LessonNo == OpList.LessonNo && | x.LessonNo == OpList.LessonNo && | ||||
@@ -146,8 +145,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
if (StrTeach.Count() > 0) | if (StrTeach.Count() > 0) | ||||
{ | { | ||||
var LessonList = this.BaseRepository("CollegeMIS").FindList<StuSelectLessonListEntity>( | var LessonList = this.BaseRepository("CollegeMIS").FindList<StuSelectLessonListEntity>( | ||||
y => y.DeptNo == OpList.DeptNo && | |||||
y.MajorNo == OpList.MajorNo && | |||||
y => y.MajorNo == OpList.MajorNo && | |||||
y.Grade == OpList.Grade && | y.Grade == OpList.Grade && | ||||
y.Semester == OpList.Semester && | y.Semester == OpList.Semester && | ||||
y.LessonNo == OpList.LessonNo && | y.LessonNo == OpList.LessonNo && | ||||
@@ -233,19 +231,18 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <param name="Grade">年级</param> | /// <param name="Grade">年级</param> | ||||
/// <param name="Lesson">课程</param> | /// <param name="Lesson">课程</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public OpenLessonPlanEntity GetRepetitions(string School, string Year, string Semester, string Dept, | |||||
public OpenLessonPlanEntity GetRepetitions(string School, string Year, string Semester, | |||||
string Major, string Grade, string Lesson) | string Major, string Grade, string Lesson) | ||||
{ | { | ||||
try | try | ||||
{ | { | ||||
return this.BaseRepository("CollegeMIS").FindEntity<OpenLessonPlanEntity>( | return this.BaseRepository("CollegeMIS").FindEntity<OpenLessonPlanEntity>( | ||||
x => x.F_SchoolId == School | |||||
&& x.AcademicYearNo == Year | |||||
&& x.Semester == Semester | |||||
&& x.DeptNo == Dept | |||||
&& x.MajorNo == Major | |||||
&& x.Grade == Grade | |||||
&& x.LessonNo == Lesson | |||||
x => x.F_SchoolId == School | |||||
&& x.AcademicYearNo == Year | |||||
&& x.Semester == Semester | |||||
&& x.MajorNo == Major | |||||
&& x.Grade == Grade | |||||
&& x.LessonNo == Lesson | |||||
); | ); | ||||
} | } | ||||
@@ -266,8 +263,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
if (OpList != null) | if (OpList != null) | ||||
{ | { | ||||
var TeachList = this.BaseRepository("CollegeMIS").FindList<TeachClassEntity>( | var TeachList = this.BaseRepository("CollegeMIS").FindList<TeachClassEntity>( | ||||
x => x.DeptNo == OpList.DeptNo && | |||||
x.MajorNo == OpList.MajorNo && | |||||
x => x.MajorNo == OpList.MajorNo && | |||||
x.Grade == OpList.Grade && | x.Grade == OpList.Grade && | ||||
x.Semester == OpList.Semester && | x.Semester == OpList.Semester && | ||||
x.LessonNo == OpList.LessonNo && | x.LessonNo == OpList.LessonNo && | ||||
@@ -280,8 +276,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
if (StrTeach.Count > 0) | if (StrTeach.Count > 0) | ||||
{ | { | ||||
var LessonList = this.BaseRepository("CollegeMIS").FindList<StuSelectLessonListEntity>( | var LessonList = this.BaseRepository("CollegeMIS").FindList<StuSelectLessonListEntity>( | ||||
y => y.DeptNo == OpList.DeptNo && | |||||
y.MajorNo == OpList.MajorNo && | |||||
y => y.MajorNo == OpList.MajorNo && | |||||
y.Grade == OpList.Grade && | y.Grade == OpList.Grade && | ||||
y.Semester == OpList.Semester && | y.Semester == OpList.Semester && | ||||
y.LessonNo == OpList.LessonNo && | y.LessonNo == OpList.LessonNo && | ||||
@@ -167,7 +167,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
stuLessonList.F_SchoolId = item.F_SchoolId; | stuLessonList.F_SchoolId = item.F_SchoolId; | ||||
stuLessonList.NoticeBookNo = item.NoticeBookNo; | stuLessonList.NoticeBookNo = item.NoticeBookNo; | ||||
stuLessonList.StuNo = item.StuNo; | stuLessonList.StuNo = item.StuNo; | ||||
stuLessonList.DeptNo = item.DeptNo; | |||||
stuLessonList.MajorNo = item.MajorNo; | stuLessonList.MajorNo = item.MajorNo; | ||||
stuLessonList.ClassNo = item.ClassNo; | stuLessonList.ClassNo = item.ClassNo; | ||||
stuLessonList.MajorDetailNo = item.MajorDetailNo; | stuLessonList.MajorDetailNo = item.MajorDetailNo; | ||||