edy 3 лет назад
Родитель
Сommit
31c9fb3ef6
14 измененных файлов: 5802 добавлений и 3826 удалений
  1. +134
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoSemsterController.cs
  2. +47
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Form.cshtml
  3. +38
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Form.js
  4. +31
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Index.cshtml
  5. +97
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Index.js
  6. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  7. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuInfoSemsterMap.cs
  8. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  9. +4853
    -3826
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM
  10. +170
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterBLL.cs
  11. +98
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterEntity.cs
  12. +61
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterIBLL.cs
  13. +234
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterService.cs
  14. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj

+ 134
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoSemsterController.cs Просмотреть файл

@@ -0,0 +1,134 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using Learun.Util;
using System.Data;
using System.Web.Mvc;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-09 11:43
/// 描 述:学生学期注册
/// </summary>
public class StuInfoSemsterController : MvcControllerBase
{
private StuInfoSemsterIBLL stuInfoSemsterIBLL = new StuInfoSemsterBLL();

#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="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetList(string queryJson)
{
var data = stuInfoSemsterIBLL.GetList(queryJson);
return Success(data);
}
/// <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 = stuInfoSemsterIBLL.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 data = stuInfoSemsterIBLL.GetEntity(keyValue);
return Success(data);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
stuInfoSemsterIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, StuInfoSemsterEntity entity)
{
stuInfoSemsterIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}

/// <summary>
/// 注册
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DoZhuce(string keyValue, string status)
{
stuInfoSemsterIBLL.DoZhuce(keyValue, status);
return Success("操作成功!");
}
#endregion

}
}

+ 47
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Form.cshtml Просмотреть файл

@@ -0,0 +1,47 @@
@{
ViewBag.Title = "学生学期注册";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">主键<font face="宋体">*</font></div>
<input id="StuId" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学号<font face="宋体">*</font></div>
<input id="StuNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">姓名<font face="宋体">*</font></div>
<input id="StuName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">系<font face="宋体">*</font></div>
<input id="DeptNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">专业<font face="宋体">*</font></div>
<input id="MajorNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">班级<font face="宋体">*</font></div>
<input id="ClassNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学年<font face="宋体">*</font></div>
<input id="AcademicYearNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学期<font face="宋体">*</font></div>
<input id="Semester" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">注册状态<font face="宋体">*</font></div>
<input id="Status" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">注册时间<font face="宋体">*</font></div>
<input id="Time" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuInfoSemster/Form.js")

+ 38
- 0
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-06-09 11:43
* 描 述:学生学期注册
*/
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();
}

+ 31
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Index.cshtml Просмотреть файл

@@ -0,0 +1,31 @@
@{
ViewBag.Title = "学生学期注册";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout" id="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">
<input id="txt_Keyword" type="text" class="form-control" placeholder="请输入要查询关键字" />
</div>
<div class="lr-layout-tool-item">
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i>&nbsp;查询</a>
</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_zhuce" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;注册</a>
<a id="lr_cancelZhuce" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;取消注册</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuInfoSemster/Index.js")

+ 97
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Index.js Просмотреть файл

@@ -0,0 +1,97 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-09 11:43
* 描 述:学生学期注册
*/
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_zhuce').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('StuId');
if (learun.checkrow(keyValue)) {
var CheckStatus = $('#gridtable').jfGridValue('Status');
if (CheckStatus == 1) {
learun.alert.warning("当前项目已注册!");
return;
}
learun.layerConfirm('是否确认注册该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoSemster/DoZhuce', { keyValue: keyValue, status: "1" }, function () {
refreshGirdData();
});
}
});
}
});
//取消注册
$('#lr_cancelZhuce').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('StuId');
if (learun.checkrow(keyValue)) {
var CheckStatus = $('#gridtable').jfGridValue('Status');
if (CheckStatus != 1) {
learun.alert.warning("当前项目未注册,无法取消!");
return;
}
learun.layerConfirm('是否确认取消注册该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoSemster/DoZhuce', { keyValue: keyValue, status: "0" }, function () {
refreshGirdData();
});
}
});
}
});
},
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/StuInfoSemster/GetPageList',
headData: [
{ label: '学号', name: 'StuNo', width: 100, align: "left" },
{ label: '姓名', name: 'StuName', width: 100, align: "left" },
{ label: '系', name: 'DeptNo', width: 100, align: "left" },
{ label: '专业', name: 'MajorNo', width: 100, align: "left" },
{ label: '班级', name: 'ClassNo', width: 100, align: "left" },
{ label: '学年', name: 'AcademicYearNo', width: 100, align: "left" },
{ label: '学期', name: 'Semester', width: 100, align: "left" },
{
label: '注册状态', name: 'Status', width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == "1" ? "<span class=\"label label-success\">已注册</span>" : "<span class=\"label label-danger\">未注册</span>";
}
},
{ label: '注册时间', name: 'Time', width: 100, align: "left" },
],
mainId: 'StuId',
isPage: true,
sidx: 'Time desc'
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Просмотреть файл

@@ -332,6 +332,7 @@
<Compile Include="Areas\EducationalAdministration\Controllers\StuAttendanceController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\StuGrantController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\StuInfoBasicChangeController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\StuInfoSemsterController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\StuScoreNotPassController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\Sys_ReceiveDocumentController.cs" />
<Compile Include="Areas\EvaluationTeach\EvaluationTeachAreaRegistration.cs" />
@@ -1006,6 +1007,8 @@
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\FormDC.js" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\SchoolUniform.js" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\IndexDC.js" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoSemster\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoSemster\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\StuLeaveManagement\CheckForm.js" />
<Content Include="Areas\EducationalAdministration\Views\StuLeaveManagement\CheckIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\InputScoreIndexInTeacher.js" />
@@ -7211,6 +7214,8 @@
<Content Include="Areas\EducationalAdministration\Views\Dispatch\FormView.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Dispatch\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Dispatch\Print.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoSemster\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoSemster\Index.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyJoin.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\IndexAttendance.cshtml" />


+ 29
- 0
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
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-09 11:43
/// 描 述:学生学期注册
/// </summary>
public class StuInfoSemsterMap : EntityTypeConfiguration<StuInfoSemsterEntity>
{
public StuInfoSemsterMap()
{
#region 表、主键
//表
this.ToTable("STUINFOSEMSTER");
//主键
this.HasKey(t => t.StuId);
#endregion

#region 配置关系
#endregion
}
}
}


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj Просмотреть файл

@@ -87,6 +87,7 @@
<Compile Include="EducationalAdministration\StuInfoBasicChangeMap.cs" />
<Compile Include="EducationalAdministration\StuInfoFreshMap.cs" />
<Compile Include="EducationalAdministration\StuInfoFreshOnlineServiceMap.cs" />
<Compile Include="EducationalAdministration\StuInfoSemsterMap.cs" />
<Compile Include="EducationalAdministration\StuScoreNotPassMap.cs" />
<Compile Include="EducationalAdministration\StuSelectLessonListOfElectivePreMap.cs" />
<Compile Include="EducationalAdministration\Sys_ReceiveFileMap.cs" />


+ 4853
- 3826
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM
Разница между файлами не показана из-за своего большого размера
Просмотреть файл


+ 170
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterBLL.cs Просмотреть файл

@@ -0,0 +1,170 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-09 11:43
/// 描 述:学生学期注册
/// </summary>
public class StuInfoSemsterBLL : StuInfoSemsterIBLL
{
private StuInfoSemsterService stuInfoSemsterService = new StuInfoSemsterService();

#region 获取数据

/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<StuInfoSemsterEntity> GetList( string queryJson )
{
try
{
return stuInfoSemsterService.GetList(queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取列表分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<StuInfoSemsterEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return stuInfoSemsterService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
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 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
stuInfoSemsterService.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>
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);
}
}
}

/// <summary>
/// 注册
/// </summary>
/// <param name="keyValue">主键</param>
public void DoZhuce(string keyValue, string status)
{
try
{
stuInfoSemsterService.DoZhuce(keyValue, status);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}
}

+ 98
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterEntity.cs Просмотреть файл

@@ -0,0 +1,98 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;
namespace Learun.Application.TwoDevelopment.EducationalAdministration

{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-09 11:43
/// 描 述:学生学期注册
/// </summary>
public class StuInfoSemsterEntity
{
#region 实体成员
/// <summary>
/// 主键
/// </summary>
/// <returns></returns>
[Column("STUID")]
public string StuId { get; set; }
/// <summary>
/// 学号
/// </summary>
/// <returns></returns>
[Column("STUNO")]
public string StuNo { get; set; }
/// <summary>
/// 姓名
/// </summary>
/// <returns></returns>
[Column("STUNAME")]
public string StuName { get; set; }
/// <summary>
/// 系
/// </summary>
/// <returns></returns>
[Column("DEPTNO")]
public string DeptNo { get; set; }
/// <summary>
/// 专业
/// </summary>
/// <returns></returns>
[Column("MAJORNO")]
public string MajorNo { get; set; }
/// <summary>
/// 班级
/// </summary>
/// <returns></returns>
[Column("CLASSNO")]
public string ClassNo { get; set; }
/// <summary>
/// 学年
/// </summary>
/// <returns></returns>
[Column("ACADEMICYEARNO")]
public string AcademicYearNo { get; set; }
/// <summary>
/// 学期
/// </summary>
/// <returns></returns>
[Column("SEMESTER")]
public string Semester { get; set; }
/// <summary>
/// 注册状态
/// </summary>
/// <returns></returns>
[Column("STATUS")]
public string Status { get; set; }
/// <summary>
/// 注册时间
/// </summary>
/// <returns></returns>
[Column("TIME")]
public DateTime? Time { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.StuId = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.StuId = keyValue;
}
#endregion
}
}


+ 61
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterIBLL.cs Просмотреть файл

@@ -0,0 +1,61 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-09 11:43
/// 描 述:学生学期注册
/// </summary>
public interface StuInfoSemsterIBLL
{
#region 获取数据

/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<StuInfoSemsterEntity> GetList(string queryJson);
/// <summary>
/// 获取列表分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<StuInfoSemsterEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
StuInfoSemsterEntity GetEntity(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, StuInfoSemsterEntity entity);

/// <summary>
/// 注册
/// </summary>
/// <param name="keyValue">主键</param>
void DoZhuce(string keyValue, string status);
#endregion

}
}

+ 234
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterService.cs Просмотреть файл

@@ -0,0 +1,234 @@
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
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-09 11:43
/// 描 述:学生学期注册
/// </summary>
public class StuInfoSemsterService : RepositoryFactory
{
#region 构造函数和属性

private string fieldSql;
/// <summary>
/// 构造方法
/// </summary>
public StuInfoSemsterService()
{
fieldSql = @"
t.StuId,
t.StuNo,
t.StuName,
t.DeptNo,
t.MajorNo,
t.ClassNo,
t.AcademicYearNo,
t.Semester,
t.Status,
t.Time
";
}
#endregion

#region 获取数据

/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">条件参数</param>
/// <returns></returns>
public IEnumerable<StuInfoSemsterEntity> 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<StuInfoSemsterEntity>(strSql.ToString());
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取列表分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">条件参数</param>
/// <returns></returns>
public IEnumerable<StuInfoSemsterEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT t.* ");
strSql.Append(" FROM StuInfoSemster t where 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["keyword"].IsEmpty())
{
dp.Add("keyword", "%" + queryParam["keyword"].ToString() + "%", DbType.String);
strSql.Append(" AND (t.StuNo Like @keyword or t.StuName like @keyword) ");
}
return this.BaseRepository("CollegeMIS").FindList<StuInfoSemsterEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public StuInfoSemsterEntity GetEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<StuInfoSemsterEntity>(keyValue);
}
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
{
this.BaseRepository("CollegeMIS").Delete<StuInfoSemsterEntity>(t => t.StuId == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// </summary>
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);
}
}
}

/// <summary>
/// 注册
/// </summary>
/// <param name="keyValue">主键</param>
public void DoZhuce(string keyValue, string status)
{
try
{
if (status == "1")
{
//注册
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuInfoSemster set Status='1',Time='" + DateTime.Now + "' where StuId='" + keyValue + "' ");
}
else
{
//取消注册
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuInfoSemster set Status='0',Time=null where StuId='" + keyValue + "' ");
}

}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj Просмотреть файл

@@ -188,6 +188,10 @@
<Compile Include="EducationalAdministration\StuInfoGraduate\StuInfoGraduateEntity.cs" />
<Compile Include="EducationalAdministration\StuInfoGraduate\StuInfoGraduateIBLL.cs" />
<Compile Include="EducationalAdministration\StuInfoGraduate\StuInfoGraduateService.cs" />
<Compile Include="EducationalAdministration\StuInfoSemster\StuInfoSemsterBLL.cs" />
<Compile Include="EducationalAdministration\StuInfoSemster\StuInfoSemsterEntity.cs" />
<Compile Include="EducationalAdministration\StuInfoSemster\StuInfoSemsterIBLL.cs" />
<Compile Include="EducationalAdministration\StuInfoSemster\StuInfoSemsterService.cs" />
<Compile Include="EducationalAdministration\StuScoreNotPass\StuScoreNotPassBLL.cs" />
<Compile Include="EducationalAdministration\StuScoreNotPass\StuScoreNotPassEntity.cs" />
<Compile Include="EducationalAdministration\StuScoreNotPass\StuScoreNotPassIBLL.cs" />


Загрузка…
Отмена
Сохранить