|
@@ -1024,7 +1024,7 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
AreaCode = pp.Id,
|
|
|
AreaName = pp.AreaName,
|
|
|
Count = SqlFunc.AggregateSum(dd.Count)
|
|
|
- }).Where(q => q.HotspotName != "").ToPivotListAsync(q => q.AreaCode, q => new { q.HotspotName, q.HotspotId }, q => q.Sum(x => x.Count));
|
|
|
+ }).Where(dd => dd.HotspotName != "").ToPivotListAsync(q => q.AreaCode, q => new { q.HotspotName, q.HotspotId }, q => q.Sum(x => x.Count));
|
|
|
|
|
|
var areaTitleList = await _systemAreaRepository.Queryable().Where(x => SqlFunc.Length(x.Id) == 6 && x.Id != "510000").OrderBy(x => x.Id).ToListAsync();
|
|
|
return (areaTitleList, returnList);
|
|
@@ -1264,14 +1264,15 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
|
|
|
if (IsCenter && list != null)
|
|
|
{
|
|
|
- data = await list.GroupBy(x => new
|
|
|
+ data = await list.GroupBy((x, h) => new
|
|
|
{
|
|
|
- HotspotId = x.OrderVisit.Order.HotspotId.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>("2"))
|
|
|
- })
|
|
|
+ HotspotName = h.HotSpotName,
|
|
|
+ HotspotId = h.Id
|
|
|
+ })
|
|
|
.Select((x, h) => new VisitAndHotspotSatisfactionStatisticsDto()
|
|
|
{
|
|
|
HotspotName = h.HotSpotName,
|
|
|
- HotspotId = x.OrderVisit.Order.HotspotId.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>("2")),
|
|
|
+ HotspotId = h.Id,
|
|
|
TotalSumCount = SqlFunc.AggregateCount(x.OrderVisit.Order.HotspotId.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>("2"))),
|
|
|
VerySatisfiedCount = SqlFunc.IIF(dto.TypeId == 1, SqlFunc.AggregateSum(SqlFunc.IIF(SqlFunc.JsonField(x.OrgProcessingResults, "Key") == "5", 1, 0)), SqlFunc.AggregateSum(SqlFunc.IIF(SqlFunc.JsonField(x.OrgHandledAttitude, "Key") == "5", 1, 0))),//非常满意数
|
|
|
SatisfiedCount = SqlFunc.IIF(dto.TypeId == 1, SqlFunc.AggregateSum(SqlFunc.IIF(SqlFunc.JsonField(x.OrgProcessingResults, "Key") == "4", 1, 0)), SqlFunc.AggregateSum(SqlFunc.IIF(SqlFunc.JsonField(x.OrgHandledAttitude, "Key") == "4", 1, 0))), //满意数
|
|
@@ -1285,15 +1286,16 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- data = await list.GroupBy(x => new
|
|
|
+ data = await list.GroupBy( (x, h) => new
|
|
|
{
|
|
|
- x.VisitOrgCode
|
|
|
- })
|
|
|
+ HotspotName = h.HotSpotName,
|
|
|
+ HotspotId = h.Id
|
|
|
+ })
|
|
|
.Select((x, h) => new VisitAndHotspotSatisfactionStatisticsDto()
|
|
|
{
|
|
|
- HotspotName = h.HotSpotName,
|
|
|
- HotspotId = x.OrderVisit.Order.HotspotId.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>("2")),
|
|
|
- TotalSumCount = SqlFunc.AggregateCount(x.OrderVisit.Order.HotspotId.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>("2"))),
|
|
|
+ HotspotName = h.HotSpotName,
|
|
|
+ HotspotId = h.Id,
|
|
|
+ TotalSumCount = SqlFunc.AggregateCount(x.OrderVisit.Order.HotspotId.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>("2"))),
|
|
|
VerySatisfiedCount = SqlFunc.IIF(dto.TypeId == 1, SqlFunc.AggregateSum(SqlFunc.IIF(SqlFunc.JsonField(x.OrgProcessingResults, "Key") == "5", 1, 0)), SqlFunc.AggregateSum(SqlFunc.IIF(SqlFunc.JsonField(x.OrgHandledAttitude, "Key") == "5", 1, 0))),//非常满意数
|
|
|
SatisfiedCount = SqlFunc.IIF(dto.TypeId == 1, SqlFunc.AggregateSum(SqlFunc.IIF(SqlFunc.JsonField(x.OrgProcessingResults, "Key") == "4", 1, 0)), SqlFunc.AggregateSum(SqlFunc.IIF(SqlFunc.JsonField(x.OrgHandledAttitude, "Key") == "4", 1, 0))), //满意数
|
|
|
RegardedAsSatisfiedCount = SqlFunc.IIF(dto.TypeId == 1, SqlFunc.AggregateSum(SqlFunc.IIF(SqlFunc.JsonField(x.OrgProcessingResults, "Key") == "-1", 1, 0)), SqlFunc.AggregateSum(SqlFunc.IIF(SqlFunc.JsonField(x.OrgHandledAttitude, "Key") == "-1", 1, 0))),//视为满意
|