From d948b2f566bb76d37812e1704279366e23a7526f Mon Sep 17 00:00:00 2001
From: zhangli <1109134334@qq.com>
Date: Fri, 19 Nov 2021 11:19:00 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AD=A6=E7=94=9F=E5=AD=A6?=
=?UTF-8?q?=E7=B1=8D=E7=AE=A1=E7=90=86--=E5=AD=A6=E7=94=9F=E5=AD=A6?=
=?UTF-8?q?=E6=9C=9F=E6=B3=A8=E5=86=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controllers/StuInfoSemsterController.cs | 133 ++++++++++
.../Views/StuInfoSemster/Form.cshtml | 43 +++
.../Views/StuInfoSemster/Form.js | 38 +++
.../Views/StuInfoSemster/Index.cshtml | 32 +++
.../Views/StuInfoSemster/Index.js | 133 ++++++++++
.../Learun.Application.Web.csproj | 5 +
.../StuInfoSemsterMap.cs | 29 ++
.../Learun.Application.Mapping.csproj | 1 +
.../StuInfoSemster/StuInfoSemsterBLL.cs | 173 ++++++++++++
.../StuInfoSemster/StuInfoSemsterEntity.cs | 92 +++++++
.../StuInfoSemster/StuInfoSemsterIBLL.cs | 62 +++++
.../StuInfoSemster/StuInfoSemsterService.cs | 248 ++++++++++++++++++
.../Learun.Application.TwoDevelopment.csproj | 4 +
13 files changed, 993 insertions(+)
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoSemsterController.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Form.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Form.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Index.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Index.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuInfoSemsterMap.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterEntity.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterIBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterService.cs
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoSemsterController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoSemsterController.cs
new file mode 100644
index 000000000..3bcc1dfe8
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoSemsterController.cs
@@ -0,0 +1,133 @@
+using Learun.Application.TwoDevelopment.EducationalAdministration;
+using Learun.Util;
+using System.Data;
+using System.Web.Mvc;
+
+namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-09-17 11:30
+ /// 描 述:学生学期注册
+ ///
+ public class StuInfoSemsterController : MvcControllerBase
+ {
+ private StuInfoSemsterIBLL stuInfoSemsterIBLL = new StuInfoSemsterBLL();
+
+ #region 视图功能
+
+ ///
+ /// 主页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Index()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Form()
+ {
+ return View();
+ }
+ #endregion
+
+ #region 获取数据
+
+ ///
+ /// 获取列表数据
+ ///
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetList( string queryJson )
+ {
+ var data = stuInfoSemsterIBLL.GetList(queryJson);
+ return Success(data);
+ }
+ ///
+ /// 获取列表分页数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPageList(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = stuInfoSemsterIBLL.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 data = stuInfoSemsterIBLL.GetEntity(keyValue);
+ return Success(data);
+ }
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ stuInfoSemsterIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue,StuInfoSemsterEntity entity)
+ {
+ stuInfoSemsterIBLL.SaveEntity(keyValue, entity);
+ return Success("保存成功!");
+ }
+ #endregion
+
+ #region 扩展数据
+
+ [HttpPost]
+ [AjaxOnly]
+
+ public ActionResult ZhuCe(string keyValue,string status)
+ {
+ stuInfoSemsterIBLL.ZhuCe(keyValue, status);
+ return Success("操作成功!");
+ }
+
+ #endregion
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Form.cshtml
new file mode 100644
index 000000000..2b9592da7
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Form.cshtml
@@ -0,0 +1,43 @@
+@{
+ ViewBag.Title = "学生学期注册";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuInfoSemster/Form.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Form.js
new file mode 100644
index 000000000..f2c05ff5e
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Form.js
@@ -0,0 +1,38 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2021-09-17 11:30
+ * 描 述:学生学期注册
+ */
+var acceptClick;
+var keyValue = request('keyValue');
+var bootstrap = function ($, learun) {
+ "use strict";
+ var selectedRow = learun.frameTab.currentIframe().selectedRow;
+ var page = {
+ init: function () {
+ page.initData();
+ },
+ bind: function () {
+ },
+ initData: function () {
+ if (!!selectedRow) {
+ $('#form').lrSetFormData(selectedRow);
+ }
+ }
+ };
+ // 保存数据
+ acceptClick = function (callBack) {
+ if (!$('#form').lrValidform()) {
+ return false;
+ }
+ var postData = $('#form').lrGetFormData();
+ $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuInfoSemster/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // 保存成功后才回调
+ if (!!callBack) {
+ callBack();
+ }
+ });
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Index.cshtml
new file mode 100644
index 000000000..cc41b88b9
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Index.cshtml
@@ -0,0 +1,32 @@
+@{
+ ViewBag.Title = "学生学期注册";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuInfoSemster/Index.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Index.js
new file mode 100644
index 000000000..54488a981
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Index.js
@@ -0,0 +1,133 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2021-09-17 11:30
+ * 描 述:学生学期注册
+ */
+var selectedRow;
+var refreshGirdData;
+var bootstrap = function ($, learun) {
+ "use strict";
+ var page = {
+ init: function () {
+ page.initGird();
+ page.bind();
+ },
+ bind: function () {
+ // 查询
+ $('#btn_Search').on('click', function () {
+ var keyword = $('#txt_Keyword').val();
+ page.search({ keyword: keyword });
+ });
+ // 刷新
+ $('#lr_refresh').on('click', function () {
+ location.reload();
+ });
+ // 新增
+ $('#lr_add').on('click', function () {
+ selectedRow = null;
+ learun.layerForm({
+ id: 'form',
+ title: '新增',
+ url: top.$.rootUrl + '/EducationalAdministration/StuInfoSemster/Form',
+ width: 700,
+ height: 400,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ });
+ // 编辑
+ $('#lr_edit').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('StuId');
+ selectedRow = $('#gridtable').jfGridGet('rowdata');
+ if (learun.checkrow(keyValue)) {
+ learun.layerForm({
+ id: 'form',
+ title: '编辑',
+ url: top.$.rootUrl + '/EducationalAdministration/StuInfoSemster/Form?keyValue=' + keyValue,
+ width: 700,
+ height: 400,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ }
+ });
+ // 删除
+ $('#lr_delete').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('StuId');
+ if (learun.checkrow(keyValue)) {
+ learun.layerConfirm('是否确认删除该项!', function (res) {
+ if (res) {
+ learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuInfoSemster/DeleteForm', { keyValue: keyValue }, function () {
+ });
+ }
+ });
+ }
+ });
+ //注册
+ $('#lr_zhuce').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('StuId');
+ console.log(keyValue)
+ if (learun.checkrow(keyValue)) {
+ learun.layerConfirm('是否确认注册该项!', function (res) {
+ if (res) {
+ learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoSemster/Zhuce', { keyValue: keyValue, status: "1" }, function () {
+ refreshGirdData();
+ });
+ }
+ });
+ }
+ });
+ //取消注册
+ $('#lr_cancel').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('StuId');
+ if (learun.checkrow(keyValue)) {
+ learun.layerConfirm('是否确认取消注册该项!', function (res) {
+ if (res) {
+ learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoSemster/Zhuce', { keyValue: keyValue, status: "0" }, function () {
+ refreshGirdData();
+ });
+ }
+ });
+ }
+ });
+
+
+ },
+ initGird: function () {
+ $('#gridtable').lrAuthorizeJfGrid({
+ url: top.$.rootUrl + '/EducationalAdministration/StuInfoSemster/GetPageList',
+ headData: [
+ { label: '学号', name: 'StuNo', width: 200, align: "left" },
+ { label: '姓名', name: 'StuName', width: 200, align: "left" },
+ { label: '专业', name: 'MajorNo', width: 200, align: "left" },
+ { label: '班级', name: 'ClassNo', width: 200, align: "left" },
+ { label: '学年', name: 'AcademicYearNo', width: 200, align: "left" },
+ { label: '学期', name: 'Semester', width: 200, align: "left" },
+ {
+ label: '注册状态', name: 'Status', width: 100, align: "left",
+ formatter: function (cellvalue) {
+ return cellvalue == "1" ? "已注册"
+ : "未注册";
+ }
+ },
+ { label: '注册时间', name: 'TIME', width: 200, align: "left" },
+ ],
+ mainId: 'StuId',
+ isMultiselect: true,//复选框
+ 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 1e84d69e5..ff7765685 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
@@ -332,6 +332,7 @@
+
@@ -1037,6 +1038,8 @@
+
+
@@ -7418,6 +7421,8 @@
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuInfoSemsterMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuInfoSemsterMap.cs
new file mode 100644
index 000000000..8b779d905
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuInfoSemsterMap.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-09-17 11:30
+ /// 描 述:学生学期注册
+ ///
+ public class StuInfoSemsterMap : EntityTypeConfiguration
+ {
+ public StuInfoSemsterMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("STUINFOSEMSTER");
+ //主键
+ this.HasKey(t => t.StuId);
+ #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 f26dcfc18..10fe1be92 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
@@ -88,6 +88,7 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterBLL.cs
new file mode 100644
index 000000000..006cd46d7
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterBLL.cs
@@ -0,0 +1,173 @@
+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-09-17 11:30
+ /// 描 述:学生学期注册
+ ///
+ public class StuInfoSemsterBLL : StuInfoSemsterIBLL
+ {
+ private StuInfoSemsterService stuInfoSemsterService = new StuInfoSemsterService();
+
+ #region 获取数据
+
+ ///
+ /// 获取列表数据
+ ///
+ /// 查询参数
+ ///
+ public IEnumerable GetList( string queryJson )
+ {
+ try
+ {
+ return stuInfoSemsterService.GetList(queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取列表分页数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ return stuInfoSemsterService.GetPageList(pagination, queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取实体数据
+ ///
+ /// 主键
+ ///
+ public StuInfoSemsterEntity GetEntity(string keyValue)
+ {
+ try
+ {
+ return stuInfoSemsterService.GetEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ stuInfoSemsterService.DeleteEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ public void SaveEntity(string keyValue, StuInfoSemsterEntity entity)
+ {
+ try
+ {
+ stuInfoSemsterService.SaveEntity(keyValue, entity);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 扩展数据
+ ///
+ /// 注册 and 取消注册
+ ///
+ /// 主键
+ /// 实体
+ public void ZhuCe(string keyValue, string status)
+ {
+ try
+ {
+ stuInfoSemsterService.ZhuCe(keyValue, status);
+ }
+ 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/StuInfoSemster/StuInfoSemsterEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterEntity.cs
new file mode 100644
index 000000000..e7ef82587
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterEntity.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-09-17 11:30
+ /// 描 述:学生学期注册
+ ///
+ public class StuInfoSemsterEntity
+ {
+ #region 实体成员
+ ///
+ /// 主键
+ ///
+ ///
+ [Column("STUID")]
+ public string StuId { get; set; }
+ ///
+ /// 学号
+ ///
+ ///
+ [Column("STUNO")]
+ public string StuNo { get; set; }
+ ///
+ /// 姓名
+ ///
+ ///
+ [Column("STUNAME")]
+ public string StuName { get; set; }
+ ///
+ /// 专业
+ ///
+ ///
+ [Column("MAJORNO")]
+ public string MajorNo { get; set; }
+ ///
+ /// 班级
+ ///
+ ///
+ [Column("CLASSNO")]
+ public string ClassNo { get; set; }
+ ///
+ /// 学年
+ ///
+ ///
+ [Column("ACADEMICYEARNO")]
+ public string AcademicYearNo { get; set; }
+ ///
+ /// 学期
+ ///
+ ///
+ [Column("SEMESTER")]
+ public string Semester { get; set; }
+ ///
+ /// 注册状态
+ ///
+ ///
+ [Column("STATUS")]
+ public string Status { get; set; }
+ ///
+ /// TIME
+ ///
+ ///
+ [Column("TIME")]
+ public DateTime? TIME { get; set; }
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.StuId = Guid.NewGuid().ToString();
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.StuId = keyValue;
+ }
+ #endregion
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterIBLL.cs
new file mode 100644
index 000000000..036a4cecb
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterIBLL.cs
@@ -0,0 +1,62 @@
+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-09-17 11:30
+ /// 描 述:学生学期注册
+ ///
+ public interface StuInfoSemsterIBLL
+ {
+ #region 获取数据
+
+ ///
+ /// 获取列表数据
+ ///
+ /// 查询参数
+ ///
+ IEnumerable GetList( string queryJson );
+ ///
+ /// 获取列表分页数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ IEnumerable GetPageList(Pagination pagination, string queryJson);
+ ///
+ /// 获取实体数据
+ ///
+ /// 主键
+ ///
+ StuInfoSemsterEntity GetEntity(string keyValue);
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ void DeleteEntity(string keyValue);
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ void SaveEntity(string keyValue, StuInfoSemsterEntity entity);
+ #endregion
+
+
+ #region 扩展数据
+ /// 注册
+ ///
+ /// 主键
+ void ZhuCe(string keyValue, string status);
+ #endregion
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterService.cs
new file mode 100644
index 000000000..f3eb212b3
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterService.cs
@@ -0,0 +1,248 @@
+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-09-17 11:30
+ /// 描 述:学生学期注册
+ ///
+ public class StuInfoSemsterService : RepositoryFactory
+ {
+ #region 构造函数和属性
+
+ private string fieldSql;
+ ///
+ /// 构造方法
+ ///
+ public StuInfoSemsterService()
+ {
+ fieldSql = @"
+ t.StuId,
+ t.StuNo,
+ t.StuName,
+ t.MajorNo,
+ t.ClassNo,
+ t.AcademicYearNo,
+ t.Semester,
+ t.Status,
+ t.TIME
+ ";
+ }
+ #endregion
+
+ #region 获取数据
+
+ ///
+ /// 获取列表数据
+ ///
+ /// 条件参数
+ ///
+ public IEnumerable GetList(string queryJson)
+ {
+ try
+ {
+ //参考写法
+ //var queryParam = queryJson.ToJObject();
+ // 虚拟参数
+ //var dp = new DynamicParameters(new { });
+ //dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT ");
+ strSql.Append(fieldSql);
+ strSql.Append(" FROM StuInfoSemster t ");
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString());
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取列表分页数据
+ ///
+ /// 分页参数
+ /// 条件参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT ");
+ strSql.Append(fieldSql);
+ strSql.Append(" FROM StuInfoSemster t ");
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), pagination);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取实体数据
+ ///
+ /// 主键
+ ///
+ public StuInfoSemsterEntity GetEntity(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.StuId == keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ /// 主键
+ /// 实体
+ ///
+ public void SaveEntity(string keyValue, StuInfoSemsterEntity 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
+
+
+ #region 扩展数据
+ /// 注册
+ ///
+ /// 主键
+ public void ZhuCe(string keyValue, string status)
+ {
+ var db = BaseRepository("CollegeMIS").BeginTrans();
+ try
+ {
+ List Ids = keyValue.Split(',').ToList();
+ List StuInfoEntity = new List();
+ if (status == "1")
+ {
+ foreach (var item in Ids)
+ {
+ var list = this.BaseRepository("CollegeMIS").FindEntity(x => x.StuId == item);
+ if (list != null)
+ {
+ list.Status = "1";
+ list.TIME = DateTime.Now;
+ StuInfoEntity.Add(list);
+ }
+ }
+ }
+ else
+ {
+ foreach (var item in Ids)
+ {
+ var list = this.BaseRepository("CollegeMIS").FindEntity(x => x.StuId == item);
+ if (list != null)
+ {
+ list.Status = "0";
+ list.TIME = null;
+ StuInfoEntity.Add(list);
+ }
+ }
+ }
+ db.Update(StuInfoEntity);
+ db.Commit();
+ }
+ 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 0bc770897..49cb1fbb0 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
@@ -192,6 +192,10 @@
+
+
+
+