You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
135 lines
4.0 KiB
135 lines
4.0 KiB
4 years ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Data;
|
||
|
using System.Linq;
|
||
|
using QMAPP.DAL.FuntionDescriptionDAL;
|
||
|
using QMAPP.DAL.Sys;
|
||
|
using QMAPP.Entity;
|
||
|
using QMFrameWork.Data;
|
||
|
using QMFrameWork.Log;
|
||
|
|
||
|
namespace QMAPP.BLL.FuntionDescriptionBLL
|
||
|
{
|
||
|
public class FuntionDescriptionBLL : BaseBLL
|
||
|
{
|
||
|
|
||
|
#region 获取列表
|
||
|
/// <summary>
|
||
|
/// 获取列表
|
||
|
/// </summary>
|
||
|
/// <param name="condition">条件</param>
|
||
|
/// <param name="page">数据页</param>
|
||
|
/// <returns>数据页</returns>
|
||
|
public DataResult<DataPage> GetCountList(FuntionDescription condition, DataPage page)
|
||
|
{
|
||
|
DataResult<DataPage> result = new DataResult<DataPage>();
|
||
|
try
|
||
|
{
|
||
|
DataPage dataPage = new FuntionDescriptionDAL().GetCountList(condition, page);
|
||
|
|
||
|
var users = new UserManageDAL().GetUserComboxSource();
|
||
|
foreach (FuntionDescription item in dataPage.Result as List<FuntionDescription>)
|
||
|
{
|
||
|
//处理人
|
||
|
if (!string.IsNullOrEmpty(item.CREATEUSER))
|
||
|
{
|
||
|
var user = users.FirstOrDefault(x => x.UserID == item.CREATEUSER);
|
||
|
if (user != null)
|
||
|
{
|
||
|
item.CREATEUSERNAME = user.UserName;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
result.Result = dataPage;
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
LogManager.LogHelper.Error(new LogInfo()
|
||
|
{
|
||
|
ErrorInfo = ex,
|
||
|
Tag = ex.StackTrace,
|
||
|
Info = "热点查询-获取列表"
|
||
|
});
|
||
|
result.IsSuccess = false;
|
||
|
result.Msg = "系统异常!";
|
||
|
throw ex;
|
||
|
}
|
||
|
result.IsSuccess = true;
|
||
|
return result;
|
||
|
}
|
||
|
#endregion
|
||
|
|
||
|
#region 导出数据
|
||
|
/// <summary>
|
||
|
/// 获取导出的数据
|
||
|
/// </summary>
|
||
|
/// <param name="user">查询条件</param>
|
||
|
/// <returns>数据</returns>
|
||
|
public DataResult<DataTable> GetExportData(FuntionDescription model)
|
||
|
{
|
||
|
DataResult<DataTable> result = new DataResult<DataTable>();
|
||
|
try
|
||
|
{
|
||
|
result.IsSuccess = true;
|
||
|
result.Result = new FuntionDescriptionDAL().GetExportData(model);
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
LogManager.LogHelper.Error(new LogInfo()
|
||
|
{
|
||
|
ErrorInfo = ex,
|
||
|
Tag = ex.StackTrace,
|
||
|
Info = "导出错误!"
|
||
|
});
|
||
|
result.IsSuccess = false;
|
||
|
result.Msg = "导出错误!";
|
||
|
}
|
||
|
return result;
|
||
|
}
|
||
|
#endregion
|
||
|
|
||
|
#region 获取功能模块下拉框
|
||
|
/// <summary>
|
||
|
/// 获取列表
|
||
|
/// </summary>
|
||
|
/// <param name="condition">条件</param>
|
||
|
/// <param name="page">数据页</param>
|
||
|
/// <returns>数据页</returns>
|
||
|
public List<FuntionDescription> GetModelNameCombox()
|
||
|
{
|
||
|
try
|
||
|
{
|
||
|
return new FuntionDescriptionDAL().GetModelNameCombox();
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
throw ex;
|
||
|
}
|
||
|
}
|
||
|
#endregion
|
||
|
|
||
|
#region 获取菜单项下拉框
|
||
|
/// <summary>
|
||
|
/// 获取列表
|
||
|
/// </summary>
|
||
|
/// <param name="condition">条件</param>
|
||
|
/// <param name="page">数据页</param>
|
||
|
/// <returns>数据页</returns>
|
||
|
public List<FuntionDescription> GetMenuNameCombox(string ModelName)
|
||
|
{
|
||
|
try
|
||
|
{
|
||
|
return new FuntionDescriptionDAL().GetMenuNameCombox(ModelName);
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
throw ex;
|
||
|
}
|
||
|
}
|
||
|
#endregion
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|