From 523620cfd7c094ab03c2f970f92d3c224003df21 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Fri, 14 May 2021 10:53:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=B1=E7=89=A9=E6=8B=9B=E9=A2=86=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E4=BB=A5=E5=8F=8APC=E7=AB=AF=E6=A1=8C=E9=9D=A2?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/NoticeController.cs | 65 +++++++- .../Views/Notice/FormLostArticle.cshtml | 50 ++++++ .../Views/Notice/FormLostArticle.js | 143 ++++++++++++++++ .../Views/Notice/FormLostArticleView.cshtml | 50 ++++++ .../Views/Notice/FormLostArticleView.js | 123 ++++++++++++++ .../Views/Notice/IndexLostArticle.cshtml | 34 ++++ .../Views/Notice/IndexLostArticle.js | 157 ++++++++++++++++++ .../Learun.Application.Web.csproj | 6 + .../Views/Utility/ListContentIndex.cshtml | 4 +- .../Views/Utility/ListContentIndex.js | 7 + .../Learun.Application.OA/News/NewsEntity.cs | 2 +- .../Learun.Application.OA/Notice/NoticeBLL.cs | 46 +++++ .../Notice/NoticeIBLL.cs | 14 ++ .../Notice/NoticeService.cs | 72 +++++++- 14 files changed, 768 insertions(+), 5 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormLostArticle.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormLostArticle.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormLostArticleView.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormLostArticleView.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/IndexLostArticle.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/IndexLostArticle.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NoticeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NoticeController.cs index 716624943..b8ae187c2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NoticeController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NoticeController.cs @@ -113,6 +113,34 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers { return View(); } + + /// + /// 失物招领 + /// + /// + [HttpGet] + public ActionResult IndexLostArticle() + { + return View(); + } + /// + /// 失物招领表单 + /// + /// + [HttpGet] + public ActionResult FormLostArticle() + { + return View(); + } + /// + /// 失物招领表单 + /// + /// + [HttpGet] + public ActionResult FormLostArticleView() + { + return View(); + } #endregion #region 获取数据 @@ -148,6 +176,27 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers }; return JsonResult(jsonData); } + + /// + /// 获取失物招领分页数据 + /// + /// 分页参数 + /// 关键词 + /// + public ActionResult GetPageListForLostArticle(string pagination, string keyword) + { + Pagination paginationobj = pagination.ToObject(); + var data = noticeIBLL.GetPageListForLostArticle(paginationobj, keyword); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records, + }; + return JsonResult(jsonData); + } + /// /// 查看通知公告 /// @@ -421,6 +470,20 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers } } + /// + /// 保存表单数据 + /// + /// 主键 + /// 实体 + /// + [HttpPost, ValidateAntiForgeryToken, AjaxOnly] + public ActionResult SaveFormForLostArticle(string keyValue, NewsEntity entity) + { + entity.F_NewsContent = WebHelper.HtmlEncode(entity.F_NewsContent); + noticeIBLL.SaveFormForLostArticle(keyValue, entity); + return Success("保存成功!"); + } + /// /// 删除表单数据 /// @@ -527,7 +590,7 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers entity.ReadSigns = false; messageRindIBLL.SaveEntity("", entity); } - + } #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormLostArticle.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormLostArticle.cshtml new file mode 100644 index 000000000..bef854362 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormLostArticle.cshtml @@ -0,0 +1,50 @@ +@{ + ViewBag.Title = "发布失物招领"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + +
+
+
公告标题*
+ +
+ @*
+
公告类别*
+
+ +
*@ +
+
发布时间*
+ +
+ @*
+
信息来源*
+ +
+
+
来源地址
+ +
+
+
接收部门
+
+
+
+
接收岗位
+
+
+
+
下发飞星
+
+
*@ +
+
标题图片
+
+
+
+
公告内容
+
+
+
+ +@Html.AppendJsFile("/Areas/LR_OAModule/Views/Notice/FormLostArticle.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormLostArticle.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormLostArticle.js new file mode 100644 index 000000000..4ec20106a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormLostArticle.js @@ -0,0 +1,143 @@ +/* + * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:陈彬彬 + * 日 期:2017.11.11 + * 描 述:公告通知 + */ +var acceptClick; +var keyValue = request('keyValue'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +var isUpdate; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; +var bootstrap = function ($, learun) { + "use strict"; + var ue; + var page = { + init: function () { + page.bind(); + page.initData(); + }, + bind: function () { + //var loginInfo = top.learun.clientdata.get(['userinfo']); + + $('#F_NewsImage').lrUploader(); + + //内容编辑器 + ue = UE.getEditor('editor'); + }, + initData: function () { + if (!!keyValue) { + //$('#form').lrSetFormData(selectedRow); + //$("#F_ReleaseTime").val(learun.formatDate(selectedRow.F_ReleaseTime, 'yyyy/MM/dd hh:mm')); + $.lrSetForm(top.$.rootUrl + '/LR_OAModule/Notice/GetEntity?keyValue=' + keyValue, function (data) { + $('#form').lrSetFormData(data); + setTimeout(function () { + ue.setContent(decodeURI(data.F_NewsContent)); + }, 100); + }); + } + } + }; + // 设置表单数据 + //setFormData = function (processId) { + // if (!!processId) { + // $.lrSetForm(top.$.rootUrl + '/LR_OAModule/Notice/GetFormDataByProcessId?processId=' + processId, function (data) { + // for (var id in data) { + // if (!!data[id] && data[id].length > 0) { + // $('#' + id).jfGridSet('refreshdata', data[id]); + // } + // else { + // if (id == 'Sys_ReceiveFile') { + // keyValue = data[id].F_DeptRelationId; + // } + // $('[data-table="' + id + '"]').lrSetFormData(data[id]); + // } + // } + // }); + // } + //} + // 验证数据是否填写完整 + validForm = function () { + if (!$('#form').lrValidform()) { + return false; + } + return true; + }; + // 保存数据 + save = function (processId, callBack, i) { + + if (!$('#form').lrValidform()) { + return false; + } + var postData = $('#form').lrGetFormData(keyValue); + postData["F_NewsContent"] = encodeURI(ue.getContent(null, null, true)); + console.log("1111111111111"); + $.lrSaveForm(top.$.rootUrl + '/LR_OAModule/Notice/SaveFormForLostArticle?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + //callBack(res, formData, i); + } + }); + + //var formData = $('body').lrGetFormData(); + //if (!!processId) { + // formData.RProcessId = processId; + //} + + //learun.clientdata.getAsync('dataItem', { + + // key: $("#F_CategoryId").lrselectGet(), + // code: 'NoticeCategory', + // callback: function (_data) { + // $("#F_Category").val(_data.text); + + + // } + //}); + + + //$.lrSaveForm(top.$.rootUrl + '/LR_OAModule/Notice/SaveForm?keyValue=' + keyValue, formData, function (res) { + // // 保存成功后才回调 + // if (!!callBack) { + // callBack(res, formData, i); + // } + //}); + }; + + acceptClick = function (callBack) { + if (!$('#form').lrValidform()) { + return false; + } + var postData = $('#form').lrGetFormData(keyValue); + postData["F_NewsContent"] = encodeURI(ue.getContent(null, null, true)); + console.log("2222222222"); + $.lrSaveForm(top.$.rootUrl + '/LR_OAModule/Notice/SaveFormForLostArticle?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + //learun.clientdata.getAsync('dataItem', { + // key: $("#F_CategoryId").lrselectGet(), + // code: 'NoticeCategory', + // callback: function (_data) { + // $("#F_Category").val(_data.text); + + + // } + //}); + + + } + page.init(); +} + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormLostArticleView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormLostArticleView.cshtml new file mode 100644 index 000000000..078b9233b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormLostArticleView.cshtml @@ -0,0 +1,50 @@ +@{ + ViewBag.Title = "发布失物招领"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + +
+
+
公告标题*
+ +
+ @*
+
公告类别*
+
+ +
*@ +
+
发布时间*
+ +
+ @*
+
信息来源*
+ +
+
+
来源地址
+ +
+
+
接收部门
+
+
+
+
接收岗位
+
+
+
+
下发飞星
+
+
*@ +
+
标题图片
+
+
+
+
公告内容
+
+
+
+ +@Html.AppendJsFile("/Areas/LR_OAModule/Views/Notice/FormLostArticleView.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormLostArticleView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormLostArticleView.js new file mode 100644 index 000000000..8abeb4e10 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormLostArticleView.js @@ -0,0 +1,123 @@ +/* + * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:陈彬彬 + * 日 期:2017.11.11 + * 描 述:公告通知 + */ +var acceptClick; +var keyValue = request('keyValue'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +var isUpdate; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; +var bootstrap = function ($, learun) { + "use strict"; + var ue; + var page = { + init: function () { + page.bind(); + page.initData(); + }, + bind: function () { + //var loginInfo = top.learun.clientdata.get(['userinfo']); + + $('#F_NewsImage').lrUploader(); + + //内容编辑器 + ue = UE.getEditor('editor'); + }, + initData: function () { + if (!!keyValue) { + //$('#form').lrSetFormData(selectedRow); + //$("#F_ReleaseTime").val(learun.formatDate(selectedRow.F_ReleaseTime, 'yyyy/MM/dd hh:mm')); + $.lrSetForm(top.$.rootUrl + '/LR_OAModule/Notice/GetEntity?keyValue=' + keyValue, function (data) { + $('#form').lrSetFormData(data); + setTimeout(function () { + ue.setContent(decodeURI(data.F_NewsContent)); + }, 100); + }); + } + } + }; + + //// 验证数据是否填写完整 + //validForm = function () { + // if (!$('#form').lrValidform()) { + // return false; + // } + // return true; + //}; + //// 保存数据 + //save = function (processId, callBack, i) { + + // if (!$('#form').lrValidform()) { + // return false; + // } + // var postData = $('#form').lrGetFormData(keyValue); + // postData["F_NewsContent"] = ue.getContent(null, null, true); + // $.lrSaveForm(top.$.rootUrl + '/LR_OAModule/Notice/SaveFormForLostArticle?keyValue=' + keyValue, postData, function (res) { + // // 保存成功后才回调 + // if (!!callBack) { + // callBack(res, formData, i); + // } + // }); + + // //var formData = $('body').lrGetFormData(); + // //if (!!processId) { + // // formData.RProcessId = processId; + // //} + + // //learun.clientdata.getAsync('dataItem', { + + // // key: $("#F_CategoryId").lrselectGet(), + // // code: 'NoticeCategory', + // // callback: function (_data) { + // // $("#F_Category").val(_data.text); + + + // // } + // //}); + + + // //$.lrSaveForm(top.$.rootUrl + '/LR_OAModule/Notice/SaveForm?keyValue=' + keyValue, formData, function (res) { + // // // 保存成功后才回调 + // // if (!!callBack) { + // // callBack(res, formData, i); + // // } + // //}); + //}; + + //acceptClick = function (callBack) { + // if (!$('#form').lrValidform()) { + // return false; + // } + // var postData = $('#form').lrGetFormData(keyValue); + // postData["F_NewsContent"] = ue.getContent(null, null, true); + // $.lrSaveForm(top.$.rootUrl + '/LR_OAModule/Notice/SaveFormForLostArticle?keyValue=' + keyValue, postData, function (res) { + // // 保存成功后才回调 + // if (!!callBack) { + // callBack(); + // } + // }); + // //learun.clientdata.getAsync('dataItem', { + // // key: $("#F_CategoryId").lrselectGet(), + // // code: 'NoticeCategory', + // // callback: function (_data) { + // // $("#F_Category").val(_data.text); + + + // // } + // //}); + + + //} + page.init(); +} + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/IndexLostArticle.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/IndexLostArticle.cshtml new file mode 100644 index 000000000..fd09b0b36 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/IndexLostArticle.cshtml @@ -0,0 +1,34 @@ +@{ + ViewBag.Title = "失物招领管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+ +
+
+  查询 +
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/LR_OAModule/Views/Notice/IndexLostArticle.js") + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/IndexLostArticle.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/IndexLostArticle.js new file mode 100644 index 000000000..419c8447a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/IndexLostArticle.js @@ -0,0 +1,157 @@ +/* + * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:陈彬彬 + * 日 期:2017.07.11 + * 描 述:公告通知 + */ +var refreshGirdData; // 更新数据 +var bootstrap = function ($, learun) { + "use strict"; + var processId = ''; + var page = { + init: function () { + page.initGrid(); + page.bind(); + }, + bind: function () { + // 查询 + $('#btn_Search').on('click', function () { + var keyword = $('#txt_Keyword').val(); + page.search({ keyword: keyword }); + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '添加公告', + url: top.$.rootUrl + '/LR_OAModule/Notice/FormLostArticle', + width: 1000, + height: 650, + maxmin: true, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + res = top[id].save('', function () { + page.search(); + }); + } + return res; + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('F_NewsId'); + if (learun.checkrow(keyValue)) { + if (keyValue.indexOf(",") != -1) { + learun.alert.warning("只能选择一条记录进行编辑!"); + return false; + } + var SendFlag = $('#gridtable').jfGridValue('F_Status'); + if (SendFlag == "1" || SendFlag == "2") { + learun.alert.warning("当前项目已提交不能编辑!"); + return; + } + learun.layerForm({ + id: 'formedit', + title: '编辑公告', + url: top.$.rootUrl + '/LR_OAModule/Notice/FormLostArticle?keyValue=' + keyValue, + width: 1000, + height: 650, + maxmin: true, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('F_NewsId'); + if (learun.checkrow(keyValue)) { + if (keyValue.indexOf(",") != -1) { + learun.alert.warning("只能选择一条记录查看!"); + return false; + } + learun.layerForm({ + id: 'form', + title: '查看', + url: top.$.rootUrl + '/LR_OAModule/Notice/FormLostArticleView?keyValue=' + keyValue, + width: 800, + height: 650, + btn: null + }); + } + }); + + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('F_NewsId'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/LR_OAModule/Notice/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + + + }, + initGrid: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/LR_OAModule/Notice/GetPageListForLostArticle', + headData: [ + { label: '标题', name: 'F_FullHead', index: 'F_FullHead', width: 600, align: 'left' }, + { label: '发布人员', name: 'F_CreateUserName', index: 'F_CreateUserName', width: 100, align: 'left' }, + + { + label: "发布时间", name: "F_ReleaseTime", index: "F_ReleaseTime", width: 140, align: "left", + formatter: function (cellvalue) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm'); + } + }, + + { label: "创建时间", name: "F_CreateDate", index: "F_CreateDate", width: 130, align: 'left' } + ], + mainId: 'F_NewsId', + reloadSelected: true, + isMultiselect: true, + isPage: true, + sidx: 'F_CreateDate', + sord: 'desc' + }); + page.search(); + }, + search: function (param) { + $('#gridtable').jfGridSet('reload', param); + } + }; + // 保存数据后回调刷新 + refreshGirdData = function (res, postData) { + //if (res && res.code && res.code == 200) { + // var postData = { + // schemeCode: 'OA_News',// 填写流程对应模板编号 + // processId: processId, + // level: '1', + // }; + // learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { + // learun.loading(false); + // }); + //} + page.search(); + } + 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 40c2505eb..099764ebf 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 @@ -1302,8 +1302,11 @@ + + + @@ -7154,6 +7157,9 @@ + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Utility/ListContentIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Utility/ListContentIndex.cshtml index a13f95220..2fd374615 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Utility/ListContentIndex.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Utility/ListContentIndex.cshtml @@ -20,8 +20,8 @@
发布时间: - 信息来源: - 公告类别: + 信息来源: + 公告类别:
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Utility/ListContentIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Utility/ListContentIndex.js index e2cedfba8..f7e832958 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Utility/ListContentIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Utility/ListContentIndex.js @@ -22,6 +22,13 @@ var bootstrap = function ($, learun) { $("#F_NewsContent").html($('
').html(item.f_content).text()); } else { $.lrSetForm(top.$.rootUrl + '/LR_OAModule/Notice/GetEntity?keyValue=' + id, function (data) { + if (data.F_Category == "失物招领") { + data.F_NewsContent = decodeURI(data.F_NewsContent); + $('.inSec1T').attr("hidden","hidden"); + $('#readlist').attr("hidden","hidden"); + $('#msgSource').attr("hidden","hidden"); + $('#newType').attr("hidden","hidden"); + } $("#F_FullHead").text(data.F_FullHead); $("#F_CreateDate").text(data.F_CreateDate); $("#F_CreateUserName").text(data.F_SourceName == null ? "" : data.F_SourceName); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsEntity.cs index 76fb60589..ce821e2fa 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsEntity.cs @@ -21,7 +21,7 @@ namespace Learun.Application.OA [Column("F_NEWSID")] public string F_NewsId { get; set; } /// - /// 类型(1-新闻2-公告) + /// 类型(1-新闻2-公告3-失物招领) /// /// [Column("F_TYPEID")] diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeBLL.cs index 64777dae7..9fa00e02c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeBLL.cs @@ -59,6 +59,25 @@ namespace Learun.Application.OA } } } + + public IEnumerable GetPageListForLostArticle(Pagination pagination, string keyword) + { + try + { + return noticeService.GetPageListForLostArticle(pagination, keyword); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } /// /// 公告实体 /// @@ -151,6 +170,33 @@ namespace Learun.Application.OA } } + + /// + /// 保存(新增、修改)失物招领 + /// + /// 主键值 + /// 公告实体 + /// + public void SaveFormForLostArticle(string keyValue, NewsEntity newsEntity) + { + try + { + noticeService.SaveFormForLostArticle(keyValue, newsEntity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + + } + #endregion #region 扩展数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeIBLL.cs index 01c6de29f..6de95c443 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeIBLL.cs @@ -22,6 +22,13 @@ namespace Learun.Application.OA IEnumerable GetPageList(Pagination pagination, string keyword); IEnumerable GetPageListRevert(Pagination pagination, string keyword); /// + /// 获取失物招领分页数据 + /// + /// + /// + /// + IEnumerable GetPageListForLostArticle(Pagination pagination, string keyword); + /// /// 公告实体 /// /// 主键值 @@ -42,6 +49,13 @@ namespace Learun.Application.OA /// 公告实体 /// void SaveEntity(string keyValue, NewsEntity newsEntity); + + /// + /// 保存失物招领信息 + /// + /// + /// + void SaveFormForLostArticle(string keyValue, NewsEntity newsEntity); #endregion #region 扩展数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeService.cs index 1099c51ae..c135fbc1e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeService.cs @@ -70,6 +70,38 @@ namespace Learun.Application.OA } } } + + /// + /// 失物招领分页列表 + /// + /// 分页参数 + /// 关键词 + /// + public IEnumerable GetPageListForLostArticle(Pagination pagination, string keyword) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT * FROM LR_OA_News t WHERE t.F_TypeId = 3 and F_CategoryId=99 "); + if (!string.IsNullOrEmpty(keyword)) + { + strSql.Append(" AND F_FullHead like @keyword"); + } + return this.BaseRepository().FindList(strSql.ToString(), new { keyword = "%" + keyword + "%" }, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// /// 新闻公告实体 /// @@ -131,7 +163,7 @@ namespace Learun.Application.OA } } - public void RecycleForm(string keyValue,string status) + public void RecycleForm(string keyValue, string status) { var db = this.BaseRepository().BeginTrans(); try @@ -195,6 +227,44 @@ namespace Learun.Application.OA } } + } + + /// + /// 保存(新增、修改)失物招领 + /// + /// 主键值 + /// 新闻公告实体 + /// + public void SaveFormForLostArticle(string keyValue, NewsEntity newsEntity) + { + try + { + newsEntity.F_TypeId = 3; + newsEntity.F_CategoryId = "99"; + newsEntity.F_Category = "失物招领"; + if (!string.IsNullOrEmpty(keyValue)) + { + newsEntity.Modify(keyValue); + this.BaseRepository().Update(newsEntity); + } + else + { + newsEntity.Create(); + this.BaseRepository().Insert(newsEntity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion #region 扩展数据