From 5ee96c80af11205014bdacdcb57752f442ad6a76 Mon Sep 17 00:00:00 2001 From: lifeng Date: Thu, 10 Nov 2022 14:25:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=9A=E7=BB=84=E7=BB=87=E6=83=85=E5=86=B5?= =?UTF-8?q?=E5=9F=BA=E7=A1=80=E6=95=B0=E6=8D=AE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ods_dzzqkjcsjController.cs | 117 +++++++++++++ .../Views/ods_dzzqkjcsj/Form.cshtml | 51 ++++++ .../Views/ods_dzzqkjcsj/Form.js | 51 ++++++ .../Views/ods_dzzqkjcsj/Index.cshtml | 29 ++++ .../Views/ods_dzzqkjcsj/Index.js | 106 ++++++++++++ .../Learun.Application.Web.csproj | 5 + .../Changyang_zhdn/ODS_DZZQKJCSJMap.cs | 29 ++++ .../Learun.Application.Mapping.csproj | 1 + .../ods_dzzqkjcsj/ODS_DZZQKJCSJEntity.cs | 100 +++++++++++ .../ods_dzzqkjcsj/ods_dzzqkjcsjBLL.cs | 125 ++++++++++++++ .../ods_dzzqkjcsj/ods_dzzqkjcsjIBLL.cs | 48 ++++++ .../ods_dzzqkjcsj/ods_dzzqkjcsjService.cs | 155 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 13 files changed, 821 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Controllers/ods_dzzqkjcsjController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_dzzqkjcsj/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_dzzqkjcsj/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_dzzqkjcsj/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_dzzqkjcsj/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Changyang_zhdn/ODS_DZZQKJCSJMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_dzzqkjcsj/ODS_DZZQKJCSJEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_dzzqkjcsj/ods_dzzqkjcsjBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_dzzqkjcsj/ods_dzzqkjcsjIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_dzzqkjcsj/ods_dzzqkjcsjService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Controllers/ods_dzzqkjcsjController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Controllers/ods_dzzqkjcsjController.cs new file mode 100644 index 000000000..2368aeeac --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Controllers/ods_dzzqkjcsjController.cs @@ -0,0 +1,117 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.Changyang_zhdn; +using System.Web.Mvc; +using System.Collections.Generic; + +namespace Learun.Application.Web.Areas.Changyang_zhdn.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-10 14:24 + /// 描 述:党组织情况基础数据表 + /// + public class ods_dzzqkjcsjController : MvcControllerBase + { + private ods_dzzqkjcsjIBLL ods_dzzqkjcsjIBLL = new ods_dzzqkjcsjBLL(); + + #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 = ods_dzzqkjcsjIBLL.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 ODS_DZZQKJCSJData = ods_dzzqkjcsjIBLL.GetODS_DZZQKJCSJEntity( keyValue ); + var jsonData = new { + ODS_DZZQKJCSJ = ODS_DZZQKJCSJData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + ods_dzzqkjcsjIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + ODS_DZZQKJCSJEntity entity = strEntity.ToObject(); + ods_dzzqkjcsjIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_dzzqkjcsj/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_dzzqkjcsj/Form.cshtml new file mode 100644 index 000000000..61436070c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_dzzqkjcsj/Form.cshtml @@ -0,0 +1,51 @@ +@{ + ViewBag.Title = "党组织情况基础数据表"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学校机构代码
+ +
+
+
学校机构名称
+ +
+
+
党组织类型
+ +
+
+
党组织名称
+ +
+
+
党组织编号
+ +
+
+
隶属上级党组织
+ +
+
+
党内领导姓名
+ +
+
+
党内领导教工号
+ +
+
+
党内领导职务
+
+
+
+
党组织党员人数
+ +
+
+
数据采集时间
+ +
+
+@Html.AppendJsFile("/Areas/Changyang_zhdn/Views/ods_dzzqkjcsj/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_dzzqkjcsj/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_dzzqkjcsj/Form.js new file mode 100644 index 000000000..fa9f55e00 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_dzzqkjcsj/Form.js @@ -0,0 +1,51 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-10 14:24 + * 描 述:党组织情况基础数据表 + */ +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 () { + $('#DNLDZW').lrDataItemSelect({ code: 'dnldrzwdm' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/Changyang_zhdn/ods_dzzqkjcsj/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 + '/Changyang_zhdn/ods_dzzqkjcsj/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_dzzqkjcsj/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_dzzqkjcsj/Index.cshtml new file mode 100644 index 000000000..718f6c363 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_dzzqkjcsj/Index.cshtml @@ -0,0 +1,29 @@ +@{ + ViewBag.Title = "党组织情况基础数据表"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+ +
+ + +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/Changyang_zhdn/Views/ods_dzzqkjcsj/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_dzzqkjcsj/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_dzzqkjcsj/Index.js new file mode 100644 index 000000000..6dc26b5e6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_dzzqkjcsj/Index.js @@ -0,0 +1,106 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-10 14:24 + * 描 述:党组织情况基础数据表 + */ +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 + '/Changyang_zhdn/ods_dzzqkjcsj/Form', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('GZZYQKSJID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/Changyang_zhdn/ods_dzzqkjcsj/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('GZZYQKSJID'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/Changyang_zhdn/ods_dzzqkjcsj/DeleteForm', { keyValue: keyValue}, function () { + refreshGirdData(); + }); + } + }); + } + }); + //  导入 + $('#lr_import').on('click', function () { + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/Changyang_zhdn/ods_dzzqkjcsj/GetPageList', + headData: [ + { label: "学校机构代码", name: "XXJGDM", width: 100, align: "left"}, + { label: "学校机构名称", name: "XXJGMC", width: 100, align: "left"}, + { label: "党组织类型", name: "DZZLX", width: 100, align: "left"}, + { label: "党组织名称", name: "DZZMC", width: 100, align: "left"}, + { label: "党组织编号", name: "DZZBH", width: 100, align: "left"}, + { label: "隶属上级党组织", name: "SJDZZ", width: 100, align: "left"}, + { label: "党内领导姓名", name: "DNLDXM", width: 100, align: "left"}, + { label: "党内领导教工号", name: "DNLDJGH", width: 100, align: "left"}, + { label: "党内领导职务", name: "DNLDZW", width: 100, align: "left", + formatterAsync: function (callback, value, row, op,$cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'dnldrzwdm', + callback: function (_data) { + callback(_data.text); + } + }); + }}, + { label: "党组织党员人数", name: "DZZDYRS", width: 100, align: "left"}, + { label: "数据采集时间", name: "SJCJSJ", width: 100, align: "left"}, + ], + mainId:'GZZYQKSJID', + 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 b2ff575bf..cb487d555 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 @@ -896,6 +896,7 @@ + @@ -7039,6 +7040,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Changyang_zhdn/ODS_DZZQKJCSJMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Changyang_zhdn/ODS_DZZQKJCSJMap.cs new file mode 100644 index 000000000..25d07b694 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Changyang_zhdn/ODS_DZZQKJCSJMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.Changyang_zhdn; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-10 14:24 + /// 描 述:党组织情况基础数据表 + /// + public class ODS_DZZQKJCSJMap : EntityTypeConfiguration + { + public ODS_DZZQKJCSJMap() + { + #region 表、主键 + //表 + this.ToTable("ODS_DZZQKJCSJ"); + //主键 + this.HasKey(t => t.GZZYQKSJID); + #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 961a0be5c..04b3a3777 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 @@ -655,6 +655,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_dzzqkjcsj/ODS_DZZQKJCSJEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_dzzqkjcsj/ODS_DZZQKJCSJEntity.cs new file mode 100644 index 000000000..259782385 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_dzzqkjcsj/ODS_DZZQKJCSJEntity.cs @@ -0,0 +1,100 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.Changyang_zhdn +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-10 14:24 + /// 描 述:党组织情况基础数据表 + /// + public class ODS_DZZQKJCSJEntity + { + #region 实体成员 + /// + /// GZZYQKSJID + /// + [Column("GZZYQKSJID")] + public string GZZYQKSJID { get; set; } + /// + /// 学校机构代码 + /// + [Column("XXJGDM")] + public string XXJGDM { get; set; } + /// + /// 学校机构名称 + /// + [Column("XXJGMC")] + public string XXJGMC { get; set; } + /// + /// 党组织类型 + /// + [Column("DZZLX")] + public string DZZLX { get; set; } + /// + /// 党组织名称 + /// + [Column("DZZMC")] + public string DZZMC { get; set; } + /// + /// 党组织编号 + /// + [Column("DZZBH")] + public string DZZBH { get; set; } + /// + /// 隶属上级党组织 + /// + [Column("SJDZZ")] + public string SJDZZ { get; set; } + /// + /// 党内领导姓名 + /// + [Column("DNLDXM")] + public string DNLDXM { get; set; } + /// + /// 党内领导教工号 + /// + [Column("DNLDJGH")] + public string DNLDJGH { get; set; } + /// + /// 党内领导职务 + /// + [Column("DNLDZW")] + public string DNLDZW { get; set; } + /// + /// 党组织党员人数 + /// + [Column("DZZDYRS")] + public int? DZZDYRS { get; set; } + /// + /// 数据采集时间 + /// + [Column("SJCJSJ")] + public string SJCJSJ { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.GZZYQKSJID = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.GZZYQKSJID = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_dzzqkjcsj/ods_dzzqkjcsjBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_dzzqkjcsj/ods_dzzqkjcsjBLL.cs new file mode 100644 index 000000000..5346009d1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_dzzqkjcsj/ods_dzzqkjcsjBLL.cs @@ -0,0 +1,125 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.Changyang_zhdn +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-10 14:24 + /// 描 述:党组织情况基础数据表 + /// + public class ods_dzzqkjcsjBLL : ods_dzzqkjcsjIBLL + { + private ods_dzzqkjcsjService ods_dzzqkjcsjService = new ods_dzzqkjcsjService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return ods_dzzqkjcsjService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取ODS_DZZQKJCSJ表实体数据 + /// + /// 主键 + /// + public ODS_DZZQKJCSJEntity GetODS_DZZQKJCSJEntity(string keyValue) + { + try + { + return ods_dzzqkjcsjService.GetODS_DZZQKJCSJEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + ods_dzzqkjcsjService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, ODS_DZZQKJCSJEntity entity) + { + try + { + ods_dzzqkjcsjService.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/Changyang_zhdn/ods_dzzqkjcsj/ods_dzzqkjcsjIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_dzzqkjcsj/ods_dzzqkjcsjIBLL.cs new file mode 100644 index 000000000..e839039ff --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_dzzqkjcsj/ods_dzzqkjcsjIBLL.cs @@ -0,0 +1,48 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.Changyang_zhdn +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-10 14:24 + /// 描 述:党组织情况基础数据表 + /// + public interface ods_dzzqkjcsjIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取ODS_DZZQKJCSJ表实体数据 + /// + /// 主键 + /// + ODS_DZZQKJCSJEntity GetODS_DZZQKJCSJEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, ODS_DZZQKJCSJEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_dzzqkjcsj/ods_dzzqkjcsjService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_dzzqkjcsj/ods_dzzqkjcsjService.cs new file mode 100644 index 000000000..7b42b25c7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_dzzqkjcsj/ods_dzzqkjcsjService.cs @@ -0,0 +1,155 @@ +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.Changyang_zhdn +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-10 14:24 + /// 描 述:党组织情况基础数据表 + /// + public class ods_dzzqkjcsjService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.GZZYQKSJID, + t.XXJGDM, + t.XXJGMC, + t.DZZLX, + t.DZZMC, + t.DZZBH, + t.SJDZZ, + t.DNLDXM, + t.DNLDJGH, + t.DNLDZW, + t.DZZDYRS, + t.SJCJSJ + "); + strSql.Append(" FROM ODS_DZZQKJCSJ t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + return this.BaseRepository("changyang").FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取ODS_DZZQKJCSJ表实体数据 + /// + /// 主键 + /// + public ODS_DZZQKJCSJEntity GetODS_DZZQKJCSJEntity(string keyValue) + { + try + { + return this.BaseRepository("changyang").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("changyang").Delete(t=>t.GZZYQKSJID == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, ODS_DZZQKJCSJEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository("changyang").Update(entity); + } + else + { + entity.Create(); + this.BaseRepository("changyang").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 8a363141f..4055becd8 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 @@ -2043,6 +2043,10 @@ + + + +