Browse Source

通知公告查询修改后,登录报错

应县
ndbs 1 year ago
parent
commit
bd4d8f4918
5 changed files with 80 additions and 1 deletions
  1. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NoticeController.cs
  2. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/IndexFlow.js
  3. +18
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeBLL.cs
  4. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeIBLL.cs
  5. +41
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeService.cs

+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NoticeController.cs View File

@@ -163,6 +163,25 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers
};
return JsonResult(jsonData);
}
/// <summary>
/// 获取分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="keyword">关键词</param>
/// <returns></returns>
public ActionResult GetPageLists(string pagination, string keyword)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = noticeIBLL.GetPageLists(paginationobj, keyword);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records,
};
return JsonResult(jsonData);
}
public ActionResult GetPageListRevert(string pagination, string keyword)
{
Pagination paginationobj = pagination.ToObject<Pagination>();


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/IndexFlow.js View File

@@ -193,7 +193,7 @@ var bootstrap = function ($, learun) {
},
initGrid: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/LR_OAModule/Notice/GetPageList',
url: top.$.rootUrl + '/LR_OAModule/Notice/GetPageLists',
headData: [
{ label: '公告标题', name: 'F_FullHead', index: 'F_FullHead', width: 600, align: 'left' },
{ label: '发布人员', name: 'F_CreateUserName', index: 'F_CreateUserName', width: 100, align: 'left' },


+ 18
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeBLL.cs View File

@@ -40,6 +40,24 @@ namespace Learun.Application.OA
}
}
}
public IEnumerable<NewsEntity> GetPageLists(Pagination pagination, string keyword)
{
try
{
return noticeService.GetPageLists(pagination, keyword);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public IEnumerable<NewsEntity> GetPageListRevert(Pagination pagination, string keyword)
{


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeIBLL.cs View File

@@ -20,6 +20,7 @@ namespace Learun.Application.OA
/// <param name="keyword">关键词</param>
/// <returns></returns>
IEnumerable<NewsEntity> GetPageList(Pagination pagination, string keyword);
IEnumerable<NewsEntity> GetPageLists(Pagination pagination, string keyword);
IEnumerable<NewsEntity> GetListApp(Pagination pagination, string keyword);

IEnumerable<NewsEntity> GetPageListRevert(Pagination pagination, string keyword);


+ 41
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeService.cs View File

@@ -24,7 +24,48 @@ namespace Learun.Application.OA
/// <param name="pagination">分页参数</param>
/// <param name="keyword">关键词</param>
/// <returns></returns>
/// <summary>
/// 公告列表
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="keyword">关键词</param>
/// <returns></returns>
public IEnumerable<NewsEntity> GetPageList(Pagination pagination, string keyword)
{
try
{
var user = LoginUserInfo.Get();
var strSql = new StringBuilder();
strSql.Append("SELECT * FROM LR_OA_News t WHERE t.F_TypeId = 2 and F_Status<>'-1' and F_DeleteMark=0");
if (!string.IsNullOrEmpty(keyword))
{
strSql.Append(" AND F_FullHead like @keyword");
}
if (user.Description != "超级管理员")
{
strSql.Append(" AND F_CreateUserName ='" + user.realName + "'");
}
return this.BaseRepository().FindList<NewsEntity>(strSql.ToString(), new { keyword = "%" + keyword + "%" }, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 公告列表
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="keyword">关键词</param>
/// <returns></returns>
public IEnumerable<NewsEntity> GetPageLists(Pagination pagination, string keyword)
{
try
{


Loading…
Cancel
Save