From 4b7d078402963ee6f2e6cb03726ddf6aa19673a3 Mon Sep 17 00:00:00 2001 From: lifeng Date: Wed, 9 Nov 2022 10:23:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AD=E8=81=8C=E5=AD=A6=E6=A0=A1=E6=A6=82?= =?UTF-8?q?=E5=86=B5=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_zzxxgkjcsjController.cs | 117 ++++++++++++++ .../Views/ods_zzxxgkjcsj/Form.cshtml | 15 ++ .../LR_Desktop/Views/ods_zzxxgkjcsj/Form.js | 51 ++++++ .../Views/ods_zzxxgkjcsj/Index.cshtml | 26 ++++ .../LR_Desktop/Views/ods_zzxxgkjcsj/Index.js | 94 +++++++++++ .../Learun.Application.Web.csproj | 5 + .../LR_Desktop/ODS_ZZXXGKJCSJMap.cs | 29 ++++ .../Learun.Application.Mapping.csproj | 1 + .../ods_zzxxgkjcsj/ODS_ZZXXGKJCSJEntity.cs | 140 +++++++++++++++++ .../ods_zzxxgkjcsj/ods_zzxxgkjcsjBLL.cs | 125 +++++++++++++++ .../ods_zzxxgkjcsj/ods_zzxxgkjcsjIBLL.cs | 48 ++++++ .../ods_zzxxgkjcsj/ods_zzxxgkjcsjService.cs | 146 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 13 files changed, 801 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/ods_zzxxgkjcsjController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ods_zzxxgkjcsj/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ods_zzxxgkjcsj/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ods_zzxxgkjcsj/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ods_zzxxgkjcsj/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_Desktop/ODS_ZZXXGKJCSJMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/ods_zzxxgkjcsj/ODS_ZZXXGKJCSJEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/ods_zzxxgkjcsj/ods_zzxxgkjcsjBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/ods_zzxxgkjcsj/ods_zzxxgkjcsjIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/ods_zzxxgkjcsj/ods_zzxxgkjcsjService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/ods_zzxxgkjcsjController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/ods_zzxxgkjcsjController.cs new file mode 100644 index 000000000..3dc1c1a90 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/ods_zzxxgkjcsjController.cs @@ -0,0 +1,117 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.LR_Desktop; +using System.Web.Mvc; +using System.Collections.Generic; + +namespace Learun.Application.Web.Areas.LR_Desktop.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-09 10:20 + /// 描 述:中职学校概况基础数据表 + /// + public class ods_zzxxgkjcsjController : MvcControllerBase + { + private ods_zzxxgkjcsjIBLL ods_zzxxgkjcsjIBLL = new ods_zzxxgkjcsjBLL(); + + #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_zzxxgkjcsjIBLL.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_ZZXXGKJCSJData = ods_zzxxgkjcsjIBLL.GetODS_ZZXXGKJCSJEntity( keyValue ); + var jsonData = new { + ODS_ZZXXGKJCSJ = ODS_ZZXXGKJCSJData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + ods_zzxxgkjcsjIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + ODS_ZZXXGKJCSJEntity entity = strEntity.ToObject(); + ods_zzxxgkjcsjIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ods_zzxxgkjcsj/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ods_zzxxgkjcsj/Form.cshtml new file mode 100644 index 000000000..c26362a6a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ods_zzxxgkjcsj/Form.cshtml @@ -0,0 +1,15 @@ +@{ + ViewBag.Title = "中职学校概况基础数据表"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
省机构编码
+ +
+
+
下拉框
+
+
+
+@Html.AppendJsFile("/Areas/LR_Desktop/Views/ods_zzxxgkjcsj/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ods_zzxxgkjcsj/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ods_zzxxgkjcsj/Form.js new file mode 100644 index 000000000..df4dcc920 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ods_zzxxgkjcsj/Form.js @@ -0,0 +1,51 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-09 10:20 + * 描 述:中职学校概况基础数据表 + */ +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 () { + $('#XXLB').lrDataItemSelect({ code: 'xxlbdm' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/LR_Desktop/ods_zzxxgkjcsj/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 + '/LR_Desktop/ods_zzxxgkjcsj/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ods_zzxxgkjcsj/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ods_zzxxgkjcsj/Index.cshtml new file mode 100644 index 000000000..674fd8c6b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ods_zzxxgkjcsj/Index.cshtml @@ -0,0 +1,26 @@ +@{ + ViewBag.Title = "中职学校概况基础数据表"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/LR_Desktop/Views/ods_zzxxgkjcsj/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ods_zzxxgkjcsj/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ods_zzxxgkjcsj/Index.js new file mode 100644 index 000000000..5828d9d4b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/ods_zzxxgkjcsj/Index.js @@ -0,0 +1,94 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-09 10:20 + * 描 述:中职学校概况基础数据表 + */ +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 + '/LR_Desktop/ods_zzxxgkjcsj/Form', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('XYGKJCSJID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/LR_Desktop/ods_zzxxgkjcsj/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('XYGKJCSJID'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/LR_Desktop/ods_zzxxgkjcsj/DeleteForm', { keyValue: keyValue}, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/LR_Desktop/ods_zzxxgkjcsj/GetPageList', + headData: [ + { label: "省机构编码", name: "PROVINCEJGBM", width: 100, align: "left"}, + { label: "下拉框", name: "XXLB", width: 100, align: "left", + formatterAsync: function (callback, value, row, op,$cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'xxlbdm', + callback: function (_data) { + callback(_data.text); + } + }); + }}, + ], + mainId:'XYGKJCSJID', + 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 20a6b7fb9..59546ab65 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 @@ -875,6 +875,7 @@ + @@ -6937,6 +6938,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_Desktop/ODS_ZZXXGKJCSJMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_Desktop/ODS_ZZXXGKJCSJMap.cs new file mode 100644 index 000000000..5242547e0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_Desktop/ODS_ZZXXGKJCSJMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.LR_Desktop; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-09 10:20 + /// 描 述:中职学校概况基础数据表 + /// + public class ODS_ZZXXGKJCSJMap : EntityTypeConfiguration + { + public ODS_ZZXXGKJCSJMap() + { + #region 表、主键 + //表 + this.ToTable("ODS_ZZXXGKJCSJ"); + //主键 + this.HasKey(t => t.XYGKJCSJID); + #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 1e664fd1a..2db5313e0 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 @@ -635,6 +635,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/ods_zzxxgkjcsj/ODS_ZZXXGKJCSJEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/ods_zzxxgkjcsj/ODS_ZZXXGKJCSJEntity.cs new file mode 100644 index 000000000..045739f13 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/ods_zzxxgkjcsj/ODS_ZZXXGKJCSJEntity.cs @@ -0,0 +1,140 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.LR_Desktop +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-09 10:20 + /// 描 述:中职学校概况基础数据表 + /// + public class ODS_ZZXXGKJCSJEntity + { + #region 实体成员 + /// + /// XYGKJCSJID + /// + [Column("XYGKJCSJID")] + public string XYGKJCSJID { get; set; } + /// + /// XXLB + /// + [Column("XXLB")] + public string XXLB { get; set; } + /// + /// PROVINCEJGBM + /// + [Column("PROVINCEJGBM")] + public string PROVINCEJGBM { get; set; } + /// + /// PROVINCEJGMC + /// + [Column("PROVINCEJGMC")] + public string PROVINCEJGMC { get; set; } + /// + /// CITYJGBM + /// + [Column("CITYJGBM")] + public string CITYJGBM { get; set; } + /// + /// CITYJGMC + /// + [Column("CITYJGMC")] + public string CITYJGMC { get; set; } + /// + /// COUNTYJGBM + /// + [Column("COUNTYJGBM")] + public string COUNTYJGBM { get; set; } + /// + /// COUNTYJGMC + /// + [Column("COUNTYJGMC")] + public string COUNTYJGMC { get; set; } + /// + /// XXJGDM + /// + [Column("XXJGDM")] + public string XXJGDM { get; set; } + /// + /// XXJGMC + /// + [Column("XXJGMC")] + public string XXJGMC { get; set; } + /// + /// XXSSZGJYXZBM + /// + [Column("XXSSZGJYXZBM")] + public string XXSSZGJYXZBM { get; set; } + /// + /// XXJBZMC + /// + [Column("XXJBZMC")] + public string XXJBZMC { get; set; } + /// + /// XXJBZXZ + /// + [Column("XXJBZXZ")] + public string XXJBZXZ { get; set; } + /// + /// XXFZRXM + /// + [Column("XXFZRXM")] + public string XXFZRXM { get; set; } + /// + /// JXRQ + /// + [Column("JXRQ")] + public string JXRQ { get; set; } + /// + /// XYJSS + /// + [Column("XYJSS")] + public int? XYJSS { get; set; } + /// + /// XYXSS + /// + [Column("XYXSS")] + public int? XYXSS { get; set; } + /// + /// BXKSZYS + /// + [Column("BXKSZYS")] + public int? BXKSZYS { get; set; } + /// + /// SYXX + /// + [Column("SYXX")] + public string SYXX { get; set; } + /// + /// SJCJSJ + /// + [Column("SJCJSJ")] + public string SJCJSJ { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.XYGKJCSJID = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.XYGKJCSJID = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/ods_zzxxgkjcsj/ods_zzxxgkjcsjBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/ods_zzxxgkjcsj/ods_zzxxgkjcsjBLL.cs new file mode 100644 index 000000000..82a267aa3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/ods_zzxxgkjcsj/ods_zzxxgkjcsjBLL.cs @@ -0,0 +1,125 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.LR_Desktop +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-09 10:20 + /// 描 述:中职学校概况基础数据表 + /// + public class ods_zzxxgkjcsjBLL : ods_zzxxgkjcsjIBLL + { + private ods_zzxxgkjcsjService ods_zzxxgkjcsjService = new ods_zzxxgkjcsjService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return ods_zzxxgkjcsjService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取ODS_ZZXXGKJCSJ表实体数据 + /// + /// 主键 + /// + public ODS_ZZXXGKJCSJEntity GetODS_ZZXXGKJCSJEntity(string keyValue) + { + try + { + return ods_zzxxgkjcsjService.GetODS_ZZXXGKJCSJEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + ods_zzxxgkjcsjService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, ODS_ZZXXGKJCSJEntity entity) + { + try + { + ods_zzxxgkjcsjService.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/LR_Desktop/ods_zzxxgkjcsj/ods_zzxxgkjcsjIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/ods_zzxxgkjcsj/ods_zzxxgkjcsjIBLL.cs new file mode 100644 index 000000000..b9c05c2a0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/ods_zzxxgkjcsj/ods_zzxxgkjcsjIBLL.cs @@ -0,0 +1,48 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.LR_Desktop +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-09 10:20 + /// 描 述:中职学校概况基础数据表 + /// + public interface ods_zzxxgkjcsjIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取ODS_ZZXXGKJCSJ表实体数据 + /// + /// 主键 + /// + ODS_ZZXXGKJCSJEntity GetODS_ZZXXGKJCSJEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, ODS_ZZXXGKJCSJEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/ods_zzxxgkjcsj/ods_zzxxgkjcsjService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/ods_zzxxgkjcsj/ods_zzxxgkjcsjService.cs new file mode 100644 index 000000000..645603155 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/ods_zzxxgkjcsj/ods_zzxxgkjcsjService.cs @@ -0,0 +1,146 @@ +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.LR_Desktop +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-09 10:20 + /// 描 述:中职学校概况基础数据表 + /// + public class ods_zzxxgkjcsjService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.XYGKJCSJID, + t.PROVINCEJGBM, + t.XXLB + "); + strSql.Append(" FROM ODS_ZZXXGKJCSJ 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_ZZXXGKJCSJ表实体数据 + /// + /// 主键 + /// + public ODS_ZZXXGKJCSJEntity GetODS_ZZXXGKJCSJEntity(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.XYGKJCSJID == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, ODS_ZZXXGKJCSJEntity 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 ae26c240b..7d7081806 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 @@ -1963,6 +1963,10 @@ + + + +