From 3689c89fa288f0c258421c4e47b6411df664a631 Mon Sep 17 00:00:00 2001 From: lifeng Date: Thu, 10 Nov 2022 11:51:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=99=E6=9D=90=E9=80=89=E7=94=A8=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ods_jcxysjController.cs | 117 +++++++++++++ .../Views/ods_jcxysj/Form.cshtml | 75 ++++++++ .../Changyang_zhdn/Views/ods_jcxysj/Form.js | 53 ++++++ .../Views/ods_jcxysj/Index.cshtml | 29 ++++ .../Changyang_zhdn/Views/ods_jcxysj/Index.js | 130 ++++++++++++++ .../Learun.Application.Web.csproj | 5 + .../Changyang_zhdn/ODS_JCXYSJMap.cs | 29 ++++ .../Learun.Application.Mapping.csproj | 1 + .../ods_jcxysj/ODS_JCXYSJEntity.cs | 130 ++++++++++++++ .../ods_jcxysj/ods_jcxysjBLL.cs | 125 ++++++++++++++ .../ods_jcxysj/ods_jcxysjIBLL.cs | 48 ++++++ .../ods_jcxysj/ods_jcxysjService.cs | 161 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 13 files changed, 907 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Controllers/ods_jcxysjController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_jcxysj/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_jcxysj/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_jcxysj/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_jcxysj/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Changyang_zhdn/ODS_JCXYSJMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_jcxysj/ODS_JCXYSJEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_jcxysj/ods_jcxysjBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_jcxysj/ods_jcxysjIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_jcxysj/ods_jcxysjService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Controllers/ods_jcxysjController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Controllers/ods_jcxysjController.cs new file mode 100644 index 000000000..d7434f9eb --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Controllers/ods_jcxysjController.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 11:51 + /// 描 述:教材选用数据表 + /// + public class ods_jcxysjController : MvcControllerBase + { + private ods_jcxysjIBLL ods_jcxysjIBLL = new ods_jcxysjBLL(); + + #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_jcxysjIBLL.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_JCXYSJData = ods_jcxysjIBLL.GetODS_JCXYSJEntity( keyValue ); + var jsonData = new { + ODS_JCXYSJ = ODS_JCXYSJData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + ods_jcxysjIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + ODS_JCXYSJEntity entity = strEntity.ToObject(); + ods_jcxysjIBLL.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_jcxysj/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_jcxysj/Form.cshtml new file mode 100644 index 000000000..fe999e37b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_jcxysj/Form.cshtml @@ -0,0 +1,75 @@ +@{ + ViewBag.Title = "教材选用数据表"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学校机构代码
+ +
+
+
学校机构名称
+ +
+
+
教材名称
+ +
+
+
教材编号
+ +
+
+
教材性质
+
+
+
+
ISBN号
+ +
+
+
作者
+ +
+
+
出版日期
+ +
+
+
出版社
+ +
+
+
适用层次
+
+
+
+
价格(元)
+ +
+
+
版次
+ +
+
+
印次
+ +
+
+
是否有练习册
+ +
+
+
是否有教参教辅
+ +
+
+
获奖情况
+
+
+
+
数据采集时间
+ +
+
+@Html.AppendJsFile("/Areas/Changyang_zhdn/Views/ods_jcxysj/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_jcxysj/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_jcxysj/Form.js new file mode 100644 index 000000000..3d3c6a54f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_jcxysj/Form.js @@ -0,0 +1,53 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-10 11:51 + * 描 述:教材选用数据表 + */ +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 () { + $('#JCXZ').lrDataItemSelect({ code: 'jcxzdm' }); + $('#SYCC').lrDataItemSelect({ code: 'jcsyccdm' }); + $('#HJQK').lrDataItemSelect({ code: 'jchjqkdm' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/Changyang_zhdn/ods_jcxysj/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_jcxysj/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_jcxysj/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_jcxysj/Index.cshtml new file mode 100644 index 000000000..5d3208d78 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_jcxysj/Index.cshtml @@ -0,0 +1,29 @@ +@{ + ViewBag.Title = "教材选用数据表"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+ +
+ + +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/Changyang_zhdn/Views/ods_jcxysj/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_jcxysj/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_jcxysj/Index.js new file mode 100644 index 000000000..39a26a6f5 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_jcxysj/Index.js @@ -0,0 +1,130 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-10 11:51 + * 描 述:教材选用数据表 + */ +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_jcxysj/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_jcxysj/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_jcxysj/DeleteForm', { keyValue: keyValue}, function () { + refreshGirdData(); + }); + } + }); + } + }); + //  导入 + $('#lr_import').on('click', function () { + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/Changyang_zhdn/ods_jcxysj/GetPageList', + headData: [ + { label: "学校机构代码", name: "XXJGDM", width: 100, align: "left"}, + { label: "学校机构名称", name: "XXJGMC", width: 100, align: "left"}, + { label: "教材名称", name: "JCMC", width: 100, align: "left"}, + { label: "教材编号", name: "JCBH", width: 100, align: "left"}, + { label: "教材性质", name: "JCXZ", width: 100, align: "left", + formatterAsync: function (callback, value, row, op,$cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'jcxzdm', + callback: function (_data) { + callback(_data.text); + } + }); + }}, + { label: "ISBN号", name: "ISBN", width: 100, align: "left"}, + { label: "作者", name: "ZZXM", width: 100, align: "left"}, + { label: "出版日期", name: "CBRQ", width: 100, align: "left"}, + { label: "出版社", name: "CBS", width: 100, align: "left"}, + { label: "适用层次", name: "SYCC", width: 100, align: "left", + formatterAsync: function (callback, value, row, op,$cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'jcsyccdm', + callback: function (_data) { + callback(_data.text); + } + }); + }}, + { label: "价格(元)", name: "JG", width: 100, align: "left"}, + { label: "版次", name: "BC", width: 100, align: "left"}, + { label: "印次", name: "YC", width: 100, align: "left"}, + { label: "是否有练习册", name: "SFYLXC", width: 100, align: "left"}, + { label: "是否有教参教辅", name: "SFYJCJF", width: 100, align: "left"}, + { label: "获奖情况", name: "HJQK", width: 100, align: "left", + formatterAsync: function (callback, value, row, op,$cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'jchjqkdm', + callback: function (_data) { + callback(_data.text); + } + }); + }}, + { 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 2113d2756..5f43d3dca 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 @@ -892,6 +892,7 @@ + @@ -7019,6 +7020,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Changyang_zhdn/ODS_JCXYSJMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Changyang_zhdn/ODS_JCXYSJMap.cs new file mode 100644 index 000000000..cd45a3075 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Changyang_zhdn/ODS_JCXYSJMap.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 11:51 + /// 描 述:教材选用数据表 + /// + public class ODS_JCXYSJMap : EntityTypeConfiguration + { + public ODS_JCXYSJMap() + { + #region 表、主键 + //表 + this.ToTable("ODS_JCXYSJ"); + //主键 + 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 03284aa17..2f27144bc 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 @@ -651,6 +651,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_jcxysj/ODS_JCXYSJEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_jcxysj/ODS_JCXYSJEntity.cs new file mode 100644 index 000000000..c5a9048e7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_jcxysj/ODS_JCXYSJEntity.cs @@ -0,0 +1,130 @@ +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 11:51 + /// 描 述:教材选用数据表 + /// + public class ODS_JCXYSJEntity + { + #region 实体成员 + /// + /// GZZYQKSJID + /// + [Column("GZZYQKSJID")] + public string GZZYQKSJID { get; set; } + /// + /// 学校机构代码 + /// + [Column("XXJGDM")] + public string XXJGDM { get; set; } + /// + /// 学校机构名称 + /// + [Column("XXJGMC")] + public string XXJGMC { get; set; } + /// + /// 教材名称 + /// + [Column("JCMC")] + public string JCMC { get; set; } + /// + /// 教材编号 + /// + [Column("JCBH")] + public string JCBH { get; set; } + /// + /// 教材性质 + /// + [Column("JCXZ")] + public string JCXZ { get; set; } + /// + /// ISBN号 + /// + [Column("ISBN")] + public string ISBN { get; set; } + /// + /// 作者 + /// + [Column("ZZXM")] + public string ZZXM { get; set; } + /// + /// 出版日期 + /// + [Column("CBRQ")] + public string CBRQ { get; set; } + /// + /// 出版社 + /// + [Column("CBS")] + public string CBS { get; set; } + /// + /// 适用层次 + /// + [Column("SYCC")] + public string SYCC { get; set; } + /// + /// 价格(元) + /// + [Column("JG")] + public string JG { get; set; } + /// + /// 版次 + /// + [Column("BC")] + public int? BC { get; set; } + /// + /// 印次 + /// + [Column("YC")] + public int? YC { get; set; } + /// + /// 是否有练习册 + /// + [Column("SFYLXC")] + public string SFYLXC { get; set; } + /// + /// 是否有教参教辅 + /// + [Column("SFYJCJF")] + public string SFYJCJF { get; set; } + /// + /// 获奖情况 + /// + [Column("HJQK")] + public string HJQK { 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_jcxysj/ods_jcxysjBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_jcxysj/ods_jcxysjBLL.cs new file mode 100644 index 000000000..0eb37a30e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_jcxysj/ods_jcxysjBLL.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 11:51 + /// 描 述:教材选用数据表 + /// + public class ods_jcxysjBLL : ods_jcxysjIBLL + { + private ods_jcxysjService ods_jcxysjService = new ods_jcxysjService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return ods_jcxysjService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取ODS_JCXYSJ表实体数据 + /// + /// 主键 + /// + public ODS_JCXYSJEntity GetODS_JCXYSJEntity(string keyValue) + { + try + { + return ods_jcxysjService.GetODS_JCXYSJEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + ods_jcxysjService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, ODS_JCXYSJEntity entity) + { + try + { + ods_jcxysjService.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_jcxysj/ods_jcxysjIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_jcxysj/ods_jcxysjIBLL.cs new file mode 100644 index 000000000..f1da5d5f5 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_jcxysj/ods_jcxysjIBLL.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 11:51 + /// 描 述:教材选用数据表 + /// + public interface ods_jcxysjIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取ODS_JCXYSJ表实体数据 + /// + /// 主键 + /// + ODS_JCXYSJEntity GetODS_JCXYSJEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, ODS_JCXYSJEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_jcxysj/ods_jcxysjService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_jcxysj/ods_jcxysjService.cs new file mode 100644 index 000000000..28d96ce3b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_jcxysj/ods_jcxysjService.cs @@ -0,0 +1,161 @@ +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 11:51 + /// 描 述:教材选用数据表 + /// + public class ods_jcxysjService : 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.JCMC, + t.JCBH, + t.JCXZ, + t.ISBN, + t.ZZXM, + t.CBRQ, + t.CBS, + t.SYCC, + t.JG, + t.BC, + t.YC, + t.SFYLXC, + t.SFYJCJF, + t.HJQK, + t.SJCJSJ + "); + strSql.Append(" FROM ODS_JCXYSJ 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_JCXYSJ表实体数据 + /// + /// 主键 + /// + public ODS_JCXYSJEntity GetODS_JCXYSJEntity(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_JCXYSJEntity 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 86db36bd3..57a624d87 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 @@ -2027,6 +2027,10 @@ + + + +