+
-
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Index.js
index 29b3cccc8..f3e352ba6 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Index.js
@@ -79,12 +79,80 @@ var bootstrap = function ($, learun) {
});
}
});
+
+ //提交
+ $('#lr_submit').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ if (learun.checkrow(keyValue)) {
+ var Status = $('#gridtable').jfGridValue('Status');
+ if (Status != 0) {
+ return learun.alert.warning('只有草稿状态才可提交!');
+ }
+ learun.layerConfirm('是否确认提交该项!', function (res) {
+ if (res) {
+ learun.postForm(top.$.rootUrl + '/EducationalAdministration/EATalentTrain/UpdateStatus', { keyValue: keyValue, Status: 1 }, function () {
+ refreshGirdData();
+ });
+ }
+ });
+ }
+ });
+ //审核通过
+ $('#lr_check').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ if (learun.checkrow(keyValue)) {
+ var Status = $('#gridtable').jfGridValue('Status');
+ if (Status == 0) {
+ return learun.alert.warning('请先提交!');
+ }
+ learun.layerConfirm('是否确认审核通过该项!', function (res) {
+ if (res) {
+ learun.postForm(top.$.rootUrl + '/EducationalAdministration/EATalentTrain/UpdateStatus', { keyValue: keyValue, Status: 2 }, function () {
+ refreshGirdData();
+ });
+ }
+ });
+ }
+ });
+ //审核不通过
+ $('#lr_nocheck').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ if (learun.checkrow(keyValue)) {
+ var Status = $('#gridtable').jfGridValue('Status');
+ if (Status == 0) {
+ return learun.alert.warning('请先提交!');
+ }
+ learun.layerConfirm('是否确认审核不通过该项!', function (res) {
+ if (res) {
+ learun.postForm(top.$.rootUrl + '/EducationalAdministration/EATalentTrain/UpdateStatus', { keyValue: keyValue, Status: 3 }, function () {
+ refreshGirdData();
+ });
+ }
+ });
+ }
+ });
},
// 初始化列表
initGird: function () {
- $('#gridtable').lrAuthorizeJfGrid({
+ $('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/EATalentTrain/GetPageList',
headData: [
+ { label: "方案名称", name: "Name", width: 150, align: "left" },
+ {
+ label: "状态", name: "Status", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ if (cellvalue == 0) {
+ return '
草稿';
+ } else if (cellvalue == 1) {
+ return "
待审核";
+ } else if (cellvalue == 2) {
+ return "
审核通过";
+ } else {
+ return "
未通过";
+ }
+
+ }
+ },
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" },
{ label: "学期", name: "Semester", width: 100, align: "left" },
{
@@ -102,6 +170,24 @@ var bootstrap = function ($, learun) {
},
{ label: "入学要求", name: "EntranceRequire", width: 150, align: "left" },
{ label: "修业年限", name: "YearLimit", width: 100, align: "left" },
+ { label: "计划招生人数", name: "PlannedNum", width: 100, align: "left" },
+ {
+ label: "计划教学课程", name: "PlannedCourse", width: 100, align: "left",
+ formatterAsync: function (callback, value, row, op, $cell) {
+ learun.clientdata.getAsync('custmerData', {
+ url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo',
+ key: value,
+ keyId: 'lessonid',
+ callback: function (_data) {
+ callback(_data['lessonname']);
+ }
+ });
+ }
+ },
+ { label: "就业领域", name: "EmploymentField", width: 100, align: "left" },
+ { label: "教学条件", name: "TeachingCondition", width: 100, align: "left" },
+ { label: "教学资源", name: "TeachingResource", width: 100, align: "left" },
+ { label: "培养目标", name: "TrainingObjectives", width: 100, align: "left" },
],
mainId: 'Id',
isPage: true
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainBLL.cs
index 19865e458..00a2a4c2f 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainBLL.cs
@@ -93,7 +93,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}
-
+ ///
+ /// 修改状态
+ ///
+ ///
主键
+ public void UpdateStatus(string keyValue, int Status)
+ {
+ try
+ {
+ eATalentTrainService.UpdateStatus(keyValue, Status);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
///
/// 保存实体数据(新增、修改)
///
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainEntity.cs
index 9115d5275..9c61b788b 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainEntity.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainEntity.cs
@@ -20,6 +20,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
[Column("ID")]
public string Id { get; set; }
///
+ /// 方案名称
+ ///
+ [Column("NAME")]
+ public string Name { get; set; }
+ ///
/// 学年
///
[Column("ACADEMICYEARNO")]
@@ -54,6 +59,44 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
///
[Column("REMARK")]
public string Remark { get; set; }
+
+ ///
+ /// 计划招生人数
+ ///
+ [Column("PLANNEDNUM")]
+ public int? PlannedNum { get; set; }
+ ///
+ /// 计划教学课程
+ ///
+ [Column("PLANNEDCOURSE")]
+ public string PlannedCourse { get; set; }
+ ///
+ /// 就业领域
+ ///
+ [Column("EMPLOYMENTFIELD")]
+ public string EmploymentField { get; set; }
+ ///
+ /// 教学条件
+ ///
+ [Column("TEACHINGCONDITION")]
+ public string TeachingCondition { get; set; }
+ ///
+ /// 教学资源
+ ///
+ [Column("TEACHINGRESOURCE")]
+ public string TeachingResource { get; set; }
+ ///
+ /// 培养目标
+ ///
+ [Column("TRAININGOBJECTIVES")]
+ public string TrainingObjectives { get; set; }
+
+ ///
+ /// 状态
+ ///
+ [Column("STATUS")]
+ public int? Status { get; set; }
+
#endregion
#region 扩展操作
@@ -63,6 +106,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
public void Create()
{
this.Id = Guid.NewGuid().ToString();
+ this.Status = 0;
}
///
/// 编辑调用
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainIBLL.cs
index df57227cc..ddff805fb 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainIBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainIBLL.cs
@@ -36,6 +36,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
///
///
主键
void DeleteEntity(string keyValue);
+ void UpdateStatus(string keyValue, int Status);
///
/// 保存实体数据(新增、修改)
///
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainService.cs
index 5821ff074..678c2df73 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainService.cs
@@ -38,20 +38,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
var dp = new DynamicParameters(new { });
if (!queryParam["AcademicYearNo"].IsEmpty())
{
- dp.Add("AcademicYearNo",queryParam["AcademicYearNo"].ToString(), DbType.String);
+ 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);
+ dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String);
strSql.Append(" AND t.Semester = @Semester ");
}
if (!queryParam["MajorNo"].IsEmpty())
{
- dp.Add("MajorNo",queryParam["MajorNo"].ToString(), DbType.String);
+ dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
strSql.Append(" AND t.MajorNo = @MajorNo ");
}
- return this.BaseRepository("CollegeMIS").FindList
(strSql.ToString(),dp, pagination);
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
@@ -102,7 +102,27 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
try
{
- this.BaseRepository("CollegeMIS").Delete(t=>t.Id == keyValue);
+ this.BaseRepository("CollegeMIS").Delete(t => t.Id == keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ public void UpdateStatus(string keyValue, int Status)
+ {
+ try
+ {
+ string sql = $"update EATalentTrain set Status={Status} where Id='{keyValue}'";
+ this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
}
catch (Exception ex)
{
From e3c70d6c2c7a1bad3d7b9ac33af0673db0158742 Mon Sep 17 00:00:00 2001
From: zhangli <1109134334@qq.com>
Date: Thu, 14 Oct 2021 16:03:17 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E6=95=99=E5=AD=A6=E8=AE=A1=E5=88=92?=
=?UTF-8?q?=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controllers/TeachingPlanController.cs | 117 +++++++++++++
.../Views/TeachingPlan/Form.cshtml | 35 ++++
.../Views/TeachingPlan/Form.js | 64 +++++++
.../Views/TeachingPlan/Index.cshtml | 37 +++++
.../Views/TeachingPlan/Index.js | 116 +++++++++++++
.../Learun.Application.Web.csproj | 5 +
.../TeachingPlanMap.cs | 29 ++++
.../Learun.Application.Mapping.csproj | 1 +
.../TeachingPlan/TeachingPlanBLL.cs | 125 ++++++++++++++
.../TeachingPlan/TeachingPlanEntity.cs | 92 +++++++++++
.../TeachingPlan/TeachingPlanIBLL.cs | 48 ++++++
.../TeachingPlan/TeachingPlanService.cs | 156 ++++++++++++++++++
.../Learun.Application.TwoDevelopment.csproj | 4 +
13 files changed, 829 insertions(+)
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TeachingPlanController.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/Form.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/Form.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/Index.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/Index.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TeachingPlanMap.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanEntity.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanIBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanService.cs
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TeachingPlanController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TeachingPlanController.cs
new file mode 100644
index 000000000..496b45072
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TeachingPlanController.cs
@@ -0,0 +1,117 @@
+using Learun.Util;
+using System.Data;
+using Learun.Application.TwoDevelopment.EducationalAdministration;
+using System.Web.Mvc;
+using System.Collections.Generic;
+
+namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-10-14 10:09
+ /// 描 述:教学计划
+ ///
+ public class TeachingPlanController : MvcControllerBase
+ {
+ private TeachingPlanIBLL teachingPlanIBLL = new TeachingPlanBLL();
+
+ #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 = teachingPlanIBLL.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 TeachingPlanData = teachingPlanIBLL.GetTeachingPlanEntity( keyValue );
+ var jsonData = new {
+ TeachingPlan = TeachingPlanData,
+ };
+ return Success(jsonData);
+ }
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ teachingPlanIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity)
+ {
+ TeachingPlanEntity entity = strEntity.ToObject();
+ teachingPlanIBLL.SaveEntity(keyValue,entity);
+ if (string.IsNullOrEmpty(keyValue))
+ {
+ }
+ return Success("保存成功!");
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/Form.cshtml
new file mode 100644
index 000000000..c832193e6
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/Form.cshtml
@@ -0,0 +1,35 @@
+@{
+ ViewBag.Title = "教学计划";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TeachingPlan/Form.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/Form.js
new file mode 100644
index 000000000..12d802aae
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/Form.js
@@ -0,0 +1,64 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2021-10-14 10:09
+ * 描 述:教学计划
+ */
+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 () {
+ //学年
+ $('#Grade').lrselect({
+ placeholder: "请选择学年",
+ allowSearch: true,
+ url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
+ value: 'value',
+ text: 'text'
+ });
+
+ $('#Major').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'id',text: 'majorname' });
+ $('#Enabled').lrRadioCheckbox({
+ type: 'radio',
+ code: 'YesOrNoBit',
+ });
+ },
+ initData: function () {
+ if (!!keyValue) {
+ $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TeachingPlan/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]);
+ }
+ }
+ });
+ }
+ }
+ };
+ // 保存数据
+ acceptClick = function (callBack) {
+ if (!$('body').lrValidform()) {
+ return false;
+ }
+ var postData = {
+ strEntity: JSON.stringify($('body').lrGetFormData())
+ };
+ $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TeachingPlan/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // 保存成功后才回调
+ if (!!callBack) {
+ callBack();
+ }
+ });
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/Index.cshtml
new file mode 100644
index 000000000..3de085ccb
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/Index.cshtml
@@ -0,0 +1,37 @@
+@{
+ ViewBag.Title = "教学计划";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TeachingPlan/Index.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/Index.js
new file mode 100644
index 000000000..3b32b6d54
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingPlan/Index.js
@@ -0,0 +1,116 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2021-10-14 10:09
+ * 描 述:教学计划
+ */
+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);
+ }, 220, 400);
+ // 刷新
+ $('#lr_refresh').on('click', function () {
+ location.reload();
+ });
+ // 新增
+ $('#lr_add').on('click', function () {
+ learun.layerForm({
+ id: 'form',
+ title: '新增',
+ url: top.$.rootUrl + '/EducationalAdministration/TeachingPlan/Form',
+ width: 600,
+ 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/TeachingPlan/Form?keyValue=' + keyValue,
+ width: 600,
+ 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/TeachingPlan/DeleteForm', { keyValue: keyValue }, function () {
+ refreshGirdData();
+ });
+ }
+ });
+ }
+ });
+ // 打印
+ $('#lr_print').on('click', function () {
+ $('#gridtable').jqprintTable();
+ });
+ },
+ // 初始化列表
+ initGird: function () {
+ $('#gridtable').lrAuthorizeJfGrid({
+ url: top.$.rootUrl + '/EducationalAdministration/TeachingPlan/GetPageList',
+ headData: [
+ { label: "名称", name: "Name", width: 100, align: "left" },
+ { label: "学年", name: "Grade", width: 100, align: "left" },
+ {
+ label: "专业", name: "Major", 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: "SchoolSystem", width: 100, align: "left" },
+ { label: "总学分", name: "Credit", width: 100, align: "left" },
+ {
+ label: "状态", name: "Enabled", width: 100, align: "left",
+ formatter: function (value, row) {
+ return value == 1
+ ? "启用"
+ : "禁用";
+ }
+ },
+ { label: "备注", name: "Remark", width: 100, align: "left" },
+ ],
+ mainId: 'Id',
+ 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.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
index 6a10909b0..805a4dd86 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
@@ -814,6 +814,7 @@
+
@@ -6399,6 +6400,10 @@
+
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TeachingPlanMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TeachingPlanMap.cs
new file mode 100644
index 000000000..03d269156
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TeachingPlanMap.cs
@@ -0,0 +1,29 @@
+using Learun.Application.TwoDevelopment.EducationalAdministration;
+using System.Data.Entity.ModelConfiguration;
+
+namespace Learun.Application.Mapping
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-10-14 10:09
+ /// 描 述:教学计划
+ ///
+ public class TeachingPlanMap : EntityTypeConfiguration
+ {
+ public TeachingPlanMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("TEACHINGPLAN");
+ //主键
+ this.HasKey(t => t.Id);
+ #endregion
+
+ #region 配置关系
+ #endregion
+ }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
index e805167ae..37d206f10 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
@@ -564,6 +564,7 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanBLL.cs
new file mode 100644
index 000000000..98506831d
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanBLL.cs
@@ -0,0 +1,125 @@
+using Learun.Util;
+using System;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-10-14 10:09
+ /// 描 述:教学计划
+ ///
+ public class TeachingPlanBLL : TeachingPlanIBLL
+ {
+ private TeachingPlanService teachingPlanService = new TeachingPlanService();
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ return teachingPlanService.GetPageList(pagination, queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取TeachingPlan表实体数据
+ ///
+ /// 主键
+ ///
+ public TeachingPlanEntity GetTeachingPlanEntity(string keyValue)
+ {
+ try
+ {
+ return teachingPlanService.GetTeachingPlanEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ teachingPlanService.DeleteEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ public void SaveEntity(string keyValue, TeachingPlanEntity entity)
+ {
+ try
+ {
+ teachingPlanService.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/TeachingPlan/TeachingPlanEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanEntity.cs
new file mode 100644
index 000000000..97c455591
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanEntity.cs
@@ -0,0 +1,92 @@
+using Learun.Util;
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-10-14 10:09
+ /// 描 述:教学计划
+ ///
+ public class TeachingPlanEntity
+ {
+ #region 实体成员
+ ///
+ /// 主键
+ ///
+ [Column("ID")]
+ public string Id { get; set; }
+ ///
+ /// 名称
+ ///
+ [Column("NAME")]
+ public string Name { get; set; }
+ ///
+ /// 年级
+ ///
+ [Column("GRADE")]
+ public string Grade { get; set; }
+ ///
+ /// 专业
+ ///
+ [Column("MAJOR")]
+ public string Major { get; set; }
+ ///
+ /// 学制
+ ///
+ [Column("SCHOOLSYSTEM")]
+ public string SchoolSystem { get; set; }
+ ///
+ /// 总学分
+ ///
+ [Column("CREDIT")]
+ public string Credit { get; set; }
+ ///
+ /// 备注
+ ///
+ [Column("REMARK")]
+ public string Remark { get; set; }
+ ///
+ /// 禁用 启用
+ ///
+ [Column("ENABLED")]
+ public bool? Enabled { get; set; }
+ ///
+ /// CreateUserId
+ ///
+ [Column("CREATEUSERID")]
+ public string CreateUserId { get; set; }
+ ///
+ /// CreateTime
+ ///
+ [Column("CREATETIME")]
+ public DateTime? CreateTime { get; set; }
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.Id = Guid.NewGuid().ToString();
+ this.CreateTime = DateTime.Now;
+ this.CreateUserId = LoginUserInfo.Get().userId;
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.Id = keyValue;
+ }
+ #endregion
+ #region 扩展字段
+ #endregion
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanIBLL.cs
new file mode 100644
index 000000000..0a53b8516
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanIBLL.cs
@@ -0,0 +1,48 @@
+using Learun.Util;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-10-14 10:09
+ /// 描 述:教学计划
+ ///
+ public interface TeachingPlanIBLL
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ IEnumerable GetPageList(Pagination pagination, string queryJson);
+ ///
+ /// 获取TeachingPlan表实体数据
+ ///
+ /// 主键
+ ///
+ TeachingPlanEntity GetTeachingPlanEntity(string keyValue);
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ void DeleteEntity(string keyValue);
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ void SaveEntity(string keyValue, TeachingPlanEntity entity);
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanService.cs
new file mode 100644
index 000000000..dfed969c7
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingPlan/TeachingPlanService.cs
@@ -0,0 +1,156 @@
+using Dapper;
+using Learun.DataBase.Repository;
+using Learun.Util;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Text;
+
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-10-14 10:09
+ /// 描 述:教学计划
+ ///
+ public class TeachingPlanService : RepositoryFactory
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT ");
+ strSql.Append(@"
+ t.Id,
+ t.Name,
+ t.Grade,
+ t.Major,
+ t.SchoolSystem,
+ t.Credit,
+ t.Enabled,
+ t.Remark
+ ");
+ strSql.Append(" FROM TeachingPlan t ");
+ strSql.Append(" WHERE 1=1 ");
+ var queryParam = queryJson.ToJObject();
+ // 虚拟参数
+ var dp = new DynamicParameters(new { });
+ if (!queryParam["Name"].IsEmpty())
+ {
+ dp.Add("Name", "%" + queryParam["Name"].ToString() + "%", DbType.String);
+ strSql.Append(" AND t.Name Like @Name ");
+ }
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取TeachingPlan表实体数据
+ ///
+ /// 主键
+ ///
+ public TeachingPlanEntity GetTeachingPlanEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ 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, TeachingPlanEntity 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 290f5accc..00d0f901d 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
@@ -1674,6 +1674,10 @@
+
+
+
+