Commit 4b4cb98c by 1391696987

手工录入数据补录列表、查看详情

parent 680b61d5
...@@ -858,12 +858,12 @@ public ApiResponse GetDeptComparisonTotal([FromRoute] int allotId) ...@@ -858,12 +858,12 @@ public ApiResponse GetDeptComparisonTotal([FromRoute] int allotId)
/// <returns></returns> /// <returns></returns>
[Route("getgatherdrop/{allotId}")] [Route("getgatherdrop/{allotId}")]
[HttpPost] [HttpPost]
public ApiResponse GetGatherDrop([FromRoute] int allotId) public ApiResponse GetGatherDrop([FromRoute] int allotId,int userId)
{ {
if (allotId <= 0) if (allotId <= 0)
return new ApiResponse(ResponseType.Fail, "参数错误", "allotid无效"); return new ApiResponse(ResponseType.Fail, "参数错误", "allotid无效");
var relust = employeeService.GetGatherDrop(allotId); var relust = employeeService.GetGatherDrop(allotId,userId);
return new ApiResponse(ResponseType.OK, relust); return new ApiResponse(ResponseType.OK, relust);
} }
...@@ -914,16 +914,17 @@ public ApiResponse SaveGatherHands([FromRoute] int allotId, [FromBody] SaveGathe ...@@ -914,16 +914,17 @@ public ApiResponse SaveGatherHands([FromRoute] int allotId, [FromBody] SaveGathe
/// <param name="allotId"></param> /// <param name="allotId"></param>
/// <param name="department">科室</param> /// <param name="department">科室</param>
/// <param name="source">来源</param> /// <param name="source">来源</param>
/// <param name="category">费用类型</param>
/// <param name="request">分页</param> /// <param name="request">分页</param>
/// <returns></returns> /// <returns></returns>
[Route("getgather/{allotId},{department},{source}")] [Route("getgather/{allotId},{source},{category},{createTime}")]
[HttpPost] [HttpPost]
public ApiResponse GetGather([FromRoute] int allotId, string department, string source, [FromBody] PersonParamsRequest request) public ApiResponse GetGather([FromRoute] int allotId,string department, string source, string category, [FromBody] PersonParamsRequest request)
{ {
if (allotId <= 0 || string.IsNullOrEmpty(department) || string.IsNullOrEmpty(source)) if (allotId <= 0 || string.IsNullOrEmpty(source) || string.IsNullOrEmpty(category) || string.IsNullOrEmpty(department) )
return new ApiResponse(ResponseType.Fail, "参数错误", "请检查allotId,department,source是否正确"); return new ApiResponse(ResponseType.Fail, "参数错误", "请检查allotId,source,category,department是否正确");
var result = employeeService.GetGather(allotId, department, source, request); var result = employeeService.GetGather(allotId, department, source, category, request);
return new ApiResponse(ResponseType.OK, result); return new ApiResponse(ResponseType.OK, result);
...@@ -933,16 +934,17 @@ public ApiResponse GetGather([FromRoute] int allotId, string department, string ...@@ -933,16 +934,17 @@ public ApiResponse GetGather([FromRoute] int allotId, string department, string
/// 手工录入列表 - 汇总 /// 手工录入列表 - 汇总
/// </summary> /// </summary>
/// <param name="allotId"></param> /// <param name="allotId"></param>
/// <param name="userId"></param>
/// <param name="request">分页</param> /// <param name="request">分页</param>
/// <returns></returns> /// <returns></returns>
[Route("getgathertotal/{allotId}")] [Route("getgathertotal/{allotId}")]
[HttpPost] [HttpPost]
public ApiResponse GetGatherTotal([FromRoute] int allotId, [FromBody] PersonParamsRequest request) public ApiResponse GetGatherTotal([FromRoute] int allotId,int userId, [FromBody] PersonParamsRequest request)
{ {
if (allotId <= 0) if (allotId <= 0)
return new ApiResponse(ResponseType.Fail, "参数错误", "allotid无效"); return new ApiResponse(ResponseType.Fail, "参数错误", "allotid无效");
var result = employeeService.GetGatherTotal(allotId, request); var result = employeeService.GetGatherTotal(allotId,userId, request);
return new ApiResponse(ResponseType.OK, result); return new ApiResponse(ResponseType.OK, result);
} }
......
...@@ -1356,7 +1356,7 @@ ...@@ -1356,7 +1356,7 @@
<param name="allotId"></param> <param name="allotId"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Performance.Api.Controllers.EmployeeController.GetGatherDrop(System.Int32)"> <member name="M:Performance.Api.Controllers.EmployeeController.GetGatherDrop(System.Int32,System.Int32)">
<summary> <summary>
手工录入 - 下拉列表 手工录入 - 下拉列表
</summary> </summary>
...@@ -1379,21 +1379,23 @@ ...@@ -1379,21 +1379,23 @@
<param name="request"></param> <param name="request"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Performance.Api.Controllers.EmployeeController.GetGather(System.Int32,System.String,System.String,Performance.DtoModels.PersonParamsRequest)"> <member name="M:Performance.Api.Controllers.EmployeeController.GetGather(System.Int32,System.String,System.String,System.String,Performance.DtoModels.PersonParamsRequest)">
<summary> <summary>
手工录入列表 - 明细 手工录入列表 - 明细
</summary> </summary>
<param name="allotId"></param> <param name="allotId"></param>
<param name="department">科室</param> <param name="department">科室</param>
<param name="source">来源</param> <param name="source">来源</param>
<param name="category">费用类型</param>
<param name="request">分页</param> <param name="request">分页</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Performance.Api.Controllers.EmployeeController.GetGatherTotal(System.Int32,Performance.DtoModels.PersonParamsRequest)"> <member name="M:Performance.Api.Controllers.EmployeeController.GetGatherTotal(System.Int32,System.Int32,Performance.DtoModels.PersonParamsRequest)">
<summary> <summary>
手工录入列表 - 汇总 手工录入列表 - 汇总
</summary> </summary>
<param name="allotId"></param> <param name="allotId"></param>
<param name="userId"></param>
<param name="request">分页</param> <param name="request">分页</param>
<returns></returns> <returns></returns>
</member> </member>
......
...@@ -3629,9 +3629,19 @@ ...@@ -3629,9 +3629,19 @@
创建时间 创建时间
</summary> </summary>
</member> </member>
<member name="P:Performance.EntityModels.ex_result_gather.AuditTime">
<summary>
审核时间
</summary>
</member>
<member name="P:Performance.EntityModels.ex_result_gather.States">
<summary>
审核状态 0未审核 1 未通过 2 通过 3审核中
</summary>
</member>
<member name="P:Performance.EntityModels.ex_result_gather.Remark"> <member name="P:Performance.EntityModels.ex_result_gather.Remark">
<summary> <summary>
备注 失败理由
</summary> </summary>
</member> </member>
<member name="T:Performance.EntityModels.ex_script"> <member name="T:Performance.EntityModels.ex_script">
......
...@@ -78,6 +78,7 @@ public AutoMapperConfigs() ...@@ -78,6 +78,7 @@ public AutoMapperConfigs()
CreateMap<PerDataEmployee, im_employee>(); CreateMap<PerDataEmployee, im_employee>();
CreateMap<im_employee, PerDataEmployee>(); CreateMap<im_employee, PerDataEmployee>();
CreateMap<res_baiscnorm, ComputerAvgRequest>().ReverseMap(); CreateMap<res_baiscnorm, ComputerAvgRequest>().ReverseMap();
CreateMap<ex_result_gather, GatherTotalRequest>();
//CreateMap<PerDataAccountBaisc, PerDataAccount>() //CreateMap<PerDataAccountBaisc, PerDataAccount>()
// .ForMember(dest => dest.AccountingUnit, opt => opt.MapFrom(src => src.AccountingUnit)) // .ForMember(dest => dest.AccountingUnit, opt => opt.MapFrom(src => src.AccountingUnit))
......
...@@ -104,9 +104,13 @@ public class ColumnHeadsConfig ...@@ -104,9 +104,13 @@ public class ColumnHeadsConfig
public static List<Heads> GatherTotal { get; } = new List<Heads> public static List<Heads> GatherTotal { get; } = new List<Heads>
{ {
new Heads{Column="科室",Name=nameof(GatherTotalRequest.Department)}, new Heads{Column="核算组别",Name=nameof(GatherTotalRequest.Department)},
new Heads{Column="来源",Name=nameof(GatherTotalRequest.Source)}, new Heads{Column="来源",Name=nameof(GatherTotalRequest.Source)},
new Heads{Column="费用",Name=nameof(GatherTotalRequest.Fee)} new Heads{Column="核算项目",Name=nameof(GatherTotalRequest.Category)},
new Heads{Column="提交日期",Name=nameof(GatherTotalRequest.CreateTime)},
new Heads{Column="审核日期",Name=nameof(GatherTotalRequest.AuditTime)},
new Heads{Column="审核状态",Name=nameof(GatherTotalRequest.States)},
new Heads{Column="失败理由",Name=nameof(GatherTotalRequest.Remark)},
}; };
} }
......
using Performance.DtoModels.Request; using Performance.DtoModels.Request;
using Performance.EntityModels; using Performance.EntityModels;
using Performance.Infrastructure.Models; using Performance.Infrastructure.Models;
using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace Performance.DtoModels namespace Performance.DtoModels
...@@ -8,7 +9,7 @@ namespace Performance.DtoModels ...@@ -8,7 +9,7 @@ namespace Performance.DtoModels
public class GatherResponse public class GatherResponse
{ {
public List<Heads> Heads { get; set; } public List<Heads> Heads { get; set; }
public List<GatherTotalRequest> Datas { get; set; } public List<Dictionary<string, object>> Datas { get; set; }
public int CurrentPage { get; set; } public int CurrentPage { get; set; }
public int TotalPages { get; set; } public int TotalPages { get; set; }
public int PageSize { get; set; } public int PageSize { get; set; }
...@@ -41,18 +42,22 @@ public class GatherRequest ...@@ -41,18 +42,22 @@ public class GatherRequest
public class GatherTotalRequest public class GatherTotalRequest
{ {
public int ID { get; set; }
public string Department { get; set; } public string Department { get; set; }
public string Source { get; set; } public string Source { get; set; }
public decimal Fee { get; set; } public string Category { get; set; }
public string CreateTime { get; set; }
public string AuditTime { get; set; }
public string States { get; set; }
public string Remark { get; set; }
} }
public class GatherInfoRequest public class GatherInfoRequest
{ {
public string Source { get; set; } public string Source { get; set; }
public string CreateTime { get; set; }
public string Department { get; set; } public string Department { get; set; }
public string DoctorName { get; set; } public string DoctorName { get; set; }
public string PersonnelNumber { get; set; } public string PersonnelNumber { get; set; }
public List<GatherInfoFee> Detail { get; set; } public GatherInfoFee Detail { get; set; }
} }
public class GatherInfoFee public class GatherInfoFee
......
...@@ -43,12 +43,16 @@ public class ex_result_gather ...@@ -43,12 +43,16 @@ public class ex_result_gather
/// </summary> /// </summary>
public DateTime CreateTime { get; set; } public DateTime CreateTime { get; set; }
/// <summary> /// <summary>
/// 备注 /// 审核时间
/// </summary>
public DateTime? AuditTime { get; set; }
/// <summary>
/// 审核状态 0未审核 1 未通过 2 通过 3审核中
/// </summary>
public int States { get; set; }
/// <summary>
/// 失败理由
/// </summary> /// </summary>
public string Remark { get; set; } public string Remark { get; set; }
// /// <summary>
// /// 1 未通过 2 通过
// /// </summary>
// public int States { get; set; }
} }
} }
using AutoMapper; using AutoMapper;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using NPOI.HSSF.UserModel; using NPOI.HSSF.UserModel;
using NPOI.SS.UserModel; using NPOI.SS.UserModel;
using NPOI.SS.Util; using NPOI.SS.Util;
...@@ -45,6 +46,7 @@ public class EmployeeService : IAutoInjection ...@@ -45,6 +46,7 @@ public class EmployeeService : IAutoInjection
private readonly PerforExitemRepository exitemRepository; private readonly PerforExitemRepository exitemRepository;
private readonly PerforExspecialRepository exspecialRepository; private readonly PerforExspecialRepository exspecialRepository;
private readonly PerforExresultRepository exresultRepository; private readonly PerforExresultRepository exresultRepository;
private readonly PerforCollectpermissionRepository perforcollectpermissionRepository;
private ILogger<EmployeeService> logger; private ILogger<EmployeeService> logger;
public EmployeeService( public EmployeeService(
...@@ -70,6 +72,7 @@ public class EmployeeService : IAutoInjection ...@@ -70,6 +72,7 @@ public class EmployeeService : IAutoInjection
PerforExitemRepository exitemRepository, PerforExitemRepository exitemRepository,
PerforExspecialRepository exspecialRepository, PerforExspecialRepository exspecialRepository,
PerforExresultRepository exresultRepository, PerforExresultRepository exresultRepository,
PerforCollectpermissionRepository perforcollectpermissionRepository,
ILogger<EmployeeService> logger) ILogger<EmployeeService> logger)
{ {
_mapper = mapper; _mapper = mapper;
...@@ -94,6 +97,7 @@ public class EmployeeService : IAutoInjection ...@@ -94,6 +97,7 @@ public class EmployeeService : IAutoInjection
this.exitemRepository = exitemRepository; this.exitemRepository = exitemRepository;
this.exspecialRepository = exspecialRepository; this.exspecialRepository = exspecialRepository;
this.exresultRepository = exresultRepository; this.exresultRepository = exresultRepository;
this.perforcollectpermissionRepository = perforcollectpermissionRepository;
this.logger = logger; this.logger = logger;
} }
...@@ -1247,9 +1251,11 @@ public ComparisonResponse<DtoModels.Comparison<DeptComparisonTotal>> GetDeptComp ...@@ -1247,9 +1251,11 @@ public ComparisonResponse<DtoModels.Comparison<DeptComparisonTotal>> GetDeptComp
#region 手工数据录入 #region 手工数据录入
public List<GatherDropResponse> GetGatherDrop(int allotId) public List<GatherDropResponse> GetGatherDrop(int allotId,int userId)
{ {
var perSheets = perforPersheetRepository.GetEntities(t => t.AllotID == allotId && new[] { 3, 4, 7 }.Contains(t.SheetType.Value)); var collectPermission = perforcollectpermissionRepository.GetEntities(t=>t.UserId == userId).Select(t=> t.SheetName).Distinct();
var perSheets = perforPersheetRepository.GetEntities(t => t.AllotID == allotId && new[] { 3, 4, 7 }.Contains(t.SheetType.Value) && collectPermission.Contains(t.SheetName));
if (perSheets == null || !perSheets.Any()) if (perSheets == null || !perSheets.Any())
{ {
var allot = perallotRepository.GetEntity(t => t.ID == allotId); var allot = perallotRepository.GetEntity(t => t.ID == allotId);
...@@ -1292,7 +1298,7 @@ public List<GatherDropResponse> GetGatherDrop(int allotId) ...@@ -1292,7 +1298,7 @@ public List<GatherDropResponse> GetGatherDrop(int allotId)
foreach (var sheet in perSheets) foreach (var sheet in perSheets)
{ {
var drop = new GatherDropResponse(); var drop = new GatherDropResponse();
var header = imHeaders.Where(t => t.SheetID == sheet.ID && !cellValue.Contains(t.CellValue)).Select(t => t.CellValue).Distinct(); var header = imHeaders.Where(t =>!cellValue.Contains(t.CellValue)).Select(t => t.CellValue).Distinct();
drop.Label = Regex.Replace(sheet.SheetName.Replace(" ", "").Replace(".", ""), "[0-9]", "")/*sheet.SheetName.Split(' ')[1]*/; drop.Label = Regex.Replace(sheet.SheetName.Replace(" ", "").Replace(".", ""), "[0-9]", "")/*sheet.SheetName.Split(' ')[1]*/;
drop.Value = Regex.Replace(sheet.SheetName.Replace(" ", "").Replace(".", ""), "[0-9]", "")/*sheet.SheetName.Split(' ')[1]*/; drop.Value = Regex.Replace(sheet.SheetName.Replace(" ", "").Replace(".", ""), "[0-9]", "")/*sheet.SheetName.Split(' ')[1]*/;
drop.Children = header.Select(t => new GatherDropResponse() { Label = t, Value = t }).ToList(); drop.Children = header.Select(t => new GatherDropResponse() { Label = t, Value = t }).ToList();
...@@ -1374,51 +1380,29 @@ public void SaveGatherHands(int allotId, SaveGatherData request) ...@@ -1374,51 +1380,29 @@ public void SaveGatherHands(int allotId, SaveGatherData request)
exresultgatherRepository.AddRange(depts.ToArray()); exresultgatherRepository.AddRange(depts.ToArray());
} }
public GatherInfo GetGather(int allotId, string department, string source, PersonParamsRequest request) public GatherInfo GetGather(int allotId,string department, string source,string category, PersonParamsRequest request)
{ {
Expression<Func<ex_result_gather, bool>> exp = t => t.AllotId == allotId && t.Department.Contains(department) && t.Source.Contains(source); Expression<Func<ex_result_gather, bool>> exp = t => t.AllotId == allotId && t.Department == department && t.Source.Contains(source) && t.Category.Contains(category);
if (request != null && !string.IsNullOrEmpty(request.SearchQuery)) if (request != null && !string.IsNullOrEmpty(request.SearchQuery))
exp = exp.And(t => t.AllotId == allotId && t.Department.Contains(department) && t.Source.Contains(source) && t.DoctorName.Contains(request.SearchQuery) || t.PersonnelNumber.Contains(request.SearchQuery)); exp = exp.And(t => t.DoctorName.Contains(request.SearchQuery) || t.PersonnelNumber.Contains(request.SearchQuery));
var datas = exresultgatherRepository.GetEntities(exp); var datas = exresultgatherRepository.GetEntities(exp);
var result = datas.GroupBy(a => new { a.Source, a.Department, a.DoctorName, a.PersonnelNumber }).Select(t => new var result = datas.Select(t => new GatherInfoRequest
{ {
Source = t.Key.Source, Source = Regex.Replace(t.Source.Replace(" ", "").Replace(".", ""), "[0-9]", ""),
Department = t.Key.Department, CreateTime = t.CreateTime.ToString("d"),
DoctorName = t.Key.DoctorName, Department = t.Department,
PersonnelNumber = t.Key.PersonnelNumber, PersonnelNumber = t.PersonnelNumber,
Detail = t.GroupBy(group => group.Category).Select(s => new TitleValue<decimal> DoctorName = t.DoctorName,
Detail = new GatherInfoFee
{ {
Title = string.IsNullOrEmpty(s.Key) ? "未知" : s.Key, Category = category,
Value = s.Sum(sum => sum.Fee) Fee = t.Fee
}) },
}); });
List<GatherInfoRequest> gatherInfoRequests = new List<GatherInfoRequest>();
foreach (var item in result.ToList())
{
GatherInfoRequest gatherInfoRequest = new GatherInfoRequest()
{
Source = Regex.Replace(item.Source.Replace(" ", "").Replace(".", ""), "[0-9]", ""),
Department = item.Department,
DoctorName = item.DoctorName,
PersonnelNumber = item.PersonnelNumber,
Detail = new List<GatherInfoFee>()
};
foreach (var item2 in item.Detail)
{
GatherInfoFee gatherInfoFee = new GatherInfoFee()
{
Category = item2.Title,
Fee = item2.Value
};
gatherInfoRequest.Detail.Add(gatherInfoFee);
}
gatherInfoRequests.Add(gatherInfoRequest);
}
var head = ColumnHeadsConfig.GatherHeads; var head = ColumnHeadsConfig.GatherHeads;
head.ForEach(t => head.ForEach(t =>
{ {
...@@ -1428,48 +1412,58 @@ public GatherInfo GetGather(int allotId, string department, string source, Perso ...@@ -1428,48 +1412,58 @@ public GatherInfo GetGather(int allotId, string department, string source, Perso
GatherInfo gatherInfo = new GatherInfo() GatherInfo gatherInfo = new GatherInfo()
{ {
Heads = head, Heads = head,
Datas = gatherInfoRequests.Skip((request.PageNumber - 1) * request.PageSize).Take(request.PageSize).ToList(), Datas = result.Skip((request.PageNumber - 1) * request.PageSize).Take(request.PageSize).ToList(),
CurrentPage = request.PageNumber, CurrentPage = request.PageNumber,
TotalCount = gatherInfoRequests.Count(), TotalCount = result.Count(),
PageSize = request.PageSize, PageSize = request.PageSize,
TotalPages = (int)Math.Ceiling((double)gatherInfoRequests.Count() / request.PageSize) TotalPages = (int)Math.Ceiling((double)result.Count() / request.PageSize)
}; };
return gatherInfo; return gatherInfo;
} }
public GatherResponse GetGatherTotal(int allotId, PersonParamsRequest request) public GatherResponse GetGatherTotal(int allotId, int userId, PersonParamsRequest request)
{ {
List<GatherTotalRequest> gatherTotalRequests = new List<GatherTotalRequest>();
Expression<Func<ex_result_gather, bool>> exp = t => t.AllotId == allotId; Expression<Func<ex_result_gather, bool>> exp = t => t.AllotId == allotId;
if (request != null && !string.IsNullOrEmpty(request.SearchQuery)) if (request != null && !string.IsNullOrEmpty(request.SearchQuery))
{ {
exp = exp.And(t => t.Department.Contains(request.SearchQuery) || t.Source.Contains(request.SearchQuery)); exp = exp.And(t => t.Category.Contains(request.SearchQuery));
} }
var datas = exresultgatherRepository.GetEntities(exp); var userSource = perforcollectpermissionRepository.GetEntities(t => t.UserId == userId)
if (datas != null && datas.Any()) .Select(s => Regex.Replace(s.SheetName.Replace(" ", "").Replace(".", ""), "[0-9]", ""))
{ .Distinct().ToList();
var result = datas.GroupBy(a => new { a.AllotId, a.Department, a.Source }).Select(t => new
{ exp = exp.And(t => userSource.Contains(t.Source));
ID = t.Key.AllotId,
Department = t.Key.Department, var datas = exresultgatherRepository.GetEntities(exp)
Source = t.Key.Source, .GroupBy(t => new { t.Department, t.Source, t.Category })
Fee = t.Sum(a => a.Fee) .Select(s => new {
Department = s.Key.Department,
Source = s.Key.Source,
Category = s.Key.Category,
CreateTime = s.Max(t => t.CreateTime).ToString("d"),
AuditTime = s.Max(t => t.AuditTime)?.ToString("d"),
States = s.Any(w => w.States == 1) ? "未通过"
: s.Any(w => w.States == 3) ? "审核中"
: s.Count() == s.Where(w => w.States == 2).Count() ? "已通过"
: s.Count() == s.Where(w => w.States == 0).Count() ? "未审核" : "未知",
Remark = s.FirstOrDefault()?.Remark,
}); });
foreach (var item in result.ToList()) var ser = JsonConvert.SerializeObject(datas);
var rows = JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(ser);
var data = new List<Dictionary<string, object>>();
foreach (var obj in rows)
{
Dictionary<string, object> nobj = new Dictionary<string, object>();
foreach (var item in obj)
{ {
GatherTotalRequest gatherTotalRequest = new GatherTotalRequest() nobj[item.Key.ToLower()] = item.Value;
{
ID = item.ID,
Department = item.Department,
Source = Regex.Replace(item.Source.Replace(" ", "").Replace(".", ""), "[0-9]", "")/*item.Source.Split(' ')[1]*/,
Fee = item.Fee
};
gatherTotalRequests.Add(gatherTotalRequest);
} }
data.Add(nobj);
} }
var head = ColumnHeadsConfig.GatherTotal; var head = ColumnHeadsConfig.GatherTotal;
...@@ -1480,11 +1474,11 @@ public GatherResponse GetGatherTotal(int allotId, PersonParamsRequest request) ...@@ -1480,11 +1474,11 @@ public GatherResponse GetGatherTotal(int allotId, PersonParamsRequest request)
GatherResponse gatherResponse = new GatherResponse() GatherResponse gatherResponse = new GatherResponse()
{ {
Heads = head, Heads = head,
Datas = gatherTotalRequests.Skip((request.PageNumber - 1) * request.PageSize).Take(request.PageSize).ToList(), Datas = data.Skip((request.PageNumber - 1) * request.PageSize).Take(request.PageSize).ToList(),
CurrentPage = request.PageNumber, CurrentPage = request.PageNumber,
TotalCount = gatherTotalRequests.Count(), TotalCount = data.Count(),
PageSize = request.PageSize, PageSize = request.PageSize,
TotalPages = (int)Math.Ceiling((double)gatherTotalRequests.Count() / request.PageSize) TotalPages = (int)Math.Ceiling((double)data.Count() / request.PageSize)
}; };
return gatherResponse; return gatherResponse;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment