瀏覽代碼

合并

怀来职教中心中职
dyy 1 年之前
父節點
當前提交
babb586fd4
共有 21 個文件被更改,包括 2475 次插入4 次删除
  1. +18
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js
  2. +240
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEncourgementTranController.cs
  3. +252
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuPunishmentTranController.cs
  4. +61
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryStuEncourgementIndex.cshtml
  5. +86
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryStuEncourgementIndex.js
  6. +4
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  7. +3
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config
  8. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config
  9. +30
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuEncourgementTranMap.cs
  10. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuPunishmentTranMap.cs
  11. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  12. +4
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs
  13. +239
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgementTran/StuEncourgementTranBLL.cs
  14. +153
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgementTran/StuEncourgementTranEntity.cs
  15. +73
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgementTran/StuEncourgementTranIBLL.cs
  16. +377
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgementTran/StuEncourgementTranService.cs
  17. +263
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishmentTran/StuPunishmentTranBLL.cs
  18. +154
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishmentTran/StuPunishmentTranEntity.cs
  19. +81
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishmentTran/StuPunishmentTranIBLL.cs
  20. +396
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishmentTran/StuPunishmentTranService.cs
  21. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj

+ 18
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js 查看文件

@@ -78,6 +78,12 @@ var bootstrap = function ($, learun) {
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
var ApplyUser = $('#gridtable').jfGridValue('ApplyUser');
var user = learun.clientdata.get(['userinfo']).userId;
if (ApplyUser != user) {
learun.alert.warning("当前项不可编辑!");
return;
}
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status !== 0) {
@@ -109,6 +115,12 @@ var bootstrap = function ($, learun) {
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
var ApplyUser = $('#gridtable').jfGridValue('ApplyUser');
var user = learun.clientdata.get(['userinfo']).userId;
if (ApplyUser != user) {
learun.alert.warning("当前项不可删除!");
return;
}
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status !== 0) {
@@ -131,6 +143,12 @@ var bootstrap = function ($, learun) {
// 提交
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
var ApplyUser = $('#gridtable').jfGridValue('ApplyUser');
var user = learun.clientdata.get(['userinfo']).userId;
if (ApplyUser != user) {
learun.alert.warning("当前项不可编辑提交!");
return;
}
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status !== 0) {


+ 240
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEncourgementTranController.cs 查看文件

@@ -0,0 +1,240 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Web.Mvc;
using System.Collections.Generic;
using System.Linq;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-06-18 10:08
/// 描 述:学生奖励管理
/// </summary>
public class StuEncourgementTranController : MvcControllerBase
{
private StuEncourgementIBLL stuEncourgementIBLL = new StuEncourgementBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult DeptIndex()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult MajorIndex()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult ClassIndex()
{
return View();
}
/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult StuIndex()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = stuEncourgementIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageListOne(string queryJson)
{
var data = stuEncourgementIBLL.GetPageList(queryJson);
var data1 = data.GroupBy(x => new { x.AcademicYearNo, x.Semester, x.DeptNo, x.Num }).Select(x => new
{
AcademicYearNo = x.Key.AcademicYearNo,
Semester = x.Key.Semester,
DeptNo = x.Key.DeptNo,
Num = x.Count(),
});
return Success(data1);
}
/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageListTwo(string queryJson)
{
var data = stuEncourgementIBLL.GetPageList(queryJson);
var data1 = data.GroupBy(x => new { x.AcademicYearNo, x.Semester, x.DeptNo, x.Grade, x.Num }).Select(x => new
{
AcademicYearNo = x.Key.AcademicYearNo,
Semester = x.Key.Semester,
DeptNo = x.Key.DeptNo,
Grade = x.Key.Grade,
Num = x.Count(),
});
return Success(data1);
}
/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageListThree(string queryJson)
{
var data = stuEncourgementIBLL.GetPageList(queryJson);
var data1 = data.GroupBy(x => new
{
x.AcademicYearNo,
x.Semester,
x.DeptNo,
x.MajorNo,
x.ClassNo,
x.Grade,
x.Num
}).Select(x => new
{
AcademicYearNo = x.Key.AcademicYearNo,
Semester = x.Key.Semester,
DeptNo = x.Key.DeptNo,
MajorNo = x.Key.MajorNo,
ClassNo = x.Key.ClassNo,
Grade = x.Key.Grade,
Num = x.Count(),
});
return Success(data1);
}
/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageListStu(string queryJson)
{
var data = stuEncourgementIBLL.GetPageList(queryJson);
var data1 = data.GroupBy(x => new { x.AcademicYearNo, x.Semester, x.StuNo, x.StuName, x.Num }).Select(x => new
{
AcademicYearNo = x.Key.AcademicYearNo,
Semester = x.Key.Semester,
StuNo = x.Key.StuNo,
StuName = x.Key.StuName,
Num = x.Count(),
});
return Success(data1);
}

/// <summary>
/// 获取表单数据
/// <summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var StuEncourgementData = stuEncourgementIBLL.GetStuEncourgementEntity(keyValue);
var jsonData = new
{
StuEncourgement = StuEncourgementData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

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

}
}

+ 252
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuPunishmentTranController.cs 查看文件

@@ -0,0 +1,252 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Web.Mvc;
using System.Collections.Generic;
using System.Linq;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-06-17 14:54
/// 描 述:学生处分管理
/// </summary>
public class StuPunishmentTranController : MvcControllerBase
{
private StuPunishmentTranIBLL stuPunishmentTranIBLL = new StuPunishmentTranBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
/// <summary>
/// 表页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult DeptIndex()
{
return View();
}
/// <summary>
/// 表页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult MajorIndex()
{
return View();
}
/// <summary>
/// 表页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult ClassIndex()
{
return View();
}
/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult StuIndex()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = stuPunishmentTranIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// <summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var StuPunishmentData = stuPunishmentTranIBLL.GetStuPunishmentEntity(keyValue);
var jsonData = new
{
StuPunishment = StuPunishmentData,
};
return Success(jsonData);
}
/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageListOne(string queryJson)
{
var data = stuPunishmentTranIBLL.GetPageList(queryJson);
var data1 = data.GroupBy(x => new { x.AcademicYearNo, x.Semester, x.DeptNo, x.Num }).Select(x => new
{
AcademicYearNo = x.Key.AcademicYearNo,
Semester = x.Key.Semester,
DeptNo = x.Key.DeptNo,
Num = x.Count(),
});
return Success(data1);
}
/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageListTwo(string queryJson)
{
var data = stuPunishmentTranIBLL.GetPageList(queryJson);
var data1 = data.GroupBy(x => new { x.AcademicYearNo, x.Semester, x.DeptNo, x.Grade, x.Num }).Select(x => new
{
AcademicYearNo = x.Key.AcademicYearNo,
Semester = x.Key.Semester,
DeptNo = x.Key.DeptNo,
Grade = x.Key.Grade,
Num = x.Count(),
});
return Success(data1);
}
/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageListThree(string queryJson)
{
var data = stuPunishmentTranIBLL.GetPageList(queryJson);
var data1 = data.GroupBy(x => new
{
x.AcademicYearNo,
x.Semester,
x.DeptNo,
x.MajorNo,
x.ClassNo,
x.Grade,
x.Num
}).Select(x => new
{
AcademicYearNo = x.Key.AcademicYearNo,
Semester = x.Key.Semester,
DeptNo = x.Key.DeptNo,
MajorNo = x.Key.MajorNo,
ClassNo = x.Key.ClassNo,
Grade = x.Key.Grade,
Num = x.Count(),
});
return Success(data1);
}
/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageListStu(string queryJson)
{
var data = stuPunishmentTranIBLL.GetPageList(queryJson);
var data1 = data.GroupBy(x => new { x.AcademicYearNo, x.Semester, x.StuNo, x.StuName, x.Num }).Select(x => new
{
AcademicYearNo = x.Key.AcademicYearNo,
Semester = x.Key.Semester,
StuNo = x.Key.StuNo,
StuName = x.Key.StuName,
Num = x.Count(),
});
return Success(data1);
}
#endregion

#region 提交数据

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

/// <summary>
/// 解除处分
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DoCancelPunish(string keyValue, bool status)
{
stuPunishmentTranIBLL.DoCancelPunish(keyValue, status);
return Success("操作成功!");
}
#endregion

}
}

+ 61
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryStuEncourgementIndex.cshtml 查看文件

@@ -0,0 +1,61 @@
@{
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 " style="overflow-y:scroll;-webkit-scrollbar-track-piece{width:1px;background-color:#fff;}">
<div class="lr-layout-tool">
@*<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">系部</div>
<div id="DeptNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">专业</div>
<div id="MajorNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">年级</div>
<div id="Grade"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">班级</div>
<div id="ClassNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">姓名</div>
<input id="StuName" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">身份证号</div>
<input id="IdentityCardNo" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学生编号</div>
<input id="StuNo" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学籍号</div>
<input id="StuCode" type="text" class="form-control" />
</div>
</div>
</div>
</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>
</div>
<div class="lr-layout-body" style="height:45%;border-bottom:1px solid #ccc;" id="gridtable"></div>

<div class="lr-layout-body" style="height:45%;border-top: 1px solid #ccc;border-bottom: 1px solid #ccc;margin-top:50px;" id="gridtableTwo"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuTransferInfo/QueryStuEncourgementIndex.js")

+ 86
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryStuEncourgementIndex.js 查看文件

@@ -0,0 +1,86 @@
var refreshGirdData;
var StuId;
var StuNo = request('StuNo');
var tempdatra = new Array();
var list = [];
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.initGird2();
page.bind();
},
bind: function () {
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGridLei({
url: top.$.rootUrl + '/EducationalAdministration/StuEncourgementTran/GetPageList',
headData: [
{ label: "学号", name: "StuNo", width: 200, align: "left" },
{ label: "姓名", name: "StuName", width: 150, align: "left" },
{ label: "奖励名称", name: "EncourgeName", width: 200, align: "left" },
{ label: "奖励原因", name: "Reason", width: 200, align: "left" },
{ label: "奖励金额", name: "Fee", width: 200, align: "left" },
{ label: "奖励日期", name: "EncourgeDate", width: 200, align: "left" },
],
mainId: 'Id',
isPage: true,
});
page.search();
},
initGird2: function () {
$('#gridtableTwo').lrAuthorizeJfGridLei({
url: top.$.rootUrl + '/EducationalAdministration/StuPunishmentTran/GetPageList',
headData: [
{ label: "学号", name: "StuNo", width: 200, align: "left" },
{ label: "姓名", name: "StuName", width: 200, align: "left" },
{
label: "处分名称", name: "PunishNo", width: 200, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'Punishment',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "处分原因", name: "PunishReason", width: 300, align: "left" },
{ label: "处分日期", name: "PunishDate", width: 200, align: "left" },
{ label: "处分文号", name: "FileNo", width: 200, align: "left" },
{
label: "是否解除处分", name: "IsCancelPunish", width: 100, align: "left", formatter: function (cellvalue) {
return cellvalue == true ? "是" : "否";
}
},
{ label: "解除处分日期", name: "CancelPunishDate", width: 200, align: "left" },
],
mainId: 'Id',
isPage: true,
});
page.search2();
},
search: function (param) {
param = param || {};
param.StuNo = StuNo;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
},
search2: function (param) {
param = param || {};
param.StuNo = StuNo;
$('#gridtableTwo').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
page.search();
page.search2();
};
page.init();
}

+ 4
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj 查看文件

@@ -360,9 +360,11 @@
<Compile Include="Areas\EducationalAdministration\Controllers\StuDisciplineManagementController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\StuCancelDisciplineManagementController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\StuCancelLeaveManagementController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\StuEncourgementTranController.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\StuPunishmentTranController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\StuScoreNotPassController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\StuVolunteerPhoneController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\StuVolunteerController.cs" />
@@ -1370,9 +1372,9 @@
<Content Include="Areas\EducationalAdministration\Views\StuScore\ScoreQueryAllIndexTeacher.js" />
<Content Include="Areas\EducationalAdministration\Views\StuScore\ScoreQueryAllIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\CheckIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryScoreIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryAPStuHealthIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryMSRMilitaryIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryStuEncourgementIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryScholarshipIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryBasicInfo.js" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\FormView.js" />
@@ -8090,7 +8092,7 @@
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryScholarshipIndex.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryMSRMilitaryIndex.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryAPStuHealthIndex.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryScoreIndex.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryStuEncourgementIndex.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


+ 3
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config 查看文件

@@ -168,12 +168,14 @@
<!--注册教师生成编号 金隅:jy;西昌:xc;大厂:dc-->
<add key="EmpNoRule" value="jy"/>
<!--校长角色Id-->
<add key="PrincipalRoleId" value="72b0df2d-66cc-4c84-a7d7-f3728c787d92" />
<add key="PrincipalRoleId" value="72b0df2d-66cc-4c84-a7d7-f3728c787d92" />
<!--考勤明细统计时查询的职工编号前缀 大厂:DCZZ-->
<add key="ADR_RecordUserNoPrev" value=""/>
<!--第三方登录跳转地址(最后不加/)-->
<add key="redirect_url" value="http://localhost:20472"/>
<add key="QJUrl" value="www.qj.com"/>
<!--经费开支角色Id-->
<add key="FundsApplyRoleId" value="8881181c-23ea-46f2-a9ed-19e6a24b527b" />
<!--系主任角色Id-->
<add key="DeptDirectorRoleId" value="cccde0ce-ebfe-41f2-9a78-e49aaa21cd5a" />
<!--排课管理角色Id 有权限查看所有人的课-->


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config 查看文件

@@ -104,6 +104,8 @@
<add key="DeptDirectorRoleId" value="cccde0ce-ebfe-41f2-9a78-e49aaa21cd5a" />
<!--校长角色Id-->
<add key="PrincipalRoleId" value="72b0df2d-66cc-4c84-a7d7-f3728c787d92" />
<!--经费开支角色Id-->
<add key="FundsApplyRoleId" value="8881181c-23ea-46f2-a9ed-19e6a24b527b" />
<add key="QJUrl" value="www.qj.com"/>
<!-- 报名选修课的最大课程数 -->
<add key="ElectiveLessonApplyMax" value="2" />


+ 30
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuEncourgementTranMap.cs 查看文件

@@ -0,0 +1,30 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-06-18 10:08
/// 描 述:学生奖励管理
/// </summary>
public class StuEncourgementTranMap : EntityTypeConfiguration<StuEncourgementTranEntity>
{
public StuEncourgementTranMap()
{

#region 表、主键
//表
this.ToTable("STUENCOURGEMENTTRAN");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuPunishmentTranMap.cs 查看文件

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-06-17 14:54
/// 描 述:学生处分管理
/// </summary>
public class StuPunishmentTranMap : EntityTypeConfiguration<stuPunishmentTranEntity>
{
public StuPunishmentTranMap()
{
#region 表、主键
//表
this.ToTable("STUPUNISHMENTTRAN");
//主键
this.HasKey(t => t.Id);
#endregion

#region 配置关系
#endregion
}
}
}


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj 查看文件

@@ -117,12 +117,14 @@
<Compile Include="EducationalAdministration\StudentCompetitionMap.cs" />
<Compile Include="EducationalAdministration\StudentHonorMap.cs" />
<Compile Include="EducationalAdministration\StuDisciplineManagementMap.cs" />
<Compile Include="EducationalAdministration\StuEncourgementTranMap.cs" />
<Compile Include="EducationalAdministration\StuGrantMap.cs" />
<Compile Include="EducationalAdministration\StuInfoBasicChangeMap.cs" />
<Compile Include="EducationalAdministration\StuInfoDropMap.cs" />
<Compile Include="EducationalAdministration\StuInfoFreshMap.cs" />
<Compile Include="EducationalAdministration\StuInfoFreshOnlineServiceMap.cs" />
<Compile Include="EducationalAdministration\StuInfoSemsterMap.cs" />
<Compile Include="EducationalAdministration\StuPunishmentTranMap.cs" />
<Compile Include="EducationalAdministration\StuScoreNotPassMap.cs" />
<Compile Include="EducationalAdministration\StuSelectLessonListOfElectivePreMap.cs" />
<Compile Include="EducationalAdministration\StuVolunteerMap.cs" />


+ 4
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs 查看文件

@@ -47,9 +47,12 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
strSql.Append(" AND ( t.ApplyTime >= @startTime AND t.ApplyTime <= @endTime ) ");
}
var userLogin = LoginUserInfo.Get();
//校长
var PrincipalRole = Config.GetValue("PrincipalRoleId");
//按角色查询是否有查看的权限
var FundsApplyRole = Config.GetValue("FundsApplyRoleId");
var loginInfoRoleIds = LoginUserInfo.Get().roleIds;
if (!userLogin.Description.Contains("管理员") && !loginInfoRoleIds.Split(',').Contains(PrincipalRole))
if (!userLogin.Description.Contains("管理员") && !loginInfoRoleIds.Split(',').Contains(PrincipalRole)&& !loginInfoRoleIds.Split(',').Contains(FundsApplyRole))
{
strSql.Append(" AND t.ApplyUser = '" + userLogin.userId + "' ");
}


+ 239
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgementTran/StuEncourgementTranBLL.cs 查看文件

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

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-06-18 10:08
/// 描 述:学生奖励管理
/// </summary>
public class StuEncourgementTranBLL : StuEncourgementTranIBLL
{
private StuEncourgementTranService stuEncourgementService = new StuEncourgementTranService();

#region 获取数据

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

/// <summary>
/// 获取StuEncourgementTran表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public StuEncourgementTranEntity GetStuEncourgementEntity(string keyValue)
{
try
{
return stuEncourgementService.GetStuEncourgementEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void DeleteEntity(string keyValue)
{
try
{
stuEncourgementService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void SaveEntity(string keyValue, StuEncourgementTranEntity entity)
{
try
{
stuEncourgementService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 扩展数据

/// <summary>
/// 获取学年学期列表
/// </summary>
/// <returns></returns>
public IEnumerable<WebHelper.YearGrade> GetAcademicAndSemesterList()
{
try
{
return stuEncourgementService.GetAcademicAndSemesterList();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<StuEncourgementTranEntity> GetEncourgementListByStuNo(string acdemic, string semester, string stuNo)
{
try
{
return stuEncourgementService.GetEncourgementListByStuNo(acdemic, semester, stuNo);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<StuEncourgementTranEntity> GetEncourgementListByStuNo(string stuNo)
{
try
{
return stuEncourgementService.GetEncourgementListByStuNo(stuNo);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}
}

+ 153
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgementTran/StuEncourgementTranEntity.cs 查看文件

@@ -0,0 +1,153 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-06-18 10:08
/// 描 述:学生奖励管理
/// </summary>
public class StuEncourgementTranEntity
{
#region 实体成员
/// <summary>
/// 编号
/// </summary>
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("ID")]
public int ID { get; set; }
/// <summary>
/// 学年度
/// </summary>
[Column("ACADEMICYEARNO")]
public string AcademicYearNo { get; set; }
/// <summary>
/// 学期
/// </summary>
[Column("SEMESTER")]
public string Semester { get; set; }
/// <summary>
/// 学号
/// </summary>
[Column("STUNO")]
public string StuNo { get; set; }
/// <summary>
/// 姓名
/// </summary>
[Column("STUNAME")]
public string StuName { get; set; }

/// <summary>
/// 奖励名称
/// </summary>
[Column("ENCOURGENAME")]
public string EncourgeName { get; set; }
/// <summary>
/// 奖励级别码
/// </summary>
[Column("ENCOURGELEVELNO")]
public string EncourgeLevelNo { get; set; }
/// <summary>
/// 奖励级别
/// </summary>
[Column("ENCOURGELEVEL")]
public string EncourgeLevel { get; set; }
/// <summary>
/// 奖励类型码
/// </summary>
[Column("ENCOURGESORTNO")]
public string EncourgeSortNo { get; set; }
/// <summary>
/// 奖励类型
/// </summary>
[Column("ENCOURGESORT")]
public string EncourgeSort { get; set; }
/// <summary>
/// 原因
/// </summary>
[Column("REASON")]
public string Reason { get; set; }
/// <summary>
/// 奖励金额
/// </summary>
[Column("FEE")]
public decimal? Fee { get; set; }
/// <summary>
/// 奖励文号
/// </summary>
[Column("FILENO")]
public string FileNo { get; set; }
/// <summary>
/// 奖励日期
/// </summary>
[Column("ENCOURGEDATE")]
public DateTime? EncourgeDate { get; set; }
/// <summary>
/// 颁奖部门
/// </summary>
[Column("ISSUEUNIT")]
public string IssueUnit { get; set; }
/// <summary>
/// 教师号
/// </summary>
[Column("EMPNO")]
public string EmpNo { get; set; }
/// <summary>
/// 备注(此处填写调、停、补课的具体原因和情况)
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
/// <summary>
/// 学院教务审查标志
/// </summary>
[Column("CHECKMARK")]
public string CheckMark { get; set; }
/// <summary>
/// 年级
/// </summary>
[Column("GRADE")]
public string Grade { get; set; }
/// <summary>
/// 系所代码
/// </summary>
[Column("DEPTNO")]
public string DeptNo { get; set; }
/// <summary>
/// 专业代码
/// </summary>
[Column("MAJORNO")]
public string MajorNo { get; set; }
/// <summary>
/// 行政班号
/// </summary>
[Column("CLASSNO")]
public string ClassNo { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.ID = Convert.ToInt32(keyValue);
}
#endregion
#region 扩展字段
[NotMapped]
public int Num { get; set; }
#endregion
}
}


+ 73
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgementTran/StuEncourgementTranIBLL.cs 查看文件

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

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-06-18 10:08
/// 描 述:学生奖励管理
/// </summary>
public interface StuEncourgementTranIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<StuEncourgementTranEntity> GetPageList(Pagination pagination, string queryJson);
IEnumerable<StuEncourgementTranEntity> GetPageList(string queryJson);
IEnumerable<StuEncourgementTranEntity> GetAllList();
/// <summary>
/// 获取StuEncourgementTran表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
StuEncourgementTranEntity GetStuEncourgementEntity(string keyValue);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
void SaveEntity(string keyValue, StuEncourgementTranEntity entity);
#endregion
#region 扩展数据

/// <summary>
/// 获取学年学期列表
/// </summary>
/// <returns></returns>
IEnumerable<WebHelper.YearGrade> GetAcademicAndSemesterList();

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<StuEncourgementTranEntity> GetEncourgementListByStuNo(string acdemic, string semester, string stuNo);

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<StuEncourgementTranEntity> GetEncourgementListByStuNo(string stuNo);
#endregion

}
}

+ 377
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgementTran/StuEncourgementTranService.cs 查看文件

@@ -0,0 +1,377 @@
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-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-06-18 10:08
/// 描 述:学生奖励管理
/// </summary>
public class StuEncourgementTranService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<StuEncourgementTranEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@" * ");
strSql.Append(" FROM StuEncourgementTran t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["AcademicYearNo"].IsEmpty())
{
dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String);
strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo ");
}
if (!queryParam["Semester"].IsEmpty())
{
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String);
strSql.Append(" AND t.Semester = @Semester ");
}
if (!queryParam["StuName"].IsEmpty())
{
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.StuName Like @StuName ");
}
if (!queryParam["StuNo"].IsEmpty())
{
dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String);
strSql.Append(" AND t.StuNo Like @StuNo ");
}
if (!queryParam["Sex"].IsEmpty())
{
dp.Add("Sex", queryParam["Sex"].ToString(), DbType.String);
strSql.Append(" AND t.Sex = @Sex ");
}
if (!queryParam["DeptNo"].IsEmpty())
{
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String);
strSql.Append(" AND t.DeptNo = @DeptNo ");
}
if (!queryParam["MajorNo"].IsEmpty())
{
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
strSql.Append(" AND t.MajorNo = @MajorNo ");
}
if (!queryParam["ClassNo"].IsEmpty())
{
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String);
strSql.Append(" AND t.ClassNo = @ClassNo ");
}
if (!queryParam["StuNo"].IsEmpty())
{
dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String);
strSql.Append(" AND t.StuNo = @StuNo ");
}
if (!queryParam["EncourgeName"].IsEmpty())
{
dp.Add("EncourgeName", "%" + queryParam["EncourgeName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.EncourgeName Like @EncourgeName ");
}
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
{
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime);
strSql.Append(" AND ( t.EncourgeDate >= @startTime AND t.EncourgeDate <= @endTime ) ");
}
return this.BaseRepository("CollegeMIS").FindList<StuEncourgementTranEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<StuEncourgementTranEntity> GetPageList(string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@" * ");
strSql.Append(" FROM StuEncourgementTran t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["AcademicYearNo"].IsEmpty())
{
dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String);
strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo ");
}
if (!queryParam["Semester"].IsEmpty())
{
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String);
strSql.Append(" AND t.Semester = @Semester ");
}
if (!queryParam["StuName"].IsEmpty())
{
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.StuName Like @StuName ");
}
if (!queryParam["StuNo"].IsEmpty())
{
dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String);
strSql.Append(" AND t.StuNo Like @StuNo ");
}
if (!queryParam["Sex"].IsEmpty())
{
dp.Add("Sex", queryParam["Sex"].ToString(), DbType.String);
strSql.Append(" AND t.Sex = @Sex ");
}
if (!queryParam["DeptNo"].IsEmpty())
{
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String);
strSql.Append(" AND t.DeptNo = @DeptNo ");
}
if (!queryParam["MajorNo"].IsEmpty())
{
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
strSql.Append(" AND t.MajorNo = @MajorNo ");
}
if (!queryParam["ClassNo"].IsEmpty())
{
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String);
strSql.Append(" AND t.ClassNo = @ClassNo ");
}
if (!queryParam["Grade"].IsEmpty())
{
dp.Add("Grade", queryParam["Grade"].ToString(), DbType.String);
strSql.Append(" AND t.Grade = @Grade ");
}
return this.BaseRepository("CollegeMIS").FindList<StuEncourgementTranEntity>(strSql.ToString(), dp);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
public IEnumerable<StuEncourgementTranEntity> GetAllList()
{
try
{
return this.BaseRepository("CollegeMIS").FindList<StuEncourgementTranEntity>();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取StuEncourgementTran表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public StuEncourgementTranEntity GetStuEncourgementEntity(string keyValue)
{
try
{
var keyvalue = Convert.ToInt32(keyValue);
return this.BaseRepository("CollegeMIS").FindEntity<StuEncourgementTranEntity>(keyvalue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void DeleteEntity(string keyValue)
{
try
{
var keyvalue = Convert.ToInt32(keyValue);
this.BaseRepository("CollegeMIS").Delete<StuEncourgementTranEntity>(t => t.ID == keyvalue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void SaveEntity(string keyValue, StuEncourgementTranEntity 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>
/// 获取学年学期列表
/// </summary>
/// <returns></returns>
public IEnumerable<WebHelper.YearGrade> GetAcademicAndSemesterList()
{
try
{
var aa = this.BaseRepository("CollegeMIS").FindList<StuEncourgementTranEntity>();
var aaa = aa.GroupBy(x => new { x.AcademicYearNo, x.Semester }).Select(x => new WebHelper.YearGrade()
{
text = string.Format("{0}学年第{1}学期", x.Key.AcademicYearNo, x.Key.Semester),
value = string.Format("{0},{1}", x.Key.AcademicYearNo, x.Key.Semester)
});
return aaa;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<StuEncourgementTranEntity> GetEncourgementListByStuNo(string acdemic, string semester, string stuNo)
{
try
{
var result = this.BaseRepository("CollegeMIS").FindList<StuEncourgementTranEntity>(x => x.AcademicYearNo == acdemic && x.Semester == semester && x.StuNo == stuNo);
return result;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<StuEncourgementTranEntity> GetEncourgementListByStuNo(string stuNo)
{
try
{
var result = this.BaseRepository("CollegeMIS").FindList<StuEncourgementTranEntity>(x => x.StuNo == stuNo);
return result;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

}
}

+ 263
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishmentTran/StuPunishmentTranBLL.cs 查看文件

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

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-06-17 14:54
/// 描 述:学生处分管理
/// </summary>
public class StuPunishmentTranBLL : StuPunishmentTranIBLL
{
private StuPunishmentTranService stuPunishmentTranService = new StuPunishmentTranService();

#region 获取数据

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

public IEnumerable<stuPunishmentTranEntity> GetAllList()
{
try
{
return stuPunishmentTranService.GetAllList();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 获取StuPunishment表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public stuPunishmentTranEntity GetStuPunishmentEntity(string keyValue)
{
try
{
return stuPunishmentTranService.GetStuPunishmentEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void DeleteEntity(string keyValue)
{
try
{
stuPunishmentTranService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void SaveEntity(string keyValue, stuPunishmentTranEntity entity)
{
try
{
stuPunishmentTranService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 扩展数据

/// <summary>
/// 获取学年学期列表
/// </summary>
/// <returns></returns>
public IEnumerable<WebHelper.YearGrade> GetAcademicAndSemesterList()
{
try
{
return stuPunishmentTranService.GetAcademicAndSemesterList();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<stuPunishmentTranEntity> GetPunishmentListByStuNo(string acdemic, string semester, string stuNo)
{
try
{
return stuPunishmentTranService.GetPunishmentListByStuNo(acdemic, semester, stuNo);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<stuPunishmentTranEntity> GetPunishmentListByStuNo(string stuNo)
{
try
{
return stuPunishmentTranService.GetPunishmentListByStuNo(stuNo);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 解除处分
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void DoCancelPunish(string keyValue, bool status)
{
try
{
stuPunishmentTranService.DoCancelPunish(keyValue, status);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}
}

+ 154
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishmentTran/StuPunishmentTranEntity.cs 查看文件

@@ -0,0 +1,154 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-06-17 14:54
/// 描 述:学生处分管理
/// </summary>
public class stuPunishmentTranEntity
{
#region 实体成员
/// <summary>
/// Id
/// </summary>
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("ID")]
public int Id { get; set; }
/// <summary>
/// 学年度
/// </summary>
[Column("ACADEMICYEARNO")]
public string AcademicYearNo { get; set; }
/// <summary>
/// 学期
/// </summary>
[Column("SEMESTER")]
public string Semester { get; set; }
/// <summary>
/// StuNo
/// </summary>
[Column("STUNO")]
public string StuNo { get; set; }
/// <summary>
/// 姓名
/// </summary>
[Column("STUNAME")]
public string StuName { get; set; }

/// <summary>
/// 处分名称码(参见DM-CFMC《处分名称代码》)
/// </summary>
[Column("PUNISHNO")]
public string PunishNo { get; set; }
/// <summary>
/// 处分名称
/// </summary>
[Column("PUNISHNAME")]
public string PunishName { get; set; }
/// <summary>
/// 处分原因
/// </summary>
[Column("PUNISHREASON")]
public string PunishReason { get; set; }
/// <summary>
/// 处分日期
/// </summary>
[Column("PUNISHDATE")]
public DateTime? PunishDate { get; set; }
/// <summary>
/// 处分文号(处分的正式文号,无正式文号不填)
/// </summary>
[Column("FILENO")]
public string FileNo { get; set; }
/// <summary>
/// 处分撤消日期
/// </summary>
[Column("WITHDRAWDATE")]
public DateTime? WithdrawDate { get; set; }
/// <summary>
/// 处分撤消文号(撤消的正式文号,无正式文号不填)
/// </summary>
[Column("WITHDRAWFILENO")]
public string WithdrawFileNo { get; set; }
/// <summary>
/// 录入人职工号
/// </summary>
[Column("EMPNO")]
public string EmpNo { get; set; }
/// <summary>
/// 备注(此处填写调、停、补课的具体原因和情况)
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
/// <summary>
/// 审核标志(1为已审,0为未审)
/// </summary>
[Column("CHECKMARK")]
public string CheckMark { get; set; }
/// <summary>
/// 处分日期
/// </summary>
[Column("PUNISHMENTDATE")]
public DateTime? PunishmentDate { get; set; }
/// <summary>
/// 是否解除处分
/// </summary>
[Column("ISCANCELPUNISH")]
public bool? IsCancelPunish { get; set; }
/// <summary>
/// 解除处分日期
/// </summary>
[Column("CANCELPUNISHDATE")]
public DateTime? CancelPunishDate { get; set; }
/// <summary>
/// 年级
/// </summary>
[Column("GRADE")]
public string Grade { get; set; }
/// <summary>
/// 系所代码
/// </summary>
[Column("DEPTNO")]
public string DeptNo { get; set; }
/// <summary>
/// 专业代码
/// </summary>
[Column("MAJORNO")]
public string MajorNo { get; set; }
/// <summary>
/// 行政班号
/// </summary>
[Column("CLASSNO")]
public string ClassNo { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.Id = Convert.ToInt32(keyValue);
}
#endregion
#region 扩展字段
[NotMapped]
public int Num { get; set; }

#endregion
}
}


+ 81
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishmentTran/StuPunishmentTranIBLL.cs 查看文件

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

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-06-17 14:54
/// 描 述:学生处分管理
/// </summary>
public interface StuPunishmentTranIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<stuPunishmentTranEntity> GetPageList(Pagination pagination, string queryJson);
IEnumerable<stuPunishmentTranEntity> GetPageList(string queryJson);
IEnumerable<stuPunishmentTranEntity> GetAllList();
/// <summary>
/// 获取StuPunishment表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
stuPunishmentTranEntity GetStuPunishmentEntity(string keyValue);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
void SaveEntity(string keyValue, stuPunishmentTranEntity entity);
#endregion

#region 扩展数据

/// <summary>
/// 获取学年学期列表
/// </summary>
/// <returns></returns>
IEnumerable<WebHelper.YearGrade> GetAcademicAndSemesterList();

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<stuPunishmentTranEntity> GetPunishmentListByStuNo(string acdemic, string semester, string stuNo);

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<stuPunishmentTranEntity> GetPunishmentListByStuNo(string stuNo);

/// <summary>
/// 解除处分
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
void DoCancelPunish(string keyValue, bool status);
#endregion

}
}

+ 396
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishmentTran/StuPunishmentTranService.cs 查看文件

@@ -0,0 +1,396 @@
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-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-06-17 14:54
/// 描 述:学生处分管理
/// </summary>
public class StuPunishmentTranService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<stuPunishmentTranEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT t.* ");
strSql.Append(" FROM StuPunishmentTran t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["AcademicYearNo"].IsEmpty())
{
dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String);
strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo ");
}
if (!queryParam["Semester"].IsEmpty())
{
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String);
strSql.Append(" AND t.Semester = @Semester ");
}
if (!queryParam["StuName"].IsEmpty())
{
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.StuName Like @StuName ");
}
if (!queryParam["StuNo"].IsEmpty())
{
dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String);
strSql.Append(" AND t.StuNo Like @StuNo ");
}
if (!queryParam["DeptNo"].IsEmpty())
{
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String);
strSql.Append(" AND t.DeptNo = @DeptNo ");
}
if (!queryParam["MajorNo"].IsEmpty())
{
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
strSql.Append(" AND t.MajorNo = @MajorNo ");
}
if (!queryParam["ClassNo"].IsEmpty())
{
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String);
strSql.Append(" AND t.ClassNo = @ClassNo ");
}

if (!queryParam["PunishNo"].IsEmpty())
{
dp.Add("PunishNo", queryParam["PunishNo"].ToString(), DbType.String);
strSql.Append(" AND t.PunishNo = @PunishNo ");
}
if (!queryParam["StuNo"].IsEmpty())
{
dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String);
strSql.Append(" AND t.StuNo = @StuNo ");
}
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
{
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime);
strSql.Append(" AND ( t.PunishDate >= @startTime AND t.PunishDate <= @endTime ) ");
}
return this.BaseRepository("CollegeMIS").FindList<stuPunishmentTranEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<stuPunishmentTranEntity> GetPageList(string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT t.* ");
strSql.Append(" FROM StuPunishmentTran t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["AcademicYearNo"].IsEmpty())
{
dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String);
strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo ");
}
if (!queryParam["Semester"].IsEmpty())
{
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String);
strSql.Append(" AND t.Semester = @Semester ");
}
if (!queryParam["StuName"].IsEmpty())
{
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.StuName Like @StuName ");
}
if (!queryParam["StuNo"].IsEmpty())
{
dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String);
strSql.Append(" AND t.StuNo Like @StuNo ");
}
if (!queryParam["DeptNo"].IsEmpty())
{
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String);
strSql.Append(" AND t.DeptNo = @DeptNo ");
}
if (!queryParam["MajorNo"].IsEmpty())
{
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
strSql.Append(" AND t.MajorNo = @MajorNo ");
}
if (!queryParam["ClassNo"].IsEmpty())
{
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String);
strSql.Append(" AND t.ClassNo = @ClassNo ");
}
return this.BaseRepository("CollegeMIS").FindList<stuPunishmentTranEntity>(strSql.ToString(), dp);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
public IEnumerable<stuPunishmentTranEntity> GetAllList()
{
try
{
return this.BaseRepository("CollegeMIS").FindList<stuPunishmentTranEntity>();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取StuPunishment表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public stuPunishmentTranEntity GetStuPunishmentEntity(string keyValue)
{
try
{
var keyvalue = Convert.ToInt32(keyValue);
return this.BaseRepository("CollegeMIS").FindEntity<stuPunishmentTranEntity>(keyvalue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void DeleteEntity(string keyValue)
{
try
{
var keyvalue = Convert.ToInt32(keyValue);
this.BaseRepository("CollegeMIS").Delete<stuPunishmentTranEntity>(t => t.Id == keyvalue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void SaveEntity(string keyValue, stuPunishmentTranEntity 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>
/// 获取学年学期列表
/// </summary>
/// <returns></returns>
public IEnumerable<WebHelper.YearGrade> GetAcademicAndSemesterList()
{
try
{
var aa = this.BaseRepository("CollegeMIS").FindList<stuPunishmentTranEntity>();
var aaa = aa.GroupBy(x => new { x.AcademicYearNo, x.Semester }).Select(x => new WebHelper.YearGrade()
{
text = string.Format("{0}学年第{1}学期", x.Key.AcademicYearNo, x.Key.Semester),
value = string.Format("{0},{1}", x.Key.AcademicYearNo, x.Key.Semester)
});
return aaa;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<stuPunishmentTranEntity> GetPunishmentListByStuNo(string acdemic, string semester, string stuNo)
{
try
{
var result = this.BaseRepository("CollegeMIS").FindList<stuPunishmentTranEntity>(x => x.AcademicYearNo == acdemic && x.Semester == semester && x.StuNo == stuNo);
return result;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<stuPunishmentTranEntity> GetPunishmentListByStuNo(string stuNo)
{
try
{
var result = this.BaseRepository("CollegeMIS").FindList<stuPunishmentTranEntity>(x => x.StuNo == stuNo);
return result;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 解除处分
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void DoCancelPunish(string keyValue, bool status)
{
try
{
var keyvalue = Convert.ToInt32(keyValue);
if (status)
{
//解除处分
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuPunishment set IsCancelPunish=1,CancelPunishDate='" + DateTime.Now + "' where Id= " + keyValue);
}
else
{
//取消解除处分
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuPunishment set IsCancelPunish=0,CancelPunishDate=null where Id= " + keyValue);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

+ 8
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj 查看文件

@@ -301,6 +301,10 @@
<Compile Include="EducationalAdministration\StuCancelLeaveManagement\StuCancelLeaveManagementEntity.cs" />
<Compile Include="EducationalAdministration\StuCancelLeaveManagement\StuCancelLeaveManagementIBLL.cs" />
<Compile Include="EducationalAdministration\StuCancelLeaveManagement\StuCancelLeaveManagementService.cs" />
<Compile Include="EducationalAdministration\StuEncourgementTran\StuEncourgementTranBLL.cs" />
<Compile Include="EducationalAdministration\StuEncourgementTran\StuEncourgementTranEntity.cs" />
<Compile Include="EducationalAdministration\StuEncourgementTran\StuEncourgementTranIBLL.cs" />
<Compile Include="EducationalAdministration\StuEncourgementTran\StuEncourgementTranService.cs" />
<Compile Include="EducationalAdministration\StuEnrollAmountRecord\StuEnrollAmountRecordBLL.cs" />
<Compile Include="EducationalAdministration\StuEnrollAmountRecord\StuEnrollAmountRecordEntity.cs" />
<Compile Include="EducationalAdministration\StuEnrollAmountRecord\StuEnrollAmountRecordIBLL.cs" />
@@ -330,6 +334,10 @@
<Compile Include="EducationalAdministration\StuInfoSemster\StuInfoSemsterEntity.cs" />
<Compile Include="EducationalAdministration\StuInfoSemster\StuInfoSemsterIBLL.cs" />
<Compile Include="EducationalAdministration\StuInfoSemster\StuInfoSemsterService.cs" />
<Compile Include="EducationalAdministration\StuPunishmentTran\StuPunishmentTranBLL.cs" />
<Compile Include="EducationalAdministration\StuPunishmentTran\StuPunishmentTranEntity.cs" />
<Compile Include="EducationalAdministration\StuPunishmentTran\StuPunishmentTranIBLL.cs" />
<Compile Include="EducationalAdministration\StuPunishmentTran\StuPunishmentTranService.cs" />
<Compile Include="EducationalAdministration\StuScoreNotPass\StuScoreNotPassBLL.cs" />
<Compile Include="EducationalAdministration\StuScoreNotPass\StuScoreNotPassEntity.cs" />
<Compile Include="EducationalAdministration\StuScoreNotPass\StuScoreNotPassIBLL.cs" />


Loading…
取消
儲存