|
@@ -3055,8 +3055,8 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
[HttpGet("hotspot-area-statistics-detail")]
|
|
|
public async Task<PagedDto<HotspotAndAreaStatisticsDetailDto>> HotspotAndAreaStatisticsDetail([FromQuery] HotspotAndAreaStatisticsDetailReq dto)
|
|
|
{
|
|
|
- var (total,items) =await _orderRepository.HotspotAndAreaStatisticsDetail(dto).ToPagedListAsync(dto.PageIndex, dto.PageSize, HttpContext.RequestAborted);
|
|
|
- return new PagedDto<HotspotAndAreaStatisticsDetailDto>(total,items);
|
|
|
+ var (total, items) = await _orderRepository.HotspotAndAreaStatisticsDetail(dto).ToPagedListAsync(dto.PageIndex, dto.PageSize, HttpContext.RequestAborted);
|
|
|
+ return new PagedDto<HotspotAndAreaStatisticsDetailDto>(total, items);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -3065,9 +3065,9 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
/// <param name="dto"></param>
|
|
|
/// <returns></returns>
|
|
|
[HttpGet("accepttype-statistics-bydate-detail")]
|
|
|
- public async Task<PagedDto<HotspotAndAreaStatisticsDetailDto>> AcceptTypeStatisticsByDateDetail([FromQuery] AcceptTypeStatisticsByDateDetailReq dto )
|
|
|
+ public async Task<PagedDto<HotspotAndAreaStatisticsDetailDto>> AcceptTypeStatisticsByDateDetail([FromQuery] AcceptTypeStatisticsByDateDetailReq dto)
|
|
|
{
|
|
|
- var (total, items) = await _orderRepository.AcceptTypeStatisticsByDateDetail(dto).ToPagedListAsync(dto.PageIndex,dto.PageSize,HttpContext.RequestAborted);
|
|
|
+ var (total, items) = await _orderRepository.AcceptTypeStatisticsByDateDetail(dto).ToPagedListAsync(dto.PageIndex, dto.PageSize, HttpContext.RequestAborted);
|
|
|
return new PagedDto<HotspotAndAreaStatisticsDetailDto>(total, items);
|
|
|
}
|
|
|
|
|
@@ -3077,7 +3077,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
/// <param name="dto"></param>
|
|
|
/// <returns></returns>
|
|
|
[HttpPost("accepttype-statistics-bydate-detail-export")]
|
|
|
- public async Task<FileStreamResult> AcceptTypeStatisticsByDateDetailExport([FromBody]ExportExcelDto<AcceptTypeStatisticsByDateDetailReq> dto)
|
|
|
+ public async Task<FileStreamResult> AcceptTypeStatisticsByDateDetailExport([FromBody] ExportExcelDto<AcceptTypeStatisticsByDateDetailReq> dto)
|
|
|
{
|
|
|
var query = _orderRepository.AcceptTypeStatisticsByDateDetail(dto.QueryDto);
|
|
|
|
|
@@ -3108,7 +3108,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
/// <param name="dto"></param>
|
|
|
/// <returns></returns>
|
|
|
[HttpPost("hotspot-area-statistics-detail-export")]
|
|
|
- public async Task<FileStreamResult> HotspotAndAreaStatisticsDetailExport([FromBody]ExportExcelDto<HotspotAndAreaStatisticsDetailReq> dto)
|
|
|
+ public async Task<FileStreamResult> HotspotAndAreaStatisticsDetailExport([FromBody] ExportExcelDto<HotspotAndAreaStatisticsDetailReq> dto)
|
|
|
{
|
|
|
var query = _orderRepository.HotspotAndAreaStatisticsDetail(dto.QueryDto);
|
|
|
|
|
@@ -3201,7 +3201,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
[HttpGet("accepttype-statistics-bydate")]
|
|
|
public async Task<object> AcceptTypeStatisticsByDate([FromQuery] AcceptTypeStatisticsByDateReq dto)
|
|
|
{
|
|
|
- var (acceptList,items) =await _orderRepository.AcceptTypeStatisticsByDate(dto);
|
|
|
+ var (acceptList, items) = await _orderRepository.AcceptTypeStatisticsByDate(dto);
|
|
|
|
|
|
return new { AcceptType = acceptList, Data = items };
|
|
|
}
|
|
@@ -3220,7 +3220,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
return ExcelStreamResult(stream, "受理类型时间统计");
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
/// <summary>
|
|
|
/// 下级区域统计
|
|
@@ -3229,16 +3229,17 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
/// <param name="EndTime">结束时间</param>
|
|
|
/// <param name="TypeId">0:全部 ,1:市民,2:企业</param>
|
|
|
/// <param name="AreaCode">上级区域Id</param>
|
|
|
+ /// <param name="Line">线路号</param>
|
|
|
/// <returns></returns>
|
|
|
[HttpGet("area_subordinate")]
|
|
|
- public async Task<object> AreaSubordinate(DateTime StartTime, DateTime EndTime, int TypeId, string? AreaCode)
|
|
|
+ public async Task<object> AreaSubordinate(DateTime StartTime, DateTime EndTime, int TypeId, string? AreaCode, string? Line)
|
|
|
{
|
|
|
EndTime = EndTime.AddDays(1).AddSeconds(-1);
|
|
|
|
|
|
var IsCenter = _sessionContext.OrgIsCenter;
|
|
|
|
|
|
string count = "6";
|
|
|
- if (!string.IsNullOrEmpty(AreaCode) && AreaCode!= "511500")
|
|
|
+ if (!string.IsNullOrEmpty(AreaCode) && AreaCode != "511500")
|
|
|
count = (AreaCode.Length + 2).ToString();
|
|
|
|
|
|
if (string.IsNullOrEmpty(AreaCode))
|
|
@@ -3248,6 +3249,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.Where(p => p.CreationTime >= StartTime && p.CreationTime <= EndTime)
|
|
|
.WhereIF(TypeId == 1, p => p.IdentityType == EIdentityType.Citizen)
|
|
|
.WhereIF(TypeId == 2, p => p.IdentityType == EIdentityType.Enterprise)
|
|
|
+ .WhereIF(!string.IsNullOrEmpty(Line), p => p.TransferPhone == Line)
|
|
|
.WhereIF(IsCenter == false, p => p.ActualHandleOrgCode.StartsWith(_sessionContext.RequiredOrgId))
|
|
|
.GroupBy(p => new { Id = p.AreaCode.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>(count)) })
|
|
|
.Select(p => new
|