diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/LeagueMemberAppraiseController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/LeagueMemberAppraiseController.cs new file mode 100644 index 000000000..99f1f4663 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/LeagueMemberAppraiseController.cs @@ -0,0 +1,145 @@ +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 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-03-10 14:48 + /// 描 述:团员评优申请管理 + /// + public class LeagueMemberAppraiseController : MvcControllerBase + { + private LeagueMemberAppraiseIBLL leagueMemberAppraiseIBLL = new LeagueMemberAppraiseBLL(); + + #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 = leagueMemberAppraiseIBLL.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 LeagueMemberAppraiseData = leagueMemberAppraiseIBLL.GetLeagueMemberAppraiseEntity(keyValue); + var jsonData = new + { + LeagueMemberAppraise = LeagueMemberAppraiseData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + leagueMemberAppraiseIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + LeagueMemberAppraiseEntity entity = strEntity.ToObject(); + leagueMemberAppraiseIBLL.SaveEntity(keyValue, entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + + /// + /// 提交申请 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DoSubmit(string keyValue) + { + leagueMemberAppraiseIBLL.DoSubmit(keyValue); + return Success("操作成功!"); + } + + /// + /// 审核 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DoCheck(string keyValue, string status) + { + leagueMemberAppraiseIBLL.DoCheck(keyValue, status); + return Success("操作成功!"); + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/LeagueMemberAppraise/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/LeagueMemberAppraise/Form.cshtml new file mode 100644 index 000000000..a619e24ac --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/LeagueMemberAppraise/Form.cshtml @@ -0,0 +1,27 @@ +@{ + ViewBag.Title = "团员评优申请管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
团员*
+ +
+
+
理由*
+ +
+
+
证明
+ +
+
+
文件材料
+
+
+
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/LeagueMemberAppraise/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/LeagueMemberAppraise/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/LeagueMemberAppraise/Form.js new file mode 100644 index 000000000..3a54cfcce --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/LeagueMemberAppraise/Form.js @@ -0,0 +1,51 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2023-03-10 14:48 + * 描 述:团员评优申请管理 + */ +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 () { + $('#Files').lrUploader(); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/LeagueMemberAppraise/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/LeagueMemberAppraise/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/LeagueMemberAppraise/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/LeagueMemberAppraise/Index.cshtml new file mode 100644 index 000000000..3e1048d17 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/LeagueMemberAppraise/Index.cshtml @@ -0,0 +1,41 @@ +@{ + ViewBag.Title = "团员评优申请管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
团员
+ +
+
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/LeagueMemberAppraise/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/LeagueMemberAppraise/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/LeagueMemberAppraise/Index.js new file mode 100644 index 000000000..2350e669b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/LeagueMemberAppraise/Index.js @@ -0,0 +1,201 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2023-03-10 14:48 + * 描 述:团员评优申请管理 + */ +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); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/PersonnelManagement/LeagueMemberAppraise/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)) { + var ApplyStatus = $('#gridtable').jfGridValue('ApplyStatus'); + if (ApplyStatus == "1") { + learun.alert.warning("当前项申请中!"); + return false; + } else if (ApplyStatus == "2") { + learun.alert.warning("当前项已审核!"); + return false; + } else if (ApplyStatus == "3") { + learun.alert.warning("当前项未通过审核!"); + return false; + } + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/PersonnelManagement/LeagueMemberAppraise/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)) { + var ApplyStatus = $('#gridtable').jfGridValue('ApplyStatus'); + if (ApplyStatus == "1") { + learun.alert.warning("当前项申请中!"); + return false; + } else if (ApplyStatus == "2") { + learun.alert.warning("当前项已审核!"); + return false; + } else if (ApplyStatus == "3") { + learun.alert.warning("当前项未通过审核!"); + return false; + } + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/LeagueMemberAppraise/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //  提交申请 + $('#lr_apply').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var ApplyStatus = $('#gridtable').jfGridValue('ApplyStatus'); + if (ApplyStatus == "1") { + learun.alert.warning("当前项申请中!"); + return false; + } else if (ApplyStatus == "2") { + learun.alert.warning("当前项已审核!"); + return false; + } else if (ApplyStatus == "3") { + learun.alert.warning("当前项未通过审核!"); + return false; + } + learun.layerConfirm('是否确认申请该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/PersonnelManagement/LeagueMemberAppraise/DoSubmit', { keyValue: keyValue }, function (res) { + refreshGirdData(); + }); + } + }); + } + }); + //  审核通过 + $('#lr_check').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var ApplyStatus = $('#gridtable').jfGridValue('ApplyStatus'); + if (ApplyStatus != "1") { + learun.alert.warning("当前项不在申请中!"); + return false; + } + learun.layerConfirm('是否确认审核通过该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/PersonnelManagement/LeagueMemberAppraise/DoCheck', { keyValue: keyValue, status: '2' }, function (res) { + refreshGirdData(); + }); + } + }); + } + }); + //  审核不通过 + $('#lr_checkno').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var ApplyStatus = $('#gridtable').jfGridValue('ApplyStatus'); + if (ApplyStatus != "1") { + learun.alert.warning("当前项不在申请中!"); + return false; + } + learun.layerConfirm('是否确认审核不通过该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/PersonnelManagement/LeagueMemberAppraise/DoCheck', { keyValue: keyValue, status: '3' }, function (res) { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/PersonnelManagement/LeagueMemberAppraise/GetPageList', + headData: [ + { label: "团员", name: "LeagueMember", width: 100, align: "left" }, + { label: "理由", name: "Reason", width: 100, align: "left" }, + { label: "证明", name: "Prove", width: 100, align: "left" }, + { label: "申请时间", name: "ApplyTime", width: 130, align: "left" }, + { + label: "申请状态", name: "ApplyStatus", width: 100, align: "left", formatter: function (cellvalue) { + return cellvalue == "1" ? "申请中" : cellvalue == "2" ? "申请已通过" : cellvalue == "3" ? "申请未通过" : "草稿"; + } + }, + { + label: "申请人", name: "CreateUserId", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: "审核时间", name: "CheckTime", width: 130, align: "left" }, + { + label: "审核人", name: "CheckUserId", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + ], + mainId: 'Id', + isPage: true, + sidx: 'CreateTime' + }); + 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 6736e185a..906453892 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 @@ + @@ -6464,6 +6465,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config index 4c2360d84..72e20af2a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config @@ -1,16 +1,16 @@  - - + - + - + \ No newline at end of file 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 1c3fc01cf..d9d60d1f5 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 @@ -609,6 +609,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/LeagueMemberAppraiseMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/LeagueMemberAppraiseMap.cs new file mode 100644 index 000000000..3374c608c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/LeagueMemberAppraiseMap.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 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-03-10 14:48 + /// 描 述:团员评优申请管理 + /// + public class LeagueMemberAppraiseMap : EntityTypeConfiguration + { + public LeagueMemberAppraiseMap() + { + #region 表、主键 + //表 + this.ToTable("LEAGUEMEMBERAPPRAISE"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #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 6f6ebafec..b4490741e 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 @@ -1868,6 +1868,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/LeagueMemberAppraise/LeagueMemberAppraiseBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/LeagueMemberAppraise/LeagueMemberAppraiseBLL.cs new file mode 100644 index 000000000..3d24a044a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/LeagueMemberAppraise/LeagueMemberAppraiseBLL.cs @@ -0,0 +1,171 @@ +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 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-03-10 14:48 + /// 描 述:团员评优申请管理 + /// + public class LeagueMemberAppraiseBLL : LeagueMemberAppraiseIBLL + { + private LeagueMemberAppraiseService leagueMemberAppraiseService = new LeagueMemberAppraiseService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return leagueMemberAppraiseService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取LeagueMemberAppraise表实体数据 + /// + /// 主键 + /// + public LeagueMemberAppraiseEntity GetLeagueMemberAppraiseEntity(string keyValue) + { + try + { + return leagueMemberAppraiseService.GetLeagueMemberAppraiseEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + leagueMemberAppraiseService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, LeagueMemberAppraiseEntity entity) + { + try + { + leagueMemberAppraiseService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 提交申请 + /// + /// 主键 + public void DoSubmit(string keyValue) + { + try + { + leagueMemberAppraiseService.DoSubmit(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 审核 + /// + /// 主键 + public void DoCheck(string keyValue, string status) + { + try + { + leagueMemberAppraiseService.DoCheck(keyValue, status); + } + 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/LeagueMemberAppraise/LeagueMemberAppraiseEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/LeagueMemberAppraise/LeagueMemberAppraiseEntity.cs new file mode 100644 index 000000000..2874ad8bc --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/LeagueMemberAppraise/LeagueMemberAppraiseEntity.cs @@ -0,0 +1,114 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-03-10 14:48 + /// 描 述:团员评优申请管理 + /// + public class LeagueMemberAppraiseEntity + { + #region 实体成员 + /// + /// Id + /// + [Column("ID")] + public string Id { get; set; } + /// + /// 团员 + /// + [Column("LEAGUEMEMBER")] + public string LeagueMember { get; set; } + /// + /// 理由 + /// + [Column("REASON")] + public string Reason { get; set; } + /// + /// 证明 + /// + [Column("PROVE")] + public string Prove { get; set; } + /// + /// 文件材料 + /// + [Column("FILES")] + public string Files { get; set; } + /// + /// 备注 + /// + [Column("REMARK")] + public string Remark { get; set; } + /// + /// 申请时间 + /// + [Column("APPLYTIME")] + public DateTime? ApplyTime { get; set; } + /// + /// 申请状态(0草稿,1申请中,2已通过,3未通过,) + /// + [Column("APPLYSTATUS")] + public string ApplyStatus { get; set; } + /// + /// 审核时间 + /// + [Column("CHECKTIME")] + public DateTime? CheckTime { get; set; } + /// + /// 审核人 + /// + [Column("CHECKUSERID")] + public string CheckUserId { get; set; } + /// + /// CreateUserId + /// + [Column("CREATEUSERID")] + public string CreateUserId { get; set; } + /// + /// CreateTime + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// ModifyUserId + /// + [Column("MODIFYUSERID")] + public string ModifyUserId { get; set; } + /// + /// ModifyTime + /// + [Column("MODIFYTIME")] + public DateTime? ModifyTime { 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; + this.ModifyTime = DateTime.Now; + this.ModifyUserId = LoginUserInfo.Get().userId; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/LeagueMemberAppraise/LeagueMemberAppraiseIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/LeagueMemberAppraise/LeagueMemberAppraiseIBLL.cs new file mode 100644 index 000000000..290251162 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/LeagueMemberAppraise/LeagueMemberAppraiseIBLL.cs @@ -0,0 +1,61 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-03-10 14:48 + /// 描 述:团员评优申请管理 + /// + public interface LeagueMemberAppraiseIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取LeagueMemberAppraise表实体数据 + /// + /// 主键 + /// + LeagueMemberAppraiseEntity GetLeagueMemberAppraiseEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, LeagueMemberAppraiseEntity entity); + + /// + /// 提交申请 + /// + /// 主键 + void DoSubmit(string keyValue); + + /// + /// 审核 + /// + /// 主键 + void DoCheck(string keyValue, string status); + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/LeagueMemberAppraise/LeagueMemberAppraiseService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/LeagueMemberAppraise/LeagueMemberAppraiseService.cs new file mode 100644 index 000000000..5bfbf94ba --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/LeagueMemberAppraise/LeagueMemberAppraiseService.cs @@ -0,0 +1,193 @@ +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 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-03-10 14:48 + /// 描 述:团员评优申请管理 + /// + public class LeagueMemberAppraiseService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.*"); + strSql.Append(" FROM LeagueMemberAppraise t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["LeagueMember"].IsEmpty()) + { + dp.Add("LeagueMember", "%" + queryParam["LeagueMember"].ToString() + "%", DbType.String); + strSql.Append(" AND t.LeagueMember Like @LeagueMember "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取LeagueMemberAppraise表实体数据 + /// + /// 主键 + /// + public LeagueMemberAppraiseEntity GetLeagueMemberAppraiseEntity(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, LeagueMemberAppraiseEntity 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); + } + } + } + + /// + /// 提交申请 + /// + /// 主键 + public void DoSubmit(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").ExecuteBySql($"update LeagueMemberAppraise set ApplyStatus='1',ApplyTime='{DateTime.Now}' where Id='{keyValue}' "); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 审核 + /// + /// 主键 + public void DoCheck(string keyValue, string status) + { + try + { + var loginUserInfo = LoginUserInfo.Get(); + this.BaseRepository("CollegeMIS").ExecuteBySql($"update LeagueMemberAppraise set ApplyStatus='{status}',CheckTime='{DateTime.Now}',CheckUserId='{loginUserInfo.userId}' where Id='{keyValue}' "); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + } +}