From 73b64c3f75a2d535e4591148f4c47630af487812 Mon Sep 17 00:00:00 2001 From: ndbs Date: Wed, 14 Dec 2022 14:22:17 +0800 Subject: [PATCH 1/4] =?UTF-8?q?app2.0=E5=80=9F=E9=98=85=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/BookBorrowApi.cs | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/BookBorrowApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/BookBorrowApi.cs index 1eb14f888..2093cbc6f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/BookBorrowApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/BookBorrowApi.cs @@ -23,6 +23,10 @@ namespace Learun.Application.WebApi.Modules : base("/Learun/adms/EducationalAdministration/BookBorrow") { Get["/pagelist"] = GetPageList; + //Get["/list"] = GetList; + Get["/form"] = GetForm; + Post["/delete"] = DeleteForm; + Post["/save"] = SaveForm; } #region 获取数据 @@ -44,6 +48,76 @@ namespace Learun.Application.WebApi.Modules }; return Success(jsonData); } + + ///// + ///// 获取页面显示列表数据 + ///// + ///// + ///// + //public Response GetList(dynamic _) + //{ + // string queryJson = this.GetReqData(); + // var data = bookBorrowIBLL.GetPageList(queryJson); + // return Success(data); + //} + /// + /// 获取表单数据 + /// + /// + /// + public Response GetForm(dynamic _) + { + string keyValue = this.GetReqData(); + var Book_borrowinfoData = bookBorrowIBLL.GetBook_borrowinfoEntity(keyValue); + var jsonData = new + { + Book_borrowinfo = Book_borrowinfoData, + }; + return Success(jsonData); + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// + /// + public Response DeleteForm(dynamic _) + { + string keyValue = this.GetReqData(); + bookBorrowIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + + /// + /// 保存实体数据(新增、修改) + /// + /// + /// + public Response SaveForm(dynamic _) + { + ReqFormEntity parameter = this.GetReqData(); + Book_borrowinfoEntity entity = parameter.strEntity.ToObject(); + bookBorrowIBLL.SaveEntity(parameter.keyValue, entity); + return Success("保存成功!"); + } + #endregion + + #region 私有类 + + /// + /// 表单实体类 + /// + private class ReqFormEntity + { + public string keyValue { get; set; } + public string strEntity { get; set; } + } + #endregion + } } \ No newline at end of file From bc0cc7e37a182a356c5104b77c5f3435fa6bd520 Mon Sep 17 00:00:00 2001 From: lb01 Date: Wed, 14 Dec 2022 15:08:47 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=80=9F=E9=98=85?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=9A=84=E5=A2=9E=E5=88=A0=E6=94=B9=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BookBorrow/list.vue | 649 ++++++++++-------- .../BookBorrow/single.vue | 215 ++++++ 2 files changed, 560 insertions(+), 304 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/BookBorrow/single.vue diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/BookBorrow/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/BookBorrow/list.vue index 94577373b..d0986d591 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/BookBorrow/list.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/BookBorrow/list.vue @@ -1,304 +1,345 @@ - - - - - - - \ No newline at end of file + + + + + + + diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/BookBorrow/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/BookBorrow/single.vue new file mode 100644 index 000000000..c3042816d --- /dev/null +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/BookBorrow/single.vue @@ -0,0 +1,215 @@ + + + + \ No newline at end of file From 45713c1cd462bc4e8913ec2007656fe7e40741ca Mon Sep 17 00:00:00 2001 From: ndbs Date: Wed, 14 Dec 2022 19:04:49 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=8B=9B=E7=94=9F=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E6=9D=A5=E6=BA=90=E7=AE=A1=E7=90=86,=E4=B8=93=E4=B8=9A?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/RecruitStuPlanController.cs | 174 +++++++++++ .../Views/RecruitStuPlan/Form.cshtml | 39 +++ .../Views/RecruitStuPlan/Form.js | 64 +++++ .../Views/RecruitStuPlan/FormPlan.cshtml | 43 +++ .../Views/RecruitStuPlan/FormPlan.js | 72 +++++ .../Views/RecruitStuPlan/Index.cshtml | 50 ++++ .../Views/RecruitStuPlan/Index.js | 213 ++++++++++++++ .../Views/RecruitStuPlan/IndexPlan.cshtml | 50 ++++ .../Views/RecruitStuPlan/IndexPlan.js | 219 ++++++++++++++ .../Learun.Application.Web.csproj | 9 + .../RecruitStuPlanMap.cs | 29 ++ .../Learun.Application.Mapping.csproj | 1 + .../RecruitStuPlan/RecruitStuPlanBLL.cs | 170 +++++++++++ .../RecruitStuPlan/RecruitStuPlanEntity.cs | 121 ++++++++ .../RecruitStuPlan/RecruitStuPlanIBLL.cs | 56 ++++ .../RecruitStuPlan/RecruitStuPlanService.cs | 271 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 17 files changed, 1585 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/RecruitStuPlanController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/FormPlan.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/FormPlan.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/IndexPlan.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/IndexPlan.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/RecruitStuPlanMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/RecruitStuPlan/RecruitStuPlanBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/RecruitStuPlan/RecruitStuPlanEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/RecruitStuPlan/RecruitStuPlanIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/RecruitStuPlan/RecruitStuPlanService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/RecruitStuPlanController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/RecruitStuPlanController.cs new file mode 100644 index 000000000..002d43141 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/RecruitStuPlanController.cs @@ -0,0 +1,174 @@ +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 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-12-14 16:36 + /// 描 述:RecruitStuPlan + /// + public class RecruitStuPlanController : MvcControllerBase + { + private RecruitStuPlanIBLL recruitStuPlanIBLL = new RecruitStuPlanBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult IndexPlan() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult FormPlan() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = recruitStuPlanIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListPlan(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = recruitStuPlanIBLL.GetPageListPlan(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 RecruitStuPlanData = recruitStuPlanIBLL.GetRecruitStuPlanEntity(keyValue); + var jsonData = new + { + RecruitStuPlan = RecruitStuPlanData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + recruitStuPlanIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + RecruitStuPlanEntity entity = strEntity.ToObject(); + recruitStuPlanIBLL.SaveEntity(keyValue, entity); + if (keyValue != null) + { + } + return Success("保存成功!"); + } + #endregion + + #region 扩展数据 + /// + /// 启用/禁用 + /// + /// + /// + /// + [HttpPost] + [AjaxOnly] + + public ActionResult Lock(string keyValue, string status) + { + recruitStuPlanIBLL.DisableEntity(keyValue, status); + return Success("操作成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/Form.cshtml new file mode 100644 index 000000000..932b46717 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/Form.cshtml @@ -0,0 +1,39 @@ +@{ + ViewBag.Title = "RecruitStuPlan"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
计划年月*
+
+
+
+
招生科类*
+
+
+
+
省份*
+
+
+
+
系部*
+
+
+
+
专业*
+
+
+
+
教务专业码
+ +
+
+
教委专业名称
+ +
+
+
计划招生人数*
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/RecruitStuPlan/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/Form.js new file mode 100644 index 000000000..d54b22a09 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/Form.js @@ -0,0 +1,64 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-12-14 16:36 + * 描 述:RecruitStuPlan + */ +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 () { + //学年 + $('#PlanYearMonth').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + $('#RecruitStuSubject').lrDataItemSelect({ code: 'MidTermSubject' }); + $('#ProvinceNo').lrDataSourceSelect({ code: 'DIC_PROVINCE',value: 'pcode',text: 'pname' }); + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'majorno',text: 'majorname' }); + $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo',value: 'deptno',text: 'deptname' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/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]); + } + } + }); + } + $('#RecruitNum').val('0'); + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('#form').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('#form').lrGetFormData()) + }; + console.log(postData,"postData") + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/FormPlan.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/FormPlan.cshtml new file mode 100644 index 000000000..7060fb2a8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/FormPlan.cshtml @@ -0,0 +1,43 @@ +@{ + ViewBag.Title = "RecruitStuPlan"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
计划年月*
+
+
+
+
年级*
+
+
+
+
招生科类*
+
+
+
+
系部*
+
+
+
+
专业*
+
+
+
+
教务专业码
+ +
+
+
教委专业名称
+ +
+
+
本专科
+
+
+
+
计划招生人数*
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/RecruitStuPlan/FormPlan.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/FormPlan.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/FormPlan.js new file mode 100644 index 000000000..91a0160df --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/FormPlan.js @@ -0,0 +1,72 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-12-14 16:36 + * 描 述:RecruitStuPlan + */ +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 () { + //学年 + $('#PlanYearMonth').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //年级 + $('#Grade').lrselect({ + placeholder: "请选择年级", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetGradeData', + value: 'value', + text: 'text' + }); + $('#RecruitStuSubject').lrDataItemSelect({ code: 'MidTermSubject' }); + $('#ProvinceNo').lrDataSourceSelect({ code: 'DIC_PROVINCE',value: 'pcode',text: 'pname' }); + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); + $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo',value: 'deptno',text: 'deptname' }); + $('#CollegeScience').lrDataItemSelect({ code: 'CollegeType' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/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]); + } + } + }); + } + $('#RecruitNum').val('0'); + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/Index.cshtml new file mode 100644 index 000000000..5e4ba0542 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/Index.cshtml @@ -0,0 +1,50 @@ +@{ + ViewBag.Title = "RecruitStuPlan"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
计划年月
+
+
+
+
招生科类
+
+
+
+
省份
+
+
+
+
专业
+
+
+
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/RecruitStuPlan/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/Index.js new file mode 100644 index 000000000..7e7dc99c4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/Index.js @@ -0,0 +1,213 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-12-14 16:36 + * 描 述:RecruitStuPlan + */ +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); + //学年 + $('#PlanYearMonth').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + $('#RecruitStuSubject').lrDataItemSelect({ code: 'MidTermSubject' }); + $('#ProvinceNo').lrDataSourceSelect({ code: 'DIC_PROVINCE', value: 'pcode', text: 'pname' }); + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/Form', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('PlanID'); + if (learun.checkrow(keyValue)) { + var CheckMark = $('#gridtable').jfGridValue('CheckMark'); + if (CheckMark != 0) { + learun.alert.warning("选中记录中包含已审核项目!"); + return; + } + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('PlanID'); + if (learun.checkrow(keyValue)) { + var CheckMark = $('#gridtable').jfGridValue('CheckMark'); + if (CheckMark.indexOf('true') != -1) { + learun.alert.warning("选中记录中包含已启用项目!"); + return; + } + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //审核 + $('#lr_lock').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('PlanID'); + if (learun.checkrow(keyValue)) { + var CheckMark = $('#gridtable').jfGridValue('CheckMark'); + if (CheckMark != 0) { + learun.alert.warning("选中记录中包含已审核项目!"); + return; + } + learun.layerConfirm('是否确认审核该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/Lock', { keyValue: keyValue, status: '1' }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //去审核 + $('#lr_unlock').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('PlanID'); + if (learun.checkrow(keyValue)) { + var CheckMark = $('#gridtable').jfGridValue('CheckMark'); + if (CheckMark != 1) { + learun.alert.warning("选中记录中包含未审核审核项目!"); + return; + } + learun.layerConfirm('是否确认去审核该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/Lock', { keyValue: keyValue, status: '0' }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/GetPageList', + headData: [ + { label: "计划年月", name: "PlanYearMonth", width: 100, align: "left", }, + { + label: "招生科类", name: "RecruitStuSubject", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'MidTermSubject', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "省份编码", name: "ProvinceNo", width: 100, align: "left", }, + { + label: "省份", name: "ProvinceNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_PROVINCE', + key: value, + keyId: 'pcode', + callback: function (_data) { + callback(_data['pname']); + } + }); + } + }, + { + label: "系部编号", name: "DeptNo", width: 100, align: "left", + }, + { + label: "系部名称", name: "DeptNo", width: 100, 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: "MajorNo", width: 100, align: "left", + }, + { + label: "专业名称", name: "MajorNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', + key: value, + keyId: 'majorno', + callback: function (_data) { + callback(_data['majorname']); + } + }); + } + }, + { label: "教务专业码", name: "GovMajorNo", width: 100, align: "left" }, + { label: "教委专业名称", name: "GovMajorName", width: 100, align: "left" }, + { label: "计划招生人数", name: "RecruitNum", width: 100, align: "left" }, + { + label: "状态", name: "CheckMark", width: 100, align: "left", + formatter: function (cellvalue) { + //return cellvalue == true ? "" : ""; + return cellvalue == true ? "已审核" : "未审核"; + } + }, + + ], + mainId: 'PlanID', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#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/RecruitStuPlan/IndexPlan.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/IndexPlan.cshtml new file mode 100644 index 000000000..4f133099e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/IndexPlan.cshtml @@ -0,0 +1,50 @@ +@{ + ViewBag.Title = "RecruitStuPlan"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
计划年月
+
+
+
+
招生科类
+
+
+
+
省份
+
+
+
+
专业
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/RecruitStuPlan/IndexPlan.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/IndexPlan.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/IndexPlan.js new file mode 100644 index 000000000..a62f6c94c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/IndexPlan.js @@ -0,0 +1,219 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-12-14 16:36 + * 描 述:RecruitStuPlan + */ +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); + //学年 + $('#PlanYearMonth').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //年级 + $('#Grade').lrselect({ + placeholder: "请选择年级", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetGradeData', + value: 'value', + text: 'text' + }); + $('#RecruitStuSubject').lrDataItemSelect({ code: 'MidTermSubject' }); + $('#ProvinceNo').lrDataSourceSelect({ code: 'DIC_PROVINCE', value: 'pcode', text: 'pname' }); + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/FormPlan', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('PlanID'); + if (learun.checkrow(keyValue)) { + var CheckMark = $('#gridtable').jfGridValue('CheckMark'); + if (CheckMark != 0) { + learun.alert.warning("选中记录中包含已审核项目!"); + return; + } + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/FormPlan?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('PlanID'); + if (learun.checkrow(keyValue)) { + var CheckMark = $('#gridtable').jfGridValue('CheckMark'); + if (CheckMark.indexOf('true') != -1) { + learun.alert.warning("选中记录中包含已启用项目!"); + return; + } + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //审核 + $('#lr_lock').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('PlanID'); + if (learun.checkrow(keyValue)) { + var CheckMark = $('#gridtable').jfGridValue('CheckMark'); + if (CheckMark != 0) { + learun.alert.warning("选中记录中包含已审核项目!"); + return; + } + learun.layerConfirm('是否确认审核该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/Lock', { keyValue: keyValue, status: '1' }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //去审核 + $('#lr_unlock').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('PlanID'); + if (learun.checkrow(keyValue)) { + var CheckMark = $('#gridtable').jfGridValue('CheckMark'); + if (CheckMark != 1) { + learun.alert.warning("选中记录中包含未审核审核项目!"); + return; + } + learun.layerConfirm('是否确认去审核该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/Lock', { keyValue: keyValue, status: '0' }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/GetPageListPlan', + headData: [ + { label: "计划年月", name: "PlanYearMonth", width: 100, align: "left", }, + { + label: "招生科类", name: "RecruitStuSubject", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'MidTermSubject', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "系部代码", name: "DeptNo", width: 100, align: "left", + }, + { + label: "系部名称", name: "DeptNo", width: 100, 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: "MajorNo", width: 100, align: "left", + }, + { + label: "专业名称", name: "MajorNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', + key: value, + keyId: 'majorno', + callback: function (_data) { + callback(_data['majorname']); + } + }); + } + }, + { + label: "本专科", name: "CollegeScience", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'CollegeType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "教务专业码", name: "GovMajorNo", width: 100, align: "left" }, + { label: "教委专业名称", name: "GovMajorName", width: 100, align: "left" }, + { label: "计划招生人数", name: "RecruitNum", width: 100, align: "left" }, + //{ + // label: "状态", name: "CheckMark", width: 100, align: "left", + // formatter: function (cellvalue) { + // //return cellvalue == true ? "" : ""; + // return cellvalue == true ? "已审核" : "未审核"; + // } + //}, + + ], + mainId: 'PlanID', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#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 55a9149e0..6520194ca 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 @@ -847,6 +847,7 @@ + @@ -1063,6 +1064,8 @@ + + @@ -6410,6 +6413,10 @@ + + + + @@ -7707,6 +7714,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/RecruitStuPlanMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/RecruitStuPlanMap.cs new file mode 100644 index 000000000..184552ba3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/RecruitStuPlanMap.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 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-12-14 16:36 + /// 描 述:RecruitStuPlan + /// + public class RecruitStuPlanMap : EntityTypeConfiguration + { + public RecruitStuPlanMap() + { + #region 表、主键 + //表 + this.ToTable("RECRUITSTUPLAN"); + //主键 + this.HasKey(t => t.PlanID); + #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 0e9df956c..40b7e46e2 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 @@ -603,6 +603,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/RecruitStuPlan/RecruitStuPlanBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/RecruitStuPlan/RecruitStuPlanBLL.cs new file mode 100644 index 000000000..ba9fae896 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/RecruitStuPlan/RecruitStuPlanBLL.cs @@ -0,0 +1,170 @@ +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 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-12-14 16:36 + /// 描 述:RecruitStuPlan + /// + public class RecruitStuPlanBLL : RecruitStuPlanIBLL + { + private RecruitStuPlanService recruitStuPlanService = new RecruitStuPlanService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return recruitStuPlanService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取RecruitStuPlan表实体数据 + /// + /// 主键 + /// + public RecruitStuPlanEntity GetRecruitStuPlanEntity(string keyValue) + { + try + { + return recruitStuPlanService.GetRecruitStuPlanEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageListPlan(Pagination pagination, string queryJson) + { + try + { + return recruitStuPlanService.GetPageListPlan(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + recruitStuPlanService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, RecruitStuPlanEntity entity) + { + try + { + recruitStuPlanService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 删除实体数据 + /// + /// 主键 + public void DisableEntity(string keyValue, string status) + { + try + { + recruitStuPlanService.DisableEntity(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/RecruitStuPlan/RecruitStuPlanEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/RecruitStuPlan/RecruitStuPlanEntity.cs new file mode 100644 index 000000000..90053b388 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/RecruitStuPlan/RecruitStuPlanEntity.cs @@ -0,0 +1,121 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-12-14 16:36 + /// 描 述:RecruitStuPlan + /// + public class RecruitStuPlanEntity + { + #region 实体成员 + /// + /// 唯一键 + /// + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Column("PLANID")] + public int? PlanID { get; set; } + /// + /// PlanYearMonth计划年月 + /// + [Column("PLANYEARMONTH")] + public string PlanYearMonth { get; set; } + /// + /// 招生科类(关联表CdRecruitStuSubject) + /// + [Column("RECRUITSTUSUBJECT")] + public string RecruitStuSubject { get; set; } + /// + /// 年级 + /// + [Column("GRADE")] + public string Grade { get; set; } + /// + /// 专业代码 + /// + [Column("MAJORNO")] + public string MajorNo { get; set; } + /// + /// 专业名称 + /// + [Column("MAJORNAME")] + public string MajorName { get; set; } + /// + /// 系所代码 + /// + [Column("DEPTNO")] + public string DeptNo { get; set; } + /// + /// 系名 + /// + [Column("DEPTNAME")] + public string DeptName { get; set; } + /// + /// 教委专业代码 + /// + [Column("GOVMAJORNO")] + public string GovMajorNo { get; set; } + /// + /// 教委专业名称 + /// + [Column("GOVMAJORNAME")] + public string GovMajorName { get; set; } + /// + /// 省市码 + /// + [Column("PROVINCENO")] + public string ProvinceNo { get; set; } + /// + /// 省市简称 + /// + [Column("PROVINCEBRIEF")] + public string ProvinceBrief { get; set; } + /// + /// 招生人数 + /// + [Column("RECRUITNUM")] + public int? RecruitNum { get; set; } + /// + /// 备注 + /// + [Column("REMARK")] + public string Remark { get; set; } + /// + /// 审查标志 + /// + [Column("CHECKMARK")] + public string CheckMark { get; set; } + /// + /// 本专科 + /// + [Column("COLLEGESCIENCE")] + public string CollegeScience { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.PlanID = Convert.ToInt32(keyValue); + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/RecruitStuPlan/RecruitStuPlanIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/RecruitStuPlan/RecruitStuPlanIBLL.cs new file mode 100644 index 000000000..85c82ac8e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/RecruitStuPlan/RecruitStuPlanIBLL.cs @@ -0,0 +1,56 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-12-14 16:36 + /// 描 述:RecruitStuPlan + /// + public interface RecruitStuPlanIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageListPlan(Pagination pagination, string queryJson); + /// + /// 获取RecruitStuPlan表实体数据 + /// + /// 主键 + /// + RecruitStuPlanEntity GetRecruitStuPlanEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, RecruitStuPlanEntity entity); + void DisableEntity(string keyValue, string status); + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/RecruitStuPlan/RecruitStuPlanService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/RecruitStuPlan/RecruitStuPlanService.cs new file mode 100644 index 000000000..c0c6d4da7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/RecruitStuPlan/RecruitStuPlanService.cs @@ -0,0 +1,271 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; +using System.Linq; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-12-14 16:36 + /// 描 述:RecruitStuPlan + /// + public class RecruitStuPlanService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" t.* "); + strSql.Append(" FROM RecruitStuPlan t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["PlanYearMonth"].IsEmpty()) + { + dp.Add("PlanYearMonth", queryParam["PlanYearMonth"].ToString(), DbType.String); + strSql.Append(" AND t.PlanYearMonth = @PlanYearMonth "); + } + if (!queryParam["RecruitStuSubject"].IsEmpty()) + { + dp.Add("RecruitStuSubject", queryParam["RecruitStuSubject"].ToString(), DbType.String); + strSql.Append(" AND t.RecruitStuSubject = @RecruitStuSubject "); + } + if (!queryParam["ProvinceNo"].IsEmpty()) + { + dp.Add("ProvinceNo", queryParam["ProvinceNo"].ToString(), DbType.String); + strSql.Append(" AND t.ProvinceNo = @ProvinceNo "); + } + if (!queryParam["MajorNo"].IsEmpty()) + { + dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); + strSql.Append(" AND t.MajorNo = @MajorNo "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取RecruitStuPlan表实体数据 + /// + /// 主键 + /// + public RecruitStuPlanEntity GetRecruitStuPlanEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue.ToInt()); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageListPlan(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append(@"select PlanYearMonth, RecruitStuSubject, Grade, MajorNo, MajorName, + DeptNo, DeptName, GovMajorNo, GovMajorName,CollegeScience, count(RecruitNum) as RecruitNum from RecruitStuPlan t"); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["PlanYearMonth"].IsEmpty()) + { + dp.Add("PlanYearMonth", queryParam["PlanYearMonth"].ToString(), DbType.String); + strSql.Append(" AND t.PlanYearMonth = @PlanYearMonth "); + } + if (!queryParam["RecruitStuSubject"].IsEmpty()) + { + dp.Add("RecruitStuSubject", queryParam["RecruitStuSubject"].ToString(), DbType.String); + strSql.Append(" AND t.RecruitStuSubject = @RecruitStuSubject "); + } + if (!queryParam["ProvinceNo"].IsEmpty()) + { + dp.Add("ProvinceNo", queryParam["ProvinceNo"].ToString(), DbType.String); + strSql.Append(" AND t.ProvinceNo = @ProvinceNo "); + } + if (!queryParam["MajorNo"].IsEmpty()) + { + dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); + strSql.Append(" AND t.MajorNo = @MajorNo "); + } + strSql.Append(@"group by PlanYearMonth, RecruitStuSubject, Grade, MajorNo, MajorName, + DeptNo, DeptName, GovMajorNo, GovMajorName,CollegeScience "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + var Id = keyValue.ToInt(); + this.BaseRepository("CollegeMIS").Delete(t => t.PlanID == Id); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, RecruitStuPlanEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + entity.Create(); + entity.CheckMark = "0"; + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// + /// 删除实体数据 + /// + /// 主键 + public void DisableEntity(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 ID = item.ToInt(); + var list = this.BaseRepository("CollegeMIS").FindEntity(x => x.PlanID == ID); + if (list != null) + { + list.CheckMark = status; + AwardandPEntity.Add(list); + } + } + } + else + { + foreach (var item in Ids) + { + var ID = item.ToInt(); + var list = this.BaseRepository("CollegeMIS").FindEntity(x => x.PlanID == ID); + if (list != null) + { + list.CheckMark = status; + 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/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 1f2d2fbfa..8e136aa59 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 @@ -1847,6 +1847,10 @@ + + + + From 2d850dd6d1ba7652dee7333643382961e6357837 Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 15 Dec 2022 09:06:48 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=BD=95=E5=8F=96=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/StuNoticeController.cs | 134 +++++++++++ .../Views/RecruitStuPlan/IndexPlan.cshtml | 12 +- .../Views/StuNotice/Form.cshtml | 31 +++ .../Views/StuNotice/Form.js | 50 +++++ .../Views/StuNotice/Index.cshtml | 49 +++++ .../Views/StuNotice/Index.js | 149 +++++++++++++ .../Learun.Application.Web.csproj | 5 + .../EducationalAdministration/StuNoticeMap.cs | 29 +++ .../Learun.Application.Mapping.csproj | 1 + .../StuNotice/StuNoticeBLL.cs | 148 +++++++++++++ .../StuNotice/StuNoticeEntity.cs | 80 +++++++ .../StuNotice/StuNoticeIBLL.cs | 50 +++++ .../StuNotice/StuNoticeService.cs | 208 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 14 files changed, 944 insertions(+), 6 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuNoticeController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuNotice/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuNotice/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuNotice/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuNotice/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuNoticeMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuNotice/StuNoticeBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuNotice/StuNoticeEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuNotice/StuNoticeIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuNotice/StuNoticeService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuNoticeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuNoticeController.cs new file mode 100644 index 000000000..20d08a11f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuNoticeController.cs @@ -0,0 +1,134 @@ +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 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-12-14 19:11 + /// 描 述:StuNotice + /// + public class StuNoticeController : MvcControllerBase + { + private StuNoticeIBLL stuNoticeIBLL = new StuNoticeBLL(); + + #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 = stuNoticeIBLL.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 StuNoticeData = stuNoticeIBLL.GetStuNoticeEntity(keyValue); + var jsonData = new + { + StuNotice = StuNoticeData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + stuNoticeIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + StuNoticeEntity entity = strEntity.ToObject(); + stuNoticeIBLL.SaveEntity(keyValue, entity); + if (keyValue != null) + { + } + return Success("保存成功!"); + } + + /// + /// 启用/禁用 + /// + /// + /// + /// + [HttpPost] + [AjaxOnly] + + public ActionResult Lock(string keyValue, string status) + { + stuNoticeIBLL.EnableEntity(keyValue, status); + return Success("操作成功!"); + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/IndexPlan.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/IndexPlan.cshtml index 4f133099e..beb1bd66e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/IndexPlan.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/IndexPlan.cshtml @@ -2,7 +2,7 @@ ViewBag.Title = "RecruitStuPlan"; Layout = "~/Views/Shared/_Index.cshtml"; } -
+
@@ -35,11 +35,11 @@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuNotice/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuNotice/Form.cshtml new file mode 100644 index 000000000..f235e2f20 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuNotice/Form.cshtml @@ -0,0 +1,31 @@ +@{ + ViewBag.Title = "StuNotice"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学号*
+ +
+
+
姓名*
+ +
+
+
身份证号*
+ +
+
+
毕业证号
+ +
+
+
地址*
+ +
+
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuNotice/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuNotice/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuNotice/Form.js new file mode 100644 index 000000000..004b2d51a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuNotice/Form.js @@ -0,0 +1,50 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-12-14 19:11 + * 描 述:StuNotice + */ +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 () { + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuNotice/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]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuNotice/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuNotice/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuNotice/Index.cshtml new file mode 100644 index 000000000..458c6c9ba --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuNotice/Index.cshtml @@ -0,0 +1,49 @@ +@{ + ViewBag.Title = "StuNotice"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学号
+ +
+
+
姓名
+ +
+
+
毕业证号
+ +
+
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuNotice/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuNotice/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuNotice/Index.js new file mode 100644 index 000000000..0fdd106a7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuNotice/Index.js @@ -0,0 +1,149 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-12-14 19:11 + * 描 述:StuNotice + */ +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); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/StuNotice/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)) { + var CheckMark = $('#gridtable').jfGridValue('Status'); + if (CheckMark != 0) { + learun.alert.warning("选中记录中包含已审核项目!"); + return; + } + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/StuNotice/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)) { + var CheckMark = $('#gridtable').jfGridValue('Status'); + if (CheckMark != 0) { + learun.alert.warning("选中记录中包含已审核项目!"); + return; + } + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuNotice/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //审核 + $('#lr_lock').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var CheckMark = $('#gridtable').jfGridValue('Status'); + if (CheckMark != 0) { + learun.alert.warning("选中记录中包含已审核项目!"); + return; + } + learun.layerConfirm('是否确认审核该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuNotice/Lock', { keyValue: keyValue, status: '1' }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //去审核 + $('#lr_unlock').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var CheckMark = $('#gridtable').jfGridValue('Status'); + if (CheckMark != 1) { + learun.alert.warning("选中记录中包含未审核审核项目!"); + return; + } + learun.layerConfirm('是否确认去审核该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuNotice/Lock', { keyValue: keyValue, status: '0' }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StuNotice/GetPageList', + headData: [ + { label: "学号", name: "StuNo", width: 200, align: "left" }, + { label: "姓名", name: "StuName", width: 200, align: "left" }, + { label: "身份证号", name: "CardId", width: 200, align: "left" }, + { label: "毕业证号", name: "NoticeId", width: 200, align: "left" }, + { label: "地址", name: "Address", width: 200, align: "left" }, + { label: "备注", name: "Remark", width: 200, align: "left" }, + { + label: "状态", name: "Status", width: 100, align: "left", + formatter: function (cellvalue) { + return cellvalue == "1" ? "已审核" + : "未审核"; + } + }, + ], + mainId: 'ID', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#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 6520194ca..3b39b96f2 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 @@ -848,6 +848,7 @@ + @@ -6417,6 +6418,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuNoticeMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuNoticeMap.cs new file mode 100644 index 000000000..4e60cf1e5 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuNoticeMap.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 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-12-14 19:11 + /// 描 述:StuNotice + /// + public class StuNoticeMap : EntityTypeConfiguration + { + public StuNoticeMap() + { + #region 表、主键 + //表 + this.ToTable("STUNOTICE"); + //主键 + 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 40b7e46e2..f8ca3a040 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 @@ -604,6 +604,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuNotice/StuNoticeBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuNotice/StuNoticeBLL.cs new file mode 100644 index 000000000..416faaf5c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuNotice/StuNoticeBLL.cs @@ -0,0 +1,148 @@ +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 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-12-14 19:11 + /// 描 述:StuNotice + /// + public class StuNoticeBLL : StuNoticeIBLL + { + private StuNoticeService stuNoticeService = new StuNoticeService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return stuNoticeService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取StuNotice表实体数据 + /// + /// 主键 + /// + public StuNoticeEntity GetStuNoticeEntity(string keyValue) + { + try + { + return stuNoticeService.GetStuNoticeEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + stuNoticeService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, StuNoticeEntity entity) + { + try + { + stuNoticeService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + /// + /// 删除实体数据 + /// + /// 主键 + public void EnableEntity(string keyValue, string status) + { + try + { + stuNoticeService.EnableEntity(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/StuNotice/StuNoticeEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuNotice/StuNoticeEntity.cs new file mode 100644 index 000000000..dad651f9b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuNotice/StuNoticeEntity.cs @@ -0,0 +1,80 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-12-14 19:11 + /// 描 述:StuNotice + /// + public class StuNoticeEntity + { + #region 实体成员 + /// + /// ID + /// + [Column("ID")] + public string ID { get; set; } + /// + /// StuNo + /// + [Column("STUNO")] + public string StuNo { get; set; } + /// + /// StuName + /// + [Column("STUNAME")] + public string StuName { get; set; } + /// + /// CardId + /// + [Column("CARDID")] + public string CardId { get; set; } + /// + /// NoticeId + /// + [Column("NOTICEID")] + public string NoticeId { get; set; } + /// + /// Address + /// + [Column("ADDRESS")] + public string Address { get; set; } + /// + /// Status + /// + [Column("STATUS")] + public string Status { get; set; } + /// + /// Remark + /// + [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/StuNotice/StuNoticeIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuNotice/StuNoticeIBLL.cs new file mode 100644 index 000000000..695f792ca --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuNotice/StuNoticeIBLL.cs @@ -0,0 +1,50 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-12-14 19:11 + /// 描 述:StuNotice + /// + public interface StuNoticeIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取StuNotice表实体数据 + /// + /// 主键 + /// + StuNoticeEntity GetStuNoticeEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, StuNoticeEntity entity); + + void EnableEntity(string keyValue, string status); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuNotice/StuNoticeService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuNotice/StuNoticeService.cs new file mode 100644 index 000000000..df1b53ee0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuNotice/StuNoticeService.cs @@ -0,0 +1,208 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; +using System.Linq; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-12-14 19:11 + /// 描 述:StuNotice + /// + public class StuNoticeService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" t.* "); + strSql.Append(" FROM StuNotice t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuNo Like @StuNo "); + } + if (!queryParam["StuName"].IsEmpty()) + { + dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuName Like @StuName "); + } + if (!queryParam["NoticeId"].IsEmpty()) + { + dp.Add("NoticeId", "%" + queryParam["NoticeId"].ToString() + "%", DbType.String); + strSql.Append(" AND t.NoticeId Like @NoticeId "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取StuNotice表实体数据 + /// + /// 主键 + /// + public StuNoticeEntity GetStuNoticeEntity(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, StuNoticeEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + entity.Create(); + entity.Status = "0"; + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// 注册 + ///
+ /// 主键 + public void EnableEntity(string keyValue, string status) + { + var db = BaseRepository("CollegeMIS").BeginTrans(); + try + { + List Ids = keyValue.Split(',').ToList(); + List StuNoticeEntity = new List(); + if (status == "1") + { + foreach (var item in Ids) + { + var list = this.BaseRepository("CollegeMIS").FindEntity(x => x.ID == item); + if (list != null) + { + list.Status = "1"; + StuNoticeEntity.Add(list); + } + } + } + else + { + foreach (var item in Ids) + { + var list = this.BaseRepository("CollegeMIS").FindEntity(x => x.ID == item); + if (list != null) + { + list.Status = "0"; + StuNoticeEntity.Add(list); + } + } + } + db.Update(StuNoticeEntity); + 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/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 8e136aa59..afc6568d8 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 @@ -1851,6 +1851,10 @@ + + + +