From a9ac2ea84e87455d381a96bcf01973c99a84937b Mon Sep 17 00:00:00 2001 From: edy Date: Sun, 26 Sep 2021 09:50:46 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=A5=96=E5=8A=B1=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AwardAndPunishmentController.cs | 154 +++++++++++++ .../Controllers/AwardPunishInfoController.cs | 135 +++++++++++ .../Views/AwardAndPunishment/AwardForm.cshtml | 31 +++ .../Views/AwardAndPunishment/AwardForm.js | 62 +++++ .../Views/AwardAndPunishment/Form.cshtml | 23 ++ .../Views/AwardAndPunishment/Form.js | 62 +++++ .../Views/AwardAndPunishment/Index.cshtml | 42 ++++ .../Views/AwardAndPunishment/Index.js | 158 +++++++++++++ .../AwardAndPunishment/IndexPunishment.cshtml | 43 ++++ .../AwardAndPunishment/IndexPunishment.js | 135 +++++++++++ .../Views/AwardPunishInfo/AwardForm.cshtml | 43 ++++ .../Views/AwardPunishInfo/AwardForm.js | 57 +++++ .../Views/AwardPunishInfo/AwardIndex.cshtml | 40 ++++ .../Views/AwardPunishInfo/AwardIndex.js | 108 +++++++++ .../Views/AwardPunishInfo/Form.cshtml | 39 ++++ .../Views/AwardPunishInfo/Form.js | 57 +++++ .../Views/AwardPunishInfo/Index.cshtml | 40 ++++ .../Views/AwardPunishInfo/Index.js | 108 +++++++++ .../Learun.Application.Web.csproj | 18 ++ .../AwardAndPunishmentMap.cs | 29 +++ .../AwardPunishInfoMap.cs | 29 +++ .../Learun.Application.Mapping.csproj | 2 + .../AwardAndPunishmentBLL.cs | 150 ++++++++++++ .../AwardAndPunishmentEntity.cs | 75 ++++++ .../AwardAndPunishmentIBLL.cs | 54 +++++ .../AwardAndPunishmentService.cs | 216 ++++++++++++++++++ .../AwardPunishInfo/AwardPunishInfoBLL.cs | 125 ++++++++++ .../AwardPunishInfo/AwardPunishInfoEntity.cs | 110 +++++++++ .../AwardPunishInfo/AwardPunishInfoIBLL.cs | 48 ++++ .../AwardPunishInfo/AwardPunishInfoService.cs | 159 +++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 8 + 31 files changed, 2360 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/AwardAndPunishmentController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/AwardPunishInfoController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/AwardForm.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/AwardForm.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/IndexPunishment.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/IndexPunishment.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/AwardAndPunishmentMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/AwardPunishInfoMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardAndPunishment/AwardAndPunishmentBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardAndPunishment/AwardAndPunishmentEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardAndPunishment/AwardAndPunishmentIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardAndPunishment/AwardAndPunishmentService.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/AwardAndPunishmentController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/AwardAndPunishmentController.cs new file mode 100644 index 000000000..6e4f15087 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/AwardAndPunishmentController.cs @@ -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 +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-09-24 10:33 + /// 描 述:AwardAndPunishment + /// + public class AwardAndPunishmentController : MvcControllerBase + { + private AwardAndPunishmentIBLL awardAndPunishmentIBLL = new AwardAndPunishmentBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult IndexPunishment() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult AwardForm() + { + return View(); + } + + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = awardAndPunishmentIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var AwardAndPunishmentData = awardAndPunishmentIBLL.GetAwardAndPunishmentEntity( keyValue ); + var jsonData = new { + AwardAndPunishment = AwardAndPunishmentData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + awardAndPunishmentIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + AwardAndPunishmentEntity entity = strEntity.ToObject(); + awardAndPunishmentIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + + #region 扩展数据 + /// + /// 启用/禁用 + /// + /// + /// + /// + [HttpPost] + [AjaxOnly] + + public ActionResult EnableDisable(string keyValue, string status) + { + awardAndPunishmentIBLL.EnableDisable(keyValue, status); + return Success("操作成功!"); + } + #endregion + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/AwardPunishInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/AwardPunishInfoController.cs new file mode 100644 index 000000000..315dad9bc --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/AwardPunishInfoController.cs @@ -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 +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-09-24 17:38 + /// 描 述:奖励惩罚管理 + /// + public class AwardPunishInfoController : MvcControllerBase + { + private AwardPunishInfoIBLL awardPunishInfoIBLL = new AwardPunishInfoBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult AwardIndex() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult AwardForm() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = awardPunishInfoIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var AwardPunishInfoData = awardPunishInfoIBLL.GetAwardPunishInfoEntity( keyValue ); + var jsonData = new { + AwardPunishInfo = AwardPunishInfoData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + awardPunishInfoIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + AwardPunishInfoEntity entity = strEntity.ToObject(); + awardPunishInfoIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/AwardForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/AwardForm.cshtml new file mode 100644 index 000000000..add7d0518 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/AwardForm.cshtml @@ -0,0 +1,31 @@ +@{ + ViewBag.Title = "AwardAndPunishment"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
奖励名称*
+ +
+
+
奖励代码*
+ +
+
+
奖励级别*
+
+
+
+
奖励属性*
+
+
+
+
状态
+
+
+ +
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/AwardAndPunishment/AwardForm.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/AwardForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/AwardForm.js new file mode 100644 index 000000000..77c55ea0d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/Form.cshtml new file mode 100644 index 000000000..4cfc3f715 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/Form.cshtml @@ -0,0 +1,23 @@ +@{ + ViewBag.Title = "AwardAndPunishment"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
奖励名称*
+ +
+
+
奖励代码*
+ +
+
+
状态
+
+
+ +
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/AwardAndPunishment/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/Form.js new file mode 100644 index 000000000..4ded31d5a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/Index.cshtml new file mode 100644 index 000000000..5b8f33257 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/Index.cshtml @@ -0,0 +1,42 @@ +@{ + ViewBag.Title = "AwardAndPunishment"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
奖励名称
+ +
+
+
奖励级别
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/AwardAndPunishment/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/Index.js new file mode 100644 index 000000000..a22043ff5 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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" ? "启用" : + "禁用"; + } + }, + ], + 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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/IndexPunishment.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/IndexPunishment.cshtml new file mode 100644 index 000000000..1a4d1170e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/IndexPunishment.cshtml @@ -0,0 +1,43 @@ +@{ + ViewBag.Title = "AwardAndPunishment"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
奖励名称
+ +
+
+
奖励级别
+
+
+
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/AwardAndPunishment/IndexPunishment.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/IndexPunishment.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardAndPunishment/IndexPunishment.js new file mode 100644 index 000000000..f371cf90c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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" ? "启用" : + "禁用"; + } + }, + ], + 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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.cshtml new file mode 100644 index 000000000..69d345394 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.cshtml @@ -0,0 +1,43 @@ +@{ + ViewBag.Title = "奖励惩罚管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
奖励类型*
+
+
+
+
奖励对象
+
+
+ @*
+
申请材料
+
+
*@ +
+
附件上传
+
+
+
+
获奖时间*
+ +
+
+
获奖描述
+ +
+ @*
+
录入时间
+ +
+
+
录入人
+ +
*@ + +
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.js new file mode 100644 index 000000000..c0ae804ff --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.js @@ -0,0 +1,57 @@ +/* * 版 本 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').lrDataSourceSelect({ code: 'AwardAndPunishment',value: 'id',text: 'awardname' }); + $('#stuName').lrDataItemSelect({ code: '' }); + $('#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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.cshtml new file mode 100644 index 000000000..9039bd2b1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.cshtml @@ -0,0 +1,40 @@ +@{ + ViewBag.Title = "奖励惩罚管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
奖励类型
+
+
+
+
奖励对象
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.js new file mode 100644 index 000000000..39c9fcdab --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.js @@ -0,0 +1,108 @@ +/* * 版 本 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: 'AwardAndPunishment', value: 'id', text: 'awardname' }); + $('#stuName').lrDataItemSelect({ code: '' }); + $('#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: "NatureType", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'AwardAndPunishment', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['awardname']); + } + }); + } + }, + { label: "申请材料", name: "FileAddress", width: 100, align: "left" }, + { label: "获奖时间", name: "WinningTime", width: 100, align: "left" }, + { label: "获奖描述", name: "Remark", width: 100, align: "left" }, + { label: "录入时间", name: "Adddate", 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) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.cshtml new file mode 100644 index 000000000..587823ff4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.cshtml @@ -0,0 +1,39 @@ +@{ + ViewBag.Title = "奖励惩罚管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
惩罚类型*
+
+
+
+
惩罚对象
+
+
+ @*
+
申请材料
+
+
*@ +
+
惩罚时间*
+ +
+
+
惩罚描述
+ +
+
+
录入时间
+ +
+
+
录入人
+ +
+ +
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.js new file mode 100644 index 000000000..ab50835cb --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.js @@ -0,0 +1,57 @@ +/* * 版 本 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').lrDataSourceSelect({ code: 'AwardAndPunishment',value: 'id',text: 'awardname' }); + $('#stuName').lrDataItemSelect({ code: '' }); + $('#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('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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.cshtml new file mode 100644 index 000000000..f79fc5f0a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.cshtml @@ -0,0 +1,40 @@ +@{ + ViewBag.Title = "奖励惩罚管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
惩罚类型
+
+
+
+
惩罚对象
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.js new file mode 100644 index 000000000..b6fce5ec0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.js @@ -0,0 +1,108 @@ +/* * 版 本 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: 'AwardAndPunishment', value: 'id', text: 'awardname' }); + $('#stuName').lrDataItemSelect({ code: '' }); + $('#FileAddress').lrUploader(); + // 刷新 + $('#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: "NatureType", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'AwardAndPunishment', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['awardname']); + } + }); + } + }, + { label: "惩罚材料", name: "FileAddress", width: 100, align: "left" }, + { label: "惩罚时间", name: "WinningTime", width: 100, align: "left" }, + { label: "惩罚描述", name: "Remark", width: 100, align: "left" }, + { label: "录入时间", name: "Adddate", 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) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index bfedc2664..8e7667a81 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -810,6 +810,8 @@ + + @@ -929,6 +931,10 @@ + + + + @@ -6372,6 +6378,14 @@ + + + + + + + + @@ -7171,6 +7185,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/AwardAndPunishmentMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/AwardAndPunishmentMap.cs new file mode 100644 index 000000000..4f1f2d424 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/AwardAndPunishmentMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-09-24 10:33 + /// 描 述:AwardAndPunishment + /// + public class AwardAndPunishmentMap : EntityTypeConfiguration + { + public AwardAndPunishmentMap() + { + #region 表、主键 + //表 + this.ToTable("AWARDANDPUNISHMENT"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/AwardPunishInfoMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/AwardPunishInfoMap.cs new file mode 100644 index 000000000..d59877f18 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/AwardPunishInfoMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-09-24 17:38 + /// 描 述:奖励惩罚管理 + /// + public class AwardPunishInfoMap : EntityTypeConfiguration + { + public AwardPunishInfoMap() + { + #region 表、主键 + //表 + this.ToTable("AWARDPUNISHINFO"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index 65d44f8e7..d270a98cd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -560,6 +560,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardAndPunishment/AwardAndPunishmentBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardAndPunishment/AwardAndPunishmentBLL.cs new file mode 100644 index 000000000..f78fcf537 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardAndPunishment/AwardAndPunishmentBLL.cs @@ -0,0 +1,150 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-09-24 10:33 + /// 描 述:AwardAndPunishment + /// + public class AwardAndPunishmentBLL : AwardAndPunishmentIBLL + { + private AwardAndPunishmentService awardAndPunishmentService = new AwardAndPunishmentService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return awardAndPunishmentService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取AwardAndPunishment表实体数据 + /// + /// 主键 + /// + 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 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + awardAndPunishmentService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + 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 扩展数据 + /// + /// 注册 and 取消注册 + /// + /// 主键 + /// 实体 + 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 + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardAndPunishment/AwardAndPunishmentEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardAndPunishment/AwardAndPunishmentEntity.cs new file mode 100644 index 000000000..cc099c06a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardAndPunishment/AwardAndPunishmentEntity.cs @@ -0,0 +1,75 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-09-24 10:33 + /// 描 述:AwardAndPunishment + /// + public class AwardAndPunishmentEntity + { + #region 实体成员 + /// + /// 主键 + /// + [Column("ID")] + public string Id { get; set; } + /// + /// 名称 + /// + [Column("AWARDNAME")] + public string AwardName { get; set; } + /// + /// 奖励代码 + /// + [Column("CODEPRIZE")] + public string CodePrize { get; set; } + /// + /// 奖励级别 + /// + [Column("AWARDTYPE")] + public string AwardType { get; set; } + /// + /// 奖励属性(0集体 1个人) + /// + [Column("NATURETYPE")] + public string NatureType { get; set; } + /// + /// IsValid + /// + [Column("ISVALID")] + public string IsValid { get; set; } + /// + /// 0:奖励 1 惩戒 + /// + [Column("ISAWARD")] + public string IsAward { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.Id = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardAndPunishment/AwardAndPunishmentIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardAndPunishment/AwardAndPunishmentIBLL.cs new file mode 100644 index 000000000..e309fd534 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardAndPunishment/AwardAndPunishmentIBLL.cs @@ -0,0 +1,54 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-09-24 10:33 + /// 描 述:AwardAndPunishment + /// + public interface AwardAndPunishmentIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取AwardAndPunishment表实体数据 + /// + /// 主键 + /// + AwardAndPunishmentEntity GetAwardAndPunishmentEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, AwardAndPunishmentEntity entity); + #endregion + + #region 扩展数据 + /// 注册 + ///
+ /// 主键 + void EnableDisable(string keyValue, string status); + #endregion + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardAndPunishment/AwardAndPunishmentService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardAndPunishment/AwardAndPunishmentService.cs new file mode 100644 index 000000000..30cac7f72 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardAndPunishment/AwardAndPunishmentService.cs @@ -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 +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-09-24 10:33 + /// 描 述:AwardAndPunishment + /// + public class AwardAndPunishmentService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable 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(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取AwardAndPunishment表实体数据 + /// + /// 主键 + /// + public AwardAndPunishmentEntity GetAwardAndPunishmentEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + var IdList = keyValue.Split(','); + foreach (var item in IdList) + { + db.Delete(t => t.Id == item); + } + db.Commit(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + 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 扩展数据 + /// 注册 + ///
+ /// 主键 + public void EnableDisable(string keyValue, string status) + { + var db = BaseRepository("CollegeMIS").BeginTrans(); + try + { + List Ids = keyValue.Split(',').ToList(); + List AwardandPEntity = new List(); + if (status == "1") + { + foreach (var item in Ids) + { + var list = this.BaseRepository("CollegeMIS").FindEntity(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(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 + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoBLL.cs new file mode 100644 index 000000000..1012e6b46 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoBLL.cs @@ -0,0 +1,125 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-09-24 17:38 + /// 描 述:奖励惩罚管理 + /// + public class AwardPunishInfoBLL : AwardPunishInfoIBLL + { + private AwardPunishInfoService awardPunishInfoService = new AwardPunishInfoService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return awardPunishInfoService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取AwardPunishInfo表实体数据 + /// + /// 主键 + /// + 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 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + awardPunishInfoService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + 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 + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoEntity.cs new file mode 100644 index 000000000..3f9afc18d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoEntity.cs @@ -0,0 +1,110 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-09-24 17:38 + /// 描 述:奖励惩罚管理 + /// + public class AwardPunishInfoEntity + { + #region 实体成员 + /// + /// 主键 + /// + [Column("ID")] + public string Id { get; set; } + /// + /// 奖励对象 + /// + [Column("REWARDOBJECTS")] + public string RewardObjects { get; set; } + /// + /// 学号 + /// + [Column("STUID")] + public string StuId { get; set; } + /// + /// stuName + /// + [Column("STUNAME")] + public string stuName { get; set; } + /// + /// 班级 + /// + [Column("CLASSNO")] + public string ClassNo { get; set; } + /// + /// FileAddress + /// + [Column("FILEADDRESS")] + public string FileAddress { get; set; } + /// + /// 奖励/惩罚类型 + /// + [Column("AWARDNAME")] + public string AwardName { get; set; } + /// + /// 属性 0集体 1个人 + /// + [Column("NATURETYPE")] + public string NatureType { get; set; } + /// + /// 奖励级别 + /// + [Column("AWARDTYPE")] + public string AwardType { get; set; } + /// + /// 获奖/惩罚时间 + /// + [Column("WINNINGTIME")] + public DateTime? WinningTime { get; set; } + /// + /// 获奖/惩罚描述 + /// + [Column("REMARK")] + public string Remark { get; set; } + /// + /// 添加时间 + /// + [Column("ADDDATE")] + public DateTime? Adddate { get; set; } + /// + /// AddUser + /// + [Column("ADDUSER")] + public string AddUser { get; set; } + /// + /// 0奖励 1惩罚 + /// + [Column("ISVAILD")] + public string IsVaild { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.Id = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoIBLL.cs new file mode 100644 index 000000000..db417768a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoIBLL.cs @@ -0,0 +1,48 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-09-24 17:38 + /// 描 述:奖励惩罚管理 + /// + public interface AwardPunishInfoIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取AwardPunishInfo表实体数据 + /// + /// 主键 + /// + AwardPunishInfoEntity GetAwardPunishInfoEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, AwardPunishInfoEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoService.cs new file mode 100644 index 000000000..8ce0d4291 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoService.cs @@ -0,0 +1,159 @@ +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 +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-09-24 17:38 + /// 描 述:奖励惩罚管理 + /// + public class AwardPunishInfoService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable 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 "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取AwardPunishInfo表实体数据 + /// + /// 主键 + /// + public AwardPunishInfoEntity GetAwardPunishInfoEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + //多个删除 + var keyValueArr = keyValue.Split(','); + foreach (var item in keyValueArr) + { + db.Delete(t => t.Id == item); + } + db.Commit(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + 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 + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 34d82435a..d8a234fce 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj @@ -1658,6 +1658,14 @@ + + + + + + + + From 5bc0409a25c9c40d6f9c446df6d9434434ed03b2 Mon Sep 17 00:00:00 2001 From: edy Date: Sun, 26 Sep 2021 16:46:29 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=83=A9=E7=BD=9A=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E6=9D=90=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/AwardPunishInfo/AwardForm.cshtml | 44 +++---- .../Views/AwardPunishInfo/AwardForm.js | 51 +++++++- .../Views/AwardPunishInfo/AwardIndex.cshtml | 2 +- .../Views/AwardPunishInfo/AwardIndex.js | 118 ++++++++++++++++-- .../Views/AwardPunishInfo/Form.cshtml | 16 ++- .../Views/AwardPunishInfo/Form.js | 29 ++++- .../Views/AwardPunishInfo/Index.cshtml | 2 +- .../Views/AwardPunishInfo/Index.js | 63 ++++++++-- .../AwardPunishInfo/AwardPunishInfoEntity.cs | 4 +- .../AwardPunishInfo/AwardPunishInfoService.cs | 11 +- 10 files changed, 275 insertions(+), 65 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.cshtml index 69d345394..0e223a3a0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.cshtml @@ -3,41 +3,41 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
+
奖励类型*
-
+
+ +
-
+
奖励对象
-
-
- @*
-
申请材料
-
-
*@ -
-
附件上传
-
-
-
+
+ + +
+
+
附件上传
+
+
+
获奖时间*
- +
-
+
获奖描述
- +
- @*
+ -
+ *@ - +
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.js index c0ae804ff..7f1d1a0a2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.js @@ -15,8 +15,55 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { - $('#NatureType').lrDataSourceSelect({ code: 'AwardAndPunishment',value: 'id',text: 'awardname' }); - $('#stuName').lrDataItemSelect({ code: '' }); + $('#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; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.cshtml index 9039bd2b1..37ecb59a1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.cshtml @@ -16,7 +16,7 @@
奖励对象
-
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.js index 39c9fcdab..23571b051 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.js @@ -16,9 +16,65 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 220, 400); - $('#NatureType').lrDataSourceSelect({ code: 'AwardAndPunishment', value: 'id', text: 'awardname' }); - $('#stuName').lrDataItemSelect({ code: '' }); - $('#FileAddress').lrUploader(); + $('#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(); @@ -71,11 +127,37 @@ var bootstrap = function ($, learun) { $('#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=' + 'AwardAndPunishment', + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'AwardSource', key: value, keyId: 'id', callback: function (_data) { @@ -84,10 +166,17 @@ var bootstrap = function ($, learun) { }); } }, - { label: "申请材料", name: "FileAddress", width: 100, align: "left" }, + { + label: '奖励属性', name: 'NatureType', width: 100, align: "left", + formatter: function (val) { + if (val == '0') { + return '集体'; + } else { + return '个人'; + } + } + }, { label: "获奖时间", name: "WinningTime", width: 100, align: "left" }, - { label: "获奖描述", name: "Remark", width: 100, align: "left" }, - { label: "录入时间", name: "Adddate", width: 100, align: "left" }, ], mainId: 'Id', isMultiselect: true, @@ -97,8 +186,11 @@ var bootstrap = function ($, learun) { }, search: function (param) { param = param || {}; - param.IsVaild='0' + 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 () { @@ -106,3 +198,13 @@ var bootstrap = function ($, learun) { }; 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' }); +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.cshtml index 587823ff4..f3ea06aef 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.cshtml @@ -7,14 +7,12 @@
惩罚类型*
-
+
惩罚对象
-
+
+ +
- @*
-
申请材料
-
-
*@
惩罚时间*
@@ -23,11 +21,11 @@
惩罚描述
-
+ -
+ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.js index ab50835cb..cf7158b6a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.js @@ -10,14 +10,31 @@ var bootstrap = function ($, learun) { "use strict"; var page = { init: function () { - $('.lr-form-wrap').lrscroll(); page.bind(); page.initData(); }, bind: function () { - $('#NatureType').lrDataSourceSelect({ code: 'AwardAndPunishment',value: 'id',text: 'awardname' }); - $('#stuName').lrDataItemSelect({ code: '' }); - $('#FileAddress').lrUploader(); + $('#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); @@ -27,7 +44,7 @@ var bootstrap = function ($, learun) { $.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]); + $('#' + id).jfGridSet('refreshdata', data[id]); } else { $('[data-table="' + id + '"]').lrSetFormData(data[id]); @@ -35,7 +52,7 @@ var bootstrap = function ($, learun) { } }); } - $('#IsVaild').val('1'); + $('#IsVaild').val('1'); } }; // 保存数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.cshtml index f79fc5f0a..4ef00d927 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.cshtml @@ -16,7 +16,7 @@
惩罚对象
-
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.js index b6fce5ec0..ea35a36f9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.js @@ -16,9 +16,26 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 220, 400); - $('#NatureType').lrDataSourceSelect({ code: 'AwardAndPunishment', value: 'id', text: 'awardname' }); - $('#stuName').lrDataItemSelect({ code: '' }); - $('#FileAddress').lrUploader(); + $('#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(); @@ -72,10 +89,37 @@ var bootstrap = function ($, learun) { url: top.$.rootUrl + '/EducationalAdministration/AwardPunishInfo/GetPageList', headData: [ { - label: "惩罚类型", name: "NatureType", width: 100, align: "left", + 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=' + 'AwardAndPunishment', + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'PunishmentSource', key: value, keyId: 'id', callback: function (_data) { @@ -84,10 +128,7 @@ var bootstrap = function ($, learun) { }); } }, - { label: "惩罚材料", name: "FileAddress", width: 100, align: "left" }, - { label: "惩罚时间", name: "WinningTime", width: 100, align: "left" }, - { label: "惩罚描述", name: "Remark", width: 100, align: "left" }, - { label: "录入时间", name: "Adddate", width: 100, align: "left" }, + { label: "惩罚时间", name: "WinningTime", width: 200, align: "left" }, ], mainId: 'Id', isMultiselect: true, @@ -97,7 +138,7 @@ var bootstrap = function ($, learun) { }, search: function (param) { param = param || {}; - param.IsVaild='0' + param.IsVaild = '1' $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; @@ -105,4 +146,4 @@ var bootstrap = function ($, learun) { $('#gridtable').jfGridSet('reload'); }; page.init(); -} +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoEntity.cs index 3f9afc18d..816922a09 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoEntity.cs @@ -30,10 +30,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("STUID")] public string StuId { get; set; } /// - /// stuName + /// StuName /// [Column("STUNAME")] - public string stuName { get; set; } + public string StuName { get; set; } /// /// 班级 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoService.cs index 8ce0d4291..6276a326c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoService.cs @@ -42,10 +42,15 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("NatureType",queryParam["NatureType"].ToString(), DbType.String); strSql.Append(" AND t.NatureType = @NatureType "); } - if (!queryParam["stuName"].IsEmpty()) + if (!queryParam["StuName"].IsEmpty()) { - dp.Add("stuName",queryParam["stuName"].ToString(), DbType.String); - strSql.Append(" AND t.stuName = @stuName "); + 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(strSql.ToString(),dp, pagination); } From 28d58b76bdb636b5791178a670a4f83e8c9d0a3d Mon Sep 17 00:00:00 2001 From: edy Date: Mon, 27 Sep 2021 14:58:54 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=A5=96/=E5=8A=A9=E5=AD=A6=E9=87=91?= =?UTF-8?q?=E5=90=AF=E7=94=A8=20=E7=A6=81=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ScholarshipController.cs | 167 +++++++++++ .../Views/Scholarship/Form.cshtml | 27 ++ .../Views/Scholarship/Form.js | 57 ++++ .../Views/Scholarship/FormZxj.cshtml | 27 ++ .../Views/Scholarship/FormZxj.js | 57 ++++ .../Views/Scholarship/Index.cshtml | 46 +++ .../Views/Scholarship/Index.js | 128 +++++++++ .../Views/Scholarship/IndexZxj.cshtml | 46 +++ .../Views/Scholarship/IndexZxj.js | 128 +++++++++ .../Learun.Application.Web.csproj | 9 + .../ScholarshipMap.cs | 29 ++ .../Learun.Application.Mapping.csproj | 1 + .../Scholarship/ScholarshipBLL.cs | 176 ++++++++++++ .../Scholarship/ScholarshipEntity.cs | 70 +++++ .../Scholarship/ScholarshipIBLL.cs | 62 ++++ .../Scholarship/ScholarshipService.cs | 265 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 17 files changed, 1299 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScholarshipController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/FormZxj.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/FormZxj.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/IndexZxj.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/IndexZxj.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ScholarshipMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScholarshipController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScholarshipController.cs new file mode 100644 index 000000000..53ffec8eb --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScholarshipController.cs @@ -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 +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-09-27 10:33 + /// 描 述:学金类型 + /// + public class ScholarshipController : MvcControllerBase + { + private ScholarshipIBLL scholarshipIBLL = new ScholarshipBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Indexzxj() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Formzxj() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = scholarshipIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var ScholarshipData = scholarshipIBLL.GetScholarshipEntity(keyValue); + var jsonData = new + { + Scholarship = ScholarshipData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + scholarshipIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + ScholarshipEntity entity = strEntity.ToObject(); + 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 扩展数据 + /// + /// 启用/禁用 + /// + /// + /// + /// + [HttpPost] + [AjaxOnly] + + public ActionResult EnableDisable(string keyValue, string status) + { + scholarshipIBLL.EnableDisable(keyValue, status); + return Success("操作成功!"); + } + #endregion + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Form.cshtml new file mode 100644 index 000000000..4eaf73403 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Form.cshtml @@ -0,0 +1,27 @@ +@{ + ViewBag.Title = "学金类型"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
奖学金名称*
+ +
+
+
奖学金代码*
+ +
+
+
状态*
+
+
+ + +
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Scholarship/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Form.js new file mode 100644 index 000000000..3343ae3ca --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/FormZxj.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/FormZxj.cshtml new file mode 100644 index 000000000..6fdb8b858 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/FormZxj.cshtml @@ -0,0 +1,27 @@ +@{ + ViewBag.Title = "学金类型"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
助学金名称*
+ +
+
+
助学金代码*
+ +
+
+
状态*
+
+
+ + +
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Scholarship/FormZxj.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/FormZxj.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/FormZxj.js new file mode 100644 index 000000000..1e5b810ed --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Index.cshtml new file mode 100644 index 000000000..674ea70d0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Index.cshtml @@ -0,0 +1,46 @@ +@{ + ViewBag.Title = "学金类型"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
奖学金名称
+ +
+
+
奖学金代码
+ +
+
+
状态
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Scholarship/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Index.js new file mode 100644 index 000000000..f4c8a0e0c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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" ? "启用" : + "禁用"; + } + }, + ], + 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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/IndexZxj.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/IndexZxj.cshtml new file mode 100644 index 000000000..6ca8930b8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/IndexZxj.cshtml @@ -0,0 +1,46 @@ +@{ + ViewBag.Title = "学金类型"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
助学金名称
+ +
+
+
助学金代码
+ +
+
+
状态
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Scholarship/IndexZxj.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/IndexZxj.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/IndexZxj.js new file mode 100644 index 000000000..6e1d9090a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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" ? "启用" : + "禁用"; + } + }, + ], + 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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 8e7667a81..46f3675ea 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -812,6 +812,7 @@ + @@ -975,6 +976,8 @@ + + @@ -6386,6 +6389,10 @@ + + + + @@ -7189,6 +7196,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ScholarshipMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ScholarshipMap.cs new file mode 100644 index 000000000..cba035eac --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ScholarshipMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-09-27 10:33 + /// 描 述:学金类型 + /// + public class ScholarshipMap : EntityTypeConfiguration + { + public ScholarshipMap() + { + #region 表、主键 + //表 + this.ToTable("SCHOLARSHIP"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index d270a98cd..5296706b6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -562,6 +562,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipBLL.cs new file mode 100644 index 000000000..eb30a496d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipBLL.cs @@ -0,0 +1,176 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-09-27 10:33 + /// 描 述:学金类型 + /// + public class ScholarshipBLL : ScholarshipIBLL + { + private ScholarshipService scholarshipService = new ScholarshipService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return scholarshipService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取Scholarship表实体数据 + /// + /// 主键 + /// + 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 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + scholarshipService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + 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 扩展数据 + /// + /// 获取CdLessonSort表实体数据 + /// 分类编号 + /// + /// + 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 启用和禁用 + /// + /// 注册 and 取消注册 + /// + /// 主键 + /// 实体 + 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 + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipEntity.cs new file mode 100644 index 000000000..854bb63f4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipEntity.cs @@ -0,0 +1,70 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-09-27 10:33 + /// 描 述:学金类型 + /// + public class ScholarshipEntity + { + #region 实体成员 + /// + /// Id + /// + [Column("ID")] + public string Id { get; set; } + /// + /// ItemName + /// + [Column("ITEMNAME")] + public string ItemName { get; set; } + /// + /// ItemCode + /// + [Column("ITEMCODE")] + public string ItemCode { get; set; } + /// + /// 0启用 1 禁用 + /// + [Column("ISVALID")] + public int? IsValid { get; set; } + /// + /// 0未删除 1 已删除 + /// + [Column("ISDEL")] + public int? IsDel { get; set; } + /// + /// 0 奖学金 1助学金 + /// + [Column("ISTYPE")] + public int? IsType { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.Id = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipIBLL.cs new file mode 100644 index 000000000..3076589b0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipIBLL.cs @@ -0,0 +1,62 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-09-27 10:33 + /// 描 述:学金类型 + /// + public interface ScholarshipIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取Scholarship表实体数据 + /// + /// 主键 + /// + ScholarshipEntity GetScholarshipEntity(string keyValue); + + /// + ///获取重复数据 + /// + /// + /// + ScholarshipEntity NameOrCode(string ItemName, string ItemCode, int? IsType); + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, ScholarshipEntity entity); + #endregion + + /// + /// 启用和禁用 + /// + /// + /// + void EnableDisable(string keyValue,string status); + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipService.cs new file mode 100644 index 000000000..c6a330e2d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipService.cs @@ -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 +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-09-27 10:33 + /// 描 述:学金类型 + /// + public class ScholarshipService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable 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() + "%", 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(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取Scholarship表实体数据 + /// + /// 主键 + /// + public ScholarshipEntity GetScholarshipEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + 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(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); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + 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 判断重复 + /// + /// 判断重复 + /// + /// 名称 + /// 编码 + /// 类型 + /// + public ScholarshipEntity NameOrCode(string ItemName, string ItemCode, int? IsType) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(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 启用和禁用 + + /// + /// 启用和禁用 + /// + /// + /// + public void EnableDisable(string keyValue, string status) + { + var db = BaseRepository("CollegeMIS").BeginTrans(); + try + { + List Ids = keyValue.Split(',').ToList(); + List ScholList = new List(); + if (status == "1") + { + foreach (var item in Ids) + { + var list = this.BaseRepository("CollegeMIS").FindEntity(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(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 + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index d8a234fce..514cedf6d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj @@ -1666,6 +1666,10 @@ + + + + From ed3bddba672169dbe908285f6ca890cf181415e0 Mon Sep 17 00:00:00 2001 From: edy Date: Mon, 11 Oct 2021 14:38:47 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ScholarshipController.cs | 2 +- .../EducationalAdministration/Views/Scholarship/Index.cshtml | 2 +- .../EducationalAdministration/Views/Scholarship/IndexZxj.cshtml | 2 +- .../EducationalAdministration/Scholarship/ScholarshipService.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScholarshipController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScholarshipController.cs index 53ffec8eb..c5e9f444e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScholarshipController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScholarshipController.cs @@ -137,7 +137,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers } else { - if (Lists.Id.Contains(keyValue)) + if (!Lists.Id.Contains(keyValue)) { return Fail("添加失败!名称或编码已存在"); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Index.cshtml index 674ea70d0..4f7de4c8a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/Index.cshtml @@ -20,7 +20,7 @@
状态
-
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/IndexZxj.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/IndexZxj.cshtml index 6ca8930b8..ca7de88aa 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/IndexZxj.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarship/IndexZxj.cshtml @@ -20,7 +20,7 @@
状态
-
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipService.cs index c6a330e2d..7a990cbca 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarship/ScholarshipService.cs @@ -46,7 +46,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration if (!queryParam["ItemCode"].IsEmpty()) { - dp.Add("ItemCode", "%" + queryParam["ItemCode"].ToString() + "%", DbType.String); + dp.Add("ItemCode", "%" + queryParam["ItemCode"].ToString().ToUpperInvariant() + "%", DbType.String); strSql.Append(" AND t.ItemCode Like @ItemCode "); } From ea22d6fd8a8249233abd22b45f865866c61b3c5b Mon Sep 17 00:00:00 2001 From: edy Date: Tue, 12 Oct 2021 10:31:54 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E5=A5=96=E5=AD=A6=E9=87=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ScholarshipxjController.cs | 117 ++++++++++++++ .../Views/Scholarshipxj/Form.cshtml | 43 +++++ .../Views/Scholarshipxj/Form.js | 58 +++++++ .../Views/Scholarshipxj/Index.cshtml | 26 +++ .../Views/Scholarshipxj/Index.js | 112 +++++++++++++ .../Views/Scholarshipxj/IndexTwo.cshtml | 46 ++++++ .../Views/Scholarshipxj/IndexTwo.js | 133 +++++++++++++++ .../Learun.Application.Web.csproj | 7 + .../ScholarshipAuditMap.cs | 29 ++++ .../Learun.Application.Mapping.csproj | 1 + .../Scholarshipzxj/ScholarshipxjBLL.cs | 125 ++++++++++++++ .../Scholarshipzxj/ScholarshipxjEntity.cs | 110 +++++++++++++ .../Scholarshipzxj/ScholarshipxjIBLL.cs | 48 ++++++ .../Scholarshipzxj/ScholarshipxjService.cs | 153 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 15 files changed, 1012 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScholarshipxjController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/IndexTwo.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/IndexTwo.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ScholarshipAuditMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarshipzxj/ScholarshipxjBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarshipzxj/ScholarshipxjEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarshipzxj/ScholarshipxjIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarshipzxj/ScholarshipxjService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScholarshipxjController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScholarshipxjController.cs new file mode 100644 index 000000000..6db7feb2f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScholarshipxjController.cs @@ -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 +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-10-11 16:46 + /// 描 述:助学金及审核 + /// + public class ScholarshipxjController : MvcControllerBase + { + private ScholarshipxjIBLL scholarshipxjIBLL = new ScholarshipxjBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = scholarshipxjIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var ScholarshipxjData = scholarshipxjIBLL.GetScholarshipxjEntity( keyValue ); + var jsonData = new { + ScholarshipAxj = ScholarshipxjData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + scholarshipxjIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + ScholarshipxjEntity entity = strEntity.ToObject(); + scholarshipxjIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Form.cshtml new file mode 100644 index 000000000..e18b10d31 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Form.cshtml @@ -0,0 +1,43 @@ +@{ + ViewBag.Title = "助学金及审核"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
助学金类型*
+
+
+
+
学生
+ +
+ @*
+
申请材料
+
+
*@ +
+
获得时间*
+ +
+
+
描述
+ +
+ @*
+
录入人
+ +
+
+
录入时间
+ +
*@ + + +
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Scholarshipxj/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Form.js new file mode 100644 index 000000000..9e153a6b8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Index.cshtml new file mode 100644 index 000000000..b81b0f9c7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Index.cshtml @@ -0,0 +1,26 @@ +@{ + ViewBag.Title = "助学金及审核"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Scholarshipxj/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Index.js new file mode 100644 index 000000000..f0cf64459 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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' }); +//} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/IndexTwo.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/IndexTwo.cshtml new file mode 100644 index 000000000..9710db8e6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/IndexTwo.cshtml @@ -0,0 +1,46 @@ +@{ + ViewBag.Title = "奖学金提名"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+ 列表信息 +
+
+
+
+
+
+
+
学生姓名
+ +
+
+
+
+
+ @*
+
年级
+ +
*@ +
+
班级
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/DtHonoraryUser/IndexTwo.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/IndexTwo.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/IndexTwo.js new file mode 100644 index 000000000..f81ad7a14 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/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; +}; \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 46f3675ea..6a10909b0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -813,6 +813,7 @@ + @@ -976,6 +977,7 @@ + @@ -6393,6 +6395,10 @@ + + + + @@ -7198,6 +7204,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ScholarshipAuditMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ScholarshipAuditMap.cs new file mode 100644 index 000000000..cb778eb8e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ScholarshipAuditMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-10-11 16:46 + /// 描 述:助学金及审核 + /// + public class ScholarshipAuditMap : EntityTypeConfiguration + { + public ScholarshipAuditMap() + { + #region 表、主键 + //表 + this.ToTable("SCHOLARSHIPAUDIT"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index 5296706b6..e805167ae 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -563,6 +563,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarshipzxj/ScholarshipxjBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarshipzxj/ScholarshipxjBLL.cs new file mode 100644 index 000000000..19979ce1f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarshipzxj/ScholarshipxjBLL.cs @@ -0,0 +1,125 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-10-11 16:46 + /// 描 述:助学金及审核 + /// + public class ScholarshipxjBLL : ScholarshipxjIBLL + { + private ScholarshipxjService scholarshipxjService = new ScholarshipxjService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return scholarshipxjService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取ScholarshipAudit表实体数据 + /// + /// 主键 + /// + 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 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + scholarshipxjService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + 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 + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarshipzxj/ScholarshipxjEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarshipzxj/ScholarshipxjEntity.cs new file mode 100644 index 000000000..a89541728 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarshipzxj/ScholarshipxjEntity.cs @@ -0,0 +1,110 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-10-11 16:46 + /// 描 述:助学金及审核 + /// + public class ScholarshipxjEntity + { + #region 实体成员 + /// + /// 主键 + /// + [Column("ID")] + public string Id { get; set; } + /// + /// 姓名 + /// + [Column("STUNAME")] + public string StuName { get; set; } + /// + /// 学号 + /// + [Column("STUNO")] + public string StuNo { get; set; } + /// + /// 班级 + /// + [Column("CLASSNO")] + public string ClassNo { get; set; } + /// + /// SchoolType + /// + [Column("SCHOOLTYPE")] + public string SchoolType { get; set; } + /// + /// 获得时间 /申请时间 + /// + [Column("GETTIME")] + public DateTime? GetTime { get; set; } + /// + /// 0奖学金 1助学金 + /// + [Column("ISTYPE")] + public string IsType { get; set; } + /// + /// 状态 0草稿 1 审核中 2 审核完成 + /// + [Column("STATE")] + public string State { get; set; } + /// + /// 审核人 + /// + [Column("AUDITPEOPLE")] + public string AuditPeople { get; set; } + /// + /// 审核时间 + /// + [Column("AUDITTIME")] + public DateTime? AuditTime { get; set; } + /// + /// 录入人 + /// + [Column("LRPEOPLE")] + public string LrPeople { get; set; } + /// + /// 录入时间 + /// + [Column("LRTIME")] + public DateTime? LrTime { get; set; } + /// + /// 附件 + /// + [Column("ATTACHMENTNAME")] + public string AttachmentName { get; set; } + /// + /// 备注 + /// + [Column("REMARK")] + public string Remark { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.Id = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarshipzxj/ScholarshipxjIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarshipzxj/ScholarshipxjIBLL.cs new file mode 100644 index 000000000..f17b22656 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarshipzxj/ScholarshipxjIBLL.cs @@ -0,0 +1,48 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-10-11 16:46 + /// 描 述:助学金及审核 + /// + public interface ScholarshipxjIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取ScholarshipAudit表实体数据 + /// + /// 主键 + /// + ScholarshipxjEntity GetScholarshipxjEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, ScholarshipxjEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarshipzxj/ScholarshipxjService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarshipzxj/ScholarshipxjService.cs new file mode 100644 index 000000000..34f6acfeb --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarshipzxj/ScholarshipxjService.cs @@ -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 +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-10-11 16:46 + /// 描 述:助学金及审核 + /// + public class ScholarshipxjService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable 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(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取ScholarshipAudit表实体数据 + /// + /// 主键 + /// + public ScholarshipxjEntity GetScholarshipxjEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t=>t.Id == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + 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 + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 514cedf6d..290f5accc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj @@ -1670,6 +1670,10 @@ + + + +