From 1e56c6d7d33da9602be1d5c28881963bf178f0bd Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Mon, 14 Mar 2022 09:36:22 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=BF=E8=88=8D?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=97=A0=E6=B3=95=E6=A0=B9=E6=8D=AE=E7=B3=BB?= =?UTF-8?q?=E9=83=A8=E3=80=81=E4=B8=93=E4=B8=9A=E3=80=81=E7=8F=AD=E7=BA=A7?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Accommodation/AccommodationService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs index 996ada2f3..ade272d6d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs @@ -101,17 +101,17 @@ a.name as ApartmentName,b.name as UnitName,c.Name as FloorName } if (!queryParam["Dept"].IsEmpty()) { - dp.Add("Dept", "%" + queryParam["Dept"].ToString() + "%", DbType.String); + dp.Add("Dept", queryParam["Dept"].ToString(), DbType.String); strSql.Append(" AND t.Dept=@Dept "); } if (!queryParam["Class"].IsEmpty()) { - dp.Add("Class", "%" + queryParam["Class"].ToString() + "%", DbType.String); + dp.Add("Class", queryParam["Class"].ToString(), DbType.String); strSql.Append(" AND t.Class=@Class "); } if (!queryParam["Major"].IsEmpty()) { - dp.Add("Major", "%" + queryParam["Major"].ToString() + "%", DbType.String); + dp.Add("Major", queryParam["Major"].ToString(), DbType.String); strSql.Append(" AND t.Major=@Major "); } if (!queryParam["Sex"].IsEmpty()) From c4bdb29a94d17f5a9ee08876a29b7c089a87a0e4 Mon Sep 17 00:00:00 2001 From: liangkun Date: Mon, 14 Mar 2022 09:38:33 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=8F=91=E8=B5=B7?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=88=97=E8=A1=A8=E4=B8=AD=E7=9A=84=E9=87=87?= =?UTF-8?q?=E8=B4=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/NWFSchemeController.cs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFSchemeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFSchemeController.cs index fb4ef0133..9f6d42418 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFSchemeController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFSchemeController.cs @@ -251,19 +251,6 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers { item.imgUrl = null; } - - if (item.F_Id == "3a9e9db8-a928-435b-a9d2-4a4660b4cdeb") - { - item.F_Name = "采购申请(普通)"; - item.F_CodeUrl = "/AssetManagementSystem/Ass_AssetsInfoApply/IndexJY"; - item.F_Code = "caigoupt"; - } - else if (item.F_Id == "307b2c75-174f-424d-84d8-e0f8374ec6d1") - { - item.F_Name = "采购申请(耗材)"; - item.F_CodeUrl = "/AssetManagementSystem/Ass_AssetsInfoApply/IndexJYHC"; - item.F_Code = "caigouhc"; - } } return Success(data); } From 2689249a962ab25f2ed00482a1bbce7e2b4cf681 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Mon, 14 Mar 2022 11:37:04 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=AE=BF=E8=88=8D=E5=86=85=E5=8A=A1?= =?UTF-8?q?=E6=97=A5=E8=80=83=E6=A0=B8=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/EvaDormitoryInterior/Form.cshtml | 6 +- .../Views/EvaDormitoryInterior/Form.js | 5 +- .../Views/EvaDormitoryInterior/Index.cshtml | 29 ++-- .../Views/EvaDormitoryInterior/Index.js | 156 ++++++++++++++---- .../EvaDormitoryInterior/Indexold.cshtml | 36 ++++ .../Views/EvaDormitoryInterior/Indexold.js | 102 ++++++++++++ .../Learun.Application.Web.csproj | 4 +- .../EvaDormitoryInteriorEntity.cs | 8 +- .../EvaDormitoryInteriorService.cs | 12 +- 9 files changed, 304 insertions(+), 54 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Indexold.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Indexold.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Form.cshtml index aa12cf51d..aef055040 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Form.cshtml @@ -3,13 +3,13 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
+ @*
班级
-
+
*@
分数
- +
日期
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Form.js index 7ed6f9276..cdb7f68c1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Form.js @@ -6,6 +6,7 @@ */ var acceptClick; var keyValue = request('keyValue'); +var DormitoryBuildId = request('DormitoryBuildId'); var bootstrap = function ($, learun) { "use strict"; var page = { @@ -37,8 +38,10 @@ var bootstrap = function ($, learun) { if (!$('body').lrValidform()) { return false; } + var strEntity = $('body').lrGetFormData(); + strEntity.DormitoryBuildId = DormitoryBuildId; var postData = { - strEntity: JSON.stringify($('body').lrGetFormData()) + strEntity: JSON.stringify(strEntity) }; $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/EvaDormitoryInterior/SaveForm?keyValue=' + keyValue, postData, function (res) { // 保存成功后才回调 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Index.cshtml index c8e5e6dbd..a106d6c80 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Index.cshtml @@ -1,22 +1,24 @@ @{ - ViewBag.Title = "宿舍内务日考核"; + ViewBag.Title = "学生归宿管理"; Layout = "~/Views/Shared/_Index.cshtml"; } -
+
+
+
+
树形列表
+
+
+
-
+
+
+ 列表信息 +
-
-
-
-
-
班级
- -
-
-
-
+ @*
+
+
*@
@@ -26,6 +28,7 @@  录入  修改  删除 +  打印
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Index.js index a79b2d6a0..f06a99bfa 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Index.js @@ -1,18 +1,58 @@ -/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) - * Copyright (c) 2013-2018 北京泉江科技有限公司 +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 * 创建人:超级管理员 - * 日 期:2019-11-20 11:34 - * 描 述:宿舍内务日考核 + * 日 期:2022-03-10 10:06 + * 描 述:学生归宿管理 */ var refreshGirdData; +var DormitoryBuildId = ''; var bootstrap = function ($, learun) { "use strict"; + var startTime; + var endTime; var page = { init: function () { page.initGird(); page.bind(); }, bind: function () { + // 初始化左侧树形数据 + $('#dataTree').lrtree({ + url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetTree', + nodeClick: function (item) { + if (item.title == '4') { + DormitoryBuildId = item.value; + page.search({ DormitoryBuildId: item.value }); + } + } + }); + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '1', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + }); $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 220, 400); @@ -22,16 +62,20 @@ var bootstrap = function ($, learun) { }); // 新增 $('#lr_add').on('click', function () { - learun.layerForm({ - id: 'form', - title: '新增', - url: top.$.rootUrl + '/EducationalAdministration/EvaDormitoryInterior/Form', - width: 600, - height: 400, - callBack: function (id) { - return top[id].acceptClick(refreshGirdData); - } - }); + if (!!DormitoryBuildId) { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/EvaDormitoryInterior/Form?DormitoryBuildId=' + DormitoryBuildId, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } else { + return learun.alert.warning('请选择宿舍!'); + } }); // 编辑 $('#lr_edit').on('click', function () { @@ -40,7 +84,7 @@ var bootstrap = function ($, learun) { learun.layerForm({ id: 'form', title: '编辑', - url: top.$.rootUrl + '/EducationalAdministration/EvaDormitoryInterior/Form?keyValue=' + keyValue, + url: top.$.rootUrl + '/EducationalAdministration/EvaDormitoryInterior/Form?keyValue=' + keyValue + '&DormitoryBuildId=' + DormitoryBuildId, width: 600, height: 400, callBack: function (id) { @@ -62,41 +106,89 @@ var bootstrap = function ($, learun) { }); } }); + // 学生出宿 + $('#lr_out').on('click', function () { + if (!!ParentId) { + learun.layerForm({ + id: 'formout', + title: '学生出宿', + url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/FormOut?ParentId=' + ParentId, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } else { + return learun.alert.warning('请选择宿舍!'); + } + }); + + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/Form?keyValue=' + keyValue + '&ParentId=' + ParentId, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/EvaDormitoryInterior/GetPageList', headData: [ + { label: "分数", name: "Fraction", width: 100, align: "left" }, { - label: "班级", name: "Class", width: 100, align: "left", - formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', - key: value, - keyId: 'classno', - callback: function (_data) { - callback(_data['classname']); - } - }); + label: "日期", name: "Data", width: 130, align: "left", + formatter: function (value, row) { + if (!!value) { + return learun.formatDate(value, 'yyyy-MM-dd'); + } else { + return ''; + } } }, - { label: "分数", name: "Fraction", width: 100, align: "left" }, - { label: "日期", name: "Data", width: 130, align: "left" }, { label: "备注", name: "Remark", width: 100, align: "left" }, ], - mainId: 'ID', - isPage: true + mainId: 'Id', + isPage: true, + sidx: 'Data desc', }); - page.search(); }, search: function (param) { param = param || {}; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } }; refreshGirdData = function () { - page.search(); + $('#gridtable').jfGridSet('reload'); }; page.init(); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Indexold.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Indexold.cshtml new file mode 100644 index 000000000..c8e5e6dbd --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Indexold.cshtml @@ -0,0 +1,36 @@ +@{ + ViewBag.Title = "宿舍内务日考核"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
班级
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Indexold.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Indexold.js new file mode 100644 index 000000000..a79b2d6a0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Indexold.js @@ -0,0 +1,102 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-11-20 11:34 + * 描 述:宿舍内务日考核 + */ +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/EvaDormitoryInterior/Form', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/EvaDormitoryInterior/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/EvaDormitoryInterior/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/EvaDormitoryInterior/GetPageList', + headData: [ + { + label: "班级", name: "Class", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + key: value, + keyId: 'classno', + callback: function (_data) { + callback(_data['classname']); + } + }); + } + }, + { label: "分数", name: "Fraction", width: 100, align: "left" }, + { label: "日期", name: "Data", width: 130, align: "left" }, + { label: "备注", name: "Remark", width: 100, align: "left" }, + ], + mainId: 'ID', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + 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 b4692d004..16ca5cb79 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 @@ -1022,6 +1022,7 @@ + @@ -7114,7 +7115,7 @@ - + @@ -7545,6 +7546,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EvaDormitoryInterior/EvaDormitoryInteriorEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EvaDormitoryInterior/EvaDormitoryInteriorEntity.cs index 202374741..9dd44a3a4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EvaDormitoryInterior/EvaDormitoryInteriorEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EvaDormitoryInterior/EvaDormitoryInteriorEntity.cs @@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 日 期:2019-11-20 11:34 /// 描 述:宿舍内务日考核 /// - public class EvaDormitoryInteriorEntity + public class EvaDormitoryInteriorEntity { #region 实体成员 /// @@ -19,6 +19,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("ID")] public string ID { get; set; } + + /// + /// 宿舍Id + /// + [Column("DORMITORYBUILDID")] + public string DormitoryBuildId { get; set; } /// /// 班级 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EvaDormitoryInterior/EvaDormitoryInteriorService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EvaDormitoryInterior/EvaDormitoryInteriorService.cs index a35616588..0bb52e12c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EvaDormitoryInterior/EvaDormitoryInteriorService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EvaDormitoryInterior/EvaDormitoryInteriorService.cs @@ -35,7 +35,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration t.Class, t.Fraction, t.Data, - t.Remark + t.Remark, +t.DormitoryBuildId "); strSql.Append(" FROM EvaDormitoryInterior t "); strSql.Append(" WHERE 1=1 "); @@ -47,7 +48,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("Class", "%" + queryParam["Class"].ToString() + "%", DbType.String); strSql.Append(" AND t.Class Like @Class "); } - return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + if (!queryParam["DormitoryBuildId"].IsEmpty()) + { + dp.Add("DormitoryBuildId", queryParam["DormitoryBuildId"].ToString(), DbType.String); + strSql.Append(" AND t.DormitoryBuildId = @DormitoryBuildId "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) { @@ -99,7 +105,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { try { - this.BaseRepository("CollegeMIS").Delete(t=>t.ID == keyValue); + this.BaseRepository("CollegeMIS").Delete(t => t.ID == keyValue); } catch (Exception ex) { From cbef55e89fd26c40175cbf0bee6776eba3a08d1b Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Mon, 14 Mar 2022 11:57:37 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=AE=BF=E8=88=8D=E5=86=85=E5=8A=A1?= =?UTF-8?q?=E6=97=A5=E8=80=83=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/EvaDormitoryInterior/Index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Index.js index f06a99bfa..984e1839a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EvaDormitoryInterior/Index.js @@ -126,12 +126,12 @@ var bootstrap = function ($, learun) { // 编辑 $('#lr_edit').on('click', function () { - var keyValue = $('#gridtable').jfGridValue('Id'); + var keyValue = $('#gridtable').jfGridValue('ID'); if (learun.checkrow(keyValue)) { learun.layerForm({ id: 'form', title: '编辑', - url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/Form?keyValue=' + keyValue + '&ParentId=' + ParentId, + url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/Form?keyValue=' + keyValue, width: 600, height: 400, callBack: function (id) { From 417500f2f674fb9c096f27bef7c2bc85f317facf Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Mon, 14 Mar 2022 16:09:01 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AE=BF=E8=88=8D?= =?UTF-8?q?=E6=99=9A=E5=BD=92=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Acc_DormitoryRuleController.cs | 136 ++++++++++++++ .../Views/Acc_DormitoryRule/Form.cshtml | 23 +++ .../Views/Acc_DormitoryRule/Form.js | 62 +++++++ .../Views/Acc_DormitoryRule/Index.cshtml | 27 +++ .../Views/Acc_DormitoryRule/Index.js | 138 ++++++++++++++ .../Learun.Application.Web.csproj | 5 + .../Views/LR_Content/script/lr-form.js | 3 + .../Learun.Application.Mapping.csproj | 1 + .../Acc_DormitoryRuleMap.cs | 29 +++ .../Learun.Application.TwoDevelopment.csproj | 4 + .../Acc_DormitoryRule/Acc_DormitoryRuleBLL.cs | 148 +++++++++++++++ .../Acc_DormitoryRuleEntity.cs | 85 +++++++++ .../Acc_DormitoryRuleIBLL.cs | 49 +++++ .../Acc_DormitoryRuleService.cs | 172 ++++++++++++++++++ 14 files changed, 882 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Acc_DormitoryRuleController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Acc_DormitoryRuleMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Acc_DormitoryRuleController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Acc_DormitoryRuleController.cs new file mode 100644 index 000000000..fdb4f9134 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Acc_DormitoryRuleController.cs @@ -0,0 +1,136 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.LogisticsManagement; +using System.Web.Mvc; +using System.Collections.Generic; +using System; + +namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-03-14 12:05 + /// 描 述:宿舍晚归规则 + /// + public class Acc_DormitoryRuleController : MvcControllerBase + { + private Acc_DormitoryRuleIBLL acc_DormitoryRuleIBLL = new Acc_DormitoryRuleBLL(); + + #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 = acc_DormitoryRuleIBLL.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 Acc_DormitoryRuleData = acc_DormitoryRuleIBLL.GetAcc_DormitoryRuleEntity(keyValue); + var jsonData = new + { + Acc_DormitoryRule = Acc_DormitoryRuleData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + acc_DormitoryRuleIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + Acc_DormitoryRuleEntity entity = strEntity.ToObject(); + DateTime time; + bool flag = DateTime.TryParse(entity.LateReturnTime, out time); + if (!flag) + { + return Fail("晚归时间格式不正确!"); + } + + var model = acc_DormitoryRuleIBLL.GetEnableEntity(); + if (entity.IsEnable == 1) + { + if (string.IsNullOrEmpty(keyValue) && model != null) + { + return Fail("只能有一个启用的规则!"); + } + else if (!string.IsNullOrEmpty(keyValue) && model != null && model.Id != keyValue) + { + return Fail("只能有一个启用的规则!"); + } + } + acc_DormitoryRuleIBLL.SaveEntity(keyValue, entity); + + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Form.cshtml new file mode 100644 index 000000000..6a6c120e0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Form.cshtml @@ -0,0 +1,23 @@ +@{ + ViewBag.Title = "宿舍晚归规则"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
晚归时间*
+ +
+
+
推送人*
+
+
+
+
推送班主任*
+
+
+
+
启用*
+
+
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Form.js new file mode 100644 index 000000000..2dab9f792 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Form.js @@ -0,0 +1,62 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-03-14 12:05 + * 描 述:宿舍晚归规则 + */ +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 () { + $('#PushUser').lrDataSourceSelect({ + code: 'teacheruserdata', value: 'f_userid', text: 'f_realname', type: 'multiple' + }); + + $('#ClassDiredctor').lrRadioCheckbox({ + type: 'radio', + code: 'YesOrNoInt', + }); + $('#IsEnable').lrRadioCheckbox({ + type: 'radio', + code: 'YesOrNoInt', + }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Acc_DormitoryRule/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 + '/LogisticsManagement/Acc_DormitoryRule/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Index.cshtml new file mode 100644 index 000000000..ebbd5409c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Index.cshtml @@ -0,0 +1,27 @@ +@{ + ViewBag.Title = "宿舍晚归规则"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Index.js new file mode 100644 index 000000000..cd1b97a40 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Index.js @@ -0,0 +1,138 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-03-14 12:05 + * 描 述:宿舍晚归规则 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/LogisticsManagement/Acc_DormitoryRule/Form', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/LogisticsManagement/Acc_DormitoryRule/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Acc_DormitoryRule/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/LogisticsManagement/Acc_DormitoryRule/GetPageList', + headData: [ + { label: "晚归时间", name: "LateReturnTime", width: 100, align: "left" }, + { + label: "推送人", name: "PushUser", width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + if (value.indexOf(',') != -1) { + var content = ''; + var timearr = value.split(','); + for (var i = 0; i < timearr.length; i++) { + learun.clientdata.getAsync('custmerData', + { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', + key: timearr[i], + keyId: 'f_userid', + callback: function (_data) { + content += _data['f_realname']; + } + }); + } + content = content.substring(0, content.length - 1); + callback(content); + } else { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + } + }, + { + label: "推送班主任", name: "ClassDiredctor", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'YesOrNoInt', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "启用", name: "IsEnable", width: 100, align: "left", + formatter: function (cellvalue, rowObject) { + 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 16ca5cb79..2cd5285fa 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 @@ -846,6 +846,7 @@ + @@ -6701,6 +6702,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-form.js index 8a5b5bb55..75ab83149 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-form.js @@ -460,6 +460,9 @@ if (!op.code) { return $(this); } + if (!!op.type) { + dfop.type = op.type; + } var $select = $(this).lrselect(dfop); learun.clientdata.getAllAsync('sourceData', { 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 0291b6d2d..d3acfa803 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 @@ -600,6 +600,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Acc_DormitoryRuleMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Acc_DormitoryRuleMap.cs new file mode 100644 index 000000000..f56e03bcd --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/Acc_DormitoryRuleMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.LogisticsManagement; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-03-14 12:05 + /// 描 述:宿舍晚归规则 + /// + public class Acc_DormitoryRuleMap : EntityTypeConfiguration + { + public Acc_DormitoryRuleMap() + { + #region 表、主键 + //表 + this.ToTable("ACC_DORMITORYRULE"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #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 85be91922..4a459f288 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 @@ -1830,6 +1830,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleBLL.cs new file mode 100644 index 000000000..491d215b1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleBLL.cs @@ -0,0 +1,148 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-03-14 12:05 + /// 描 述:宿舍晚归规则 + /// + public class Acc_DormitoryRuleBLL : Acc_DormitoryRuleIBLL + { + private Acc_DormitoryRuleService acc_DormitoryRuleService = new Acc_DormitoryRuleService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return acc_DormitoryRuleService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取Acc_DormitoryRule表实体数据 + /// + /// 主键 + /// + public Acc_DormitoryRuleEntity GetAcc_DormitoryRuleEntity(string keyValue) + { + try + { + return acc_DormitoryRuleService.GetAcc_DormitoryRuleEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + + /// + /// 获取Acc_DormitoryRule表实体数据 + /// + /// + public Acc_DormitoryRuleEntity GetEnableEntity() + { + try + { + return acc_DormitoryRuleService.GetEnableEntity(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + acc_DormitoryRuleService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, Acc_DormitoryRuleEntity entity) + { + try + { + acc_DormitoryRuleService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleEntity.cs new file mode 100644 index 000000000..61fab88f7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleEntity.cs @@ -0,0 +1,85 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-03-14 12:05 + /// 描 述:宿舍晚归规则 + /// + public class Acc_DormitoryRuleEntity + { + #region 实体成员 + /// + /// Id + /// + [Column("ID")] + public string Id { get; set; } + /// + /// 晚归时间 + /// + [Column("LATERETURNTIME")] + public string LateReturnTime { get; set; } + /// + /// 推送人员 + /// + [Column("PUSHUSER")] + public string PushUser { get; set; } + /// + /// 是否推送班主任 + /// + [Column("CLASSDIREDCTOR")] + public int? ClassDiredctor { get; set; } + /// + /// 是否启用 + /// + [Column("ISENABLE")] + public int? IsEnable { get; set; } + /// + /// CreateTime + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// CreateUserId + /// + [Column("CREATEUSERID")] + public string CreateUserId { get; set; } + /// + /// UpdateTime + /// + [Column("UPDATETIME")] + public DateTime? UpdateTime { get; set; } + /// + /// UpdateUserId + /// + [Column("UPDATEUSERID")] + public string UpdateUserId { 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/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleIBLL.cs new file mode 100644 index 000000000..22b52a86d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleIBLL.cs @@ -0,0 +1,49 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-03-14 12:05 + /// 描 述:宿舍晚归规则 + /// + public interface Acc_DormitoryRuleIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取Acc_DormitoryRule表实体数据 + /// + /// 主键 + /// + Acc_DormitoryRuleEntity GetAcc_DormitoryRuleEntity(string keyValue); + Acc_DormitoryRuleEntity GetEnableEntity(); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, Acc_DormitoryRuleEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleService.cs new file mode 100644 index 000000000..01ff3c3f7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Acc_DormitoryRule/Acc_DormitoryRuleService.cs @@ -0,0 +1,172 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +namespace Learun.Application.TwoDevelopment.LogisticsManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-03-14 12:05 + /// 描 述:宿舍晚归规则 + /// + public class Acc_DormitoryRuleService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.Id, + t.LateReturnTime, + t.PushUser, + t.ClassDiredctor, + t.IsEnable + "); + strSql.Append(" FROM Acc_DormitoryRule t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取Acc_DormitoryRule表实体数据 + /// + /// 主键 + /// + public Acc_DormitoryRuleEntity GetAcc_DormitoryRuleEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + + /// + /// 获取Acc_DormitoryRule表实体数据 + /// + /// 主键 + /// + public Acc_DormitoryRuleEntity GetEnableEntity() + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(x => x.IsEnable == 1); + } + 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, Acc_DormitoryRuleEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + entity.Create(); + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + } +}