diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Controllers/ods_zzxxgkjcsjController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Controllers/ods_zzxxgkjcsjController.cs new file mode 100644 index 000000000..76722a03c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Controllers/ods_zzxxgkjcsjController.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-09 12:34 + /// 描 述:中职学校概况基础数据表 + /// + 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/Changyang_zhdn/Views/ods_zzxxgkjcsj/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_zzxxgkjcsj/Form.cshtml new file mode 100644 index 000000000..951efd1e3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_zzxxgkjcsj/Form.cshtml @@ -0,0 +1,83 @@ +@{ + ViewBag.Title = "中职学校概况基础数据表"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
省机构编码
+ +
+
+
省机构名称
+ +
+
+
市机构编码
+ +
+
+
市机构名称
+ +
+
+
区县机构编码
+ +
+
+
区县机构名称
+ +
+
+
学校机构代码
+ +
+
+
学校名称
+ +
+
+
学校类别
+
+
+
+
学校所属主管教育行政部门
+ +
+
+
学校举办者名称
+ +
+
+
学校举办者性质
+ +
+
+
学校负责人姓名(校长)
+ +
+
+
建校日期(年月)
+ +
+
+
现有教职工总数
+ +
+
+
现有学生数
+ +
+
+
本校开设专业数
+ +
+
+
是否国家双优学校/省级双优学校/否
+
+
+
+
数据采集时间
+ +
+
+@Html.AppendJsFile("/Areas/Changyang_zhdn/Views/ods_zzxxgkjcsj/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_zzxxgkjcsj/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_zzxxgkjcsj/Form.js new file mode 100644 index 000000000..9593e151e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_zzxxgkjcsj/Form.js @@ -0,0 +1,52 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-09 12:34 + * 描 述:中职学校概况基础数据表 + */ +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' }); + $('#SYXX').lrDataItemSelect({ code: 'syxxdm' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/Changyang_zhdn/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 + '/Changyang_zhdn/ods_zzxxgkjcsj/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_zzxxgkjcsj/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_zzxxgkjcsj/Index.cshtml new file mode 100644 index 000000000..857a41dd4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_zzxxgkjcsj/Index.cshtml @@ -0,0 +1,26 @@ +@{ + ViewBag.Title = "中职学校概况基础数据表"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/Changyang_zhdn/Views/ods_zzxxgkjcsj/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_zzxxgkjcsj/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_zzxxgkjcsj/Index.js new file mode 100644 index 000000000..159fd718a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Changyang_zhdn/Views/ods_zzxxgkjcsj/Index.js @@ -0,0 +1,120 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-09 12:34 + * 描 述:中职学校概况基础数据表 + */ +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_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 + '/Changyang_zhdn/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 + '/Changyang_zhdn/ods_zzxxgkjcsj/DeleteForm', { keyValue: keyValue}, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/Changyang_zhdn/ods_zzxxgkjcsj/GetPageList', + headData: [ + { label: "省机构编码", name: "PROVINCEJGBM", width: 100, align: "left"}, + { label: "省机构名称", name: "PROVINCEJGMC", width: 100, align: "left"}, + { label: "市机构编码", name: "CITYJGBM", width: 100, align: "left"}, + { label: "市机构名称", name: "CITYJGMC", width: 100, align: "left"}, + { label: "区县机构编码", name: "COUNTYJGBM", width: 100, align: "left"}, + { label: "区县机构名称", name: "COUNTYJGMC", width: 100, align: "left"}, + { label: "学校机构代码", name: "XXJGDM", width: 100, align: "left"}, + { label: "学校名称", name: "XXJGMC", 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); + } + }); + }}, + { label: "学校所属主管教育行政部门", name: "XXSSZGJYXZBM", width: 100, align: "left"}, + { label: "学校举办者名称", name: "XXJBZMC", width: 100, align: "left"}, + { label: "学校举办者性质", name: "XXJBZXZ", width: 100, align: "left"}, + { label: "学校负责人姓名(校长)", name: "XXFZRXM", width: 100, align: "left"}, + { label: "建校日期(年月)", name: "JXRQ", width: 100, align: "left"}, + { label: "现有教职工总数", name: "XYJSS", width: 100, align: "left"}, + { label: "现有学生数", name: "XYXSS", width: 100, align: "left"}, + { label: "本校开设专业数", name: "BXKSZYS", width: 100, align: "left"}, + { label: "是否国家双优学校/省级双优学校/否", name: "SYXX", width: 100, align: "left", + formatterAsync: function (callback, value, row, op,$cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'syxxdm', + callback: function (_data) { + callback(_data.text); + } + }); + }}, + { label: "数据采集时间", name: "SJCJSJ", width: 100, align: "left"}, + ], + 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 7dee47db4..b717ab7c4 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 @@ -878,6 +878,7 @@ + @@ -6950,6 +6951,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Changyang_zhdn/ODS_ZZXXGKJCSJMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Changyang_zhdn/ODS_ZZXXGKJCSJMap.cs new file mode 100644 index 000000000..96065052b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Changyang_zhdn/ODS_ZZXXGKJCSJMap.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-09 12:34 + /// 描 述:中职学校概况基础数据表 + /// + 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 b5d12c852..72f7f8221 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 @@ -637,6 +637,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_zzxxgkjcsj/ODS_ZZXXGKJCSJEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_zzxxgkjcsj/ODS_ZZXXGKJCSJEntity.cs new file mode 100644 index 000000000..ccac2bf2f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_zzxxgkjcsj/ODS_ZZXXGKJCSJEntity.cs @@ -0,0 +1,140 @@ +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-09 12:34 + /// 描 述:中职学校概况基础数据表 + /// + 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/Changyang_zhdn/ods_zzxxgkjcsj/ods_zzxxgkjcsjBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_zzxxgkjcsj/ods_zzxxgkjcsjBLL.cs new file mode 100644 index 000000000..21ccc4e13 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/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.Changyang_zhdn +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-09 12:34 + /// 描 述:中职学校概况基础数据表 + /// + 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/Changyang_zhdn/ods_zzxxgkjcsj/ods_zzxxgkjcsjIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_zzxxgkjcsj/ods_zzxxgkjcsjIBLL.cs new file mode 100644 index 000000000..fe25d5872 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_zzxxgkjcsj/ods_zzxxgkjcsjIBLL.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-09 12:34 + /// 描 述:中职学校概况基础数据表 + /// + 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/Changyang_zhdn/ods_zzxxgkjcsj/ods_zzxxgkjcsjService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_zzxxgkjcsj/ods_zzxxgkjcsjService.cs new file mode 100644 index 000000000..0bec78172 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Changyang_zhdn/ods_zzxxgkjcsj/ods_zzxxgkjcsjService.cs @@ -0,0 +1,163 @@ +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-09 12:34 + /// 描 述:中职学校概况基础数据表 + /// + 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.PROVINCEJGMC, + t.CITYJGBM, + t.CITYJGMC, + t.COUNTYJGBM, + t.COUNTYJGMC, + t.XXJGDM, + t.XXJGMC, + t.XXLB, + t.XXSSZGJYXZBM, + t.XXJBZMC, + t.XXJBZXZ, + t.XXFZRXM, + t.JXRQ, + t.XYJSS, + t.XYXSS, + t.BXKSZYS, + t.SYXX, + t.SJCJSJ + "); + 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 3c5a38a7c..9898c4106 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 @@ -1971,6 +1971,10 @@ + + + +