田爽 9 mesiacov pred
rodič
commit
4caeb7bfed

+ 5 - 4
src/Hotline.Application/Orders/OrderApplication.cs

@@ -1237,14 +1237,15 @@ public class OrderApplication : IOrderApplication, IScopeDependency
 			.Where(x => x.OrderVisit.VisitTime >= dto.StartTime.Value && x.OrderVisit.VisitTime <= dto.EndTime.Value && x.VisitTarget == EVisitTarget.Org && x.OrderVisit.VisitState == EVisitState.Visited && !string.IsNullOrEmpty(x.VisitOrgCode))
 			.WhereIF(string.IsNullOrEmpty(dto.HotspotName) == false, (x, h) => h.HotSpotName == dto.HotspotName)
 			.WhereIF(IsCenter == false, x => x.VisitOrgCode.StartsWith(_sessionContext.OrgId))
-            .GroupBy(x => new
+            .GroupBy((x,h) => new
 		    {
-			    HotspotId = x.OrderVisit.Order.HotspotId.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>("2"))
-		    })
+			    HotspotId = h.Id,
+			    HotspotName = h.HotSpotName
+			})
 		    .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))), //满意数

+ 1 - 1
src/Hotline.Share/Requests/PagedKeywordRequest.cs

@@ -53,7 +53,7 @@ public record VisitAndHotspotPagedKeywordRequest : PagedKeywordRequest
 	/// <summary>
 	/// 1:办件结果 2:办件态度
 	/// </summary>
-	public int? TypeId { get; set; }
+	public int TypeId { get; set; }
 
 	/// <summary>
 	/// 标题名称