@@ -0,0 +1,154 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-09-24 10:33 | |||
/// 描 述:AwardAndPunishment | |||
/// </summary> | |||
public class AwardAndPunishmentController : MvcControllerBase | |||
{ | |||
private AwardAndPunishmentIBLL awardAndPunishmentIBLL = new AwardAndPunishmentBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexPunishment() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult AwardForm() | |||
{ | |||
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 = awardAndPunishmentIBLL.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 AwardAndPunishmentData = awardAndPunishmentIBLL.GetAwardAndPunishmentEntity( keyValue ); | |||
var jsonData = new { | |||
AwardAndPunishment = AwardAndPunishmentData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
awardAndPunishmentIBLL.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) | |||
{ | |||
AwardAndPunishmentEntity entity = strEntity.ToObject<AwardAndPunishmentEntity>(); | |||
awardAndPunishmentIBLL.SaveEntity(keyValue,entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 启用/禁用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="status"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult EnableDisable(string keyValue, string status) | |||
{ | |||
awardAndPunishmentIBLL.EnableDisable(keyValue, status); | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,135 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-09-24 17:38 | |||
/// 描 述:奖励惩罚管理 | |||
/// </summary> | |||
public class AwardPunishInfoController : MvcControllerBase | |||
{ | |||
private AwardPunishInfoIBLL awardPunishInfoIBLL = new AwardPunishInfoBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult AwardIndex() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult AwardForm() | |||
{ | |||
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 = awardPunishInfoIBLL.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 AwardPunishInfoData = awardPunishInfoIBLL.GetAwardPunishInfoEntity( keyValue ); | |||
var jsonData = new { | |||
AwardPunishInfo = AwardPunishInfoData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
awardPunishInfoIBLL.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) | |||
{ | |||
AwardPunishInfoEntity entity = strEntity.ToObject<AwardPunishInfoEntity>(); | |||
awardPunishInfoIBLL.SaveEntity(keyValue,entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,167 @@ | |||
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 V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-09-27 10:33 | |||
/// 描 述:学金类型 | |||
/// </summary> | |||
public class ScholarshipController : MvcControllerBase | |||
{ | |||
private ScholarshipIBLL scholarshipIBLL = new ScholarshipBLL(); | |||
#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 Indexzxj() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Formzxj() | |||
{ | |||
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 = scholarshipIBLL.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 = scholarshipIBLL.GetScholarshipEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
Scholarship = ScholarshipData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
scholarshipIBLL.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) | |||
{ | |||
ScholarshipEntity entity = strEntity.ToObject<ScholarshipEntity>(); | |||
var Lists = scholarshipIBLL.NameOrCode(entity.ItemName, entity.ItemCode, entity.IsValid); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
if (Lists != null) | |||
{ | |||
return Fail("添加失败!名称或编码已存在"); | |||
} | |||
} | |||
else | |||
{ | |||
if (!Lists.Id.Contains(keyValue)) | |||
{ | |||
return Fail("添加失败!名称或编码已存在"); | |||
} | |||
} | |||
scholarshipIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 启用/禁用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="status"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult EnableDisable(string keyValue, string status) | |||
{ | |||
scholarshipIBLL.EnableDisable(keyValue, status); | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,117 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-10-11 16:46 | |||
/// 描 述:助学金及审核 | |||
/// </summary> | |||
public class ScholarshipxjController : MvcControllerBase | |||
{ | |||
private ScholarshipxjIBLL scholarshipxjIBLL = new ScholarshipxjBLL(); | |||
#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 = scholarshipxjIBLL.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 ScholarshipxjData = scholarshipxjIBLL.GetScholarshipxjEntity( keyValue ); | |||
var jsonData = new { | |||
ScholarshipAxj = ScholarshipxjData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
scholarshipxjIBLL.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) | |||
{ | |||
ScholarshipxjEntity entity = strEntity.ToObject<ScholarshipxjEntity>(); | |||
scholarshipxjIBLL.SaveEntity(keyValue,entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,31 @@ | |||
@{ | |||
ViewBag.Title = "AwardAndPunishment"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="AwardAndPunishment"> | |||
<div class="lr-form-item-title">奖励名称<font face="宋体">*</font></div> | |||
<input id="AwardName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="AwardAndPunishment"> | |||
<div class="lr-form-item-title">奖励代码<font face="宋体">*</font></div> | |||
<input id="CodePrize" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="AwardAndPunishment"> | |||
<div class="lr-form-item-title">奖励级别<font face="宋体">*</font></div> | |||
<div id="AwardType" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="AwardAndPunishment"> | |||
<div class="lr-form-item-title">奖励属性<font face="宋体">*</font></div> | |||
<div id="NatureType"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="AwardAndPunishment"> | |||
<div class="lr-form-item-title">状态</div> | |||
<div id="IsValid"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="AwardAndPunishment" style="display: none; "> | |||
<div class="lr-form-item-title">类型<font face="宋体">*</font></div> | |||
<input id="IsAward" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/AwardAndPunishment/AwardForm.js") |
@@ -0,0 +1,62 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-09-24 10:33 | |||
* 描 述:AwardAndPunishment | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#AwardType').lrDataItemSelect({ code: 'AwardType' }); | |||
$('#NatureType').lrselect({ | |||
data: [{ text: "集体", value: "0" }, { text: "个人", value: "1" }], | |||
text: "text", | |||
value: "value" | |||
}) | |||
$('#IsValid').lrselect({ | |||
data: [{ text: "启用", value: "0" }, { text: "禁用", value: "1" }], | |||
text: "text", | |||
value: "value" | |||
}) | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/AwardAndPunishment/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
$('#IsAward').val('0'); | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/AwardAndPunishment/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,23 @@ | |||
@{ | |||
ViewBag.Title = "AwardAndPunishment"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="AwardAndPunishment"> | |||
<div class="lr-form-item-title">奖励名称<font face="宋体">*</font></div> | |||
<input id="AwardName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="AwardAndPunishment"> | |||
<div class="lr-form-item-title">奖励代码<font face="宋体">*</font></div> | |||
<input id="CodePrize" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="AwardAndPunishment"> | |||
<div class="lr-form-item-title">状态</div> | |||
<div id="IsValid"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="AwardAndPunishment" style="display: none; "> | |||
<div class="lr-form-item-title">类型<font face="宋体">*</font></div> | |||
<input id="IsAward" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/AwardAndPunishment/Form.js") |
@@ -0,0 +1,62 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-09-24 10:33 | |||
* 描 述:AwardAndPunishment | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#AwardType').lrDataItemSelect({ code: 'AwardType' }); | |||
$('#NatureType').lrselect({ | |||
data: [{ text: "集体", value: "0" }, { text: "个人", value: "1" }], | |||
text: "text", | |||
value: "value" | |||
}) | |||
$('#IsValid').lrselect({ | |||
data: [{ text: "启用", value: "0" }, { text: "禁用", value: "1" }], | |||
text: "text", | |||
value: "value" | |||
}) | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/AwardAndPunishment/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
$('#IsAward').val('1'); | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/AwardAndPunishment/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,42 @@ | |||
@{ | |||
ViewBag.Title = "AwardAndPunishment"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-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> | |||
<input id="AwardName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">奖励级别</div> | |||
<div id="AwardType"></div> | |||
</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 class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_enabled" class="btn btn-default"><i class="fa fa-lrlt"></i> 启用</a> | |||
<a id="lr_disabled" class="btn btn-default"><i class="fa fa-lrlt"></i> 禁用</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/AwardAndPunishment/Index.js") |
@@ -0,0 +1,158 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-09-24 10:33 | |||
* 描 述:AwardAndPunishment | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#AwardType').lrDataItemSelect({ code: 'AwardType' }); | |||
$('#NatureType').lrselect({ | |||
data: [{ text: "集体", value: "0" }, { text: "个人", value: "1" }], | |||
text: "text", | |||
value: "value" | |||
}) | |||
$('#IsValid').lrselect({ | |||
data: [{ text: "启用", value: "0" }, { text: "禁用", value: "1" }], | |||
text: "text", | |||
value: "value" | |||
}) | |||
//$('#IsValid').lrDataItemSelect({ code: 'YesOrNoInt' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/AwardAndPunishment/AwardForm', | |||
width: 400, | |||
height: 300, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/AwardAndPunishment/AwardForm?keyValue=' + keyValue, | |||
width: 400, | |||
height: 300, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/AwardAndPunishment/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//启用 | |||
$('#lr_enabled').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认启用选择项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/AwardAndPunishment/EnableDisable', { keyValue: keyValue, status: "0" }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//禁用 | |||
$('#lr_disabled').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认禁用选择项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/AwardAndPunishment/EnableDisable', { keyValue: keyValue, status: "1" }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/AwardAndPunishment/GetPageList', | |||
headData: [ | |||
{ label: "奖励名称", name: "AwardName", width: 100, align: "left" }, | |||
{ label: "奖励代码", name: "CodePrize", width: 100, align: "left" }, | |||
{ | |||
label: "奖励级别", name: "AwardType", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'AwardType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: '奖励属性', name: 'NatureType', width: 100, align: "left", | |||
formatter: function (val) { | |||
if (val == '0') { | |||
return '集体'; | |||
} else { | |||
return '个人'; | |||
} | |||
} | |||
}, | |||
{ | |||
label: '状态', name: 'IsValid', width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == "0" ? "<span class=\"label label-success\">启用</span>" : | |||
"<span class=\"label label-danger\">禁用</span>"; | |||
} | |||
}, | |||
], | |||
mainId: 'Id', | |||
isMultiselect: true, | |||
isPage: true, | |||
sord: 'asc' | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.IsAward = '0' | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,43 @@ | |||
@{ | |||
ViewBag.Title = "AwardAndPunishment"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-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> | |||
<input id="AwardName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">奖励级别</div> | |||
<div id="AwardType"></div> | |||
</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 class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
<a id="lr_enabled" class="btn btn-default"><i class="fa fa-lrlt"></i> 启用</a> | |||
<a id="lr_disabled" class="btn btn-default"><i class="fa fa-lrlt"></i> 禁用</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/AwardAndPunishment/IndexPunishment.js") |
@@ -0,0 +1,135 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-09-24 10:33 | |||
* 描 述:AwardAndPunishment | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#AwardType').lrDataItemSelect({ code: 'AwardType' }); | |||
$('#NatureType').lrselect({ | |||
data: [{ text: "集体", value: "0" }, { text: "个人", value: "1" }], | |||
text: "text", | |||
value: "value" | |||
}) | |||
$('#IsValid').lrselect({ | |||
data: [{ text: "启用", value: "0" }, { text: "禁用", value: "1" }], | |||
text: "text", | |||
value: "value" | |||
}) | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/AwardAndPunishment/Form', | |||
width: 400, | |||
height: 250, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/AwardAndPunishment/Form?keyValue=' + keyValue, | |||
width: 400, | |||
height: 250, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/AwardAndPunishment/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//启用 | |||
$('#lr_enabled').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认启用选择项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/AwardAndPunishment/EnableDisable', { keyValue: keyValue, status: "1" }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//禁用 | |||
$('#lr_disabled').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('StuId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认禁用选择项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/AwardAndPunishment/EnableDisable', { keyValue: keyValue, status: "0" }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/AwardAndPunishment/GetPageList', | |||
headData: [ | |||
{ label: "奖励名称", name: "AwardName", width: 100, align: "left" }, | |||
{ label: "奖励代码", name: "CodePrize", width: 100, align: "left" }, | |||
{ | |||
label: '状态', name: 'IsValid', width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == "0" ? "<span class=\"label label-success\">启用</span>" : | |||
"<span class=\"label label-danger\">禁用</span>"; | |||
} | |||
}, | |||
], | |||
mainId: 'Id', | |||
isMultiselect: true, | |||
isPage: true, | |||
sord: 'desc' | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.IsAward = '1' | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,43 @@ | |||
@{ | |||
ViewBag.Title = "奖励惩罚管理"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo"> | |||
<div class="lr-form-item-title">奖励类型<font face="宋体">*</font></div> | |||
<div id="NatureType" isvalid="yes" checkexpession="NotNull"></div> | |||
<input id="shuxing" type="text" style="display: none; " /> | |||
<input id="awardtype" type="text" style="display: none; " /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo"> | |||
<div class="lr-form-item-title">奖励对象</div> | |||
<div id="RewardObjects"></div> | |||
<input id="StuId" type="text" style="display: none; " /> | |||
<input id="ClassNo" type="text" style="display: none; " /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FileAddress"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo"> | |||
<div class="lr-form-item-title">获奖时间<font face="宋体">*</font></div> | |||
<input id="WinningTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#WinningTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo"> | |||
<div class="lr-form-item-title">获奖描述</div> | |||
<textarea id="Remark" class="form-control" style="height:50px;"></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" style="display: none; "> | |||
<div class="lr-form-item-title">录入时间</div> | |||
<input id="Adddate" type="text" readonly class="form-control currentInfo lr-currentInfo-time" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" style="display: none; "> | |||
<div class="lr-form-item-title">录入人</div> | |||
<input id="AddUser" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" style="display: none; "> | |||
<div class="lr-form-item-title">奖惩</div> | |||
<input id="IsVaild" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.js") |
@@ -0,0 +1,104 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-09-24 17:38 | |||
* 描 述:奖励惩罚管理 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#NatureType').lrGirdSelect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=AwardSource', | |||
selectWord: 'id', | |||
value: 'id', | |||
text: 'awardname', | |||
headData: | |||
[ | |||
{ label: "奖励类型", name: "awardname", width: 100, align: "left" }, | |||
{ | |||
label: '奖励属性', name: 'naturetype', width: 100, align: "left", | |||
formatter: function (val) { | |||
if (val == '0') { return '集体'; } | |||
else { return '个人'; } | |||
} | |||
}, | |||
{ | |||
label: "奖励级别", name: "awardtype", width: 100, align: "left", | |||
formatterAsync: function (callback, value) { | |||
learun.clientdata.getAsync('dataItem', | |||
{ | |||
key: value,code: 'AwardType', | |||
callback: function (_data) {callback(_data.text);} | |||
}); | |||
}, | |||
} | |||
], | |||
select: function (item) { | |||
$("#NatureType").val(item.awardname); | |||
$("#shuxing").val(item.naturetype); | |||
$("#awardtype").val(item.awardtype); | |||
} | |||
}); | |||
$('#RewardObjects').lrGirdSelect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', | |||
selectWord: 'stuno', | |||
value: 'stuno', | |||
text: 'stuname', | |||
headData: | |||
[ | |||
{ label: "学号", name: "stuno", width: 100, align: "left" }, | |||
{ label: "姓名", name: "stuname", width: 100, align: "left" }, | |||
{ label: "班级", name: "classno", width: 100, align: "left" }, | |||
], | |||
select: function (item) { | |||
$("#StuId").val(item.stuno); | |||
$("#RewardObjects").val(item.stuname); | |||
$("#ClassNo").val(item.classno); | |||
} | |||
}); | |||
$('#FileAddress').lrUploader(); | |||
$('#Adddate').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); | |||
$('#AddUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | |||
$('#AddUser').val(learun.clientdata.get(['userinfo']).realName); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/AwardPunishInfo/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
$('#IsVaild').val('0'); | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/AwardPunishInfo/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,40 @@ | |||
@{ | |||
ViewBag.Title = "奖励惩罚管理"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-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="NatureType"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">奖励对象</div> | |||
<div id="StuName"></div> | |||
</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 class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.js") |
@@ -0,0 +1,210 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-09-24 17:38 | |||
* 描 述:奖励惩罚管理 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#NatureType').lrGirdSelect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=AwardSource', | |||
selectWord: 'id', | |||
value: 'id', | |||
text: 'awardname', | |||
headData: | |||
[ | |||
{ label: "奖励类型", name: "awardname", width: 100, align: "left" }, | |||
{ | |||
label: '奖励属性', name: 'naturetype', width: 100, align: "left", | |||
formatter: function (val) { | |||
if (val == '0') { | |||
return '集体'; | |||
} else { | |||
return '个人'; | |||
} | |||
} | |||
}, | |||
{ | |||
label: "奖励级别",name: "awardtype",width: 100,align: "left", | |||
formatterAsync: function(callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', | |||
{ | |||
key: value, | |||
code: 'AwardType', | |||
callback: function(_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
}, | |||
} | |||
], | |||
select: function (item) { | |||
$("#NatureType").val(item.awardname); | |||
$("#shuxing").val(item.naturetype); | |||
$("#awardtype").val(item.awardtype); | |||
console.log($("#NatureType").val()) | |||
console.log($("#shuxing").val()) | |||
console.log($("#awardtype").val()) | |||
} | |||
}); | |||
$('#RewardObjects').lrGirdSelect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', | |||
selectWord: 'stuno', | |||
value: 'stuno', | |||
text: 'stuname', | |||
headData: | |||
[ | |||
{ label: "学号", name: "stuno", width: 100, align: "left" }, | |||
{ label: "姓名", name: "stuname", width: 100, align: "left" }, | |||
{ label: "班级", name: "classno", width: 100, align: "left" }, | |||
], | |||
select: function (item) { | |||
$("#StuId").val(item.stuno); | |||
$("#RewardObjects").val(item.stuname); | |||
$("#ClassNo").val(item.classno); | |||
} | |||
}); | |||
//$('#FileAddress').lrUploader(); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/AwardPunishInfo/AwardForm', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/AwardPunishInfo/AwardForm?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/AwardPunishInfo/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/AwardPunishInfo/GetPageList', | |||
headData: [ | |||
{ | |||
label: "获奖对象", name: "RewardObjects", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', | |||
key: value, | |||
keyId: 'stuno', | |||
callback: function (_data) { | |||
callback(_data['stuname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "班级", name: "ClassNo", width: 200, 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: "NatureType", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'AwardSource', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['awardname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: '奖励属性', name: 'NatureType', width: 100, align: "left", | |||
formatter: function (val) { | |||
if (val == '0') { | |||
return '集体'; | |||
} else { | |||
return '个人'; | |||
} | |||
} | |||
}, | |||
{ label: "获奖时间", name: "WinningTime", width: 100, align: "left" }, | |||
], | |||
mainId: 'Id', | |||
isMultiselect: true, | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.IsVaild = '0' | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
}, | |||
downLoad: function (fileId) { | |||
top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: top.$.lrToken }, method: 'POST' }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} | |||
function downLoad(fileId, fileTwo) { | |||
if (fileTwo) { | |||
top.learun.postFormSilence(top.$.rootUrl + '/PersonnelManagement/MP_QualityObjectives/AddRecord', { fileId: fileTwo }, function () { | |||
}); | |||
} | |||
top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: $.lrToken }, method: 'POST' }); | |||
} |
@@ -0,0 +1,37 @@ | |||
@{ | |||
ViewBag.Title = "奖励惩罚管理"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" > | |||
<div class="lr-form-item-title">惩罚类型<font face="宋体">*</font></div> | |||
<div id="NatureType" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo"> | |||
<div class="lr-form-item-title">惩罚对象</div> | |||
<div id="StuName"></div> | |||
<input id="StuId" type="text" style="display: none; " /> | |||
<input id="ClassNo" type="text" style="display: none; " /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" > | |||
<div class="lr-form-item-title">惩罚时间<font face="宋体">*</font></div> | |||
<input id="WinningTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#WinningTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" > | |||
<div class="lr-form-item-title">惩罚描述</div> | |||
<textarea id="Remark" class="form-control" style="height:50px;" ></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" style="display: none; " > | |||
<div class="lr-form-item-title">录入时间</div> | |||
<input id="Adddate" type="text" readonly class="form-control currentInfo lr-currentInfo-time" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" style="display: none; " > | |||
<div class="lr-form-item-title">录入人</div> | |||
<input id="AddUser" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" style="display: none; " > | |||
<div class="lr-form-item-title">奖惩</div> | |||
<input id="IsVaild" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.js") |
@@ -0,0 +1,74 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-09-24 17:38 | |||
* 描 述:奖励惩罚管理 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#NatureType').lrDataSourceSelect({ | |||
code: 'PunishmentSource', value: 'id', text: 'awardname', | |||
}); | |||
$('#AttachmentName').lrUploader(); | |||
$('#StuName').lrGirdSelect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', | |||
selectWord: 'stuno', | |||
value: 'stuno', | |||
text: 'stuname', | |||
headData: | |||
[ | |||
{ label: "学号", name: "stuno", width: 100, align: "left"}, | |||
{ label: "姓名", name: "stuname", width: 100, align: "left" }, | |||
{ label: "班级", name: "classno", width: 100, align: "left" }, | |||
], | |||
select: function (item) { | |||
$("#StuId").val(item.stuno); | |||
$("#StuName").val(item.stuname); | |||
$("#ClassNo").val(item.classno); | |||
} | |||
}); | |||
$('#Adddate').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); | |||
$('#AddUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | |||
$('#AddUser').val(learun.clientdata.get(['userinfo']).realName); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/AwardPunishInfo/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
$('#IsVaild').val('1'); | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/AwardPunishInfo/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,40 @@ | |||
@{ | |||
ViewBag.Title = "奖励惩罚管理"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-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="NatureType"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">惩罚对象</div> | |||
<div id="StuName"></div> | |||
</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 class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.js") |
@@ -0,0 +1,149 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-09-24 17:38 | |||
* 描 述:奖励惩罚管理 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#NatureType').lrDataSourceSelect({ | |||
code: 'PunishmentSource', value: 'id', text: 'awardname', | |||
}); | |||
$('#StuName').lrGirdSelect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', | |||
selectWord: 'stuno', | |||
value: 'id', | |||
text: 'name', | |||
headData: | |||
[ | |||
{ label: "学号", name: "stuno", width: 100, align: "left" }, | |||
{ label: "姓名", name: "stuname", width: 100, align: "left" }, | |||
{ label: "班级", name: "classno", width: 100, align: "left" }, | |||
], | |||
select: function (item) { | |||
$("#StuId").val(item.stuno); | |||
$("#StuName").val(item.stuname); | |||
$("#ClassNo").val(item.classno); | |||
} | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/AwardPunishInfo/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/AwardPunishInfo/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/AwardPunishInfo/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/AwardPunishInfo/GetPageList', | |||
headData: [ | |||
{ | |||
label: "姓名", name: "StuName", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', | |||
key: value, | |||
keyId: 'stuno', | |||
callback: function (_data) { | |||
callback(_data['stuname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "学生学号", name: "StuId", width: 200, align: "left" }, | |||
{ | |||
label: "班级", name: "ClassNo", width: 200, 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: "NatureType", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'PunishmentSource', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['awardname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "惩罚时间", name: "WinningTime", width: 200, align: "left" }, | |||
], | |||
mainId: 'Id', | |||
isMultiselect: true, | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.IsVaild = '1' | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,27 @@ | |||
@{ | |||
ViewBag.Title = "学金类型"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Scholarship" > | |||
<div class="lr-form-item-title">奖学金名称<font face="宋体">*</font></div> | |||
<input id="ItemName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Scholarship" > | |||
<div class="lr-form-item-title">奖学金代码<font face="宋体">*</font></div> | |||
<input id="ItemCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Scholarship" > | |||
<div class="lr-form-item-title">状态<font face="宋体">*</font></div> | |||
<div id="IsValid" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Scholarship" style="display: none; " > | |||
<div class="lr-form-item-title">是否删除</div> | |||
<input id="IsDel" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Scholarship" style="display: none; " > | |||
<div class="lr-form-item-title">学金类型</div> | |||
<input id="IsType" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Scholarship/Form.js") |
@@ -0,0 +1,57 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-09-27 10:33 | |||
* 描 述:学金类型 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#IsValid').lrselect({ | |||
data: [{ text: "启用", value: "0" }, { text: "禁用", value: "1" }], | |||
text: "text", | |||
value: "value" | |||
}) | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Scholarship/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
$('#IsDel').val('0'); | |||
$('#IsType').val('0'); | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Scholarship/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,27 @@ | |||
@{ | |||
ViewBag.Title = "学金类型"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Scholarship" > | |||
<div class="lr-form-item-title">助学金名称<font face="宋体">*</font></div> | |||
<input id="ItemName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Scholarship" > | |||
<div class="lr-form-item-title">助学金代码<font face="宋体">*</font></div> | |||
<input id="ItemCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Scholarship" > | |||
<div class="lr-form-item-title">状态<font face="宋体">*</font></div> | |||
<div id="IsValid" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Scholarship" style="display: none; " > | |||
<div class="lr-form-item-title">是否删除</div> | |||
<input id="IsDel" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Scholarship" style="display: none; " > | |||
<div class="lr-form-item-title">学金类型</div> | |||
<input id="IsType" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Scholarship/FormZxj.js") |
@@ -0,0 +1,57 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-09-27 10:33 | |||
* 描 述:学金类型 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#IsValid').lrselect({ | |||
data: [{ text: "启用", value: "0" }, { text: "禁用", value: "1" }], | |||
text: "text", | |||
value: "value" | |||
}) | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Scholarship/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
$('#IsDel').val('0'); | |||
$('#IsType').val('1'); | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Scholarship/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,46 @@ | |||
@{ | |||
ViewBag.Title = "学金类型"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-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> | |||
<input id="ItemName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">奖学金代码</div> | |||
<input id="ItemCode" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">状态</div> | |||
<div id="IsValid"></div> | |||
</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 class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_enabled" class="btn btn-default"><i class="fa fa-lrlt"></i> 启用</a> | |||
<a id="lr_disabled" class="btn btn-default"><i class="fa fa-lrlt"></i> 禁用</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Scholarship/Index.js") |
@@ -0,0 +1,128 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-09-27 10:33 | |||
* 描 述:学金类型 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#IsValid').lrselect({ | |||
data: [{ text: "启用", value: "0" }, { text: "禁用", value: "1" }], | |||
text: "text", | |||
value: "value" | |||
}) | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/Scholarship/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/Scholarship/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Scholarship/DeleteForm', { keyValue: keyValue}, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//启用 | |||
$('#lr_enabled').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认启用选择项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Scholarship/EnableDisable', { keyValue: keyValue, status: "0" }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//禁用 | |||
$('#lr_disabled').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认禁用选择项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Scholarship/EnableDisable', { keyValue: keyValue, status: "1" }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Scholarship/GetPageList', | |||
headData: [ | |||
{ label: "奖学金名称", name: "ItemName", width: 200, align: "left"}, | |||
{ label: "奖学金代码", name: "ItemCode", width: 200, align: "left"}, | |||
{ | |||
label: '状态', name: 'IsValid', width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == "0" ? "<span class=\"label label-success\">启用</span>" : | |||
"<span class=\"label label-danger\">禁用</span>"; | |||
} | |||
}, | |||
], | |||
mainId:'Id', | |||
isMultiselect: true,//复选框 | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.IsType = '0' | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,46 @@ | |||
@{ | |||
ViewBag.Title = "学金类型"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-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> | |||
<input id="ItemName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">助学金代码</div> | |||
<input id="ItemCode" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">状态</div> | |||
<div id="IsValid"></div> | |||
</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 class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_enabled" class="btn btn-default"><i class="fa fa-lrlt"></i> 启用</a> | |||
<a id="lr_disabled" class="btn btn-default"><i class="fa fa-lrlt"></i> 禁用</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Scholarship/IndexZxj.js") |
@@ -0,0 +1,128 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-09-27 10:33 | |||
* 描 述:学金类型 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#IsValid').lrselect({ | |||
data: [{ text: "启用", value: "0" }, { text: "禁用", value: "1" }], | |||
text: "text", | |||
value: "value" | |||
}) | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/Scholarship/FormZxj', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/Scholarship/FormZxj?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Scholarship/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//启用 | |||
$('#lr_enabled').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认启用选择项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Scholarship/EnableDisable', { keyValue: keyValue, status: "0" }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//禁用 | |||
$('#lr_disabled').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认禁用选择项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Scholarship/EnableDisable', { keyValue: keyValue, status: "1" }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Scholarship/GetPageList', | |||
headData: [ | |||
{ label: "助学金名称", name: "ItemName", width: 200, align: "left" }, | |||
{ label: "助学金代码", name: "ItemCode", width: 200, align: "left" }, | |||
{ | |||
label: '状态', name: 'IsValid', width: 200, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == "0" ? "<span class=\"label label-success\">启用</span>" : | |||
"<span class=\"label label-danger\">禁用</span>"; | |||
} | |||
}, | |||
], | |||
mainId: 'Id', | |||
isMultiselect: true,//复选框 | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.IsType = '1' | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,43 @@ | |||
@{ | |||
ViewBag.Title = "助学金及审核"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Scholarshipxj"> | |||
<div class="lr-form-item-title">助学金类型<font face="宋体">*</font></div> | |||
<div id="SchoolType" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Scholarshipxj"> | |||
<div class="lr-form-item-title">学生</div> | |||
<input id="StuName" type="text" class="form-control" /> | |||
</div> | |||
@*<div class="col-xs-12 lr-form-item" data-table="Scholarshipxj" > | |||
<div class="lr-form-item-title">申请材料</div> | |||
<div id="AttachmentName" ></div> | |||
</div>*@ | |||
<div class="col-xs-12 lr-form-item" data-table="Scholarshipxj"> | |||
<div class="lr-form-item-title">获得时间<font face="宋体">*</font></div> | |||
<input id="GetTime" isvalid="yes" checkexpession="NotNull" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#GetTime').trigger('change'); } })" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Scholarshipxj"> | |||
<div class="lr-form-item-title">描述</div> | |||
<textarea id="Remark" class="form-control" style="height:100px;"></textarea> | |||
</div> | |||
@*<div class="col-xs-12 lr-form-item" data-table="Scholarshipxj" > | |||
<div class="lr-form-item-title">录入人</div> | |||
<input id="LrPeople" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Scholarshipxj" > | |||
<div class="lr-form-item-title">录入时间</div> | |||
<input id="LrTime" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||
</div>*@ | |||
<div class="col-xs-12 lr-form-item" data-table="Scholarshipxj" style="display: none; "> | |||
<div class="lr-form-item-title">0奖学金 1助学金</div> | |||
<input id="IsType" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Scholarshipxj" style="display: none; "> | |||
<div class="lr-form-item-title">状态</div> | |||
<input id="State" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Scholarshipxj/Form.js") |
@@ -0,0 +1,58 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-10-11 16:46 | |||
* 描 述:助学金及审核 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#SchoolType').lrDataItemSelect({ code: 'Isjxj' }); | |||
//$('#SchoolType').lrselectSet("2"); | |||
//$('#AttachmentName').lrUploader(); | |||
$('#LrPeople')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | |||
$('#LrPeople').val(learun.clientdata.get(['userinfo']).realName); | |||
$('#LrTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Scholarshipxj/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
$('#IsType').val('0'); | |||
$('#State').val('-1'); | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Scholarshipxj/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,26 @@ | |||
@{ | |||
ViewBag.Title = "助学金及审核"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Scholarshipxj/Index.js") |
@@ -0,0 +1,112 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-10-11 16:46 | |||
* 描 述:助学金及审核 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/Scholarshipxj/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/Scholarshipxj/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Scholarshipxj/DeleteForm', { keyValue: keyValue}, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Scholarshipxj/GetPageList', | |||
headData: [ | |||
{ label: "学生", name: "StuName", width: 100, align: "left"}, | |||
{ label: "学生学号", name: "StuNo", width: 100, align: "left"}, | |||
{ label: "班级", name: "ClassNo", width: 100, align: "left" }, | |||
{ | |||
label: "奖学金类型", name: "SchoolType", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'AwardType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "获得时间", name: "GetTime", width: 100, align: "left"}, | |||
], | |||
mainId:'Id', | |||
isPage: true, | |||
isMultiselect: true,//复选框 | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
}, | |||
//downLoad: function (fileId) { | |||
// top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: top.$.lrToken }, method: 'POST' }); | |||
//} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} | |||
//function downLoad(fileId, fileTwo) { | |||
// if (fileTwo) { | |||
// top.learun.postFormSilence(top.$.rootUrl + '/PersonnelManagement/MP_QualityObjectives/AddRecord', { fileId: fileTwo }, function () { | |||
// }); | |||
// } | |||
// top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: $.lrToken }, method: 'POST' }); | |||
//} |
@@ -0,0 +1,46 @@ | |||
@{ | |||
ViewBag.Title = "奖学金提名"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout"> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap "> | |||
<div class="lr-layout-title"> | |||
<span id="titleinfo" class="lrlt">列表信息</span> | |||
</div> | |||
<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> | |||
<input id="StuName" type="text" class="form-control" /> | |||
</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> | |||
<input id="Grade" type="text" class="form-control" /> | |||
</div>*@ | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo"></div> | |||
</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" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/DtHonoraryUser/IndexTwo.js") |
@@ -0,0 +1,133 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-03-29 11:27 | |||
* 描 述:在册登记明细 | |||
*/ | |||
var refreshGirdData; | |||
var acceptClick; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
//if (currentUser) { | |||
// setTimeout("hiddenButton()", 300); | |||
//} | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 200, 400); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetPageList', | |||
headData: [ | |||
{ | |||
label: "学生", name: "StuName", width: 150, align: "left", | |||
}, | |||
{ | |||
label: "所属系", name: "DeptNo", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
key: value, | |||
keyId: 'deptno', | |||
callback: function (_data) { | |||
callback(_data['deptname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "年级", name: "Grade", width: 150, align: "left", | |||
}, | |||
{ | |||
label: "班级", name: "ClassNo", width: 200, 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']); | |||
} | |||
}); | |||
} | |||
}, | |||
], | |||
mainId: 'stuId', | |||
//mainId: 'AIId', | |||
isMultiselect: true, | |||
isPage: true, | |||
//sidx: 'AICodeNum' | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
//param.AId = AId; | |||
//if (currentUser) { | |||
// var userInfo = top.learun.clientdata.get(['userinfo']); | |||
// param.userId = userInfo.userId; | |||
//} | |||
param.AIIsScrap = false; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
var selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
var postData = { | |||
strEntity: JSON.stringify(selectedRow) | |||
}; | |||
var keyValue = ""; | |||
$.lrSaveForm(top.$.rootUrl + '/StudentWork/SW_Ask_Student/Nominate?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} | |||
Date.prototype.Format = function (fmt) { //author: meizz | |||
var o = { | |||
"M+": this.getMonth() + 1, //月份 | |||
"d+": this.getDate(), //日 | |||
"H+": this.getHours(), //小时 | |||
"m+": this.getMinutes(), //分 | |||
"s+": this.getSeconds(), //秒 | |||
"q+": Math.floor((this.getMonth() + 3) / 3), //季度 | |||
"S": this.getMilliseconds() //毫秒 | |||
}; | |||
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); | |||
for (var k in o) | |||
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); | |||
return fmt; | |||
} | |||
function datedifference(sDate1, sDate2) { //sDate1和sDate2是2006-12-18格式 | |||
var dateSpan, | |||
tempDate, | |||
iDays; | |||
sDate1 = Date.parse(sDate1); | |||
sDate2 = Date.parse(sDate2); | |||
dateSpan = sDate2 - sDate1; | |||
dateSpan = Math.abs(dateSpan); | |||
iDays = Math.floor(dateSpan / (24 * 3600 * 1000)); | |||
return iDays; | |||
}; |
@@ -810,6 +810,10 @@ | |||
<Compile Include="Areas\PersonnelManagement\Controllers\StudyGuideController.cs" /> | |||
<Compile Include="Areas\PersonnelManagement\Controllers\ResourceImportController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuInfoSemsterController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\AwardAndPunishmentController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\AwardPunishInfoController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\ScholarshipController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\ScholarshipxjController.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | |||
@@ -929,6 +933,10 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\ClearByConditionForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\EmptyByConditionForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTerm\SyncByConditionForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\AwardAndPunishment\AwardForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\AwardAndPunishment\IndexPunishment.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\AwardPunishInfo\AwardForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\AwardPunishInfo\AwardIndex.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\CertificateManage\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\CertificateManage\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\CertificateResult\Form.js" /> | |||
@@ -969,6 +977,9 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\R_EnterSchool\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\R_EnterSchool\DeptReport.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\R_EnterSchool\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Scholarshipxj\IndexTwo.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Scholarship\FormZxj.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Scholarship\IndexZxj.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ScoreStatistics\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ScoreStatistics\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuAttendanceLeave\IndexInStudent.js" /> | |||
@@ -6372,6 +6383,22 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuInfoSemster\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuInfoSemster\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuInfoSemster\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\AwardAndPunishment\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\AwardAndPunishment\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\AwardAndPunishment\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\AwardAndPunishment\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\AwardPunishInfo\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\AwardPunishInfo\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\AwardPunishInfo\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\AwardPunishInfo\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Scholarship\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Scholarship\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Scholarship\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Scholarship\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Scholarshipxj\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Scholarshipxj\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Scholarshipxj\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Scholarshipxj\Form.js" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Folder Include="Areas\LR_Desktop\Models\" /> | |||
@@ -7171,6 +7198,13 @@ | |||
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\PaperView.cshtml" /> | |||
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\TeacherIndex.cshtml" /> | |||
<Content Include="Areas\LR_OrganizationModule\Views\User\FamilyIndex.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\AwardAndPunishment\IndexPunishment.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\AwardAndPunishment\AwardForm.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\AwardPunishInfo\AwardForm.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\AwardPunishInfo\AwardIndex.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Scholarship\FormZxj.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Scholarship\IndexZxj.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Scholarshipxj\IndexTwo.cshtml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" /> | |||
@@ -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-24 10:33 | |||
/// 描 述:AwardAndPunishment | |||
/// </summary> | |||
public class AwardAndPunishmentMap : EntityTypeConfiguration<AwardAndPunishmentEntity> | |||
{ | |||
public AwardAndPunishmentMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("AWARDANDPUNISHMENT"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -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-24 17:38 | |||
/// 描 述:奖励惩罚管理 | |||
/// </summary> | |||
public class AwardPunishInfoMap : EntityTypeConfiguration<AwardPunishInfoEntity> | |||
{ | |||
public AwardPunishInfoMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("AWARDPUNISHINFO"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -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-10-11 16:46 | |||
/// 描 述:助学金及审核 | |||
/// </summary> | |||
public class ScholarshipAuditMap : EntityTypeConfiguration<ScholarshipxjEntity> | |||
{ | |||
public ScholarshipAuditMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("SCHOLARSHIPAUDIT"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -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 ScholarshipMap : EntityTypeConfiguration<ScholarshipEntity> | |||
{ | |||
public ScholarshipMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("SCHOLARSHIP"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -560,6 +560,10 @@ | |||
<Compile Include="PersonnelManagement\StudyGuideMap.cs" /> | |||
<Compile Include="PersonnelManagement\ResourceImportMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuInfoSemsterMap.cs" /> | |||
<Compile Include="EducationalAdministration\AwardAndPunishmentMap.cs" /> | |||
<Compile Include="EducationalAdministration\AwardPunishInfoMap.cs" /> | |||
<Compile Include="EducationalAdministration\ScholarshipMap.cs" /> | |||
<Compile Include="EducationalAdministration\ScholarshipAuditMap.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -0,0 +1,150 @@ | |||
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-24 10:33 | |||
/// 描 述:AwardAndPunishment | |||
/// </summary> | |||
public class AwardAndPunishmentBLL : AwardAndPunishmentIBLL | |||
{ | |||
private AwardAndPunishmentService awardAndPunishmentService = new AwardAndPunishmentService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<AwardAndPunishmentEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return awardAndPunishmentService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取AwardAndPunishment表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public AwardAndPunishmentEntity GetAwardAndPunishmentEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return awardAndPunishmentService.GetAwardAndPunishmentEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
awardAndPunishmentService.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, AwardAndPunishmentEntity entity) | |||
{ | |||
try | |||
{ | |||
awardAndPunishmentService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 注册 and 取消注册 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void EnableDisable(string keyValue, string status) | |||
{ | |||
try | |||
{ | |||
awardAndPunishmentService.EnableDisable(keyValue, status); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,75 @@ | |||
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-24 10:33 | |||
/// 描 述:AwardAndPunishment | |||
/// </summary> | |||
public class AwardAndPunishmentEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// 主键 | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 名称 | |||
/// </summary> | |||
[Column("AWARDNAME")] | |||
public string AwardName { get; set; } | |||
/// <summary> | |||
/// 奖励代码 | |||
/// </summary> | |||
[Column("CODEPRIZE")] | |||
public string CodePrize { get; set; } | |||
/// <summary> | |||
/// 奖励级别 | |||
/// </summary> | |||
[Column("AWARDTYPE")] | |||
public string AwardType { get; set; } | |||
/// <summary> | |||
/// 奖励属性(0集体 1个人) | |||
/// </summary> | |||
[Column("NATURETYPE")] | |||
public string NatureType { get; set; } | |||
/// <summary> | |||
/// IsValid | |||
/// </summary> | |||
[Column("ISVALID")] | |||
public string IsValid { get; set; } | |||
/// <summary> | |||
/// 0:奖励 1 惩戒 | |||
/// </summary> | |||
[Column("ISAWARD")] | |||
public string IsAward { 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 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,54 @@ | |||
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-24 10:33 | |||
/// 描 述:AwardAndPunishment | |||
/// </summary> | |||
public interface AwardAndPunishmentIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<AwardAndPunishmentEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取AwardAndPunishment表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
AwardAndPunishmentEntity GetAwardAndPunishmentEntity(string keyValue); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, AwardAndPunishmentEntity entity); | |||
#endregion | |||
#region 扩展数据 | |||
/// 注册 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void EnableDisable(string keyValue, string status); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,216 @@ | |||
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-24 10:33 | |||
/// 描 述:AwardAndPunishment | |||
/// </summary> | |||
public class AwardAndPunishmentService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<AwardAndPunishmentEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" * "); | |||
strSql.Append(" FROM AwardAndPunishment t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["AwardName"].IsEmpty()) | |||
{ | |||
dp.Add("AwardName", "%" + queryParam["AwardName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.AwardName Like @AwardName "); | |||
} | |||
if (!queryParam["AwardType"].IsEmpty()) | |||
{ | |||
dp.Add("AwardType",queryParam["AwardType"].ToString(), DbType.String); | |||
strSql.Append(" AND t.AwardType = @AwardType "); | |||
} | |||
if (!queryParam["IsAward"].IsEmpty()) | |||
{ | |||
dp.Add("IsAward", queryParam["IsAward"].ToString(), DbType.String); | |||
strSql.Append(" AND t.IsAward = @IsAward "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<AwardAndPunishmentEntity>(strSql.ToString(),dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取AwardAndPunishment表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public AwardAndPunishmentEntity GetAwardAndPunishmentEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<AwardAndPunishmentEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||
try | |||
{ | |||
var IdList = keyValue.Split(','); | |||
foreach (var item in IdList) | |||
{ | |||
db.Delete<AwardAndPunishmentEntity>(t => t.Id == item); | |||
} | |||
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, AwardAndPunishmentEntity entity) | |||
{ | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.Modify(keyValue); | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
this.BaseRepository("CollegeMIS").Insert(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// 注册 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void EnableDisable(string keyValue, string status) | |||
{ | |||
var db = BaseRepository("CollegeMIS").BeginTrans(); | |||
try | |||
{ | |||
List<string> Ids = keyValue.Split(',').ToList(); | |||
List<AwardAndPunishmentEntity> AwardandPEntity = new List<AwardAndPunishmentEntity>(); | |||
if (status == "1") | |||
{ | |||
foreach (var item in Ids) | |||
{ | |||
var list = this.BaseRepository("CollegeMIS").FindEntity<AwardAndPunishmentEntity>(x => x.Id == item); | |||
if (list != null) | |||
{ | |||
list.IsValid = "1"; | |||
AwardandPEntity.Add(list); | |||
} | |||
} | |||
} | |||
else | |||
{ | |||
foreach (var item in Ids) | |||
{ | |||
var list = this.BaseRepository("CollegeMIS").FindEntity<AwardAndPunishmentEntity>(x => x.Id == item); | |||
if (list != null) | |||
{ | |||
list.IsValid = "0"; | |||
AwardandPEntity.Add(list); | |||
} | |||
} | |||
} | |||
db.Update(AwardandPEntity); | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,125 @@ | |||
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-24 17:38 | |||
/// 描 述:奖励惩罚管理 | |||
/// </summary> | |||
public class AwardPunishInfoBLL : AwardPunishInfoIBLL | |||
{ | |||
private AwardPunishInfoService awardPunishInfoService = new AwardPunishInfoService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<AwardPunishInfoEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return awardPunishInfoService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取AwardPunishInfo表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public AwardPunishInfoEntity GetAwardPunishInfoEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return awardPunishInfoService.GetAwardPunishInfoEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
awardPunishInfoService.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, AwardPunishInfoEntity entity) | |||
{ | |||
try | |||
{ | |||
awardPunishInfoService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,110 @@ | |||
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-24 17:38 | |||
/// 描 述:奖励惩罚管理 | |||
/// </summary> | |||
public class AwardPunishInfoEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// 主键 | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 奖励对象 | |||
/// </summary> | |||
[Column("REWARDOBJECTS")] | |||
public string RewardObjects { get; set; } | |||
/// <summary> | |||
/// 学号 | |||
/// </summary> | |||
[Column("STUID")] | |||
public string StuId { get; set; } | |||
/// <summary> | |||
/// StuName | |||
/// </summary> | |||
[Column("STUNAME")] | |||
public string StuName { get; set; } | |||
/// <summary> | |||
/// 班级 | |||
/// </summary> | |||
[Column("CLASSNO")] | |||
public string ClassNo { get; set; } | |||
/// <summary> | |||
/// FileAddress | |||
/// </summary> | |||
[Column("FILEADDRESS")] | |||
public string FileAddress { get; set; } | |||
/// <summary> | |||
/// 奖励/惩罚类型 | |||
/// </summary> | |||
[Column("AWARDNAME")] | |||
public string AwardName { get; set; } | |||
/// <summary> | |||
/// 属性 0集体 1个人 | |||
/// </summary> | |||
[Column("NATURETYPE")] | |||
public string NatureType { get; set; } | |||
/// <summary> | |||
/// 奖励级别 | |||
/// </summary> | |||
[Column("AWARDTYPE")] | |||
public string AwardType { get; set; } | |||
/// <summary> | |||
/// 获奖/惩罚时间 | |||
/// </summary> | |||
[Column("WINNINGTIME")] | |||
public DateTime? WinningTime { get; set; } | |||
/// <summary> | |||
/// 获奖/惩罚描述 | |||
/// </summary> | |||
[Column("REMARK")] | |||
public string Remark { get; set; } | |||
/// <summary> | |||
/// 添加时间 | |||
/// </summary> | |||
[Column("ADDDATE")] | |||
public DateTime? Adddate { get; set; } | |||
/// <summary> | |||
/// AddUser | |||
/// </summary> | |||
[Column("ADDUSER")] | |||
public string AddUser { get; set; } | |||
/// <summary> | |||
/// 0奖励 1惩罚 | |||
/// </summary> | |||
[Column("ISVAILD")] | |||
public string IsVaild { 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 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,48 @@ | |||
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-24 17:38 | |||
/// 描 述:奖励惩罚管理 | |||
/// </summary> | |||
public interface AwardPunishInfoIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<AwardPunishInfoEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取AwardPunishInfo表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
AwardPunishInfoEntity GetAwardPunishInfoEntity(string keyValue); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, AwardPunishInfoEntity entity); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,164 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-09-24 17:38 | |||
/// 描 述:奖励惩罚管理 | |||
/// </summary> | |||
public class AwardPunishInfoService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<AwardPunishInfoEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" * "); | |||
strSql.Append(" FROM AwardPunishInfo t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["NatureType"].IsEmpty()) | |||
{ | |||
dp.Add("NatureType",queryParam["NatureType"].ToString(), DbType.String); | |||
strSql.Append(" AND t.NatureType = @NatureType "); | |||
} | |||
if (!queryParam["StuName"].IsEmpty()) | |||
{ | |||
dp.Add("StuName", queryParam["StuName"].ToString(), DbType.String); | |||
strSql.Append(" AND t.StuName = @StuName "); | |||
} | |||
if (!queryParam["IsVaild"].IsEmpty()) | |||
{ | |||
dp.Add("IsVaild", queryParam["IsVaild"].ToString(), DbType.String); | |||
strSql.Append(" AND t.IsVaild = @IsVaild "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<AwardPunishInfoEntity>(strSql.ToString(),dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取AwardPunishInfo表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public AwardPunishInfoEntity GetAwardPunishInfoEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<AwardPunishInfoEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||
try | |||
{ | |||
//多个删除 | |||
var keyValueArr = keyValue.Split(','); | |||
foreach (var item in keyValueArr) | |||
{ | |||
db.Delete<AwardPunishInfoEntity>(t => t.Id == item); | |||
} | |||
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, AwardPunishInfoEntity 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 | |||
} | |||
} |
@@ -0,0 +1,176 @@ | |||
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 ScholarshipBLL : ScholarshipIBLL | |||
{ | |||
private ScholarshipService scholarshipService = new ScholarshipService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<ScholarshipEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return scholarshipService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Scholarship表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public ScholarshipEntity GetScholarshipEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return scholarshipService.GetScholarshipEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
scholarshipService.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, ScholarshipEntity entity) | |||
{ | |||
try | |||
{ | |||
scholarshipService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 获取CdLessonSort表实体数据 | |||
/// <param name="lessonSortNo">分类编号</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public ScholarshipEntity NameOrCode(string ItemName ,string ItemCode,int? IsType) | |||
{ | |||
try | |||
{ | |||
return scholarshipService.NameOrCode(ItemName,ItemCode,IsType); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 启用和禁用 | |||
/// <summary> | |||
/// 注册 and 取消注册 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void EnableDisable(string keyValue, string status) | |||
{ | |||
try | |||
{ | |||
scholarshipService.EnableDisable(keyValue, status); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,70 @@ | |||
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 ScholarshipEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// ItemName | |||
/// </summary> | |||
[Column("ITEMNAME")] | |||
public string ItemName { get; set; } | |||
/// <summary> | |||
/// ItemCode | |||
/// </summary> | |||
[Column("ITEMCODE")] | |||
public string ItemCode { get; set; } | |||
/// <summary> | |||
/// 0启用 1 禁用 | |||
/// </summary> | |||
[Column("ISVALID")] | |||
public int? IsValid { get; set; } | |||
/// <summary> | |||
/// 0未删除 1 已删除 | |||
/// </summary> | |||
[Column("ISDEL")] | |||
public int? IsDel { get; set; } | |||
/// <summary> | |||
/// 0 奖学金 1助学金 | |||
/// </summary> | |||
[Column("ISTYPE")] | |||
public int? IsType { 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 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,62 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-09-27 10:33 | |||
/// 描 述:学金类型 | |||
/// </summary> | |||
public interface ScholarshipIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<ScholarshipEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取Scholarship表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
ScholarshipEntity GetScholarshipEntity(string keyValue); | |||
/// <summary> | |||
///获取重复数据 | |||
/// </summary> | |||
/// <param name="NameOrCode"></param> | |||
/// <returns></returns> | |||
ScholarshipEntity NameOrCode(string ItemName, string ItemCode, int? IsType); | |||
#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, ScholarshipEntity entity); | |||
#endregion | |||
/// <summary> | |||
/// 启用和禁用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="status"></param> | |||
void EnableDisable(string keyValue,string status); | |||
} | |||
} |
@@ -0,0 +1,265 @@ | |||
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 ScholarshipService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<ScholarshipEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" * "); | |||
strSql.Append(" FROM Scholarship t "); | |||
strSql.Append(" WHERE 1=1 and IsDel ='0' "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["ItemName"].IsEmpty()) | |||
{ | |||
dp.Add("ItemName", "%" + queryParam["ItemName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.ItemName Like @ItemName "); | |||
} | |||
if (!queryParam["ItemCode"].IsEmpty()) | |||
{ | |||
dp.Add("ItemCode", "%" + queryParam["ItemCode"].ToString().ToUpperInvariant() + "%", DbType.String); | |||
strSql.Append(" AND t.ItemCode Like @ItemCode "); | |||
} | |||
if (!queryParam["IsValid"].IsEmpty()) | |||
{ | |||
dp.Add("IsValid", queryParam["IsValid"].ToString(), DbType.String); | |||
strSql.Append(" AND t.IsValid = @IsValid "); | |||
} | |||
if (!queryParam["IsType"].IsEmpty()) | |||
{ | |||
dp.Add("IsType", queryParam["IsType"].ToString(), DbType.String); | |||
strSql.Append(" AND t.IsType = @IsType "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<ScholarshipEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Scholarship表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public ScholarshipEntity GetScholarshipEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<ScholarshipEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||
try | |||
{ | |||
var IdList = keyValue.Split(','); | |||
foreach (var item in IdList) | |||
{ | |||
var entity = db.FindEntity<ScholarshipEntity>(x => x.Id == item); | |||
entity.IsDel = 1; | |||
db.Update(entity); | |||
} | |||
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, ScholarshipEntity 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 扩展数据 | |||
#region 判断重复 | |||
/// <summary> | |||
/// 判断重复 | |||
/// </summary> | |||
/// <param name="ItemName">名称</param> | |||
/// <param name="ItemCode">编码</param> | |||
/// <param name="IsType">类型</param> | |||
/// <returns></returns> | |||
public ScholarshipEntity NameOrCode(string ItemName, string ItemCode, int? IsType) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<ScholarshipEntity>(x => | |||
(x.ItemCode == ItemCode || x.ItemName == ItemName) && x.IsValid == IsType && x.IsDel == 0); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 启用和禁用 | |||
/// <summary> | |||
/// 启用和禁用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="status"></param> | |||
public void EnableDisable(string keyValue, string status) | |||
{ | |||
var db = BaseRepository("CollegeMIS").BeginTrans(); | |||
try | |||
{ | |||
List<string> Ids = keyValue.Split(',').ToList(); | |||
List<ScholarshipEntity> ScholList = new List<ScholarshipEntity>(); | |||
if (status == "1") | |||
{ | |||
foreach (var item in Ids) | |||
{ | |||
var list = this.BaseRepository("CollegeMIS").FindEntity<ScholarshipEntity>(x => x.Id == item); | |||
if (list != null) | |||
{ | |||
list.IsValid = 1; | |||
ScholList.Add(list); | |||
} | |||
} | |||
} | |||
else | |||
{ | |||
foreach (var item in Ids) | |||
{ | |||
var list = this.BaseRepository("CollegeMIS").FindEntity<ScholarshipEntity>(x => x.Id == item); | |||
if (list != null) | |||
{ | |||
list.IsValid = 0; | |||
ScholList.Add(list); | |||
} | |||
} | |||
} | |||
db.Update(ScholList); | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,125 @@ | |||
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-10-11 16:46 | |||
/// 描 述:助学金及审核 | |||
/// </summary> | |||
public class ScholarshipxjBLL : ScholarshipxjIBLL | |||
{ | |||
private ScholarshipxjService scholarshipxjService = new ScholarshipxjService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<ScholarshipxjEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return scholarshipxjService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取ScholarshipAudit表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public ScholarshipxjEntity GetScholarshipxjEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return scholarshipxjService.GetScholarshipxjEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
scholarshipxjService.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, ScholarshipxjEntity entity) | |||
{ | |||
try | |||
{ | |||
scholarshipxjService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,110 @@ | |||
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-10-11 16:46 | |||
/// 描 述:助学金及审核 | |||
/// </summary> | |||
public class ScholarshipxjEntity | |||
{ | |||
#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; } | |||
#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 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,48 @@ | |||
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-10-11 16:46 | |||
/// 描 述:助学金及审核 | |||
/// </summary> | |||
public interface ScholarshipxjIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<ScholarshipxjEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取ScholarshipAudit表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
ScholarshipxjEntity GetScholarshipxjEntity(string keyValue); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, ScholarshipxjEntity entity); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,153 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-10-11 16:46 | |||
/// 描 述:助学金及审核 | |||
/// </summary> | |||
public class ScholarshipxjService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<ScholarshipxjEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.Id, | |||
t.SchoolType, | |||
t.StuName, | |||
t.AttachmentName, | |||
t.GetTime, | |||
t.Remark, | |||
t.LrPeople, | |||
t.LrTime, | |||
t.IsType, | |||
t.State | |||
"); | |||
strSql.Append(" FROM ScholarshipAudit t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
return this.BaseRepository("CollegeMIS").FindList<ScholarshipxjEntity>(strSql.ToString(),dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取ScholarshipAudit表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public ScholarshipxjEntity GetScholarshipxjEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<ScholarshipxjEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").Delete<ScholarshipxjEntity>(t=>t.Id == keyValue); | |||
} | |||
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, ScholarshipxjEntity 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 | |||
} | |||
} |
@@ -1658,6 +1658,22 @@ | |||
<Compile Include="EducationalAdministration\StuInfoSemster\StuInfoSemsterService.cs" /> | |||
<Compile Include="EducationalAdministration\StuInfoSemster\StuInfoSemsterIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\StuInfoSemster\StuInfoSemsterBLL.cs" /> | |||
<Compile Include="EducationalAdministration\AwardAndPunishment\AwardAndPunishmentEntity.cs" /> | |||
<Compile Include="EducationalAdministration\AwardAndPunishment\AwardAndPunishmentService.cs" /> | |||
<Compile Include="EducationalAdministration\AwardAndPunishment\AwardAndPunishmentBLL.cs" /> | |||
<Compile Include="EducationalAdministration\AwardAndPunishment\AwardAndPunishmentIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\AwardPunishInfo\AwardPunishInfoEntity.cs" /> | |||
<Compile Include="EducationalAdministration\AwardPunishInfo\AwardPunishInfoService.cs" /> | |||
<Compile Include="EducationalAdministration\AwardPunishInfo\AwardPunishInfoBLL.cs" /> | |||
<Compile Include="EducationalAdministration\AwardPunishInfo\AwardPunishInfoIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Scholarship\ScholarshipEntity.cs" /> | |||
<Compile Include="EducationalAdministration\Scholarship\ScholarshipService.cs" /> | |||
<Compile Include="EducationalAdministration\Scholarship\ScholarshipBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Scholarship\ScholarshipIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Scholarshipzxj\ScholarshipxjEntity.cs" /> | |||
<Compile Include="EducationalAdministration\Scholarshipzxj\ScholarshipxjService.cs" /> | |||
<Compile Include="EducationalAdministration\Scholarshipzxj\ScholarshipxjBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Scholarshipzxj\ScholarshipxjIBLL.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||