|
@@ -1286,11 +1286,56 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
return ExcelStreamResult(stream, "热点类型小类统计");
|
|
|
}
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// 部门满意度统计表基础数据
|
|
|
- /// </summary>
|
|
|
- /// <returns></returns>
|
|
|
- [HttpGet("visit-org-satisfaction-statisticsBaseData")]
|
|
|
+ /// <summary>
|
|
|
+ /// 热点类型小类统计明细
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpGet("hotspot-statistics-detail")]
|
|
|
+ public async Task<PagedDto<OrderDto>> HotspotStatisticsDetail([FromQuery] HotspotStatisticsRep dto)
|
|
|
+ {
|
|
|
+ var (total, items) = await _orderApplication.HotspotStatisticsDetail(dto)
|
|
|
+ .ToPagedListAsync(dto.PageIndex, dto.PageSize, HttpContext.RequestAborted);
|
|
|
+ return new PagedDto<OrderDto>(total, _mapper.Map<IReadOnlyList<OrderDto>>(items));
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 热点类型小类统计明细导出
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost("hotspot-statistics-detail/export")]
|
|
|
+ public async Task<FileStreamResult> HotspotStatisticsDetailExport([FromBody] ExportExcelDto<HotspotStatisticsRep> dto)
|
|
|
+ {
|
|
|
+ var query = _orderApplication.HotspotStatisticsDetail(dto.QueryDto);
|
|
|
+ List<Order> data;
|
|
|
+ if (dto.IsExportAll)
|
|
|
+ {
|
|
|
+ data = await query.ToListAsync(HttpContext.RequestAborted);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ var (_, items) = await query.ToPagedListAsync(dto.QueryDto, HttpContext.RequestAborted);
|
|
|
+ data = items;
|
|
|
+ }
|
|
|
+ var orderDtos = _mapper.Map<IReadOnlyList<OrderDto>>(data);
|
|
|
+ dynamic? dynamicClass = DynamicClassHelper.CreateDynamicClass(dto.ColumnInfos);
|
|
|
+
|
|
|
+ var dtos = orderDtos
|
|
|
+ .Select(stu => _mapper.Map(stu, typeof(OrderDto), dynamicClass))
|
|
|
+ .Cast<object>()
|
|
|
+ .ToList();
|
|
|
+
|
|
|
+ var stream = ExcelHelper.CreateStream(dtos);
|
|
|
+
|
|
|
+ return ExcelStreamResult(stream, "热点类型小类统计明细");
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 部门满意度统计表基础数据
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpGet("visit-org-satisfaction-statisticsBaseData")]
|
|
|
public async Task<object> VisitAndOrgSatisfactionStatisticsBaseData()
|
|
|
{
|
|
|
return new {
|