@@ -0,0 +1,122 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Web.Mvc; | |||||
using System.Collections.Generic; | |||||
using System; | |||||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2019-08-21 17:28 | |||||
/// 描 述:成绩比例设置 | |||||
/// </summary> | |||||
public class ClassPlanController : MvcControllerBase | |||||
{ | |||||
private ClassPlanIBLL classPlanIBLL = new ClassPlanBLL(); | |||||
#region 视图功能 | |||||
/// <summary> | |||||
/// 主页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Index() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 表单页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Form() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetPageList(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = classPlanIBLL.GetPageList(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormData(string keyValue) | |||||
{ | |||||
var ClassPlanData = classPlanIBLL.GetClassPlanEntity(keyValue); | |||||
var jsonData = new | |||||
{ | |||||
ClassPlan = ClassPlanData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
classPlanIBLL.DeleteEntity(keyValue); | |||||
return Success("删除成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="strEntity">实体</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[ValidateAntiForgeryToken] | |||||
[AjaxOnly] | |||||
public ActionResult SaveForm(string keyValue, string strEntity) | |||||
{ | |||||
OpenLessonPlanEntity entity = strEntity.ToObject<OpenLessonPlanEntity>(); | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
entity.AmendDate = DateTime.Now; | |||||
} | |||||
entity.MakeDate = DateTime.Now; | |||||
classPlanIBLL.SaveEntity(keyValue, entity); | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,112 @@ | |||||
@{ | |||||
ViewBag.Title = "开课计划"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-4 lr-form-item" data-table="ClassPlan"> | |||||
<div class="lr-form-item-title">学校<font face="宋体">*</font></div> | |||||
<div id="F_SchoolId" 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="AcademicYearNo" 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="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="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="Grade" 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-4 lr-form-item" data-table="ClassPlan" style="display: none; "> | |||||
<div class="lr-form-item-title">课程类别码</div> | |||||
<input id="LessonSortNo" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="ClassPlan" style="display: none; "> | |||||
<div class="lr-form-item-title">课程细类码</div> | |||||
<input id="LessonSortDetailNo" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 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-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-4 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-4 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-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-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-3 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-3 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> | |||||
<div id="TeachDeptNo"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ClassPlan"> | |||||
<div class="lr-form-item-title">学分<font face="宋体">*</font></div> | |||||
<input id="StudyScore" type="text" class="form-control" checkexpession="NumOrNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ClassPlan"> | |||||
<div class="lr-form-item-title">备注</div> | |||||
<textarea id="Remark" class="form-control" style="height:100px;"></textarea> | |||||
</div> | |||||
<div class="col-xs-2 lr-form-item" data-table="ClassPlan" style="display: none; "> | |||||
<div class="lr-form-item-title">考核方式码</div> | |||||
<input id="CheckStyleNo" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-2 lr-form-item" data-table="ClassPlan" style="display: none; "> | |||||
<div class="lr-form-item-title">成绩记录方式</div> | |||||
<input id="ScoreRecordStyleNo" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-2 lr-form-item" data-table="ClassPlan" style="display: none; "> | |||||
<div class="lr-form-item-title">审查标记</div> | |||||
<input id="CheckMarkDept" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-2 lr-form-item" data-table="ClassPlan" style="display: none; "> | |||||
<div class="lr-form-item-title">审查标记</div> | |||||
<input id="CheckMark" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-2 lr-form-item" data-table="ClassPlan" style="display: none; "> | |||||
<div class="lr-form-item-title">实践课教室类型</div> | |||||
<input id="ClassroomType" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ClassPlan" style="display: none; "> | |||||
<div class="lr-form-item-title">理论课教室类型</div> | |||||
<input id="ClassroomPracticeType" type="text" class="form-control" /> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ClassPlan/Form.js") |
@@ -0,0 +1,112 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-11-29 11:43 | |||||
* 描 述:开课计划 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#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' }); | |||||
$('#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(); | |||||
$('#LessonNo').lrselect({ | |||||
placeholder: "请选择课程", | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
$('#TeachDeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ClassPlan/GetFormData?keyValue=' + keyValue, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
$('#StuSortNo').val('02'); | |||||
//$('#StudyScore').val('2.0'); | |||||
$('#CheckStyleNo').val('1'); | |||||
$('#ScoreRecordStyleNo').val('1'); | |||||
$('#CheckMark').val('1'); | |||||
$('#ClassroomType').val('1'); | |||||
$('#ClassroomPracticeType').val('99'); | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var nName = $("#LessonNo").find(".lr-select-placeholder").text(); | |||||
var Narray= nName.split("("); | |||||
$("#LessonName").val(Narray[0]); | |||||
var postData = { | |||||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ClassPlan/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,60 @@ | |||||
@{ | |||||
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-12 lr-form-item"> | |||||
<div class="lr-form-item-title">学校</div> | |||||
<div id="F_SchoolId"></div> | |||||
</div> | |||||
<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-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="MajorNo"></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 class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ClassPlan/Index.js") |
@@ -0,0 +1,214 @@ | |||||
/* * 版 本 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 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_shortname' }); | |||||
$('#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' }); | |||||
$('#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(); | |||||
$('#LessonNo').lrselect({ | |||||
placeholder: "请选择课程", | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/EducationalAdministration/ClassPlan/Form', | |||||
width: 800, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/EducationalAdministration/ClassPlan/Form?keyValue=' + keyValue, | |||||
width: 800, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/ClassPlan/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/ClassPlan/GetPageList', | |||||
headData: [ | |||||
{ | |||||
label: "校区", name: "F_SchoolId", width: 200, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', | |||||
key: value, | |||||
keyId: 'f_companyid', | |||||
callback: function (_data) { | |||||
callback(_data['f_fullname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ 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: "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", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||||
key: value, | |||||
keyId: 'id', | |||||
callback: function (_data) { | |||||
callback(_data['majorname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "年级", name: "Grade", width: 50, align: "left" }, | |||||
{ label: "课程名称", name: "LessonName", width: 200, align: "left" }, | |||||
{ 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: 'ID desc', | |||||
isPage: true | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,124 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2019-08-21 17:28 | |||||
/// 描 述:成绩比例设置 | |||||
/// </summary> | |||||
public class ClassPlanBLL : ClassPlanIBLL | |||||
{ | |||||
private ClassPlanService classPlanService = new ClassPlanService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<OpenLessonPlanEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return classPlanService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取OpenLessonPlan表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public OpenLessonPlanEntity GetClassPlanEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return classPlanService.GetClassPlanEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
classPlanService.DeleteEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
/// <returns></returns> | |||||
public void SaveEntity(string keyValue, OpenLessonPlanEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
classPlanService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,48 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2019-08-21 17:28 | |||||
/// 描 述:成绩比例设置 | |||||
/// </summary> | |||||
public interface ClassPlanIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<OpenLessonPlanEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取OpenLessonPlan表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
OpenLessonPlanEntity GetClassPlanEntity(string keyValue); | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
void DeleteEntity(string keyValue); | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
void SaveEntity(string keyValue, OpenLessonPlanEntity entity); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,179 @@ | |||||
using Dapper; | |||||
using Learun.DataBase.Repository; | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Data; | |||||
using System.Linq; | |||||
using System.Text; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-11-29 11:43 | |||||
/// 描 述:开课计划 | |||||
/// </summary> | |||||
public class ClassPlanService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<OpenLessonPlanEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" * "); | |||||
strSql.Append(" FROM OpenLessonPlan t "); | |||||
strSql.Append(" WHERE 1=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 "); | |||||
} | |||||
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> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public OpenLessonPlanEntity GetClassPlanEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<OpenLessonPlanEntity>(keyValue.ToInt()); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
var keyvalue = Convert.ToInt32(keyValue); | |||||
this.BaseRepository("CollegeMIS").Delete<OpenLessonPlanEntity>(t => t.ID == keyvalue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
public void SaveEntity(string keyValue, OpenLessonPlanEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
entity.Modify(keyValue); | |||||
this.BaseRepository("CollegeMIS").Update(entity); | |||||
} | |||||
else | |||||
{ | |||||
entity.Create(); | |||||
this.BaseRepository("CollegeMIS").Insert(entity); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -132,6 +132,9 @@ | |||||
<Compile Include="EducationalAdministration\CertificateResult\CertificateResultEntity.cs" /> | <Compile Include="EducationalAdministration\CertificateResult\CertificateResultEntity.cs" /> | ||||
<Compile Include="EducationalAdministration\CertificateResult\CertificateResultIBLL.cs" /> | <Compile Include="EducationalAdministration\CertificateResult\CertificateResultIBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\CertificateResult\CertificateResultService.cs" /> | <Compile Include="EducationalAdministration\CertificateResult\CertificateResultService.cs" /> | ||||
<Compile Include="EducationalAdministration\ClassPlan\ClassPlanBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\ClassPlan\ClassPlanIBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\ClassPlan\ClassPlanService.cs" /> | |||||
<Compile Include="EducationalAdministration\DispatchAudit\DispatchAuditBLL.cs" /> | <Compile Include="EducationalAdministration\DispatchAudit\DispatchAuditBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\DispatchAudit\DispatchAuditEntity.cs" /> | <Compile Include="EducationalAdministration\DispatchAudit\DispatchAuditEntity.cs" /> | ||||
<Compile Include="EducationalAdministration\DispatchAudit\DispatchAuditIBLL.cs" /> | <Compile Include="EducationalAdministration\DispatchAudit\DispatchAuditIBLL.cs" /> | ||||