|
@@ -813,17 +813,18 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
#region 信件分布情况
|
|
|
//市直部门
|
|
|
var listOrgStatisticsCityAll = await _orderRepository.Queryable()
|
|
|
- .LeftJoin<SystemOrganize>((it, o) => it.CurrentHandleOrgCode == o.Id)
|
|
|
+ .LeftJoin<SystemOrganize>((it, o) => it.OrgLevelOneCode == o.Id)
|
|
|
.Where((it, o) => (o.OrgType == EOrgType.City || o.OrgType == EOrgType.Province) && it.CreationTime >= StartDate && it.CreationTime <= EndDate)
|
|
|
.GroupBy((it, o) => new
|
|
|
{
|
|
|
- it.CurrentHandleOrgCode,
|
|
|
+ it.OrgLevelOneCode,
|
|
|
o.Name
|
|
|
})
|
|
|
.Select((it, o) => new OrgStatistics
|
|
|
{
|
|
|
- CountNum = SqlFunc.AggregateCount(it.CurrentHandleOrgCode),
|
|
|
- OrgName = o.Name
|
|
|
+ CountNum = SqlFunc.AggregateCount(it.OrgLevelOneCode),
|
|
|
+
|
|
|
+ OrgName = it.OrgLevelOneCode == "001" ? "热线中心" : o.Name
|
|
|
}).ToListAsync();
|
|
|
|
|
|
centerReportStatisticsDto.OrgStatisticsCityAll = new OrgStatisticsAll
|
|
@@ -833,23 +834,23 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
|
|
|
//区县部门
|
|
|
var listOrgStatisticsAreaAll = await _orderRepository.Queryable()
|
|
|
- .LeftJoin<SystemOrganize>((it, o) => it.CurrentHandleOrgCode == o.Id)
|
|
|
+ .LeftJoin<SystemOrganize>((it, o) => it.OrgLevelOneCode == o.Id)
|
|
|
.Where((it, o) => o.OrgType == EOrgType.County && it.CreationTime >= StartDate && it.CreationTime <= EndDate)
|
|
|
.GroupBy((it, o) => new
|
|
|
{
|
|
|
- it.CurrentHandleOrgCode,
|
|
|
+ it.OrgLevelOneCode,
|
|
|
o.Name
|
|
|
})
|
|
|
.Select((it, o) => new OrgStatistics
|
|
|
{
|
|
|
- CountNum = SqlFunc.AggregateCount(it.CurrentHandleOrgCode),
|
|
|
- OrgName = o.Name
|
|
|
+ CountNum = SqlFunc.AggregateCount(it.OrgLevelOneCode),
|
|
|
+ OrgName = it.OrgLevelOneCode == "001" ? "热线中心" : o.Name
|
|
|
}).ToListAsync();
|
|
|
|
|
|
centerReportStatisticsDto.OrgStatisticsAreaAll = new OrgStatisticsAll
|
|
|
{
|
|
|
OrgStatistics = listOrgStatisticsAreaAll
|
|
|
- };
|
|
|
+ };
|
|
|
#endregion
|
|
|
|
|
|
return centerReportStatisticsDto;
|