|
@@ -1192,21 +1192,33 @@ namespace Hotline.Api.Controllers.Bi
|
|
var IsCenter = _sessionContext.OrgIsCenter;
|
|
var IsCenter = _sessionContext.OrgIsCenter;
|
|
|
|
|
|
var orderData = await _orderRepository.Queryable()
|
|
var orderData = await _orderRepository.Queryable()
|
|
- .LeftJoin<SystemOrganize>((it, o) => it.OrgLevelOneCode == o.Id)
|
|
|
|
- .Where((it, o) => it.CreationTime >= StartDate && it.CreationTime <= EndDate && (int)it.Status >= 300)
|
|
|
|
- .WhereIF(TypeCode == 1, (it, o) => it.OrgLevelOneCode == "001")
|
|
|
|
- .WhereIF(TypeCode == 2, (it, o) => it.OrgLevelOneCode != "001")
|
|
|
|
- .WhereIF(IsCenter == false, (it, o) => it.OrgLevelOneCode.StartsWith(_sessionContext.RequiredOrgId))
|
|
|
|
|
|
+ // .LeftJoin<SystemOrganize>((it, o) => it.OrgLevelOneCode == o.Id)
|
|
|
|
+ .Where(it => it.CreationTime >= StartDate && it.CreationTime <= EndDate && it.Status >= EOrderStatus.Filed)
|
|
|
|
+
|
|
|
|
+ .Select(it => new
|
|
|
|
+ {
|
|
|
|
+ OrgCode = IsCenter == false ? it.ActualHandleOrgCode : it.OrgLevelOneCode,
|
|
|
|
+ it.AcceptTypeCode,
|
|
|
|
+ it.FileDurationWorkday,
|
|
|
|
+ it.AllDuration
|
|
|
|
+ })
|
|
|
|
+ .MergeTable()
|
|
|
|
+ .LeftJoin<SystemOrganize>((it, o) => it.OrgCode == o.Id)
|
|
|
|
+
|
|
|
|
+ .WhereIF(TypeCode == 1, (it, o) => it.OrgCode == "001")
|
|
|
|
+ .WhereIF(TypeCode == 2, (it, o) => it.OrgCode != "001")
|
|
|
|
+ .WhereIF(IsCenter == false, (it, o) => it.OrgCode.StartsWith(_sessionContext.RequiredOrgId))
|
|
|
|
+
|
|
.GroupBy((it, o) => new
|
|
.GroupBy((it, o) => new
|
|
{
|
|
{
|
|
- it.OrgLevelOneCode,
|
|
|
|
|
|
+ it.OrgCode,
|
|
o.Name,
|
|
o.Name,
|
|
o.OrgType
|
|
o.OrgType
|
|
})
|
|
})
|
|
.Select((it, o) => new DepartmentAcceptanceTypeStatisticsDto
|
|
.Select((it, o) => new DepartmentAcceptanceTypeStatisticsDto
|
|
{
|
|
{
|
|
- OrgName = it.OrgLevelOneCode == "001" ? "热线中心" : o.Name,
|
|
|
|
- OrgCode = it.OrgLevelOneCode,
|
|
|
|
|
|
+ OrgName = it.OrgCode == "001" ? "热线中心" : o.Name,
|
|
|
|
+ OrgCode = it.OrgCode,
|
|
OrgType = (int)o.OrgType == 2 ? "区县部门" : "市直部门",
|
|
OrgType = (int)o.OrgType == 2 ? "区县部门" : "市直部门",
|
|
ZxAllCount = SqlFunc.AggregateSum(SqlFunc.IIF(it.AcceptTypeCode == "10", 1, 0)),
|
|
ZxAllCount = SqlFunc.AggregateSum(SqlFunc.IIF(it.AcceptTypeCode == "10", 1, 0)),
|
|
ZxAllTimes = SqlFunc.AggregateSum(SqlFunc.IIF(it.AcceptTypeCode == "10" && it.AllDuration != null, it.AllDuration, 0)),
|
|
ZxAllTimes = SqlFunc.AggregateSum(SqlFunc.IIF(it.AcceptTypeCode == "10" && it.AllDuration != null, it.AllDuration, 0)),
|
|
@@ -1241,6 +1253,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
return orderData;
|
|
return orderData;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 部门受理类型统计周期--明细列表
|
|
/// 部门受理类型统计周期--明细列表
|
|
/// </summary>
|
|
/// </summary>
|