diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs
new file mode 100644
index 000000000..247825127
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs
@@ -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
+{
+ ///
+ /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
+ /// Copyright (c) 2013-2018 北京泉江科技有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2019-08-21 17:28
+ /// 描 述:成绩比例设置
+ ///
+ public class ClassPlanController : MvcControllerBase
+ {
+ private ClassPlanIBLL classPlanIBLL = new ClassPlanBLL();
+
+ #region 视图功能
+
+ ///
+ /// 主页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Index()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Form()
+ {
+ return View();
+ }
+ #endregion
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPageList(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = classPlanIBLL.GetPageList(paginationobj, queryJson);
+ var jsonData = new
+ {
+ rows = data,
+ total = paginationobj.total,
+ page = paginationobj.page,
+ records = paginationobj.records
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ /// 主键
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormData(string keyValue)
+ {
+ var ClassPlanData = classPlanIBLL.GetClassPlanEntity(keyValue);
+ var jsonData = new
+ {
+ ClassPlan = ClassPlanData,
+ };
+ return Success(jsonData);
+ }
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ classPlanIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity)
+ {
+ OpenLessonPlanEntity entity = strEntity.ToObject();
+ if (!string.IsNullOrEmpty(keyValue))
+ {
+ entity.AmendDate = DateTime.Now;
+ }
+ entity.MakeDate = DateTime.Now;
+ classPlanIBLL.SaveEntity(keyValue, entity);
+
+ return Success("保存成功!");
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.cshtml
new file mode 100644
index 000000000..0cc1700b6
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.cshtml
@@ -0,0 +1,112 @@
+@{
+ ViewBag.Title = "开课计划";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ClassPlan/Form.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js
new file mode 100644
index 000000000..ad3e1b680
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.cshtml
new file mode 100644
index 000000000..a2de08dec
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.cshtml
@@ -0,0 +1,60 @@
+@{
+ ViewBag.Title = "开课计划";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ClassPlan/Index.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js
new file mode 100644
index 000000000..c6ffa3037
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanBLL.cs
new file mode 100644
index 000000000..1489602ef
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanBLL.cs
@@ -0,0 +1,124 @@
+using Learun.Util;
+using System;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+{
+ ///
+ /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
+ /// Copyright (c) 2013-2018 北京泉江科技有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2019-08-21 17:28
+ /// 描 述:成绩比例设置
+ ///
+ public class ClassPlanBLL : ClassPlanIBLL
+ {
+ private ClassPlanService classPlanService = new ClassPlanService();
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ return classPlanService.GetPageList(pagination, queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取OpenLessonPlan表实体数据
+ ///
+ /// 主键
+ ///
+ 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 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ classPlanService.DeleteEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ 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
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanIBLL.cs
new file mode 100644
index 000000000..6ba71a1e2
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanIBLL.cs
@@ -0,0 +1,48 @@
+using Learun.Util;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+{
+ ///
+ /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
+ /// Copyright (c) 2013-2018 北京泉江科技有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2019-08-21 17:28
+ /// 描 述:成绩比例设置
+ ///
+ public interface ClassPlanIBLL
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ IEnumerable GetPageList(Pagination pagination, string queryJson);
+ ///
+ /// 获取OpenLessonPlan表实体数据
+ ///
+ /// 主键
+ ///
+ OpenLessonPlanEntity GetClassPlanEntity(string keyValue);
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ void DeleteEntity(string keyValue);
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ void SaveEntity(string keyValue, OpenLessonPlanEntity entity);
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanService.cs
new file mode 100644
index 000000000..184b03de9
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassPlan/ClassPlanService.cs
@@ -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
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-11-29 11:43
+ /// 描 述:开课计划
+ ///
+ public class ClassPlanService : RepositoryFactory
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ /// 查询参数
+ ///
+ public IEnumerable 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(strSql.ToString(), dp, pagination);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取OpenLessonPlan表实体数据
+ ///
+ /// 主键
+ ///
+ public OpenLessonPlanEntity GetClassPlanEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(keyValue.ToInt());
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ var keyvalue = Convert.ToInt32(keyValue);
+ this.BaseRepository("CollegeMIS").Delete(t => t.ID == keyvalue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ 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
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
index 302c06ac5..44cba7040 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
@@ -132,6 +132,9 @@
+
+
+