Browse Source

学籍管理-奖助学金查看列表详情

新疆警官学校中职
ndbs 1 year ago
parent
commit
d51b40f847
11 changed files with 954 additions and 1 deletions
  1. +144
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScholarshipTranController.cs
  2. +61
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryScholarshipIndex.cshtml
  3. +126
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryScholarshipIndex.js
  4. +3
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  5. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ScholarshipTranMap.cs
  6. +2
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  7. +153
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScholarshipTran/ScholarshipTranBLL.cs
  8. +117
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScholarshipTran/ScholarshipTranEntity.cs
  9. +55
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScholarshipTran/ScholarshipTranIBLL.cs
  10. +260
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScholarshipTran/ScholarshipTranService.cs
  11. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj

+ 144
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScholarshipTranController.cs View File

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

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-09-27 10:33
/// 描 述:学金类型
/// </summary>
public class ScholarshipTranController : MvcControllerBase
{
private ScholarshipTranIBLL scholarshipTranIBLL = new ScholarshipTranBLL();

#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="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = scholarshipTranIBLL.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 ScholarshipData = scholarshipTranIBLL.GetScholarshipTranEntity(keyValue);
var jsonData = new
{
Scholarship = ScholarshipData,
};
return Success(jsonData);
}

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetList(string queryJson)
{
var data = scholarshipTranIBLL.GetList(queryJson);

return Success(data);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
scholarshipTranIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
var LogUserinfo = LoginUserInfo.Get();
ScholarshipTranEntity entity = strEntity.ToObject<ScholarshipTranEntity>();
if (string.IsNullOrEmpty(keyValue))
{
entity.State = "0";
}
if (entity.State != "0")
{
entity.AuditPeople = LogUserinfo.userId;
entity.AuditTime = DateTime.Today;
}
scholarshipTranIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}
#endregion

#region 扩展数据

#endregion
}
}

+ 61
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryScholarshipIndex.cshtml View File

@@ -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/QueryScholarshipIndex.js")

+ 126
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryScholarshipIndex.js View File

@@ -0,0 +1,126 @@
var refreshGirdData;
var StuId;
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/ScholarshipTran/GetPageList',
headData: [
{ label: "学生", name: "StuName", width: 150, align: "left" },
{ label: "学生学号", name: "StuNo", width: 150, align: "left" },
{ label: "身份证号", name: "IdentityCardNo", width: 160, align: "left" },
{
label: "班级", name: "ClassNo", width: 150, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
key: value,
keyId: 'classno',
callback: function (_data) {
callback(_data['classname']);
}
});
}
},
{
label: "奖学金类型", name: "SchoolType", width: 150, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/EducationalAdministration/Scholarship/GetList?queryJson=' + JSON.stringify({ IsType: 0, IsValid: 0 }),
key: value,
keyId: 'Id',
callback: function (_data) {
callback(_data['ItemName']);
}
});
}
},
{
label: "获得时间", name: "GetTime", width: 150, align: "left",
formatter: function (cellvalue) {
return learun.formatDate(cellvalue, 'yyyy-MM-dd');
}
},
],
mainId: 'Id',
isPage: true,
});
page.search();
},
initGird2: function () {
$('#gridtableTwo').lrAuthorizeJfGridLei({
url: top.$.rootUrl + '/EducationalAdministration/ScholarshipTran/GetPageList',
headData: [
{ label: "学生", name: "StuName", width: 150, align: "left" },
{ label: "学生学号", name: "StuNo", width: 150, align: "left" },
{ label: "身份证号", name: "IdentityCardNo", width: 160, align: "left" },
{
label: "班级", name: "ClassNo", width: 150, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
key: value,
keyId: 'classno',
callback: function (_data) {
callback(_data['classname']);
}
});
}
},
{
label: "奖学金类型", name: "SchoolType", width: 150, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/EducationalAdministration/Scholarship/GetList?queryJson=' + JSON.stringify({ IsType: 0, IsValid: 0 }),
key: value,
keyId: 'Id',
callback: function (_data) {
callback(_data['ItemName']);
}
});
}
},
{
label: "获得时间", name: "GetTime", width: 150, align: "left",
formatter: function (cellvalue) {
return learun.formatDate(cellvalue, 'yyyy-MM-dd');
}
},
],
mainId: 'Id',
isPage: true,
});
page.search2();
},
search: function (param) {
param = param || {};
param.IsType = 0;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
},
search2: function (param) {
param = param || {};
param.IsType = 1;
$('#gridtableTwo').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
page.search();
page.search2();
};
page.init();
}

+ 3
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj View File

@@ -349,6 +349,7 @@
<Compile Include="Areas\EducationalAdministration\Controllers\PracticeBaseController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\R_EnterBuildingController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\R_EnterSchoolController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\ScholarshipTranController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\ScholarshipController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\ScholarshipxjController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\ScoreStatisticsController.cs" />
@@ -1365,6 +1366,7 @@
<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\QueryScholarshipIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryBasicInfo.js" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\FormView.js" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\IndexQuery.js" />
@@ -8078,6 +8080,7 @@
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\FormView.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\IndexQuery.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryBasicInfo.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryScholarshipIndex.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/ScholarshipTranMap.cs View File

@@ -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-27 10:33
/// 描 述:学金类型
/// </summary>
public class ScholarshipTranMap : EntityTypeConfiguration<ScholarshipTranEntity>
{
public ScholarshipTranMap()
{
#region 表、主键
//表
this.ToTable("SCHOLARSHIPTRAN");
//主键
this.HasKey(t => t.Id);
#endregion

#region 配置关系
#endregion
}
}
}


+ 2
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
@@ -107,6 +107,7 @@
<Compile Include="EducationalAdministration\PracticeBaseMap.cs" />
<Compile Include="EducationalAdministration\R_EnterBuildingMap.cs" />
<Compile Include="EducationalAdministration\R_EnterSchoolMap.cs" />
<Compile Include="EducationalAdministration\ScholarshipTranMap.cs" />
<Compile Include="EducationalAdministration\Scholarshipxj.cs" />
<Compile Include="EducationalAdministration\ScholarshipMap.cs" />
<Compile Include="EducationalAdministration\ScoreStatisticsMap.cs" />


+ 153
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScholarshipTran/ScholarshipTranBLL.cs View File

@@ -0,0 +1,153 @@
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-27 10:33
/// 描 述:学金类型
/// </summary>
public class ScholarshipTranBLL : ScholarshipTranIBLL
{
private ScholarshipTranService ScholarshipTranService = new ScholarshipTranService();

#region 获取数据

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

/// <summary>
/// 获取ScholarshipTran表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public ScholarshipTranEntity GetScholarshipTranEntity(string keyValue)
{
try
{
return ScholarshipTranService.GetScholarshipTranEntity(keyValue);
}
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<ScholarshipTranEntity> GetList(string queryJson)
{
try
{
return ScholarshipTranService.GetList(queryJson);
}
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
{
ScholarshipTranService.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>
/// <returns></returns>
public void SaveEntity(string keyValue, ScholarshipTranEntity entity)
{
try
{
ScholarshipTranService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 扩展数据

#endregion
}
}

+ 117
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScholarshipTran/ScholarshipTranEntity.cs View File

@@ -0,0 +1,117 @@
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-27 10:33
/// 描 述:学金类型
/// </summary>
public class ScholarshipTranEntity
{
#region 实体成员
/// <summary>
/// 主键
/// </summary>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// 姓名
/// </summary>
[Column("STUNAME")]
public string StuName { get; set; }
/// <summary>
/// 学号
/// </summary>
[Column("STUNO")]
public string StuNo { get; set; }
/// <summary>
/// 班级
/// </summary>
[Column("CLASSNO")]
public string ClassNo { get; set; }
/// <summary>
/// SchoolType
/// </summary>
[Column("SCHOOLTYPE")]
public string SchoolType { get; set; }
/// <summary>
/// 获得时间 /申请时间
/// </summary>
[Column("GETTIME")]
public DateTime? GetTime { get; set; }
/// <summary>
/// 0奖学金 1助学金
/// </summary>
[Column("ISTYPE")]
public string IsType { get; set; }
/// <summary>
/// 状态 0待审核 1 通过 2 不通过
/// </summary>
[Column("STATE")]
public string State { get; set; }
/// <summary>
/// 审核人
/// </summary>
[Column("AUDITPEOPLE")]
public string AuditPeople { get; set; }
/// <summary>
/// 审核时间
/// </summary>
[Column("AUDITTIME")]
public DateTime? AuditTime { get; set; }
/// <summary>
/// 录入人
/// </summary>
[Column("LRPEOPLE")]
public string LrPeople { get; set; }
/// <summary>
/// 录入时间
/// </summary>
[Column("LRTIME")]
public DateTime? LrTime { get; set; }
/// <summary>
/// 附件
/// </summary>
[Column("ATTACHMENTNAME")]
public string AttachmentName { get; set; }
/// <summary>
/// 备注
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
/// <summary>
/// 不同意原因
/// </summary>
[Column("DEMO")]
public string Demo { get; set; }
#endregion

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


+ 55
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScholarshipTran/ScholarshipTranIBLL.cs View File

@@ -0,0 +1,55 @@
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-27 10:33
/// 描 述:学金类型
/// </summary>
public interface ScholarshipTranIBLL
{
#region 获取数据

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

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<ScholarshipTranEntity> GetList(string queryJson);
#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, ScholarshipTranEntity entity);
#endregion
}
}

+ 260
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScholarshipTran/ScholarshipTranService.cs View File

@@ -0,0 +1,260 @@
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-27 10:33
/// 描 述:学金类型
/// </summary>
public class ScholarshipTranService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<ScholarshipTranEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@" t.*,s.IdentityCardNo ");
strSql.Append(" FROM ScholarshipTran t ");
strSql.Append(" left join StuInfoBasic s on t.StuNo=s.StuNo ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["SchoolType"].IsEmpty())
{
dp.Add("SchoolType", queryParam["SchoolType"].ToString(), DbType.String);
strSql.Append(" AND t.SchoolType = @SchoolType ");
}
if (!queryParam["StuName"].IsEmpty())
{
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.StuName Like @StuName ");
}
if (!queryParam["IsType"].IsEmpty())
{
dp.Add("IsType", queryParam["IsType"].ToString(), DbType.String);
strSql.Append(" AND t.IsType = @IsType ");
}
if (!queryParam["State"].IsEmpty())
{
dp.Add("State", queryParam["State"].ToString(), DbType.String);
strSql.Append(" AND t.State = @State ");
}
if (!queryParam["IdentityCardNo"].IsEmpty())
{
dp.Add("IdentityCardNo", "%" + queryParam["IdentityCardNo"].ToString() + "%", DbType.String);
strSql.Append(" AND s.IdentityCardNo Like @IdentityCardNo ");
}
//var userlogin = LoginUserInfo.Get();
//if (userlogin.Description == "学生")
//{
// strSql.Append(" AND t.stuno = '" + userlogin.account + "' ");
//}
return this.BaseRepository("CollegeMIS").FindList<ScholarshipTranEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取ScholarshipTran表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public ScholarshipTranEntity GetScholarshipTranEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<ScholarshipTranEntity>(keyValue);
}
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<ScholarshipTranEntity> GetList(string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT t.Id,t.GetTime,t.IsType,(case when t.State is not null then t.State else 0 end) as State ");
strSql.Append(" FROM ScholarshipTran t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["GetTime"].IsEmpty())
{
dp.Add("GetTime", queryParam["GetTime"].ToDate(), DbType.DateTime);
strSql.Append(" AND t.GetTime = @GetTime ");
}
return this.BaseRepository("CollegeMIS").FindList<ScholarshipTranEntity>(strSql.ToString(), dp);
}
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)
{

var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
//多个删除
var keyValueArr = keyValue.Split(',');
foreach (var item in keyValueArr)
{
db.Delete<ScholarshipTranEntity>(t => t.Id == item && t.State != "1");
}
db.Commit();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, ScholarshipTranEntity 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>
/// <param name="keyValue">主键</param>
public void AuditEntity(string keyValue, string UserId)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
//多个审核
var IdList = keyValue.Split(',');
foreach (var item in IdList)
{
var List = db.FindEntity<ScholarshipxjEntity>(x => x.Id == item && x.State == "0");
if (List != null)
{
List.State = "1";
List.AuditTime = DateTime.Now;
List.AuditPeople = UserId;
db.Update(List);
}
}
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 View File

@@ -260,6 +260,10 @@
<Compile Include="EducationalAdministration\R_EnterSchool\R_EnterSchoolEntity.cs" />
<Compile Include="EducationalAdministration\R_EnterSchool\R_EnterSchoolIBLL.cs" />
<Compile Include="EducationalAdministration\R_EnterSchool\R_EnterSchoolService.cs" />
<Compile Include="EducationalAdministration\ScholarshipTran\ScholarshipTranBLL.cs" />
<Compile Include="EducationalAdministration\ScholarshipTran\ScholarshipTranEntity.cs" />
<Compile Include="EducationalAdministration\ScholarshipTran\ScholarshipTranIBLL.cs" />
<Compile Include="EducationalAdministration\ScholarshipTran\ScholarshipTranService.cs" />
<Compile Include="EducationalAdministration\Scholarshipzxj\ScholarshipxjBLL.cs" />
<Compile Include="EducationalAdministration\Scholarshipzxj\ScholarshipxjEntity.cs" />
<Compile Include="EducationalAdministration\Scholarshipzxj\ScholarshipxjIBLL.cs" />


Loading…
Cancel
Save