|
@@ -53,7 +53,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
private readonly IRepository<OrderScreen> _orderScreenRepository;
|
|
|
private readonly IOrderSecondaryHandlingApplication _orderSecondaryHandlingApplication;
|
|
|
|
|
|
- public BiOrderController(
|
|
|
+ public BiOrderController(
|
|
|
IOrderRepository orderRepository,
|
|
|
IRepository<Hotspot> hotspotTypeRepository,
|
|
|
ISystemDicDataCacheManager sysDicDataCacheManager,
|
|
@@ -74,7 +74,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
IRepository<OrderScreen> orderScreenRepository,
|
|
|
IRepository<WorkflowStepHandler> workflowStepHandleRepository,
|
|
|
IOrderSecondaryHandlingApplication orderSecondaryHandlingApplication
|
|
|
- )
|
|
|
+ )
|
|
|
{
|
|
|
_orderRepository = orderRepository;
|
|
|
_hotspotTypeRepository = hotspotTypeRepository;
|
|
@@ -97,7 +97,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
_workflowStepHandleRepository = workflowStepHandleRepository;
|
|
|
_orderSecondaryHandlingApplication = orderSecondaryHandlingApplication;
|
|
|
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 部门超期统计明细
|
|
@@ -235,7 +235,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
//Subtotal = SqlFunc.AggregateCount(x.AcceptorId),
|
|
|
CentreArchive = SqlFunc.AggregateSum(SqlFunc.IIF(it.Status >= EOrderStatus.Filed && it.ProcessType == EProcessType.Zhiban, 1, 0)), //中心归档件
|
|
|
//CentreCareOf = SqlFunc.AggregateSum(SqlFunc.IIF(it.Status >= EOrderStatus.Filed && (it.FileUserRole == EFileUserType.Org || it.FileUserRole == EFileUserType.Dispatch), 1, 0)), //转办信件
|
|
|
- CentreCareOf = SqlFunc.AggregateSum(SqlFunc.IIF(it.ProcessType == EProcessType.Jiaoban || it.FileUserRole == EFileUserType.Dispatch || it.ActualHandleStepName == "派单组",1,0)),
|
|
|
+ CentreCareOf = SqlFunc.AggregateSum(SqlFunc.IIF(it.ProcessType == EProcessType.Jiaoban || it.FileUserRole == EFileUserType.Dispatch || it.ActualHandleStepName == "派单组", 1, 0)),
|
|
|
NoCentreCareOf = SqlFunc.AggregateSum(SqlFunc.IIF(it.Status <= EOrderStatus.SpecialToUnAccept || it.ActualHandleStepName == "班长审批", 1, 0)), //坐席待办 //中心领导?市领导? 是否在统计条件中
|
|
|
//CentreCareOf = SqlFunc.AggregateSum(SqlFunc.IIF(it.Status >= EOrderStatus.Filed && it.ProcessType == EProcessType.Jiaoban, 1, 0)),
|
|
|
//NoCentreCareOf = SqlFunc.AggregateSum(SqlFunc.IIF((int)x.Status < 300 && x.ExpiredTime > x.FiledTime, 1, 0)),
|
|
@@ -1656,7 +1656,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
PublishedOpen = 0,
|
|
|
PublishedNoOpen = 0,
|
|
|
YBOverdue = 0,
|
|
|
- ZBOverdue = SqlFunc.AggregateSum(SqlFunc.IIF(d.Status < EWorkflowStepStatus.Handled && DateTime.Now >= d.StepExpiredTime, 1, 0)),// 0,
|
|
|
+ ZBOverdue = SqlFunc.AggregateSum(SqlFunc.IIF(d.CountersignPosition == ECountersignPosition.None && d.Status < EWorkflowStepStatus.Handled && DateTime.Now >= d.StepExpiredTime, 1, 0)),// 0,
|
|
|
CompleteOnTime = 0,
|
|
|
HQYBOverdue = SqlFunc.AggregateSum(SqlFunc.IIF(d.CountersignPosition > ECountersignPosition.None && d.Status >= EWorkflowStepStatus.Handled && d.HandleTime > d.StepExpiredTime, 1, 0)),
|
|
|
HQZBOverdue = SqlFunc.AggregateSum(SqlFunc.IIF(d.CountersignPosition > ECountersignPosition.None && d.Status < EWorkflowStepStatus.Handled && DateTime.Now >= d.StepExpiredTime, 1, 0)),
|
|
@@ -2801,7 +2801,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.LeftJoin<WorkflowTrace>((a, wt) => a.Id == wt.WorkflowId)
|
|
|
.LeftJoin<Workflow>((a, wt, wf) => wt.WorkflowId == wf.Id)
|
|
|
.LeftJoin<WorkflowStepHandler>((a, wt, wf, wsh) => wt.StepId == wsh.WorkflowStepId && wsh.CreationTime == a.CreationTime)
|
|
|
- .InnerJoin<SchedulingUser>((a, wt, wf, wsh, su) => wsh.UserId == su.UserId)
|
|
|
+ .InnerJoin<SchedulingUser>((a, wt, wf, wsh, su) => wsh.UserId == su.UserId)
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.UserName), ((a, wt, wf, wsh, su) => su.UserName == dto.UserName))
|
|
|
.GroupBy((a, wt, wf, wsh, su) => new { su.UserId, su.UserName })
|
|
|
.Select((a, wt, wf, wsh, su) => new BiOrderSendVo
|
|
@@ -2820,7 +2820,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
{
|
|
|
UserId = t1.UserId,
|
|
|
UserName = t1.UserName,
|
|
|
- SendOrderNum = t1.SendOrderNum ,
|
|
|
+ SendOrderNum = t1.SendOrderNum,
|
|
|
NoSendOrderNum = t1.NoSendOrderNum,
|
|
|
ReSendOrderNum = t1_t2.Select(x => x.ReSendOrderNum).FirstOrDefault(),
|
|
|
ChainRate = t1_t2.Select(x => x.ReSendOrderNum).FirstOrDefault() > 0 ?
|
|
@@ -2886,257 +2886,257 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
}
|
|
|
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// 二次办理统计
|
|
|
- /// </summary>
|
|
|
- /// <param name="dto"></param>
|
|
|
- /// <returns></returns>
|
|
|
- [HttpGet("secondary_handling_report")]
|
|
|
+ /// <summary>
|
|
|
+ /// 二次办理统计
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpGet("secondary_handling_report")]
|
|
|
public async Task<List<SecondaryHandlingVo>> SecondaryHandlingReport([FromQuery] QuerySecondaryHandlingRequest dto)
|
|
|
{
|
|
|
- var query = _orderSecondaryHandlingApplication.SecondaryHandlingReport(dto, HttpContext.RequestAborted);
|
|
|
+ var query = _orderSecondaryHandlingApplication.SecondaryHandlingReport(dto, HttpContext.RequestAborted);
|
|
|
return await query.ToListAsync();
|
|
|
- }
|
|
|
- /// <summary>
|
|
|
- /// 二次办理统计导出
|
|
|
- /// </summary>
|
|
|
- /// <returns></returns>
|
|
|
- [HttpPost("secondary_handling_report/_export")]
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 二次办理统计导出
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost("secondary_handling_report/_export")]
|
|
|
public async Task<FileStreamResult> SecondaryHandlingReportExport([FromBody] ExportExcelDto<QuerySecondaryHandlingRequest> dto)
|
|
|
{
|
|
|
- var query = _orderSecondaryHandlingApplication.SecondaryHandlingReport(dto.QueryDto, HttpContext.RequestAborted);
|
|
|
- List<SecondaryHandlingVo> secondaryHandling;
|
|
|
- secondaryHandling = await query.ToListAsync(HttpContext.RequestAborted);
|
|
|
- dynamic? dynamicClass = DynamicClassHelper.CreateDynamicClass(dto.ColumnInfos);
|
|
|
- var dtos = secondaryHandling
|
|
|
- .Select(stu => _mapper.Map(stu, typeof(SecondaryHandlingVo), dynamicClass))
|
|
|
- .Cast<object>()
|
|
|
- .ToList();
|
|
|
-
|
|
|
- var stream = ExcelHelper.CreateStream(dtos);
|
|
|
-
|
|
|
- return ExcelStreamResult(stream, "二次办理统计数据");
|
|
|
+ var query = _orderSecondaryHandlingApplication.SecondaryHandlingReport(dto.QueryDto, HttpContext.RequestAborted);
|
|
|
+ List<SecondaryHandlingVo> secondaryHandling;
|
|
|
+ secondaryHandling = await query.ToListAsync(HttpContext.RequestAborted);
|
|
|
+ dynamic? dynamicClass = DynamicClassHelper.CreateDynamicClass(dto.ColumnInfos);
|
|
|
+ var dtos = secondaryHandling
|
|
|
+ .Select(stu => _mapper.Map(stu, typeof(SecondaryHandlingVo), dynamicClass))
|
|
|
+ .Cast<object>()
|
|
|
+ .ToList();
|
|
|
+
|
|
|
+ var stream = ExcelHelper.CreateStream(dtos);
|
|
|
+
|
|
|
+ return ExcelStreamResult(stream, "二次办理统计数据");
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 二次办理明细
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpGet("secondary_handling_detail_report")]
|
|
|
+ public async Task<PagedDto<OrderSecondaryHandlingDto>> SecondaryHandlingDetailReport([FromQuery] QuerySecondaryHandlingRequest dto)
|
|
|
+ {
|
|
|
+ var query = _orderSecondaryHandlingApplication.SecondaryHandlingDetailReport(dto, HttpContext.RequestAborted);
|
|
|
+ var (total, items) = await query.ToPagedListAsync(dto, HttpContext.RequestAborted);
|
|
|
+
|
|
|
+ return new PagedDto<OrderSecondaryHandlingDto>(total, _mapper.Map<IReadOnlyList<OrderSecondaryHandlingDto>>(items));
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 二次办理明细导出
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost("secondary_handling_detail_report/_export")]
|
|
|
+ public async Task<FileStreamResult> SecondaryHandlingDetailReportExport([FromBody] ExportExcelDto<QuerySecondaryHandlingRequest> dto)
|
|
|
+ {
|
|
|
+ var query = _orderSecondaryHandlingApplication.SecondaryHandlingDetailReport(dto.QueryDto, HttpContext.RequestAborted);
|
|
|
+ List<OrderSecondaryHandling> secondaryHandling;
|
|
|
+ if (dto.IsExportAll)
|
|
|
+ {
|
|
|
+ secondaryHandling = await query.ToListAsync(HttpContext.RequestAborted);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ var (_, items) = await query.ToPagedListAsync(dto.QueryDto, HttpContext.RequestAborted);
|
|
|
+ secondaryHandling = items;
|
|
|
+ }
|
|
|
+
|
|
|
+ var secondaryHandlingDtos = _mapper.Map<ICollection<OrderSecondaryHandlingDto>>(secondaryHandling);
|
|
|
+
|
|
|
+ dynamic? dynamicClass = DynamicClassHelper.CreateDynamicClass(dto.ColumnInfos);
|
|
|
+
|
|
|
+ var dtos = secondaryHandlingDtos
|
|
|
+ .Select(stu => _mapper.Map(stu, typeof(OrderSecondaryHandlingDto), dynamicClass))
|
|
|
+ .Cast<object>()
|
|
|
+ .ToList();
|
|
|
+
|
|
|
+ var stream = ExcelHelper.CreateStream(dtos);
|
|
|
+
|
|
|
+ return ExcelStreamResult(stream, "二次办理列表数据");
|
|
|
}
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// 二次办理明细
|
|
|
- /// </summary>
|
|
|
- /// <param name="dto"></param>
|
|
|
- /// <returns></returns>
|
|
|
- [HttpGet("secondary_handling_detail_report")]
|
|
|
- public async Task<PagedDto<OrderSecondaryHandlingDto>> SecondaryHandlingDetailReport([FromQuery] QuerySecondaryHandlingRequest dto)
|
|
|
- {
|
|
|
- var query = _orderSecondaryHandlingApplication.SecondaryHandlingDetailReport(dto, HttpContext.RequestAborted);
|
|
|
- var (total, items) = await query.ToPagedListAsync(dto, HttpContext.RequestAborted);
|
|
|
-
|
|
|
- return new PagedDto<OrderSecondaryHandlingDto>(total, _mapper.Map<IReadOnlyList<OrderSecondaryHandlingDto>>(items));
|
|
|
- }
|
|
|
- /// <summary>
|
|
|
- /// 二次办理明细导出
|
|
|
- /// </summary>
|
|
|
- /// <returns></returns>
|
|
|
- [HttpPost("secondary_handling_detail_report/_export")]
|
|
|
- public async Task<FileStreamResult> SecondaryHandlingDetailReportExport([FromBody] ExportExcelDto<QuerySecondaryHandlingRequest> dto)
|
|
|
- {
|
|
|
- var query = _orderSecondaryHandlingApplication.SecondaryHandlingDetailReport(dto.QueryDto, HttpContext.RequestAborted);
|
|
|
- List<OrderSecondaryHandling> secondaryHandling;
|
|
|
- if (dto.IsExportAll)
|
|
|
- {
|
|
|
- secondaryHandling = await query.ToListAsync(HttpContext.RequestAborted);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- var (_, items) = await query.ToPagedListAsync(dto.QueryDto, HttpContext.RequestAborted);
|
|
|
- secondaryHandling = items;
|
|
|
- }
|
|
|
-
|
|
|
- var secondaryHandlingDtos = _mapper.Map<ICollection<OrderSecondaryHandlingDto>>(secondaryHandling);
|
|
|
-
|
|
|
- dynamic? dynamicClass = DynamicClassHelper.CreateDynamicClass(dto.ColumnInfos);
|
|
|
-
|
|
|
- var dtos = secondaryHandlingDtos
|
|
|
- .Select(stu => _mapper.Map(stu, typeof(OrderSecondaryHandlingDto), dynamicClass))
|
|
|
- .Cast<object>()
|
|
|
- .ToList();
|
|
|
-
|
|
|
- var stream = ExcelHelper.CreateStream(dtos);
|
|
|
-
|
|
|
- return ExcelStreamResult(stream, "二次办理列表数据");
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /// <summary>
|
|
|
- /// 二次办理满意度统计
|
|
|
- /// </summary>
|
|
|
- /// <param name="dto"></param>
|
|
|
- /// <returns></returns>
|
|
|
- [HttpGet("secondary_handling_satisfaction_report")]
|
|
|
- public async Task<List<SecondaryHandlingSatisfactionVo>> SecondaryHandlingSatisfactionReport([FromQuery] QuerySecondaryHandlingRequest dto)
|
|
|
- {
|
|
|
- var query = _orderSecondaryHandlingApplication.SecondaryHandlingSatisfactionReport(dto, HttpContext.RequestAborted);
|
|
|
- var list = await query.ToListAsync();
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 二次办理满意度统计
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpGet("secondary_handling_satisfaction_report")]
|
|
|
+ public async Task<List<SecondaryHandlingSatisfactionVo>> SecondaryHandlingSatisfactionReport([FromQuery] QuerySecondaryHandlingRequest dto)
|
|
|
+ {
|
|
|
+ var query = _orderSecondaryHandlingApplication.SecondaryHandlingSatisfactionReport(dto, HttpContext.RequestAborted);
|
|
|
+ var list = await query.ToListAsync();
|
|
|
//总计
|
|
|
var total = new SecondaryHandlingSatisfactionVo
|
|
|
{
|
|
|
- OrgId ="0",
|
|
|
- OrgName ="总计",
|
|
|
- TotalSumCount = list.Select(x => x.TotalSumCount).Sum(),
|
|
|
- VerySatisfiedCount = list.Select(x => x.VerySatisfiedCount).Sum(),
|
|
|
- SatisfiedCount = list.Select(x => x.SatisfiedCount).Sum(),
|
|
|
- RegardedAsSatisfiedCount = list.Select(x => x.RegardedAsSatisfiedCount).Sum(),
|
|
|
- DefaultSatisfiedCount = list.Select(x => x.DefaultSatisfiedCount).Sum(),
|
|
|
- NoSatisfiedCount = list.Select(x => x.NoSatisfiedCount).Sum(),
|
|
|
- NoEvaluateCount = list.Select(x => x.NoEvaluateCount).Sum(),
|
|
|
- NoPutThroughCount = list.Select(x => x.NoPutThroughCount).Sum()
|
|
|
+ OrgId = "0",
|
|
|
+ OrgName = "总计",
|
|
|
+ TotalSumCount = list.Select(x => x.TotalSumCount).Sum(),
|
|
|
+ VerySatisfiedCount = list.Select(x => x.VerySatisfiedCount).Sum(),
|
|
|
+ SatisfiedCount = list.Select(x => x.SatisfiedCount).Sum(),
|
|
|
+ RegardedAsSatisfiedCount = list.Select(x => x.RegardedAsSatisfiedCount).Sum(),
|
|
|
+ DefaultSatisfiedCount = list.Select(x => x.DefaultSatisfiedCount).Sum(),
|
|
|
+ NoSatisfiedCount = list.Select(x => x.NoSatisfiedCount).Sum(),
|
|
|
+ NoEvaluateCount = list.Select(x => x.NoEvaluateCount).Sum(),
|
|
|
+ NoPutThroughCount = list.Select(x => x.NoPutThroughCount).Sum()
|
|
|
};
|
|
|
list.Add(total);
|
|
|
//区县合计
|
|
|
var countyList = list.Where(x => x.OrgType == EOrgType.County).ToList();
|
|
|
- var countyTotal = new SecondaryHandlingSatisfactionVo
|
|
|
- {
|
|
|
- OrgId = "0",
|
|
|
- OrgName = "区县合计",
|
|
|
- TotalSumCount = countyList.Select(x => x.TotalSumCount).Sum(),
|
|
|
- VerySatisfiedCount = countyList.Select(x => x.VerySatisfiedCount).Sum(),
|
|
|
- SatisfiedCount = countyList.Select(x => x.SatisfiedCount).Sum(),
|
|
|
- RegardedAsSatisfiedCount = countyList.Select(x => x.RegardedAsSatisfiedCount).Sum(),
|
|
|
- DefaultSatisfiedCount = countyList.Select(x => x.DefaultSatisfiedCount).Sum(),
|
|
|
- NoSatisfiedCount = countyList.Select(x => x.NoSatisfiedCount).Sum(),
|
|
|
- NoEvaluateCount = countyList.Select(x => x.NoEvaluateCount).Sum(),
|
|
|
- NoPutThroughCount = countyList.Select(x => x.NoPutThroughCount).Sum()
|
|
|
- };
|
|
|
- list.Add(countyTotal);
|
|
|
- //市直合计
|
|
|
- var cityList = list.Where(x => x.OrgType == EOrgType.City).ToList();
|
|
|
- var cityTotal = new SecondaryHandlingSatisfactionVo
|
|
|
- {
|
|
|
- OrgId = "0",
|
|
|
- OrgName = "市直合计",
|
|
|
- TotalSumCount = cityList.Select(x => x.TotalSumCount).Sum(),
|
|
|
- VerySatisfiedCount = cityList.Select(x => x.VerySatisfiedCount).Sum(),
|
|
|
- SatisfiedCount = cityList.Select(x => x.SatisfiedCount).Sum(),
|
|
|
- RegardedAsSatisfiedCount = cityList.Select(x => x.RegardedAsSatisfiedCount).Sum(),
|
|
|
- DefaultSatisfiedCount = cityList.Select(x => x.DefaultSatisfiedCount).Sum(),
|
|
|
- NoSatisfiedCount = cityList.Select(x => x.NoSatisfiedCount).Sum(),
|
|
|
- NoEvaluateCount = cityList.Select(x => x.NoEvaluateCount).Sum(),
|
|
|
- NoPutThroughCount = cityList.Select(x => x.NoPutThroughCount).Sum()
|
|
|
- };
|
|
|
- list.Add(cityTotal);
|
|
|
- return list;
|
|
|
- }
|
|
|
- /// <summary>
|
|
|
- /// 二次办理满意度统计导出
|
|
|
- /// </summary>
|
|
|
- /// <returns></returns>
|
|
|
- [HttpPost("secondary_handling_satisfaction_report/_export")]
|
|
|
- public async Task<FileStreamResult> SecondaryHandlingSatisfactionReportExport([FromBody] ExportExcelDto<QuerySecondaryHandlingRequest> dto)
|
|
|
- {
|
|
|
- var query = _orderSecondaryHandlingApplication.SecondaryHandlingSatisfactionReport(dto.QueryDto, HttpContext.RequestAborted);
|
|
|
- List<SecondaryHandlingSatisfactionVo> secondaryHandling;
|
|
|
- secondaryHandling = await query.ToListAsync(HttpContext.RequestAborted);
|
|
|
- //总计
|
|
|
- var total = new SecondaryHandlingSatisfactionVo
|
|
|
- {
|
|
|
- OrgId = "0",
|
|
|
- OrgName = "总计",
|
|
|
- TotalSumCount = secondaryHandling.Select(x => x.TotalSumCount).Sum(),
|
|
|
- VerySatisfiedCount = secondaryHandling.Select(x => x.VerySatisfiedCount).Sum(),
|
|
|
- SatisfiedCount = secondaryHandling.Select(x => x.SatisfiedCount).Sum(),
|
|
|
- RegardedAsSatisfiedCount = secondaryHandling.Select(x => x.RegardedAsSatisfiedCount).Sum(),
|
|
|
- DefaultSatisfiedCount = secondaryHandling.Select(x => x.DefaultSatisfiedCount).Sum(),
|
|
|
- NoSatisfiedCount = secondaryHandling.Select(x => x.NoSatisfiedCount).Sum(),
|
|
|
- NoEvaluateCount = secondaryHandling.Select(x => x.NoEvaluateCount).Sum(),
|
|
|
- NoPutThroughCount = secondaryHandling.Select(x => x.NoPutThroughCount).Sum()
|
|
|
- };
|
|
|
- secondaryHandling.Add(total);
|
|
|
- //区县合计
|
|
|
- var countyList = secondaryHandling.Where(x => x.OrgType == EOrgType.County).ToList();
|
|
|
- var countyTotal = new SecondaryHandlingSatisfactionVo
|
|
|
- {
|
|
|
- OrgId = "0",
|
|
|
- OrgName = "区县合计",
|
|
|
- TotalSumCount = countyList.Select(x => x.TotalSumCount).Sum(),
|
|
|
- VerySatisfiedCount = countyList.Select(x => x.VerySatisfiedCount).Sum(),
|
|
|
- SatisfiedCount = countyList.Select(x => x.SatisfiedCount).Sum(),
|
|
|
- RegardedAsSatisfiedCount = countyList.Select(x => x.RegardedAsSatisfiedCount).Sum(),
|
|
|
- DefaultSatisfiedCount = countyList.Select(x => x.DefaultSatisfiedCount).Sum(),
|
|
|
- NoSatisfiedCount = countyList.Select(x => x.NoSatisfiedCount).Sum(),
|
|
|
- NoEvaluateCount = countyList.Select(x => x.NoEvaluateCount).Sum(),
|
|
|
- NoPutThroughCount = countyList.Select(x => x.NoPutThroughCount).Sum()
|
|
|
- };
|
|
|
- secondaryHandling.Add(countyTotal);
|
|
|
- //市直合计
|
|
|
- var cityList = secondaryHandling.Where(x => x.OrgType == EOrgType.City).ToList();
|
|
|
- var cityTotal = new SecondaryHandlingSatisfactionVo
|
|
|
- {
|
|
|
- OrgId = "0",
|
|
|
- OrgName = "市直合计",
|
|
|
- TotalSumCount = cityList.Select(x => x.TotalSumCount).Sum(),
|
|
|
- VerySatisfiedCount = cityList.Select(x => x.VerySatisfiedCount).Sum(),
|
|
|
- SatisfiedCount = cityList.Select(x => x.SatisfiedCount).Sum(),
|
|
|
- RegardedAsSatisfiedCount = cityList.Select(x => x.RegardedAsSatisfiedCount).Sum(),
|
|
|
- DefaultSatisfiedCount = cityList.Select(x => x.DefaultSatisfiedCount).Sum(),
|
|
|
- NoSatisfiedCount = cityList.Select(x => x.NoSatisfiedCount).Sum(),
|
|
|
- NoEvaluateCount = cityList.Select(x => x.NoEvaluateCount).Sum(),
|
|
|
- NoPutThroughCount = cityList.Select(x => x.NoPutThroughCount).Sum()
|
|
|
- };
|
|
|
- secondaryHandling.Add(cityTotal);
|
|
|
-
|
|
|
- dynamic? dynamicClass = DynamicClassHelper.CreateDynamicClass(dto.ColumnInfos);
|
|
|
- var dtos = secondaryHandling
|
|
|
- .Select(stu => _mapper.Map(stu, typeof(SecondaryHandlingSatisfactionVo), dynamicClass))
|
|
|
- .Cast<object>()
|
|
|
- .ToList();
|
|
|
-
|
|
|
- var stream = ExcelHelper.CreateStream(dtos);
|
|
|
-
|
|
|
- return ExcelStreamResult(stream, "二次办理满意度统计数据");
|
|
|
- }
|
|
|
-
|
|
|
- /// <summary>
|
|
|
- /// 二次办理满意度明细
|
|
|
- /// </summary>
|
|
|
- /// <param name="dto"></param>
|
|
|
- /// <returns></returns>
|
|
|
- [HttpGet("secondary_handling_satisfaction_detail_report")]
|
|
|
- public async Task<PagedDto<OrderSecondaryHandlingDto>> SecondaryHandlingSatisfactionDetailReport([FromQuery] QuerySecondaryHandlingRequest dto)
|
|
|
- {
|
|
|
- var query = _orderSecondaryHandlingApplication.SecondaryHandlingSatisfactionDetailReport(dto, HttpContext.RequestAborted);
|
|
|
- var (total, items) = await query.ToPagedListAsync(dto, HttpContext.RequestAborted);
|
|
|
-
|
|
|
- return new PagedDto<OrderSecondaryHandlingDto>(total, _mapper.Map<IReadOnlyList<OrderSecondaryHandlingDto>>(items));
|
|
|
- }
|
|
|
- /// <summary>
|
|
|
- /// 二次办理满意度明细导出
|
|
|
- /// </summary>
|
|
|
- /// <returns></returns>
|
|
|
- [HttpPost("secondary_handling_satisfaction_detail_report/_export")]
|
|
|
- public async Task<FileStreamResult> SecondaryHandlingSatisfactionDetailReport([FromBody] ExportExcelDto<QuerySecondaryHandlingRequest> dto)
|
|
|
- {
|
|
|
- var query = _orderSecondaryHandlingApplication.SecondaryHandlingSatisfactionDetailReport(dto.QueryDto, HttpContext.RequestAborted);
|
|
|
- List<OrderSecondaryHandling> secondaryHandling;
|
|
|
- if (dto.IsExportAll)
|
|
|
- {
|
|
|
- secondaryHandling = await query.ToListAsync(HttpContext.RequestAborted);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- var (_, items) = await query.ToPagedListAsync(dto.QueryDto, HttpContext.RequestAborted);
|
|
|
- secondaryHandling = items;
|
|
|
- }
|
|
|
-
|
|
|
- var secondaryHandlingDtos = _mapper.Map<ICollection<OrderSecondaryHandlingDto>>(secondaryHandling);
|
|
|
-
|
|
|
- dynamic? dynamicClass = DynamicClassHelper.CreateDynamicClass(dto.ColumnInfos);
|
|
|
-
|
|
|
- var dtos = secondaryHandlingDtos
|
|
|
- .Select(stu => _mapper.Map(stu, typeof(OrderSecondaryHandlingDto), dynamicClass))
|
|
|
- .Cast<object>()
|
|
|
- .ToList();
|
|
|
-
|
|
|
- var stream = ExcelHelper.CreateStream(dtos);
|
|
|
-
|
|
|
- return ExcelStreamResult(stream, "二次办理满意度列表数据");
|
|
|
- }
|
|
|
- }
|
|
|
+ var countyTotal = new SecondaryHandlingSatisfactionVo
|
|
|
+ {
|
|
|
+ OrgId = "0",
|
|
|
+ OrgName = "区县合计",
|
|
|
+ TotalSumCount = countyList.Select(x => x.TotalSumCount).Sum(),
|
|
|
+ VerySatisfiedCount = countyList.Select(x => x.VerySatisfiedCount).Sum(),
|
|
|
+ SatisfiedCount = countyList.Select(x => x.SatisfiedCount).Sum(),
|
|
|
+ RegardedAsSatisfiedCount = countyList.Select(x => x.RegardedAsSatisfiedCount).Sum(),
|
|
|
+ DefaultSatisfiedCount = countyList.Select(x => x.DefaultSatisfiedCount).Sum(),
|
|
|
+ NoSatisfiedCount = countyList.Select(x => x.NoSatisfiedCount).Sum(),
|
|
|
+ NoEvaluateCount = countyList.Select(x => x.NoEvaluateCount).Sum(),
|
|
|
+ NoPutThroughCount = countyList.Select(x => x.NoPutThroughCount).Sum()
|
|
|
+ };
|
|
|
+ list.Add(countyTotal);
|
|
|
+ //市直合计
|
|
|
+ var cityList = list.Where(x => x.OrgType == EOrgType.City).ToList();
|
|
|
+ var cityTotal = new SecondaryHandlingSatisfactionVo
|
|
|
+ {
|
|
|
+ OrgId = "0",
|
|
|
+ OrgName = "市直合计",
|
|
|
+ TotalSumCount = cityList.Select(x => x.TotalSumCount).Sum(),
|
|
|
+ VerySatisfiedCount = cityList.Select(x => x.VerySatisfiedCount).Sum(),
|
|
|
+ SatisfiedCount = cityList.Select(x => x.SatisfiedCount).Sum(),
|
|
|
+ RegardedAsSatisfiedCount = cityList.Select(x => x.RegardedAsSatisfiedCount).Sum(),
|
|
|
+ DefaultSatisfiedCount = cityList.Select(x => x.DefaultSatisfiedCount).Sum(),
|
|
|
+ NoSatisfiedCount = cityList.Select(x => x.NoSatisfiedCount).Sum(),
|
|
|
+ NoEvaluateCount = cityList.Select(x => x.NoEvaluateCount).Sum(),
|
|
|
+ NoPutThroughCount = cityList.Select(x => x.NoPutThroughCount).Sum()
|
|
|
+ };
|
|
|
+ list.Add(cityTotal);
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 二次办理满意度统计导出
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost("secondary_handling_satisfaction_report/_export")]
|
|
|
+ public async Task<FileStreamResult> SecondaryHandlingSatisfactionReportExport([FromBody] ExportExcelDto<QuerySecondaryHandlingRequest> dto)
|
|
|
+ {
|
|
|
+ var query = _orderSecondaryHandlingApplication.SecondaryHandlingSatisfactionReport(dto.QueryDto, HttpContext.RequestAborted);
|
|
|
+ List<SecondaryHandlingSatisfactionVo> secondaryHandling;
|
|
|
+ secondaryHandling = await query.ToListAsync(HttpContext.RequestAborted);
|
|
|
+ //总计
|
|
|
+ var total = new SecondaryHandlingSatisfactionVo
|
|
|
+ {
|
|
|
+ OrgId = "0",
|
|
|
+ OrgName = "总计",
|
|
|
+ TotalSumCount = secondaryHandling.Select(x => x.TotalSumCount).Sum(),
|
|
|
+ VerySatisfiedCount = secondaryHandling.Select(x => x.VerySatisfiedCount).Sum(),
|
|
|
+ SatisfiedCount = secondaryHandling.Select(x => x.SatisfiedCount).Sum(),
|
|
|
+ RegardedAsSatisfiedCount = secondaryHandling.Select(x => x.RegardedAsSatisfiedCount).Sum(),
|
|
|
+ DefaultSatisfiedCount = secondaryHandling.Select(x => x.DefaultSatisfiedCount).Sum(),
|
|
|
+ NoSatisfiedCount = secondaryHandling.Select(x => x.NoSatisfiedCount).Sum(),
|
|
|
+ NoEvaluateCount = secondaryHandling.Select(x => x.NoEvaluateCount).Sum(),
|
|
|
+ NoPutThroughCount = secondaryHandling.Select(x => x.NoPutThroughCount).Sum()
|
|
|
+ };
|
|
|
+ secondaryHandling.Add(total);
|
|
|
+ //区县合计
|
|
|
+ var countyList = secondaryHandling.Where(x => x.OrgType == EOrgType.County).ToList();
|
|
|
+ var countyTotal = new SecondaryHandlingSatisfactionVo
|
|
|
+ {
|
|
|
+ OrgId = "0",
|
|
|
+ OrgName = "区县合计",
|
|
|
+ TotalSumCount = countyList.Select(x => x.TotalSumCount).Sum(),
|
|
|
+ VerySatisfiedCount = countyList.Select(x => x.VerySatisfiedCount).Sum(),
|
|
|
+ SatisfiedCount = countyList.Select(x => x.SatisfiedCount).Sum(),
|
|
|
+ RegardedAsSatisfiedCount = countyList.Select(x => x.RegardedAsSatisfiedCount).Sum(),
|
|
|
+ DefaultSatisfiedCount = countyList.Select(x => x.DefaultSatisfiedCount).Sum(),
|
|
|
+ NoSatisfiedCount = countyList.Select(x => x.NoSatisfiedCount).Sum(),
|
|
|
+ NoEvaluateCount = countyList.Select(x => x.NoEvaluateCount).Sum(),
|
|
|
+ NoPutThroughCount = countyList.Select(x => x.NoPutThroughCount).Sum()
|
|
|
+ };
|
|
|
+ secondaryHandling.Add(countyTotal);
|
|
|
+ //市直合计
|
|
|
+ var cityList = secondaryHandling.Where(x => x.OrgType == EOrgType.City).ToList();
|
|
|
+ var cityTotal = new SecondaryHandlingSatisfactionVo
|
|
|
+ {
|
|
|
+ OrgId = "0",
|
|
|
+ OrgName = "市直合计",
|
|
|
+ TotalSumCount = cityList.Select(x => x.TotalSumCount).Sum(),
|
|
|
+ VerySatisfiedCount = cityList.Select(x => x.VerySatisfiedCount).Sum(),
|
|
|
+ SatisfiedCount = cityList.Select(x => x.SatisfiedCount).Sum(),
|
|
|
+ RegardedAsSatisfiedCount = cityList.Select(x => x.RegardedAsSatisfiedCount).Sum(),
|
|
|
+ DefaultSatisfiedCount = cityList.Select(x => x.DefaultSatisfiedCount).Sum(),
|
|
|
+ NoSatisfiedCount = cityList.Select(x => x.NoSatisfiedCount).Sum(),
|
|
|
+ NoEvaluateCount = cityList.Select(x => x.NoEvaluateCount).Sum(),
|
|
|
+ NoPutThroughCount = cityList.Select(x => x.NoPutThroughCount).Sum()
|
|
|
+ };
|
|
|
+ secondaryHandling.Add(cityTotal);
|
|
|
+
|
|
|
+ dynamic? dynamicClass = DynamicClassHelper.CreateDynamicClass(dto.ColumnInfos);
|
|
|
+ var dtos = secondaryHandling
|
|
|
+ .Select(stu => _mapper.Map(stu, typeof(SecondaryHandlingSatisfactionVo), dynamicClass))
|
|
|
+ .Cast<object>()
|
|
|
+ .ToList();
|
|
|
+
|
|
|
+ var stream = ExcelHelper.CreateStream(dtos);
|
|
|
+
|
|
|
+ return ExcelStreamResult(stream, "二次办理满意度统计数据");
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 二次办理满意度明细
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpGet("secondary_handling_satisfaction_detail_report")]
|
|
|
+ public async Task<PagedDto<OrderSecondaryHandlingDto>> SecondaryHandlingSatisfactionDetailReport([FromQuery] QuerySecondaryHandlingRequest dto)
|
|
|
+ {
|
|
|
+ var query = _orderSecondaryHandlingApplication.SecondaryHandlingSatisfactionDetailReport(dto, HttpContext.RequestAborted);
|
|
|
+ var (total, items) = await query.ToPagedListAsync(dto, HttpContext.RequestAborted);
|
|
|
+
|
|
|
+ return new PagedDto<OrderSecondaryHandlingDto>(total, _mapper.Map<IReadOnlyList<OrderSecondaryHandlingDto>>(items));
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 二次办理满意度明细导出
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost("secondary_handling_satisfaction_detail_report/_export")]
|
|
|
+ public async Task<FileStreamResult> SecondaryHandlingSatisfactionDetailReport([FromBody] ExportExcelDto<QuerySecondaryHandlingRequest> dto)
|
|
|
+ {
|
|
|
+ var query = _orderSecondaryHandlingApplication.SecondaryHandlingSatisfactionDetailReport(dto.QueryDto, HttpContext.RequestAborted);
|
|
|
+ List<OrderSecondaryHandling> secondaryHandling;
|
|
|
+ if (dto.IsExportAll)
|
|
|
+ {
|
|
|
+ secondaryHandling = await query.ToListAsync(HttpContext.RequestAborted);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ var (_, items) = await query.ToPagedListAsync(dto.QueryDto, HttpContext.RequestAborted);
|
|
|
+ secondaryHandling = items;
|
|
|
+ }
|
|
|
+
|
|
|
+ var secondaryHandlingDtos = _mapper.Map<ICollection<OrderSecondaryHandlingDto>>(secondaryHandling);
|
|
|
+
|
|
|
+ dynamic? dynamicClass = DynamicClassHelper.CreateDynamicClass(dto.ColumnInfos);
|
|
|
+
|
|
|
+ var dtos = secondaryHandlingDtos
|
|
|
+ .Select(stu => _mapper.Map(stu, typeof(OrderSecondaryHandlingDto), dynamicClass))
|
|
|
+ .Cast<object>()
|
|
|
+ .ToList();
|
|
|
+
|
|
|
+ var stream = ExcelHelper.CreateStream(dtos);
|
|
|
+
|
|
|
+ return ExcelStreamResult(stream, "二次办理满意度列表数据");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|