|
@@ -1199,7 +1199,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
/// <param name="TypeCode">0:全部,1:中心,2:部门</param>
|
|
|
/// <returns></returns>
|
|
|
[HttpGet("department_acceptance_type_statistics")]
|
|
|
- public async Task<object> DepartmentAcceptanceTypeStatistics(DateTime StartDate, DateTime EndDate, int TypeCode)
|
|
|
+ public async Task<List<DepartmentAcceptanceTypeStatisticsDto>> DepartmentAcceptanceTypeStatistics(DateTime StartDate, DateTime EndDate, int TypeCode)
|
|
|
{
|
|
|
EndDate = EndDate.AddDays(1).AddSeconds(-1);
|
|
|
|
|
@@ -1263,39 +1263,8 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
})
|
|
|
.ToListAsync();
|
|
|
|
|
|
- var sumModel = new DepartmentAcceptanceTypeStatisticsDto
|
|
|
- {
|
|
|
- OrgName = "合计",
|
|
|
- ZxAllCount = orderData.Sum(x => x.ZxAllCount),
|
|
|
- ZxAllTimes = orderData.Sum(x => x.ZxAllTimes),
|
|
|
- ZxAcceptanceTypeCode = "10",
|
|
|
-
|
|
|
- JyAllCount = orderData.Sum(x => x.JyAllCount),
|
|
|
- JyAllTimes = orderData.Sum(x => x.JyAllTimes),
|
|
|
- JyAcceptanceTypeCode = "15",
|
|
|
-
|
|
|
- QzAllCount = orderData.Sum(x => x.QzAllCount),
|
|
|
- QzAllTimes = orderData.Sum(x => x.QzAllTimes),
|
|
|
- QzAcceptanceTypeCode = "20",
|
|
|
-
|
|
|
- ByAllCount = orderData.Sum(x => x.ByAllCount),
|
|
|
- ByAllTimes = orderData.Sum(x => x.ByAllTimes),
|
|
|
- ByAcceptanceTypeCode = "25",
|
|
|
-
|
|
|
- JbAllCount = orderData.Sum(x => x.JbAllCount),
|
|
|
- JbAllTimes = orderData.Sum(x => x.JbAllTimes),
|
|
|
- JbAcceptanceTypeCode = "30",
|
|
|
-
|
|
|
- TsAllCount = orderData.Sum(x => x.TsAllCount),
|
|
|
- TsAllTimes = orderData.Sum(x => x.TsAllTimes),
|
|
|
- TsAcceptanceTypeCode = "35",
|
|
|
-
|
|
|
- QtAllCount = orderData.Sum(x => x.QtAllCount),
|
|
|
- QtAllTimes = orderData.Sum(x => x.QtAllTimes),
|
|
|
- QtAcceptanceTypeCode = "40"
|
|
|
- };
|
|
|
|
|
|
- return new { DataList = orderData, SumModel = sumModel };
|
|
|
+ return orderData;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -1420,12 +1389,12 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
dto.EndDate = dto.EndDate.AddDays(1).AddSeconds(-1);
|
|
|
var (total, items) = await _orderRepository.Queryable()
|
|
|
.Where(p => p.CreationTime >= dto.StartDate && p.CreationTime <= dto.EndDate && p.Status > EOrderStatus.WaitForAccept)//&& p.Status >= EOrderStatus.Filed
|
|
|
- .WhereIF(!string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == "001", p => p.OrgLevelOneCode == dto.OrgCode)
|
|
|
+ .WhereIF(!string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == "001", p => p.ActualHandleOrgCode == dto.OrgCode)
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != "001" && dto.SuperiorOrgCode != dto.OrgCode, p => p.ActualHandleOrgCode.StartsWith(dto.OrgCode))
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != "001" && dto.SuperiorOrgCode == dto.OrgCode, p => p.ActualHandleOrgCode == dto.OrgCode)
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.AcceptTypeCode), p => p.AcceptTypeCode == dto.AcceptTypeCode)
|
|
|
- .WhereIF(dto.TypeCode == 1, p => p.OrgLevelOneCode == "001")
|
|
|
- .WhereIF(dto.TypeCode == 2, p => p.OrgLevelOneCode != "001")
|
|
|
+ .WhereIF(dto.TypeCode == 1, p => p.ActualHandleOrgCode == "001")
|
|
|
+ .WhereIF(dto.TypeCode == 2, p => p.ActualHandleOrgCode != "001")
|
|
|
.OrderByDescending(d => d.CreationTime)
|
|
|
.ToPagedListAsync(dto, HttpContext.RequestAborted);
|
|
|
|