From 1a7d0fb14b016b806ed78a1ea522fc75d5e89325 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Thu, 9 Dec 2021 18:15:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E8=80=83=E6=A0=B8?= =?UTF-8?q?=E8=AF=84=E4=BB=B7=E4=B8=BB=E8=A1=A8=20=20=E5=88=86=E5=80=BC?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DT_EvaluationDataMainController.cs | 117 +++++++++++++ .../Views/DT_EvaluationData/Index.cshtml | 46 ++--- .../Views/DT_EvaluationData/Index.js | 32 ++-- .../Views/DT_EvaluationDataMain/Form.cshtml | 23 +++ .../Views/DT_EvaluationDataMain/Form.js | 52 ++++++ .../Views/DT_EvaluationDataMain/Index.cshtml | 39 +++++ .../Views/DT_EvaluationDataMain/Index.js | 158 ++++++++++++++++++ .../Learun.Application.Web.csproj | 5 + .../EvaluatingIndicatorApi.cs | 17 +- .../Learun.Application.Mapping.csproj | 1 + .../DT_EvaluationDataMainMap.cs | 29 ++++ .../DBModel/资产系统.PDM | 100 ++++++----- .../Learun.Application.TwoDevelopment.csproj | 4 + .../DT_EvaluationDataEntity.cs | 67 +++++--- .../DT_EvaluationDataService.cs | 42 +++-- .../DT_EvaluationDataMainBLL.cs | 125 ++++++++++++++ .../DT_EvaluationDataMainEntity.cs | 92 ++++++++++ .../DT_EvaluationDataMainIBLL.cs | 48 ++++++ .../DT_EvaluationDataMainService.cs | 149 +++++++++++++++++ 19 files changed, 1022 insertions(+), 124 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/DT_EvaluationDataMainController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationDataMain/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationDataMain/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationDataMain/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationDataMain/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/DT_EvaluationDataMainMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationDataMain/DT_EvaluationDataMainBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationDataMain/DT_EvaluationDataMainEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationDataMain/DT_EvaluationDataMainIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationDataMain/DT_EvaluationDataMainService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/DT_EvaluationDataMainController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/DT_EvaluationDataMainController.cs new file mode 100644 index 000000000..ae312831a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/DT_EvaluationDataMainController.cs @@ -0,0 +1,117 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.PersonnelManagement; +using System.Web.Mvc; +using System.Collections.Generic; + +namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-12-09 16:16 + /// 描 述:党员评价考核主表 + /// + public class DT_EvaluationDataMainController : MvcControllerBase + { + private DT_EvaluationDataMainIBLL dT_EvaluationDataMainIBLL = new DT_EvaluationDataMainBLL(); + + #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 = dT_EvaluationDataMainIBLL.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 DT_EvaluationDataMainData = dT_EvaluationDataMainIBLL.GetDT_EvaluationDataMainEntity( keyValue ); + var jsonData = new { + DT_EvaluationDataMain = DT_EvaluationDataMainData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + dT_EvaluationDataMainIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + DT_EvaluationDataMainEntity entity = strEntity.ToObject(); + dT_EvaluationDataMainIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationData/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationData/Index.cshtml index 580332401..7e49129fe 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationData/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationData/Index.cshtml @@ -8,31 +8,31 @@
-
+ @*
- @*
-
考核内容
-
-
-
-
行为标准
-
-
*@
-
被考核党员
-
-
-
-
类型
- -
-
-
-
+
考核内容
+
+
+
+
行为标准
+
+
+
+
被考核党员
+
+
+
+
类型
+ +
+
+
+
*@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationData/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationData/Index.js index 682f9e1e3..d7b7e5c10 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationData/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationData/Index.js @@ -5,6 +5,8 @@ * 描 述:评价考核表 */ var refreshGirdData; +var MainId = request('MainId'); +var ScoreType = request('ScoreType'); var bootstrap = function ($, learun) { "use strict"; var page = { @@ -76,8 +78,8 @@ var bootstrap = function ($, learun) { $('#gridtable').jfGrid({ url: top.$.rootUrl + '/PersonnelManagement/DT_EvaluationData/GetPageList', headData: [ - { label: "年度", name: "ScoreYear", width: 100, align: "left" }, - { label: "季度", name: "ScoreQuarter", width: 100, align: "left" }, + //{ label: "年度", name: "ScoreYear", width: 100, align: "left" }, + //{ label: "季度", name: "ScoreQuarter", width: 100, align: "left" }, { label: "考核内容", name: "Assessment", width: 150, align: "left", formatterAsync: function (callback, value, row, op, $cell) { @@ -92,17 +94,17 @@ var bootstrap = function ($, learun) { }, { label: "行为规范要求", name: "ConductRequirements", width: 200, align: "left" }, - { label: "被考核党员", name: "BeAssessed", width: 100, align: "left", - formatterAsync: function (callback, value, row, op,$cell) { - learun.clientdata.getAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'PartyMember', - key: value, - keyId: 'id', - callback: function (_data) { - callback(_data['name']); - } - }); - }}, + //{ label: "被考核党员", name: "BeAssessed", width: 100, align: "left", + // formatterAsync: function (callback, value, row, op,$cell) { + // learun.clientdata.getAsync('custmerData', { + // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'PartyMember', + // key: value, + // keyId: 'id', + // callback: function (_data) { + // callback(_data['name']); + // } + // }); + // }}, { label: "打分人", name: "Assessed", width: 100, align: "left", formatterAsync: function (callback, value, row, op,$cell) { learun.clientdata.getAsync('custmerData', { @@ -129,12 +131,14 @@ var bootstrap = function ($, learun) { ], mainId:'Id', isPage: true, - sidx: 'BeAssessed Asc,ScoreType ASC,Assessed ASC,EOrder Asc', + sidx: 'ScoreType ASC,Assessed ASC,EOrder Asc', }); page.search(); }, search: function (param) { param = param || {}; + param.MainId = MainId; + param.ScoreType = ScoreType; $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationDataMain/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationDataMain/Form.cshtml new file mode 100644 index 000000000..86d922dcb --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationDataMain/Form.cshtml @@ -0,0 +1,23 @@ +@{ + ViewBag.Title = "党员评价考核主表"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
党员小组*
+
+
+
+
被考核党员
+
+
+
+
自评总分
+ +
+
+
小组长评总分
+ +
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/DT_EvaluationDataMain/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationDataMain/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationDataMain/Form.js new file mode 100644 index 000000000..c24b44cc7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationDataMain/Form.js @@ -0,0 +1,52 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-12-09 16:16 + * 描 述:党员评价考核主表 + */ +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 () { + $('#PartyMemberGroupId').lrDataSourceSelect({ code: 'PartyMember',value: 'id',text: 'name' }); + $('#BeAssessed').lrDataSourceSelect({ code: 'PartyMember',value: 'id',text: 'name' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/DT_EvaluationDataMain/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 + '/PersonnelManagement/DT_EvaluationDataMain/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationDataMain/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationDataMain/Index.cshtml new file mode 100644 index 000000000..c50da5f87 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationDataMain/Index.cshtml @@ -0,0 +1,39 @@ +@{ + ViewBag.Title = "党员评价考核主表"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
被考核党员
+
+
+
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/DT_EvaluationDataMain/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationDataMain/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationDataMain/Index.js new file mode 100644 index 000000000..5caf36d9f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DT_EvaluationDataMain/Index.js @@ -0,0 +1,158 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-12-09 16:16 + * 描 述:党员评价考核主表 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#BeAssessed').lrDataSourceSelect({ code: 'PartyMember', value: 'id', text: 'name' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/PersonnelManagement/DT_EvaluationDataMain/Form', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/PersonnelManagement/DT_EvaluationDataMain/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/DT_EvaluationDataMain/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + + // 党员自评详情 + $('#lr_dyzp').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + var BeAssessed = $('#gridtable').jfGridValue('BeAssessed'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '党员自评详情', + url: top.$.rootUrl + '/PersonnelManagement/DT_EvaluationData/Index?MainId=' + keyValue + '&ScoreType=1', + width: 900, + height: 700, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 党小组长评分详情 + $('#lr_xzzp').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + var BeAssessed = $('#gridtable').jfGridValue('BeAssessed'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '党小组长评分详情', + url: top.$.rootUrl + '/PersonnelManagement/DT_EvaluationData/Index?MainId=' + keyValue + '&ScoreType=2', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/PersonnelManagement/DT_EvaluationDataMain/GetPageList', + headData: [ + { label: "年度", name: "ScoreYear", width: 100, align: "left" }, + { label: "季度", name: "ScoreQuarter", width: 100, align: "left" }, + { + label: "党员小组", name: "PartyMemberGroupId", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DT_PartyMemberGroup', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + } + }, + { + label: "被考核党员", name: "BeAssessed", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'PartyMember', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + } + }, + { label: "自评分值", name: "ScoreZP", width: 100, align: "left" }, + { label: "小组长评分值", name: "ScoreXZ", width: 100, align: "left" }, + ], + mainId: 'Id', + isPage: true, + sidx: 'CreateTime', + sord: 'DESC', + }); + 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 0820d5ccf..bac037e89 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 @@ -876,6 +876,7 @@ + @@ -6754,6 +6755,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/EvaluatingIndicatorApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/EvaluatingIndicatorApi.cs index 28b85d531..0d7e6dee9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/EvaluatingIndicatorApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/EvaluatingIndicatorApi.cs @@ -49,18 +49,18 @@ namespace Learun.Application.WebApi.Modules /// public Response AddEvaluationData(dynamic _) { - AddEvaluationEntity parameter = this.GetReqData(); - if (parameter == null) - { - return Fail("参数不可空!"); - } + //AddEvaluationEntity parameter = this.GetReqData(); + //if (parameter == null) + //{ + // return Fail("参数不可空!"); + //} //年度 - string scoreYear = parameter.ScoreYear;//"2021";// + string scoreYear = "2021";//parameter.ScoreYear;// //季度 - string scoreQuarter = parameter.ScoreQuarter;//"4";// + string scoreQuarter = "4";// parameter.ScoreQuarter;// //小组Id - string partyMemberGroupId = parameter.PartyMemberGroupId;//"f4f8df5e-021b-4739-b006-6c25f04c2723";// + string partyMemberGroupId = "f4f8df5e-021b-4739-b006-6c25f04c2723";//parameter.PartyMemberGroupId;// if (string.IsNullOrEmpty(scoreYear)) { @@ -103,6 +103,7 @@ namespace Learun.Application.WebApi.Modules var list = dT_EvaluationDataIBLL.GetListByWhere(where); return Success(list); } + /// /// 保存实体数据(新增、修改) /// 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 7c70792d8..99ee60fda 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 @@ -625,6 +625,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/DT_EvaluationDataMainMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/DT_EvaluationDataMainMap.cs new file mode 100644 index 000000000..9b1f5cb25 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/DT_EvaluationDataMainMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.PersonnelManagement; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-12-09 16:16 + /// 描 述:党员评价考核主表 + /// + public class DT_EvaluationDataMainMap : EntityTypeConfiguration + { + public DT_EvaluationDataMainMap() + { + #region 表、主键 + //表 + this.ToTable("DT_EVALUATIONDATAMAIN"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM index 3423971fa..7b7d07b8a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM @@ -1,5 +1,5 @@ - + @@ -55605,11 +55605,11 @@ B9AF 14D0548F-44A3-49F8-8E89-318CB337A8A9 -PartyMemberGroupId -PartyMemberGroupId +PartyMemberGroupId------------- +PartyMemberGroupId------------- 1638943834 edy -1638943859 +1639038717 edy 党员小组Id nvarchar(50) @@ -55617,11 +55617,11 @@ B9AF 1FC97445-9D19-4577-8E16-5F2DD09DD2FE -BeAssessed -BeAssessed +BeAssessed------------ +BeAssessed------------ 1586611865 edy -1638934194 +1639038717 edy 被考核党员 nvarchar(100) @@ -55633,11 +55633,11 @@ B9AF Assessed 1586611865 edy -1638934194 +1639037096 edy 打分人(自己或党组长) -nvarchar(100) -100 +nvarchar(500) +500 6B52B587-4698-453B-96D2-4BD7940BB028 @@ -55663,22 +55663,22 @@ B9AF A6AD45A2-DBBA-4C40-B40B-A7E2E1DDD269 -ScoreYear -ScoreYear +ScoreYear---------------- +ScoreYear---------------- 1586611838 edy -1638934194 +1639038717 edy 打分年度 int EB4FF1DC-26F3-4998-829A-7E9A6162E299 -ScoreQuarter -ScoreQuarter +ScoreQuarter-------------- +ScoreQuarter-------------- 1586611838 edy -1638934194 +1639038717 edy 打分季度 int @@ -55757,7 +55757,7 @@ B9AF DT_EvaluationDataMain 1586611688 edy -1639036689 +1639037696 edy 评价主表 @@ -55800,18 +55800,6 @@ B9AF 100 -8BEB1879-2054-474A-A77F-96BF0091A7A1 -Assessed -Assessed -1586611865 -edy -1639036689 -edy -打分人(自己或党组长) -nvarchar(100) -100 - - A0A825FD-99D3-4320-A397-F36FFA054AFC ScoreZP ScoreZP @@ -55824,7 +55812,7 @@ B9AF 18 1 - + 9AA1A880-5082-42FE-8A1B-D513BB426E93 ScoreXZ ScoreXZ @@ -55837,7 +55825,7 @@ B9AF 18 1 - + 1DCE7522-C8E9-446E-A14F-DE642C0F9B7A Remark Remark @@ -55849,7 +55837,29 @@ B9AF nvarchar(50) 50 + +290E7C63-4445-4CDC-917D-47B432931104 +ScoreYear +ScoreYear +1586611838 +edy +1639037696 +edy +打分年度 +int + +AFD02C65-E08A-4165-B0A7-4392F789E837 +ScoreQuarter +ScoreQuarter +1586611838 +edy +1639037696 +edy +打分季度 +int + + 98234711-3A4E-4A1F-852A-B90BB54CFFDA CreateTime CreateTime @@ -55860,7 +55870,7 @@ B9AF 创建时间 DateTime - + 8A7B0EE8-EB4D-4305-9048-0540DF725ECF CreateUserId CreateUserId @@ -55874,7 +55884,7 @@ B9AF - + 4A0077ED-0AAF-4336-A2E1-A06A02B8B1DC Key_1 Key_1 @@ -55888,10 +55898,10 @@ B9AF - + - + @@ -55916,7 +55926,7 @@ B9AF - + 14D78C43-17A2-48F0-83B4-3DF757D5ABE8 1552635393 l @@ -55951,7 +55961,7 @@ B9AF - + FEAECB7B-8E2A-4492-A530-B0062E1511B8 1552635777 l @@ -55986,7 +55996,7 @@ B9AF - + 81527A47-E565-49C2-AAA7-F0555E81CE72 1553245426 l @@ -56021,7 +56031,7 @@ B9AF - + A3225D9D-069C-4A67-ABF0-43DC2FA55CF0 1553247802 l @@ -56055,7 +56065,7 @@ B9AF - + B458081F-CEE1-4251-9E7A-5E9CC93519D5 1553248376 l @@ -56090,7 +56100,7 @@ B9AF - + 8397C4F6-A728-4D3F-B2F8-FAC56886462B 1553248622 l @@ -56124,7 +56134,7 @@ B9AF - + 2F8BC700-F31E-41CC-9DA8-9505EAC5DA85 1553483161 l @@ -56158,7 +56168,7 @@ B9AF - + 0E2D2049-564F-4247-9F5B-B0AA82F9BE96 1555404296 admin @@ -56175,7 +56185,7 @@ B9AF - + 46EC3E2A-6CBF-421A-9DA8-6BCCEDEC7DF5 PUBLIC PUBLIC @@ -56438,7 +56448,7 @@ B9AF - + B1BAD530-6C69-4A9D-BD41-F62F564CA348 Microsoft SQL Server 2008 MSSQLSRV2008 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 02a2059e5..64c3bb77c 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 @@ -1919,6 +1919,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationData/DT_EvaluationDataEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationData/DT_EvaluationDataEntity.cs index 7513142c5..7c02a5d97 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationData/DT_EvaluationDataEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationData/DT_EvaluationDataEntity.cs @@ -20,15 +20,20 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement [Column("ID")] public string Id { get; set; } /// + /// MainId + /// + [Column("MAINID")] + public string MainId { get; set; } + /// /// 考核指标项 /// [Column("EVALUATINGINDICATORID")] public string EvaluatingIndicatorId { get; set; } - /// - /// 被考核党员 - /// - [Column("BEASSESSED")] - public string BeAssessed { get; set; } + ///// + ///// 被考核党员 + ///// + //[Column("BEASSESSED")] + //public string BeAssessed { get; set; } /// /// 打分人(自己或党组长) /// @@ -44,21 +49,21 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// [Column("SCORETYPE")] public int? ScoreType { get; set; } - /// - /// 打分年度 - /// - [Column("SCOREYEAR")] - public int? ScoreYear { get; set; } - /// - /// 打分季度 - /// - [Column("SCOREQUARTER")] - public int? ScoreQuarter { get; set; } - /// - /// 党员小组Id - /// - [Column("PARTYMEMBERGROUPID")] - public string PartyMemberGroupId { get; set; } + ///// + ///// 打分年度 + ///// + //[Column("SCOREYEAR")] + //public int? ScoreYear { get; set; } + ///// + ///// 打分季度 + ///// + //[Column("SCOREQUARTER")] + //public int? ScoreQuarter { get; set; } + ///// + ///// 党员小组Id + ///// + //[Column("PARTYMEMBERGROUPID")] + //public string PartyMemberGroupId { get; set; } /// /// 备注 /// @@ -90,7 +95,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement { this.Id = Guid.NewGuid().ToString(); this.CreateTime=DateTime.Now; - this.CreateUserId = LoginUserInfo.Get().userId; + //this.CreateUserId = LoginUserInfo.Get().userId; } /// /// 编辑调用 @@ -103,6 +108,26 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement #endregion #region 扩展字段 /// + /// 党小组Id + /// + [NotMapped] + public string PartyMemberGroupId { get; set; } + /// + /// 被考核党员 + /// + [NotMapped] + public string BeAssessed { get; set; } + /// + /// 打分年度 + /// + [NotMapped] + public string ScoreYear { get; set; } + /// + /// 打分季度 + /// + [NotMapped] + public string ScoreQuarter { get; set; } + /// /// 指标项内容 /// [NotMapped] diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationData/DT_EvaluationDataService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationData/DT_EvaluationDataService.cs index 49189fb37..69c3647f2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationData/DT_EvaluationDataService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationData/DT_EvaluationDataService.cs @@ -52,10 +52,15 @@ e.Assessment as Assessment,e.ConductRequirements as ConductRequirements dp.Add("BeAssessed", queryParam["BeAssessed"].ToString(), DbType.String); strSql.Append(" AND t.BeAssessed = @BeAssessed "); } + if (!queryParam["MainId"].IsEmpty()) + { + dp.Add("MainId", queryParam["MainId"].ToString(), DbType.String); + strSql.Append(" AND t.MainId = @MainId "); + } if (!queryParam["ScoreType"].IsEmpty()) { - dp.Add("ScoreType", "%" + queryParam["ScoreType"].ToString() + "%", DbType.String); - strSql.Append(" AND t.ScoreType Like @ScoreType "); + dp.Add("ScoreType", queryParam["ScoreType"].ToString(), DbType.String); + strSql.Append(" AND t.ScoreType=@ScoreType "); } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } @@ -81,9 +86,11 @@ e.Assessment as Assessment,e.ConductRequirements as ConductRequirements { try { - string sql = "select t.*,e.Assessment,e.ConductRequirements,e.CRRemark,e.MaxScore,e.ScoringCriteria FROM DT_EvaluationData t join DT_EvaluatingIndicator e on t.EvaluatingIndicatorId=e.Id where 1=1 "; - - sql += $" and t.ScoreType='{where.ScoreType}' and t.BeAssessed='{where.beAssessed}' and t.ScoreYear='{where.scoreYear}' and t.ScoreQuarter='{where.scoreQuarter}'"; + string sql = @"select t.*,m.PartyMemberGroupId,m.BeAssessed,m.ScoreYear,m.ScoreQuarter,e.Assessment,e.ConductRequirements,e.CRRemark,e.MaxScore,e.ScoringCriteria +FROM DT_EvaluationData t join DT_EvaluatingIndicator e on t.EvaluatingIndicatorId=e.Id +join DT_EvaluationDataMain m on t.MainId=m.Id + where 1=1 "; + sql += $" and t.ScoreType='{where.ScoreType}' and m.BeAssessed='{where.beAssessed}' and m.ScoreYear='{where.scoreYear}' and m.ScoreQuarter='{where.scoreQuarter}'"; return this.BaseRepository("CollegeMIS").FindList(sql).OrderBy(x => x.EOrder); } @@ -247,19 +254,27 @@ e.Assessment as Assessment,e.ConductRequirements as ConductRequirements foreach (var item in partyMemberList) { + DT_EvaluationDataMainEntity mainEntity=new DT_EvaluationDataMainEntity(); + mainEntity.Create(); + mainEntity.BeAssessed = item; + mainEntity.ScoreYear = Convert.ToInt32(scoreYear); + mainEntity.ScoreQuarter = Convert.ToInt32(scoreQuarter); + mainEntity.PartyMemberGroupId = partyMemberGroupId; + db.Insert(mainEntity); //考核指标 foreach (var EvaluatingIndicator in DT_EvaluatingIndicator) { DT_EvaluationDataEntity entity = new DT_EvaluationDataEntity(); entity.Create(); + entity.MainId = mainEntity.Id; entity.EvaluatingIndicatorId = EvaluatingIndicator.Id; entity.EOrder = EvaluatingIndicator.EOrder; - entity.BeAssessed = item; + //entity.BeAssessed = item; entity.Assessed = item;//自评 entity.ScoreType = 1; - entity.ScoreYear = Convert.ToInt32(scoreYear); - entity.ScoreQuarter = Convert.ToInt32(scoreQuarter); - entity.PartyMemberGroupId = partyMemberGroupId; + //entity.ScoreYear = Convert.ToInt32(scoreYear); + //entity.ScoreQuarter = Convert.ToInt32(scoreQuarter); + //entity.PartyMemberGroupId = partyMemberGroupId; db.Insert(entity); //组长评 @@ -269,14 +284,15 @@ e.Assessment as Assessment,e.ConductRequirements as ConductRequirements { DT_EvaluationDataEntity entity1 = new DT_EvaluationDataEntity(); entity1.Create(); + entity1.MainId = mainEntity.Id; entity1.ScoreType = 2; entity1.Assessed = groupLeader; entity1.EvaluatingIndicatorId = EvaluatingIndicator.Id; entity1.EOrder = EvaluatingIndicator.EOrder; - entity1.BeAssessed = item; - entity1.ScoreYear = Convert.ToInt32(scoreYear); - entity1.ScoreQuarter = Convert.ToInt32(scoreQuarter); - entity1.PartyMemberGroupId = partyMemberGroupId; + //entity1.BeAssessed = item; + //entity1.ScoreYear = Convert.ToInt32(scoreYear); + //entity1.ScoreQuarter = Convert.ToInt32(scoreQuarter); + //entity1.PartyMemberGroupId = partyMemberGroupId; db.Insert(entity1); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationDataMain/DT_EvaluationDataMainBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationDataMain/DT_EvaluationDataMainBLL.cs new file mode 100644 index 000000000..fe0774543 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationDataMain/DT_EvaluationDataMainBLL.cs @@ -0,0 +1,125 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-12-09 16:16 + /// 描 述:党员评价考核主表 + /// + public class DT_EvaluationDataMainBLL : DT_EvaluationDataMainIBLL + { + private DT_EvaluationDataMainService dT_EvaluationDataMainService = new DT_EvaluationDataMainService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return dT_EvaluationDataMainService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取DT_EvaluationDataMain表实体数据 + /// + /// 主键 + /// + public DT_EvaluationDataMainEntity GetDT_EvaluationDataMainEntity(string keyValue) + { + try + { + return dT_EvaluationDataMainService.GetDT_EvaluationDataMainEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + dT_EvaluationDataMainService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, DT_EvaluationDataMainEntity entity) + { + try + { + dT_EvaluationDataMainService.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/PersonnelManagement/DT_EvaluationDataMain/DT_EvaluationDataMainEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationDataMain/DT_EvaluationDataMainEntity.cs new file mode 100644 index 000000000..4b3a44ca0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationDataMain/DT_EvaluationDataMainEntity.cs @@ -0,0 +1,92 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-12-09 16:16 + /// 描 述:党员评价考核主表 + /// + public class DT_EvaluationDataMainEntity + { + #region 实体成员 + /// + /// Id + /// + [Column("ID")] + public string Id { get; set; } + /// + /// 党员小组Id + /// + [Column("PARTYMEMBERGROUPID")] + public string PartyMemberGroupId { get; set; } + /// + /// 被考核党员 + /// + [Column("BEASSESSED")] + public string BeAssessed { get; set; } + /// + /// 党员自评分值 + /// + [Column("SCOREZP")] + public decimal? ScoreZP { get; set; } + /// + /// 党小组评分 + /// + [Column("SCOREXZ")] + public decimal? ScoreXZ { get; set; } + /// + /// 备注 + /// + [Column("REMARK")] + public string Remark { get; set; } + /// + /// 打分年度 + /// + [Column("SCOREYEAR")] + public int? ScoreYear { get; set; } + /// + /// 打分季度 + /// + [Column("SCOREQUARTER")] + public int? ScoreQuarter { get; set; } + /// + /// 创建时间 + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// 创建人 + /// + [Column("CREATEUSERID")] + public string CreateUserId { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + this.CreateTime=DateTime.Now; + //this.CreateUserId = LoginUserInfo.Get().userId; + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.Id = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationDataMain/DT_EvaluationDataMainIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationDataMain/DT_EvaluationDataMainIBLL.cs new file mode 100644 index 000000000..58384b11e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationDataMain/DT_EvaluationDataMainIBLL.cs @@ -0,0 +1,48 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-12-09 16:16 + /// 描 述:党员评价考核主表 + /// + public interface DT_EvaluationDataMainIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取DT_EvaluationDataMain表实体数据 + /// + /// 主键 + /// + DT_EvaluationDataMainEntity GetDT_EvaluationDataMainEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, DT_EvaluationDataMainEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationDataMain/DT_EvaluationDataMainService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationDataMain/DT_EvaluationDataMainService.cs new file mode 100644 index 000000000..68729be69 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DT_EvaluationDataMain/DT_EvaluationDataMainService.cs @@ -0,0 +1,149 @@ +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.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-12-09 16:16 + /// 描 述:党员评价考核主表 + /// + public class DT_EvaluationDataMainService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.* + "); + strSql.Append(" FROM DT_EvaluationDataMain t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["BeAssessed"].IsEmpty()) + { + dp.Add("BeAssessed",queryParam["BeAssessed"].ToString(), DbType.String); + strSql.Append(" AND t.BeAssessed = @BeAssessed "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取DT_EvaluationDataMain表实体数据 + /// + /// 主键 + /// + public DT_EvaluationDataMainEntity GetDT_EvaluationDataMainEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t=>t.Id == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, DT_EvaluationDataMainEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + entity.Create(); + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + } +}