From 2efbdd5506414e585348cd09518db53adcee9f7f Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Fri, 8 Jul 2022 18:12:48 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E6=96=B0?= =?UTF-8?q?=E7=94=9F=E9=A2=86=E5=8F=96=E7=94=A8=E5=93=81=EF=BC=9A=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=A2=86=E5=86=9B=E8=AE=AD=E6=9C=8D=E8=A3=85=EF=BC=8C?= =?UTF-8?q?=E9=A2=86=E5=BA=8A=E4=B8=8A=E7=94=A8=E5=93=81=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/StuInfoFreshController.cs | 22 +++++ .../Views/StuInfoFresh/GetKeyIndex.cshtml | 17 +++- .../Views/StuInfoFresh/GetKeyIndex.js | 87 +++++++++++++++++++ .../StuInfoFresh/StuInfoFreshBLL.cs | 48 ++++++++++ .../StuInfoFresh/StuInfoFreshEntity.cs | 26 ++++++ .../StuInfoFresh/StuInfoFreshIBLL.cs | 14 +++ .../StuInfoFresh/StuInfoFreshService.cs | 60 +++++++++++++ 7 files changed, 270 insertions(+), 4 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs index 593a5d8b6..b287f0901 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs @@ -577,6 +577,28 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return Success("操作成功"); } /// + ///领取军训服装 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult IsGetMiliClothes(string keyValue, string status) + { + stuInfoFreshIBLL.IsGetMiliClothes(keyValue, status); + return Success("操作成功"); + } + /// + ///领取床上用品 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult IsGetBedding(string keyValue, string status) + { + stuInfoFreshIBLL.IsGetBedding(keyValue, status); + return Success("操作成功"); + } + /// ///缴费 /// /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/GetKeyIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/GetKeyIndex.cshtml index 11fe2af88..6926d314f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/GetKeyIndex.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/GetKeyIndex.cshtml @@ -37,10 +37,19 @@
 查看 -  领取钥匙 -  设置未领取钥匙 -  领取校园卡 -  设置未领取校园卡 + +
 删除宿舍信息 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/GetKeyIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/GetKeyIndex.js index 729f8ccc6..abcefa69a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/GetKeyIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/GetKeyIndex.js @@ -153,6 +153,79 @@ var bootstrap = function ($, learun) { }); } }); + + // 领军训服装 + $('#lr_getMiliClothes').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + selectedRow = $('#gridtable').jfGridGet('rowdata'); + if (learun.checkrow(keyValue)) { + if (selectedRow.GetMiliClothesStatus == "1") { + learun.alert.warning("当前新生已领取军训服装!"); + return; + } + learun.layerConfirm('是否确认领取军训服装!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/IsGetMiliClothes', { keyValue: keyValue, status: 1 }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 设置未领军训服装 + $('#lr_cancelGetMiliClothes').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + selectedRow = $('#gridtable').jfGridGet('rowdata'); + if (learun.checkrow(keyValue)) { + if (selectedRow.GetMiliClothesStatus != "1") { + learun.alert.warning("当前新生暂未领取军训服装!"); + return; + } + learun.layerConfirm('是否设置新生未领取军训服装!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/IsGetMiliClothes', { keyValue: keyValue, status: 0 }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 领床上用品 + $('#lr_getBedding').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + selectedRow = $('#gridtable').jfGridGet('rowdata'); + if (learun.checkrow(keyValue)) { + if (selectedRow.GetBeddingStatus == "1") { + learun.alert.warning("当前新生已领取床上用品!"); + return; + } + learun.layerConfirm('是否确认领取床上用品!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/IsGetBedding', { keyValue: keyValue, status: 1 }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 设置未领床上用品 + $('#lr_cancelGetBedding').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + selectedRow = $('#gridtable').jfGridGet('rowdata'); + if (learun.checkrow(keyValue)) { + if (selectedRow.GetBeddingStatus != "1") { + learun.alert.warning("当前新生暂未领取床上用品!"); + return; + } + learun.layerConfirm('是否设置新生未领取床上用品!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/IsGetBedding', { keyValue: keyValue, status: 0 }, function () { + refreshGirdData(); + }); + } + }); + } + }); }, initGird: function () { $('#gridtable').lrAuthorizeJfGrid({ @@ -209,6 +282,20 @@ var bootstrap = function ($, learun) { } }, { label: '领取校园卡时间', name: 'GetCardDate', width: 130, align: "left" }, + + { + label: '领军训服装状态', name: 'GetMiliClothesStatus', width: 100, align: "left", formatter: function (value) { + return value == 1 ? "已领取" : "未领取"; + } + }, + { label: '领军训服装时间', name: 'GetMiliClothesDate', width: 130, align: "left" }, + + { + label: '领床上用品状态', name: 'GetBeddingStatus', width: 100, align: "left", formatter: function (value) { + return value == 1 ? "已领取" : "未领取"; + } + }, + { label: '领床上用品时间', name: 'GetBeddingDate', width: 130, align: "left" }, { label: '系', name: 'DeptNo', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs index f0d81fed9..896041c8b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs @@ -600,6 +600,54 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 领取军训服装 + /// 主键 + /// + /// + public void IsGetMiliClothes(string keyValue, string status) + { + try + { + stuInfoFreshService.IsGetMiliClothes(keyValue, status); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 领取床上用品 + /// 主键 + /// + /// + public void IsGetBedding(string keyValue, string status) + { + try + { + stuInfoFreshService.IsGetBedding(keyValue, status); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// /// 缴费 /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshEntity.cs index 0f076d9da..d9fa427fd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshEntity.cs @@ -644,6 +644,32 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("BANKNO")] public string BankNo { get; set; } + + /// + /// 领军训服装时间 + /// + /// + [Column("GETMILICLOTHESDATE")] + public DateTime? GetMiliClothesDate { get; set; } + /// + /// 领军训服装状态 + /// + /// + [Column("GETMILICLOTHESSTATUS")] + public string GetMiliClothesStatus { get; set; } + + /// + /// 领床上用品时间 + /// + /// + [Column("GETBEDDINGDATE")] + public DateTime? GetBeddingDate { get; set; } + /// + /// 领床上用品状态 + /// + /// + [Column("GETBEDDINGSTATUS")] + public string GetBeddingStatus { get; set; } #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs index 46f4460ce..ed30b2e7e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs @@ -166,6 +166,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// void IsGetCard(string keyValue, string status); + /// + /// 领取军训服装 + /// 主键 + /// + /// + void IsGetMiliClothes(string keyValue, string status); + + /// + /// 领取床上用品 + /// 主键 + /// + /// + void IsGetBedding(string keyValue, string status); + /// /// 缴费 /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs index 64b293b98..d2f057ceb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs @@ -1104,6 +1104,66 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 领取军训服装 + /// 主键 + /// + /// + public void IsGetMiliClothes(string keyValue, string status) + { + try + { + if (status == "1")//领取 + { + this.BaseRepository("CollegeMIS").ExecuteBySql("update StuInfoFresh set GetMiliClothesStatus='1',GetMiliClothesDate='" + DateTime.Now + "' where ID='" + keyValue + "' "); + } + else + { + this.BaseRepository("CollegeMIS").ExecuteBySql("update StuInfoFresh set GetMiliClothesStatus='0',GetMiliClothesDate=null where ID='" + keyValue + "' "); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// + /// 领取床上用品 + /// 主键 + /// + /// + public void IsGetBedding(string keyValue, string status) + { + try + { + if (status == "1")//领取 + { + this.BaseRepository("CollegeMIS").ExecuteBySql("update StuInfoFresh set GetBeddingStatus='1',GetBeddingDate='" + DateTime.Now + "' where ID='" + keyValue + "' "); + } + else + { + this.BaseRepository("CollegeMIS").ExecuteBySql("update StuInfoFresh set GetBeddingStatus='0',GetBeddingDate=null where ID='" + keyValue + "' "); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } /// /// 缴费 /// 主键