|
@@ -156,12 +156,10 @@ namespace TEAMModelOS.SDK.Models.Service
|
|
|
var duration= GetUserDuration(vistTimes.Select(x => x.time).ToList());
|
|
|
}
|
|
|
//处理学校使用时长
|
|
|
-
|
|
|
-
|
|
|
- var groupSchoolUsers= apiVists.Where(x => !string.IsNullOrWhiteSpace(x.userId) && !string.IsNullOrWhiteSpace(x.school)).GroupBy(x => $"{x.userId}::{x.school}").Select(x=>x.Key);
|
|
|
- foreach (var user in groupSchoolUsers) {
|
|
|
- var suser= user.Split("::");
|
|
|
-
|
|
|
+ var groupSchools = apiVists.Where(x => !string.IsNullOrWhiteSpace(x.school) ).GroupBy(x => x.school).Select(x => new { key = x.Key, list = x.ToList() });
|
|
|
+ foreach (var school in groupSchools) {
|
|
|
+ var vistTimes = school.list.OrderBy(x => x.time);
|
|
|
+ var duration = GetUserDuration(vistTimes.Select(x => x.time).ToList());
|
|
|
}
|
|
|
var clientProvince = apiVists.GroupBy(x => $"{x.client}::{x.province}").Select(x => new CountData { pk=x.Key.Split("::")[0], sk=x.Key.Split("::")[1], count=x.Count() }).OrderByDescending(x => x.count);
|
|
|
var clientUser = apiVists.GroupBy(x => $"{x.client}::{x.userId}::{x.scope}").Select(x => new CountData { pk=x.Key.Split("::")[0], sk=x.Key.Split("::")[1], sp=x.Key.Split("::")[2], count=x.Count() }).OrderByDescending(x => x.count);
|
|
@@ -176,7 +174,6 @@ namespace TEAMModelOS.SDK.Models.Service
|
|
|
}
|
|
|
ldatas[data.pk].Add(data);
|
|
|
}
|
|
|
-
|
|
|
Dictionary<string, List<CountData>> sdatas = new Dictionary<string, List<CountData>>();
|
|
|
foreach (var data in clientSchool)
|
|
|
{
|
|
@@ -995,21 +992,88 @@ namespace TEAMModelOS.SDK.Models.Service
|
|
|
public int count { get; set; }
|
|
|
}
|
|
|
|
|
|
- public class VistSchoolDuration {
|
|
|
- public string userId { get; set; }
|
|
|
- public string school { get; set; }
|
|
|
+ public class VistStickiness {
|
|
|
+
|
|
|
+ public string last { get; set; }
|
|
|
+
|
|
|
/// <summary>
|
|
|
- /// t 教师,s 学生
|
|
|
+ /// 名字
|
|
|
/// </summary>
|
|
|
- public string scope { get; set; }
|
|
|
+ public string name { get; set; }
|
|
|
/// <summary>
|
|
|
- /// 教师使用时长
|
|
|
+ /// 编码
|
|
|
/// </summary>
|
|
|
- public long td { get; set; }
|
|
|
+ public string code { get; set; }
|
|
|
+
|
|
|
+ //排名
|
|
|
+ public int rank { get; set; }
|
|
|
/// <summary>
|
|
|
- /// 学生使用时长
|
|
|
+ /// 排名上升下降
|
|
|
/// </summary>
|
|
|
- public long sd { get; set; }
|
|
|
+ public int updown { get; set; } = 0;
|
|
|
+ #region tmd
|
|
|
+ public double stickiness_tmd { get; set; }
|
|
|
+ public double updown_stickiness_tmd { get; set; }
|
|
|
+ public double rank_stickiness_tmd { get; set; }
|
|
|
+ public double duration_tmd { get; set; }
|
|
|
+ public double updown_duration_tmd { get; set; }
|
|
|
+ public double rank_duration_tmd { get; set; }
|
|
|
+ public double count_tmd { get; set; }
|
|
|
+ public double updown_count_tmd { get; set;}
|
|
|
+ public double rank_count_tmd { get; set; }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region hiteach
|
|
|
+ public double stickiness_hiteach { get; set; }
|
|
|
+ public double updown_stickiness_hiteach { get; set; }
|
|
|
+ public double rank_stickiness_hiteach { get; set; }
|
|
|
+ public double duration_hiteach { get; set; }
|
|
|
+ public double updown_duration_hiteach { get; set; }
|
|
|
+ public double rank_duration_hiteach { get; set; }
|
|
|
+ public double count_hiteach { get; set; }
|
|
|
+ public double updown_count_hiteach { get; set; }
|
|
|
+ public double rank_count_hiteach { get; set; }
|
|
|
+ public double lesson_hiteach { get; set; }
|
|
|
+ public double updown_lesson_hiteach { get; set; }
|
|
|
+ public double rank_lesson_hiteach { get; set; }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region hita
|
|
|
+ public double stickiness_hita { get; set; }
|
|
|
+ public double updown_stickiness_hita { get; set; }
|
|
|
+ public double rank_stickiness_hita { get; set; }
|
|
|
+ public double duration_hita { get; set; }
|
|
|
+ public double updown_duration_hita { get; set; }
|
|
|
+ public double rank_duration_hita { get; set; }
|
|
|
+ public double count_hita { get; set; }
|
|
|
+ public double updown_count_hita { get; set; }
|
|
|
+ public double rank_count_hita { get; set; }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region ies5
|
|
|
+ public double stickiness_ies5 { get; set; }
|
|
|
+ public double updown_stickiness_ies5 { get; set; }
|
|
|
+ public double rank_stickiness_ies5 { get; set; }
|
|
|
+ public double duration_ies5 { get; set; }
|
|
|
+ public double updown_duration_ies5 { get; set; }
|
|
|
+ public double rank_duration_ies5 { get; set; }
|
|
|
+ public double count_ies5 { get; set; }
|
|
|
+ public double updown_count_ies5 { get; set; }
|
|
|
+ public double rank_count_ies5 { get; set; }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region other
|
|
|
+ public double stickiness_other { get; set; }
|
|
|
+ public double updown_stickiness_other { get; set; }
|
|
|
+ public double rank_stickiness_other { get; set; }
|
|
|
+ public double duration_other { get; set; }
|
|
|
+ public double updown_duration_other { get; set; }
|
|
|
+ public double rank_duration_other { get; set; }
|
|
|
+ public double count_other { get; set; }
|
|
|
+ public double updown_count_other { get; set; }
|
|
|
+ public double rank_count_other { get; set; }
|
|
|
+ #endregion
|
|
|
}
|
|
|
}
|
|
|
}
|