소스 검색

新增学生学籍管理--学生学期注册

金隅分支
zhangli 3 년 전
부모
커밋
d948b2f566
13개의 변경된 파일993개의 추가작업 그리고 0개의 파일을 삭제
  1. +133
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoSemsterController.cs
  2. +43
    -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. +32
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Index.cshtml
  5. +133
    -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. +173
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterBLL.cs
  10. +92
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterEntity.cs
  11. +62
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterIBLL.cs
  12. +248
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoSemster/StuInfoSemsterService.cs
  13. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj

+ 133
- 0
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
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-09-17 11:30
/// 描 述:学生学期注册
/// </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("保存成功!");
}
#endregion

#region 扩展数据

[HttpPost]
[AjaxOnly]

public ActionResult ZhuCe(string keyValue,string status)
{
stuInfoSemsterIBLL.ZhuCe(keyValue, status);
return Success("操作成功!");
}

#endregion
}
}

+ 43
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Form.cshtml 파일 보기

@@ -0,0 +1,43 @@
@{
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="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">TIME<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-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();
}

+ 32
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoSemster/Index.cshtml 파일 보기

@@ -0,0 +1,32 @@
@{
ViewBag.Title = "学生学期注册";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle">
@*<div class="lr-layout-title">标题</div>*@
<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_cancel" class="btn btn-default"><i class="fa fa-pencil"></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")

+ 133
- 0
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" ? "<span class=\"label label-success\">已注册</span>"
: "<span class=\"label label-danger\">未注册</span>";
}
},
{ 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();
}

+ 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\EducationalAdministration\Controllers\TeachingPlanController.cs" />
@@ -1037,6 +1038,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" />
@@ -7418,6 +7421,8 @@
<Content Include="Areas\EducationalAdministration\Views\TeachingPlan\FormManageView.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TeachingPlan\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TeachingPlan\IndexManage.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoSemster\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoSemster\Index.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.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-09-17 11:30
/// 描 述:学生学期注册
/// </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 파일 보기

@@ -88,6 +88,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" />


+ 173
- 0
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
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-09-17 11:30
/// 描 述:学生学期注册
/// </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);
}
}
}

#endregion

#region 扩展数据
/// <summary>
/// 注册 and 取消注册
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
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
}
}

+ 92
- 0
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

{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-09-17 11:30
/// 描 述:学生学期注册
/// </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("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>
/// TIME
/// </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
}
}


+ 62
- 0
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
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-09-17 11:30
/// 描 述:学生学期注册
/// </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);
#endregion


#region 扩展数据
/// 注册
/// </summary>
/// <param name="keyValue">主键</param>
void ZhuCe(string keyValue, string status);
#endregion
}
}

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

private string fieldSql;
/// <summary>
/// 构造方法
/// </summary>
public StuInfoSemsterService()
{
fieldSql = @"
t.StuId,
t.StuNo,
t.StuName,
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 ");
strSql.Append(fieldSql);
strSql.Append(" FROM StuInfoSemster t ");
return this.BaseRepository("CollegeMIS").FindList<StuInfoSemsterEntity>(strSql.ToString(), 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);
}
}
}

#endregion


#region 扩展数据
/// 注册
/// </summary>
/// <param name="keyValue">主键</param>
public void ZhuCe(string keyValue, string status)
{
var db = BaseRepository("CollegeMIS").BeginTrans();
try
{
List<string> Ids = keyValue.Split(',').ToList();
List<StuInfoSemsterEntity> StuInfoEntity = new List<StuInfoSemsterEntity>();
if (status == "1")
{
foreach (var item in Ids)
{
var list = this.BaseRepository("CollegeMIS").FindEntity<StuInfoSemsterEntity>(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<StuInfoSemsterEntity>(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
}
}

+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj 파일 보기

@@ -192,6 +192,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" />


불러오는 중...
취소
저장