|
@@ -529,9 +529,24 @@ public class BiCallController : BaseController
|
|
|
/// <param name="dto"></param>
|
|
|
/// <returns></returns>
|
|
|
[HttpGet("query-calldate-statistics")]
|
|
|
- public async Task<List<QueryCallDateStatisticsDetailResp>> QueryCallDateStatisticsDetail([FromQuery] QueryCallDateStatisticsDetailDto dto)
|
|
|
+ public async Task<object> QueryCallDateStatisticsDetail([FromQuery] QueryCallDateStatisticsDetailDto dto)
|
|
|
{
|
|
|
- return await _callReportApplication.QueryCallDateStatisticsDetail(dto);
|
|
|
+ var list = await _callReportApplication.QueryCallDateStatisticsDetail(dto);
|
|
|
+
|
|
|
+ var total = new QueryCallDateStatisticsDetailResp() {
|
|
|
+ Date = "合计",
|
|
|
+ PersonCallInCount = list.Sum(x=>x.PersonCallInCount),
|
|
|
+ EnterpriseCallInCount = list.Sum(x=>x.EnterpriseCallInCount),
|
|
|
+ AiCallInCount = list.Sum(x=>x.AiCallInCount),
|
|
|
+ PersonCallInPutthroughCount = list.Sum(x=>x.PersonCallInPutthroughCount),
|
|
|
+ EnterpriseCallInPutthroughCount = list.Sum(x=>x.EnterpriseCallInPutthroughCount),
|
|
|
+ AiCallInPutthroughCount = list.Sum(x=>x.AiCallInPutthroughCount),
|
|
|
+ PersonRingOffCount = list.Sum(x=>x.PersonRingOffCount),//个人服务挂断
|
|
|
+ EnterpriseRingOffCount = list.Sum(x=>x.EnterpriseRingOffCount), //企业挂断
|
|
|
+ IvrRingOffCount = list.Sum(x=>x.IvrRingOffCount), //IVR挂断
|
|
|
+ };
|
|
|
+
|
|
|
+ return new { List = list, Total = total };
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -541,12 +556,11 @@ public class BiCallController : BaseController
|
|
|
/// <returns></returns>
|
|
|
[HttpPost("query-calldate-statistics/export")]
|
|
|
public async Task<FileStreamResult> QueryCallDateStatisticsDetailExport([FromBody]ExportExcelDto<QueryCallDateStatisticsDetailDto> dto)
|
|
|
- => ExcelStreamResult(
|
|
|
- _exportApplication.GetExcelStream(
|
|
|
+ =>
|
|
|
+ _exportApplication.GetExcelFile(
|
|
|
dto,
|
|
|
await _callReportApplication.QueryCallDateStatisticsDetail(dto.QueryDto)
|
|
|
- )
|
|
|
- , "话务日期统计明细");
|
|
|
+ , "话务日期统计明细", "Date");
|
|
|
|
|
|
/// <summary>
|
|
|
/// 个人服务话务明细
|
|
@@ -554,9 +568,18 @@ public class BiCallController : BaseController
|
|
|
/// <param name="dto"></param>
|
|
|
/// <returns></returns>
|
|
|
[HttpGet("query-person-calldate-statistics")]
|
|
|
- public async Task<List<QueryPersonCallDateStatisticsDetailResp>> QueryPersonCallDateStatisticsDetail([FromQuery]QueryCallDateStatisticsDetailDto dto)
|
|
|
+ public async Task<object> QueryPersonCallDateStatisticsDetail([FromQuery]QueryCallDateStatisticsDetailDto dto)
|
|
|
{
|
|
|
- return await _callReportApplication.QueryPersonCallDateStatisticsDetail(dto);
|
|
|
+ var list = await _callReportApplication.QueryPersonCallDateStatisticsDetail(dto);
|
|
|
+ var total = new QueryPersonCallDateStatisticsDetailResp() {
|
|
|
+ Date = "合计",
|
|
|
+ PersonCallInCount = list.Sum(x=>x.PersonCallInCount),
|
|
|
+ PersonCallInPutthroughCount = list.Sum(x=>x.PersonCallInPutthroughCount),
|
|
|
+ PersonRingOffCount = list.Sum(x=>x.PersonRingOffCount),//个人服务挂断
|
|
|
+ PersonQueueOffCount = list.Sum(x=>x.PersonQueueOffCount),//个人服务队列挂断
|
|
|
+ PersonWaitOffCount = list.Sum(x=>x.PersonWaitOffCount) //个人服务等待挂断
|
|
|
+ };
|
|
|
+ return new { List = list, Total = total };
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -566,12 +589,10 @@ public class BiCallController : BaseController
|
|
|
/// <returns></returns>
|
|
|
[HttpPost("query-person-calldate-statistics/export")]
|
|
|
public async Task<FileStreamResult> QueryPersonCallDateStatisticsDetailExport([FromBody]ExportExcelDto<QueryCallDateStatisticsDetailDto> dto)
|
|
|
- => ExcelStreamResult(
|
|
|
- _exportApplication.GetExcelStream(
|
|
|
+ => _exportApplication.GetExcelFile(
|
|
|
dto,
|
|
|
await _callReportApplication.QueryPersonCallDateStatisticsDetail(dto.QueryDto)
|
|
|
- )
|
|
|
- , "个人服务话务明细");
|
|
|
+ , "个人服务话务明细","Date");
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
@@ -580,9 +601,18 @@ public class BiCallController : BaseController
|
|
|
/// <param name="dto"></param>
|
|
|
/// <returns></returns>
|
|
|
[HttpGet("query-enterprise-calldate-statistics")]
|
|
|
- public async Task<List<QueryEnterpriseCallDateStatisticsDetailResp>> QueryEnterpriseCallDateStatisticsDetail([FromQuery]QueryCallDateStatisticsDetailDto dto)
|
|
|
+ public async Task<object> QueryEnterpriseCallDateStatisticsDetail([FromQuery]QueryCallDateStatisticsDetailDto dto)
|
|
|
{
|
|
|
- return await _callReportApplication.QueryEnterpriseCallDateStatisticsDetail(dto);
|
|
|
+ var list = await _callReportApplication.QueryEnterpriseCallDateStatisticsDetail(dto);
|
|
|
+ var total = new QueryEnterpriseCallDateStatisticsDetailResp() {
|
|
|
+ Date = "合计",
|
|
|
+ EnterpriseCallInCount = list.Sum(x=>x.EnterpriseCallInCount),
|
|
|
+ EnterpriseCallInPutthroughCount = list.Sum(x=>x.EnterpriseCallInPutthroughCount),
|
|
|
+ EnterpriseRingOffCount = list.Sum(x=>x.EnterpriseRingOffCount), //企业挂断
|
|
|
+ EnterpriseQueueOffCount = list.Sum(x=>x.EnterpriseQueueOffCount),//个人服务队列挂断
|
|
|
+ EnterpriseWaitOffCount = list.Sum(x=>x.EnterpriseWaitOffCount) //个人服务等待挂断
|
|
|
+ };
|
|
|
+ return new { List = list, Total = total };
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -592,12 +622,10 @@ public class BiCallController : BaseController
|
|
|
/// <returns></returns>
|
|
|
[HttpPost("query-enterprise-calldate-statistics/export")]
|
|
|
public async Task<FileStreamResult> QueryEnterpriseCallDateStatisticsDetailExport([FromBody]ExportExcelDto<QueryCallDateStatisticsDetailDto> dto)
|
|
|
- => ExcelStreamResult(
|
|
|
- _exportApplication.GetExcelStream(
|
|
|
+ => _exportApplication.GetExcelFile(
|
|
|
dto,
|
|
|
await _callReportApplication.QueryPersonCallDateStatisticsDetail(dto.QueryDto)
|
|
|
- )
|
|
|
- , "企业服务话务明细");
|
|
|
+ , "企业服务话务明细","Date");
|
|
|
|
|
|
|
|
|
#endregion
|