|
|
|
|
@ -4,6 +4,7 @@ using FactorySystemBll;
|
|
|
|
|
using FactorySystemCommon;
|
|
|
|
|
using FactorySystemModel.BusinessModel;
|
|
|
|
|
using FactorySystemModel.ResponseModel;
|
|
|
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
|
|
|
|
|
|
namespace FactorySystemApi.Controllers
|
|
|
|
|
{
|
|
|
|
|
@ -22,12 +23,46 @@ namespace FactorySystemApi.Controllers
|
|
|
|
|
public ApiResult GetPageList(Dictionary<string, object> inParam)
|
|
|
|
|
{
|
|
|
|
|
var apiResult = new ApiResult();
|
|
|
|
|
|
|
|
|
|
return ExceptionHelper.TryReturnException(() =>
|
|
|
|
|
{
|
|
|
|
|
apiResult.Data = new
|
|
|
|
|
{
|
|
|
|
|
List = _operateLogBll.GetPageList(inParam, out int totalCount)
|
|
|
|
|
};
|
|
|
|
|
}, apiResult, Request);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取分页
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
public ApiResult GetPageListByParams(Dictionary<string, object> inParam)
|
|
|
|
|
{
|
|
|
|
|
var apiResult = new ApiResult();
|
|
|
|
|
int pageNumber = int.Parse(inParam.ContainsKey("current") && !string.IsNullOrEmpty(inParam["current"].ToString()) ? inParam["current"].ToString() : "0");
|
|
|
|
|
int pageSize = int.Parse(inParam.ContainsKey("limit") && !string.IsNullOrEmpty(inParam["limit"].ToString()) ? inParam["limit"].ToString() : "10");
|
|
|
|
|
string FName = inParam.ContainsKey("FName") ? inParam["FName"].ToString() : "";
|
|
|
|
|
int FType = int.Parse(inParam.ContainsKey("FType") && !string.IsNullOrEmpty(inParam["FType"].ToString()) ? inParam["FType"].ToString() : "0");
|
|
|
|
|
int FModule = int.Parse(inParam.ContainsKey("FModule") && !string.IsNullOrEmpty(inParam["FModule"].ToString()) ? inParam["FModule"].ToString() : "0");
|
|
|
|
|
string FDateRangeStr = inParam.ContainsKey("FDateRange") ? inParam["FDateRange"].ToString() : "";
|
|
|
|
|
string dateFrom = null;
|
|
|
|
|
string dateTo = null;
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(FDateRangeStr))
|
|
|
|
|
{
|
|
|
|
|
var dataRange = JArray.Parse(FDateRangeStr);
|
|
|
|
|
dateFrom = dataRange[0].ToString();
|
|
|
|
|
dateTo = dataRange[1].ToString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return ExceptionHelper.TryReturnException(() =>
|
|
|
|
|
{
|
|
|
|
|
apiResult.Data = new
|
|
|
|
|
{
|
|
|
|
|
List = _operateLogBll.GetPageList(inParam, out int totalCount),
|
|
|
|
|
Total = totalCount
|
|
|
|
|
//List = _operateLogBll.GetPageList(inParam, out int totalCount),
|
|
|
|
|
List = _operateLogBll.GetLogsByPage(FName, FType, FModule, dateFrom, dateTo, pageNumber, pageSize, out var totalNumber),
|
|
|
|
|
Total = totalNumber
|
|
|
|
|
};
|
|
|
|
|
}, apiResult, Request);
|
|
|
|
|
}
|
|
|
|
|
|