From 636a7f7dcd1130523fc38eb881aea698ac8e63ce Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 10 Nov 2022 12:06:38 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=BA=8F=E5=8F=B7?= =?UTF-8?q?=E8=B6=85=E8=BF=871000=E5=B1=95=E7=A4=BA=E4=B8=8D=E5=AE=8C?= =?UTF-8?q?=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Content/jquery/plugin/jfGrid/jfgrid.js | 6 +++--- .../Views/LR_Content/plugin/grid/jfgrid.css | 4 ++-- .../Views/LR_Content/plugin/grid/jfgrid.js | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jfGrid/jfgrid.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jfGrid/jfgrid.js index 3ad7c4e6a..a4575149b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jfGrid/jfgrid.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jfGrid/jfgrid.js @@ -204,18 +204,18 @@ if (dfop.isShowNum) { var $num = $('
'); $border.prepend($num); - _width += 30; + _width += 60; } if (dfop.isMultiselect) { var $cb = $('
') .css('left', _width + 'px').css('line-height', (dfop._headHeight - 1) + 'px'); $border.prepend($cb); - _width += 30; + _width += 60; } if (dfop.isSubGrid) { var $sub = $('
').css('left', _width + 'px'); $border.prepend($sub); - _width += 30; + _width += 60; } dfop._borderLeftPadding = _width; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.css b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.css index 9e1c2d243..d1ba7817b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.css +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.css @@ -47,7 +47,7 @@ position: absolute; top: 0; left: 0; - width: 30px; + width: 60px; height: 100%; border-right: 1px solid #ccc; } @@ -165,7 +165,7 @@ left: 0; font-size: 12px; color: #333; - width: 30px; + width: 60px; line-height: 27px; border-bottom: 1px solid #ccc; border-right: 1px solid #ccc; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js index 767cc70ed..0e52883b1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js @@ -998,20 +998,20 @@ // 判断是否有序号列 if (op.isShowNum) { $border.append('
'); - op.running.leftWidth += 30; + op.running.leftWidth += 60; } // 判断是否允许多选 if (op.isMultiselect) { var $cb = $('
') .css({ 'left': op.running.leftWidth, 'line-height': (op.running.headHeight - 1) + 'px' }); $border.append($cb); - op.running.leftWidth += 30; + op.running.leftWidth += 60; } // 是否有展开 if (op.isSubGrid) { var $sub = $('
').css('left', op.running.leftWidth); $border.append($sub); - op.running.leftWidth += 30; + op.running.leftWidth += 60; } op.running.leftWidth += op.running.frozenleft; $self.css({ 'padding-top': op.running.headHeight }); @@ -1281,7 +1281,7 @@ row['jfcheck'].$cell.css({ 'top': row['jfcheck'].top, 'left': row['jfcheck'].left, 'text-align': 'center', 'height': op.rowHeight, 'line-height': (op.rowHeight - 1) + 'px' }); $left.append(row['jfcheck'].$cell); - _left += 30; + _left += 60; } // 是否有子表选项 if (op.isSubGrid) { @@ -1293,7 +1293,7 @@ }; row['jfsubGrid'].$cell.css({ 'top': row['jfsubGrid'].top, 'left': row['jfsubGrid'].left, 'text-align': 'center', 'height': op.rowHeight, 'line-height': (op.rowHeight - 1) + 'px' }); $left.append(row['jfsubGrid'].$cell); - _left += 30; + _left += 60; } // 加载固定列数据 @@ -2153,7 +2153,7 @@ isAutoHeight: false, // 自动适应表格高度 height: 0, rowHeight: 28, // 行高 - numRowWitdh: 30 // 序号列宽度 + numRowWitdh: 60 // 序号列宽度 }; From e2832db662d257de858a6c03a8029c7782637b74 Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 10 Nov 2022 18:22:46 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=B0=91=E4=BD=93=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PeopleSportsActivitiesController.cs | 121 +++++++++++ .../Views/PeopleSportsActivities/Form.cshtml | 31 +++ .../Views/PeopleSportsActivities/Form.js | 38 ++++ .../Views/PeopleSportsActivities/Index.cshtml | 44 ++++ .../Views/PeopleSportsActivities/Index.js | 93 +++++++++ .../Learun.Application.Web.csproj | 5 + .../PeopleSportsActivitiesMap.cs | 29 +++ .../Learun.Application.Mapping.csproj | 1 + .../PeopleSportsActivitiesBLL.cs | 148 ++++++++++++++ .../PeopleSportsActivitiesEntity.cs | 95 +++++++++ .../PeopleSportsActivitiesIBLL.cs | 55 +++++ .../PeopleSportsActivitiesService.cs | 189 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 13 files changed, 853 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/PeopleSportsActivitiesController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/PeopleSportsActivitiesMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/PeopleSportsActivitiesController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/PeopleSportsActivitiesController.cs new file mode 100644 index 000000000..94dc428ed --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/PeopleSportsActivitiesController.cs @@ -0,0 +1,121 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using Learun.Util; +using System.Data; +using System.Web.Mvc; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-10 17:25 + /// 描 述:民体活动管理 + /// + public class PeopleSportsActivitiesController : MvcControllerBase + { + private PeopleSportsActivitiesIBLL peopleSportsActivitiesIBLL = new PeopleSportsActivitiesBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetList( string queryJson ) + { + var data = peopleSportsActivitiesIBLL.GetList(queryJson); + return Success(data); + } + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = peopleSportsActivitiesIBLL.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 data = peopleSportsActivitiesIBLL.GetEntity(keyValue); + return Success(data); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + peopleSportsActivitiesIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue,PeopleSportsActivitiesEntity entity) + { + peopleSportsActivitiesIBLL.SaveEntity(keyValue, entity); + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Form.cshtml new file mode 100644 index 000000000..d0763d8ff --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Form.cshtml @@ -0,0 +1,31 @@ +@{ + ViewBag.Title = "民体活动管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
赛事
+ +
+
+
内容
+ +
+
+
单位
+ +
+
+
时间
+ +
+
+
荣誉
+ +
+
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/PeopleSportsActivities/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Form.js new file mode 100644 index 000000000..d04ae307c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Form.js @@ -0,0 +1,38 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-10 17:25 + * 描 述:民体活动管理 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var selectedRow = learun.frameTab.currentIframe().selectedRow; + var page = { + init: function () { + page.initData(); + }, + bind: function () { + }, + initData: function () { + if (!!selectedRow) { + $('#form').lrSetFormData(selectedRow); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('#form').lrValidform()) { + return false; + } + var postData = $('#form').lrGetFormData(); + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/PeopleSportsActivities/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Index.cshtml new file mode 100644 index 000000000..dce55dc9d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Index.cshtml @@ -0,0 +1,44 @@ +@{ + ViewBag.Title = "民体活动管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
赛项
+ +
+
+
单位
+ +
+
+
荣誉
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/PeopleSportsActivities/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Index.js new file mode 100644 index 000000000..c17b729ce --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PeopleSportsActivities/Index.js @@ -0,0 +1,93 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-10 17:25 + * 描 述:民体活动管理 + */ +var selectedRow; +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 () { + selectedRow = null; + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/PeopleSportsActivities/Form', + width: 700, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + selectedRow = $('#gridtable').jfGridGet('rowdata'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/PeopleSportsActivities/Form?keyValue=' + keyValue, + width: 700, + 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/PeopleSportsActivities/DeleteForm', { keyValue: keyValue}, function () { + }); + } + }); + } + }); + }, + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/PeopleSportsActivities/GetPageList', + headData: [ + { label: '赛事', name: 'ContestItem', width: 200, align: "left" }, + { label: '内容', name: 'Contents', width: 300, align: "left" }, + { label: '单位', name: 'Unit', width: 200, align: "left" }, + { label: '时间', name: 'MatchTime', width: 200, align: "left" }, + { label: '荣誉', name: 'Honour', width: 200, align: "left" }, + { label: '备注', name: 'Remark', width: 300, align: "left" }, + ], + 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 c648110db..cf73cad65 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 @@ -887,6 +887,7 @@ + @@ -6999,6 +7000,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/PeopleSportsActivitiesMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/PeopleSportsActivitiesMap.cs new file mode 100644 index 000000000..b0db4a715 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/PeopleSportsActivitiesMap.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-11-10 17:25 + /// 描 述:民体活动管理 + /// + public class PeopleSportsActivitiesMap : EntityTypeConfiguration + { + public PeopleSportsActivitiesMap() + { + #region 表、主键 + //表 + this.ToTable("PEOPLESPORTSACTIVITIES"); + //主键 + 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 aa3cbcfc5..8862c2c62 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 @@ -645,6 +645,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesBLL.cs new file mode 100644 index 000000000..936aac3df --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesBLL.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-11-10 17:25 + /// 描 述:民体活动管理 + /// + public class PeopleSportsActivitiesBLL : PeopleSportsActivitiesIBLL + { + private PeopleSportsActivitiesService peopleSportsActivitiesService = new PeopleSportsActivitiesService(); + + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetList( string queryJson ) + { + try + { + return peopleSportsActivitiesService.GetList(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return peopleSportsActivitiesService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取实体数据 + /// + /// 主键 + /// + public PeopleSportsActivitiesEntity GetEntity(string keyValue) + { + try + { + return peopleSportsActivitiesService.GetEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + peopleSportsActivitiesService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, PeopleSportsActivitiesEntity entity) + { + try + { + peopleSportsActivitiesService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesEntity.cs new file mode 100644 index 000000000..c7c61c1bb --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesEntity.cs @@ -0,0 +1,95 @@ +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-11-10 17:25 + /// 描 述:民体活动管理 + /// + public class PeopleSportsActivitiesEntity + { + #region 实体成员 + /// + /// ID + /// + /// + [Column("ID")] + public string ID { get; set; } + /// + /// 赛事 + /// + /// + [Column("CONTESTITEM")] + public string ContestItem { get; set; } + /// + /// 内容 + /// + /// + [Column("CONTENTS")] + public string Contents { get; set; } + /// + /// 单位 + /// + /// + [Column("UNIT")] + public string Unit { get; set; } + /// + /// MatchTime + /// + /// + [Column("MATCHTIME")] + public DateTime? MatchTime { get; set; } + /// + /// 荣誉 + /// + /// + [Column("HONOUR")] + public string Honour { get; set; } + /// + /// Remark + /// + /// + [Column("REMARK")] + public string Remark { get; set; } + /// + /// CreateUserId + /// + /// + [Column("CREATEUSERID")] + public string CreateUserId { get; set; } + /// + /// CreateTime + /// + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + var userlogin = LoginUserInfo.Get(); + this.ID = Guid.NewGuid().ToString(); + this.CreateTime = DateTime.Now; + this.CreateUserId = userlogin.userId; + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.ID = keyValue; + } + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesIBLL.cs new file mode 100644 index 000000000..64285d587 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesIBLL.cs @@ -0,0 +1,55 @@ +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-11-10 17:25 + /// 描 述:民体活动管理 + /// + public interface PeopleSportsActivitiesIBLL + { + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + IEnumerable GetList( string queryJson ); + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取实体数据 + /// + /// 主键 + /// + PeopleSportsActivitiesEntity GetEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, PeopleSportsActivitiesEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesService.cs new file mode 100644 index 000000000..f459f7506 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PeopleSportsActivities/PeopleSportsActivitiesService.cs @@ -0,0 +1,189 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-10 17:25 + /// 描 述:民体活动管理 + /// + public class PeopleSportsActivitiesService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 条件参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + //参考写法 + //var queryParam = queryJson.ToJObject(); + // 虚拟参数 + //var dp = new DynamicParameters(new { }); + //dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + var strSql = new StringBuilder(); + strSql.Append("SELECT t.*"); + strSql.Append(" FROM PeopleSportsActivities t "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString()); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 条件参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM PeopleSportsActivities t "); + strSql.Append(" where 1= 1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + var userInfo = LoginUserInfo.Get(); + if (!queryParam["ContestItem"].IsEmpty()) + { + dp.Add("ContestItem", "%" + queryParam["ContestItem"].ToString() + "%", DbType.String); + strSql.Append(" AND t.ContestItem like @ContestItem "); + } + if (!queryParam["Unit"].IsEmpty()) + { + dp.Add("Unit", "%" + queryParam["Unit"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Unit like @Unit "); + } + if (!queryParam["Honour"].IsEmpty()) + { + dp.Add("Honour", "%" + queryParam["Honour"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Honour like @Honour "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取实体数据 + /// + /// 主键 + /// + public PeopleSportsActivitiesEntity GetEntity(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, PeopleSportsActivitiesEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + entity.Create(); + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 961103abf..d3c6ee25c 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 @@ -2003,6 +2003,10 @@ + + + + From 4e13ff3552a22468fc97eaaa2fcda87f09bb6a3b Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Fri, 11 Nov 2022 09:27:13 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E7=BB=8F=E8=B4=B9=E5=BC=80=E6=94=AF?= =?UTF-8?q?=E7=94=B3=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/FundsApplyController.cs | 2 + .../Views/FundsApply/Index.cshtml | 7 +- .../Views/FundsApply/Index.js | 108 +++++++++++------- .../XmlConfig/ioc.config | 2 +- .../FundsApply/FundsApplyService.cs | 1 + .../FundsApplyDetail/FundsApplyDetailBLL.cs | 1 + .../FundsApplyDetailService.cs | 1 + 7 files changed, 78 insertions(+), 44 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyController.cs index da27d80a3..da691f003 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyController.cs @@ -99,9 +99,11 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers public ActionResult GetFormDataByProcessId(string processId) { var FundsApplyData = fundsApplyIBLL.GetEntityByProcessId(processId); + var FundsApplyDetailData = fundsApplyDetailIBLL.GetListByApplyId(FundsApplyData.Id); var jsonData = new { FundsApply = FundsApplyData, + FundsApplyDetail = FundsApplyDetailData, }; return Success(jsonData); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml index e97220d9e..eae4e3edb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml @@ -13,11 +13,12 @@ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js index a356e7b1c..4ccfa8b43 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js @@ -46,6 +46,12 @@ var bootstrap = function ($, learun) { $('#lr_edit').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status !== 0) { + learun.alert.warning("当前项目已提交不能编辑!"); + return; + } + learun.layerForm({ id: 'formFundsApply', title: '编辑', @@ -71,10 +77,15 @@ var bootstrap = function ($, learun) { $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status !== 0) { + learun.alert.warning("当前项目已提交不能编辑!"); + return; + } learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { - learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/FundsApply/DeleteForm', { keyValue: keyValue}, function () { - refreshGirdData(); + learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/FundsApply/DeleteForm', { keyValue: keyValue }, function () { + page.search(); }); } }); @@ -103,7 +114,22 @@ var bootstrap = function ($, learun) { }); } }); + //查看 + $('#lr_look').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formFundsApply', + title: '查看', + url: top.$.rootUrl + '/AssetManagementSystem/FundsApply/FormView?keyValue=' + keyValue, + width: 860, + height: 600, + callBack: function (id) { + } + }); + } + }); }, // 初始化列表 initGird: function () { @@ -111,27 +137,31 @@ var bootstrap = function ($, learun) { url: top.$.rootUrl + '/AssetManagementSystem/FundsApply/GetPageList', headData: [ { label: "申报单号", name: "EnCode", width: 200, align: "left" }, - { label: "申报部门", name: "ApplyDept", width: 100, align: "left", - formatterAsync: function (callback, value, row, op,$cell) { - learun.clientdata.getAsync('department', { - key: value, - callback: function (_data) { - callback(_data.name); - } - }); - }}, - { label: "填报时间", name: "ApplyTime", width: 100, align: "left"}, - { label: "填报人", name: "ApplyUser", width: 100, align: "left", - formatterAsync: function (callback, value, row, op,$cell) { - learun.clientdata.getAsync('user', { - key: value, - callback: function (_data) { - callback(_data.name); - } - }); - }}, - { label: "备注", name: "Remark", width: 100, align: "left"}, - { label: "总金额", name: "SumAmount", width: 100, align: "left"}, + { + label: "申报部门", name: "ApplyDept", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('department', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: "填报时间", name: "ApplyTime", width: 100, align: "left" }, + { + label: "填报人", name: "ApplyUser", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: "备注", name: "Remark", width: 100, align: "left" }, + { label: "总金额", name: "SumAmount", width: 100, align: "left" }, { label: "人民币(大写)", name: "UpperAmount", width: 100, align: "left" }, { label: "审批状态", name: "Status", width: 100, align: "left", @@ -147,33 +177,31 @@ var bootstrap = function ($, learun) { } ], - mainId:'Id', + mainId: 'Id', isPage: true }); page.search(); }, search: function (param) { param = param || {}; - $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; refreshGirdData = function (res, postData) { - if (!!res) - { - if (res.code == 200) - { - // 发起流程 - var postData = { - schemeCode:'LC_FundsApply',// 填写流程对应模板编号 - processId:processId, - level:'1', - }; - learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function(data) { - learun.loading(false); - }); + if (!!res) { + if (res.code == 200) { + // 发起流程 + var postData = { + schemeCode: 'LC_FundsApply',// 填写流程对应模板编号 + processId: processId, + level: '1', + }; + learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { + learun.loading(false); + }); + } + page.search(); } - page.search(); - } }; page.init(); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config index 45e3931a9..c6bb783be 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config @@ -35,7 +35,7 @@ - + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs index 367911a38..2c897ed60 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs @@ -115,6 +115,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem try { this.BaseRepository("CollegeMIS").Delete(t => t.Id == keyValue); + this.BaseRepository("CollegeMIS").Delete(t => t.ApplyId == keyValue); } catch (Exception ex) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailBLL.cs index 57835808a..c8909b2c4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailBLL.cs @@ -85,6 +85,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem } } } + #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailService.cs index 5fdd277a2..19718c593 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailService.cs @@ -102,6 +102,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem } } } + #endregion #region 提交数据