From bffe8c5bbe49af92fd686156535d54af5c189b79 Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 30 Jun 2022 12:30:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E5=A4=84=E5=88=86=E7=AE=A1?= =?UTF-8?q?=E7=90=86--=E9=99=84=E4=BB=B6=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/StuPunishmentController.cs | 14 ++++++-- .../Views/StuPunishment/CancelForm.cshtml | 15 ++++++++ .../Views/StuPunishment/CancelForm.js | 35 +++++++++++++++++++ .../Views/StuPunishment/Form.cshtml | 24 +++++++------ .../Views/StuPunishment/Form.js | 1 + .../Views/StuPunishment/Index.js | 20 +++++++---- .../Learun.Application.Web.csproj | 2 ++ .../StuPunishment/StuPunishmentBLL.cs | 4 +-- .../StuPunishment/StuPunishmentEntity.cs | 24 ++++++++++++- .../StuPunishment/StuPunishmentIBLL.cs | 2 +- .../StuPunishment/StuPunishmentService.cs | 7 ++-- 11 files changed, 122 insertions(+), 26 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/CancelForm.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/CancelForm.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuPunishmentController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuPunishmentController.cs index 569c7f202..b7c36916e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuPunishmentController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuPunishmentController.cs @@ -37,6 +37,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// + /// 解除处分表单页 + /// + /// + [HttpGet] + public ActionResult CancelForm() + { + return View(); + } + #endregion #region 获取数据 @@ -114,9 +124,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers /// [HttpPost] [AjaxOnly] - public ActionResult DoCancelPunish(string keyValue, bool status) + public ActionResult DoCancelPunish(string keyValue, bool status, string File) { - stuPunishmentIBLL.DoCancelPunish(keyValue, status); + stuPunishmentIBLL.DoCancelPunish(keyValue, status, File); return Success("操作成功!"); } #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/CancelForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/CancelForm.cshtml new file mode 100644 index 000000000..cd819caeb --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/CancelForm.cshtml @@ -0,0 +1,15 @@ +@{ + ViewBag.Title = "开课计划"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
解除文号*
+ +
+
+
解除文件*
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuPunishment/CancelForm.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/CancelForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/CancelForm.js new file mode 100644 index 000000000..143f1382d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/CancelForm.js @@ -0,0 +1,35 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-11-29 11:43 + * 描 述:处分解除 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + }, + bind: function () { + $('#CancelFilePatch').lrUploader(); + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = $('#form').lrGetFormData(); + var EmpNo = postData.EmpNo; + var File = postData.CancelFilePatch; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuPunishment/DoCancelPunish', { keyValue: keyValue, status: true, File: File }, function () { + }); + if (!!callBack) { + callBack(); + } + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Form.cshtml index 9560e249e..4c4bd4bb0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Form.cshtml @@ -3,31 +3,31 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
+
学号*
-
+
-
+
姓名*
-
+
学年*
-
+
学期*
处分名称*
-
+
-
[Column("CANCELPUNISHDATE")] public DateTime? CancelPunishDate { get; set; } + + /// + /// 附件路径 + /// + [Column("FilePatch")] + public string FilePatch { get; set; } + /// + /// 取消文件路径 + /// + [Column("CANCELFILEPATCH")] + public string CancelFilePatch { get; set; } + /// + /// 取消用户 + /// + [Column("CANCELUSER")] + public string CancelUser { get; set; } + #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishment/StuPunishmentIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishment/StuPunishmentIBLL.cs index 1c35cbc4e..8911e4e57 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishment/StuPunishmentIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishment/StuPunishmentIBLL.cs @@ -73,7 +73,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 主键 /// /// - void DoCancelPunish(string keyValue, bool status); + void DoCancelPunish(string keyValue, bool status, string File); #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishment/StuPunishmentService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishment/StuPunishmentService.cs index 2f08ca743..7e0db635a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishment/StuPunishmentService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishment/StuPunishmentService.cs @@ -244,20 +244,21 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 主键 /// /// - public void DoCancelPunish(string keyValue, bool status) + public void DoCancelPunish(string keyValue, bool status, string File) { try { + var userList = LoginUserInfo.Get(); var keyvalue = Convert.ToInt32(keyValue); if (status) { //解除处分 - this.BaseRepository("CollegeMIS").ExecuteBySql("update StuPunishment set IsCancelPunish=1,CancelPunishDate='" + DateTime.Now + "' where Id= " + keyValue); + this.BaseRepository("CollegeMIS").ExecuteBySql("update StuPunishment set IsCancelPunish=1,CancelUser='" + userList.realName + "',CancelPunishDate='" + DateTime.Now + "',CancelFilePatch='" + File + "' where Id= " + keyValue); } else { //取消解除处分 - this.BaseRepository("CollegeMIS").ExecuteBySql("update StuPunishment set IsCancelPunish=0,CancelPunishDate=null where Id= " + keyValue); + this.BaseRepository("CollegeMIS").ExecuteBySql("update StuPunishment set IsCancelPunish=0,CancelPunishDate=null,CancelUser=null,CancelFilePatch=null where Id= " + keyValue); } } catch (Exception ex)