|
@@ -116,9 +116,6 @@ namespace TEAMModelOS.SDK.Models.Service
|
|
List<SchoolStick> schoolStickiness = new List<SchoolStick>();
|
|
List<SchoolStick> schoolStickiness = new List<SchoolStick>();
|
|
foreach (var chinaSchoolKey in schoolApiVisits)
|
|
foreach (var chinaSchoolKey in schoolApiVisits)
|
|
{
|
|
{
|
|
- if (chinaSchoolKey.Key.Equals("hbcn")) {
|
|
|
|
- Console.WriteLine("1");
|
|
|
|
- }
|
|
|
|
SchoolStick stickiness = new SchoolStick()
|
|
SchoolStick stickiness = new SchoolStick()
|
|
{
|
|
{
|
|
id = chinaSchoolKey.Key
|
|
id = chinaSchoolKey.Key
|
|
@@ -129,20 +126,25 @@ namespace TEAMModelOS.SDK.Models.Service
|
|
int hitaTch= 0, hiteachTch = 0, ies5Tch = 0, otherTch = 0, ies5Stu = 0, otherStu = 0;
|
|
int hitaTch= 0, hiteachTch = 0, ies5Tch = 0, otherTch = 0, ies5Stu = 0, otherStu = 0;
|
|
double hitaCount = 0, hiteachCount = 0, ies5TchCount = 0, otherTchCount = 0, ies5StuCount = 0, otherStuCount = 0;
|
|
double hitaCount = 0, hiteachCount = 0, ies5TchCount = 0, otherTchCount = 0, ies5StuCount = 0, otherStuCount = 0;
|
|
double lessonCount= chinaSchoolKey.ToList().Where(x => x.path.Contains("hiteach/create-lesson")).Count() ;
|
|
double lessonCount= chinaSchoolKey.ToList().Where(x => x.path.Contains("hiteach/create-lesson")).Count() ;
|
|
-
|
|
|
|
-
|
|
|
|
int teacherCount= teachers.Count() ;
|
|
int teacherCount= teachers.Count() ;
|
|
foreach (var user in teachers)
|
|
foreach (var user in teachers)
|
|
{
|
|
{
|
|
|
|
+ TchStick tchStick = new TchStick()
|
|
|
|
+ {
|
|
|
|
+ id = user.Key,
|
|
|
|
+ school= chinaSchoolKey.Key
|
|
|
|
+ };
|
|
|
|
+
|
|
//HiTA
|
|
//HiTA
|
|
var teacherHitaVisit = apiVisits.Where(x => !string.IsNullOrWhiteSpace(x.userId) && x.userId.Equals(user.Key) && x.client.Equals("hita"));
|
|
var teacherHitaVisit = apiVisits.Where(x => !string.IsNullOrWhiteSpace(x.userId) && x.userId.Equals(user.Key) && x.client.Equals("hita"));
|
|
var teacherHitaVisitCount = teacherHitaVisit.Count();
|
|
var teacherHitaVisitCount = teacherHitaVisit.Count();
|
|
if (teacherHitaVisitCount>0)
|
|
if (teacherHitaVisitCount>0)
|
|
{ hitaTch+=1; }
|
|
{ hitaTch+=1; }
|
|
var teacherHitaVisitTime = GetUserDuration(teacherHitaVisit.OrderBy(x => x.time).Select(x => x.time).ToList());
|
|
var teacherHitaVisitTime = GetUserDuration(teacherHitaVisit.OrderBy(x => x.time).Select(x => x.time).ToList());
|
|
-
|
|
|
|
hitaCount+=teacherHitaVisitCount;
|
|
hitaCount+=teacherHitaVisitCount;
|
|
hitaTime+=teacherHitaVisitTime;
|
|
hitaTime+=teacherHitaVisitTime;
|
|
|
|
+ tchStick.hita.count.value=teacherHitaVisitCount;
|
|
|
|
+ tchStick.hita.duration.value=teacherHitaVisitTime;
|
|
//Other
|
|
//Other
|
|
var teacherOtherVisit = user.Where(x => !x.client.Equals("hita")&&!x.client.Equals("hiteach")&&!x.client.Equals("ies5"));
|
|
var teacherOtherVisit = user.Where(x => !x.client.Equals("hita")&&!x.client.Equals("hiteach")&&!x.client.Equals("ies5"));
|
|
var teacherOtherVisitCount= teacherOtherVisit.Count();
|
|
var teacherOtherVisitCount= teacherOtherVisit.Count();
|
|
@@ -151,6 +153,9 @@ namespace TEAMModelOS.SDK.Models.Service
|
|
{ otherTch+=1; }
|
|
{ otherTch+=1; }
|
|
otherTchCount+=teacherOtherVisitCount;
|
|
otherTchCount+=teacherOtherVisitCount;
|
|
otherTchTime+=teacherOtherVisitTime;
|
|
otherTchTime+=teacherOtherVisitTime;
|
|
|
|
+
|
|
|
|
+ tchStick.otherTch.count.value=teacherOtherVisitCount;
|
|
|
|
+ tchStick.otherTch.duration.value=teacherOtherVisitTime;
|
|
//HiTeach
|
|
//HiTeach
|
|
//教师访问hiteach 不带学校信息的
|
|
//教师访问hiteach 不带学校信息的
|
|
var teacherHiteachVisit = apiVisits.Where(x => !string.IsNullOrWhiteSpace(x.userId) && x.userId.Equals(user.Key) && x.client.Equals("hiteach") && string.IsNullOrWhiteSpace(x.school));
|
|
var teacherHiteachVisit = apiVisits.Where(x => !string.IsNullOrWhiteSpace(x.userId) && x.userId.Equals(user.Key) && x.client.Equals("hiteach") && string.IsNullOrWhiteSpace(x.school));
|
|
@@ -166,6 +171,9 @@ namespace TEAMModelOS.SDK.Models.Service
|
|
var teacherHiteachAllVisitTime = GetUserDuration(teacherHiteachAllVisit.OrderBy(x => x.time).Select(x => x.time).ToList());
|
|
var teacherHiteachAllVisitTime = GetUserDuration(teacherHiteachAllVisit.OrderBy(x => x.time).Select(x => x.time).ToList());
|
|
hiteachCount+=teacherHiteachAllVisitCount;
|
|
hiteachCount+=teacherHiteachAllVisitCount;
|
|
hiteachTime+=teacherHiteachAllVisitTime;
|
|
hiteachTime+=teacherHiteachAllVisitTime;
|
|
|
|
+
|
|
|
|
+ tchStick.hiteach.count.value=teacherHiteachAllVisitCount;
|
|
|
|
+ tchStick.hiteach.duration.value=teacherHiteachAllVisitTime;
|
|
//IES5
|
|
//IES5
|
|
var teacherIes5Visit = user.Where(x => x.client.Equals("ies5"));
|
|
var teacherIes5Visit = user.Where(x => x.client.Equals("ies5"));
|
|
var teacherIes5VisitCount= teacherIes5Visit.Count();
|
|
var teacherIes5VisitCount= teacherIes5Visit.Count();
|
|
@@ -174,11 +182,51 @@ namespace TEAMModelOS.SDK.Models.Service
|
|
var teacherIes5VisitTime = GetUserDuration(teacherIes5Visit.OrderBy(x => x.time).Select(x => x.time).ToList());
|
|
var teacherIes5VisitTime = GetUserDuration(teacherIes5Visit.OrderBy(x => x.time).Select(x => x.time).ToList());
|
|
ies5TchCount+=teacherIes5VisitCount;
|
|
ies5TchCount+=teacherIes5VisitCount;
|
|
ies5TchTime+=teacherIes5VisitTime;
|
|
ies5TchTime+=teacherIes5VisitTime;
|
|
|
|
+
|
|
|
|
+ tchStick.ies5Tch.count.value=teacherIes5VisitCount;
|
|
|
|
+ tchStick.ies5Tch.duration.value=teacherIes5VisitTime;
|
|
|
|
+ double lessonCountTch = chinaSchoolKey.ToList().Where(x => x.path.Contains("hiteach/create-lesson") && x.userId.Equals(user.Key)).Count();
|
|
|
|
+ tchStick.lesson.value=lessonCountTch;
|
|
|
|
+
|
|
|
|
+ tchStick.tmd.count.value=tchStick.hita.count.value+tchStick.hiteach.count.value+tchStick.ies5Tch.count.value+tchStick.otherTch.count.value;
|
|
|
|
+ tchStick.tmd.duration.value=tchStick.hita.duration.value+tchStick.hiteach.duration.value+tchStick.ies5Tch.duration.value+tchStick.otherTch.duration.value;
|
|
|
|
+
|
|
|
|
+ tchStick.hita.userCount=1;
|
|
|
|
+ tchStick.hiteach.userCount=1;
|
|
|
|
+ tchStick.ies5Tch.userCount=1;
|
|
|
|
+ tchStick.otherTch.userCount=1;
|
|
|
|
+ tchStick.tmd.userCount=1;
|
|
|
|
+ if (tchStick.hita.count.value>0 && tchStick.hita.duration.value>0)
|
|
|
|
+ {
|
|
|
|
+ tchStick.hita.stick.value= (tchStick.hita.duration.value/1000/tchStick.hita.count.value);
|
|
|
|
+ }
|
|
|
|
+ if (tchStick.ies5Tch.count.value>0 && tchStick.ies5Tch.duration.value>0)
|
|
|
|
+ {
|
|
|
|
+ tchStick.ies5Tch.stick.value= (tchStick.ies5Tch.duration.value/1000/tchStick.ies5Tch.count.value);
|
|
|
|
+ }
|
|
|
|
+ if (tchStick.otherTch.count.value>0 && tchStick.otherTch.duration.value>0)
|
|
|
|
+ {
|
|
|
|
+ tchStick.otherTch.stick.value= (tchStick.otherTch.duration.value/1000/tchStick.otherTch.count.value);
|
|
|
|
+ }
|
|
|
|
+ if (tchStick.hiteach.count.value>0 && tchStick.hiteach.duration.value>0)
|
|
|
|
+ {
|
|
|
|
+ tchStick.hiteach.stick.value= (tchStick.hiteach.duration.value/1000/tchStick.hiteach.count.value)+tchStick.lesson.value;
|
|
|
|
+ }
|
|
|
|
+ if (tchStick.tmd.count.value>0 && tchStick.tmd.duration.value>0)
|
|
|
|
+ {
|
|
|
|
+ tchStick.tmd.stick.value= (tchStick.tmd.duration.value/1000/tchStick.tmd.count.value)+ tchStick.lesson.value;
|
|
|
|
+ }
|
|
|
|
+ stickiness.tchSticks.Add(tchStick);
|
|
}
|
|
}
|
|
var student = chinaSchoolKey.ToList().Where(x => !string.IsNullOrWhiteSpace(x.userId) && !string.IsNullOrWhiteSpace(x.scope) && (x.scope.Equals("student")||x.scope.Equals("tmduser"))).GroupBy(x => x.userId);
|
|
var student = chinaSchoolKey.ToList().Where(x => !string.IsNullOrWhiteSpace(x.userId) && !string.IsNullOrWhiteSpace(x.scope) && (x.scope.Equals("student")||x.scope.Equals("tmduser"))).GroupBy(x => x.userId);
|
|
var studentCount = student.Count();
|
|
var studentCount = student.Count();
|
|
foreach (var user in student)
|
|
foreach (var user in student)
|
|
{
|
|
{
|
|
|
|
+ StuStick stuStick = new StuStick
|
|
|
|
+ {
|
|
|
|
+ id=user.Key,
|
|
|
|
+ school=chinaSchoolKey.Key
|
|
|
|
+ };
|
|
var studentOtherVisit = user.Where(x => !x.client.Equals("ies5"));
|
|
var studentOtherVisit = user.Where(x => !x.client.Equals("ies5"));
|
|
var studentOtherVisitCount = studentOtherVisit.Count();
|
|
var studentOtherVisitCount = studentOtherVisit.Count();
|
|
if (studentOtherVisitCount>0)
|
|
if (studentOtherVisitCount>0)
|
|
@@ -193,6 +241,30 @@ namespace TEAMModelOS.SDK.Models.Service
|
|
ies5StuTime+=studentIes5VisitTime;
|
|
ies5StuTime+=studentIes5VisitTime;
|
|
otherStuCount+=studentOtherVisitCount;
|
|
otherStuCount+=studentOtherVisitCount;
|
|
otherStuTime+=studentOtherVisitTime;
|
|
otherStuTime+=studentOtherVisitTime;
|
|
|
|
+
|
|
|
|
+ stuStick.ies5Stu.count.value=studentIes5VisitCount;
|
|
|
|
+ stuStick.ies5Stu.duration.value=studentIes5VisitTime;
|
|
|
|
+ stuStick.otherStu.count.value=studentOtherVisitCount;
|
|
|
|
+ stuStick.otherStu.duration.value=studentOtherVisitTime;
|
|
|
|
+ stuStick.tmd.count.value= stuStick.ies5Stu.count.value+stuStick.otherStu.count.value;
|
|
|
|
+ stuStick.tmd.duration.value= stuStick.ies5Stu.duration.value+stuStick.otherStu.duration.value;
|
|
|
|
+ stuStick.ies5Stu.userCount=1;
|
|
|
|
+ stuStick.otherStu.userCount=1;
|
|
|
|
+ stuStick.tmd.userCount=1;
|
|
|
|
+ if (stuStick.ies5Stu.count.value>0 && stuStick.ies5Stu.duration.value>0)
|
|
|
|
+ {
|
|
|
|
+ stuStick.ies5Stu.stick.value= (stuStick.ies5Stu.duration.value/1000/stuStick.ies5Stu.count.value);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (stuStick.otherStu.count.value>0 && stuStick.otherStu.duration.value>0)
|
|
|
|
+ {
|
|
|
|
+ stuStick.otherStu.stick.value=(stuStick.otherStu.duration.value/1000/stuStick.otherStu.count.value);
|
|
|
|
+ }
|
|
|
|
+ if (stuStick.tmd.count.value>0 && stuStick.tmd.duration.value>0)
|
|
|
|
+ {
|
|
|
|
+ stuStick.tmd.stick.value=(stuStick.tmd.duration.value/1000/stuStick.tmd.count.value);
|
|
|
|
+ }
|
|
|
|
+ stickiness.stuSticks.Add(stuStick);
|
|
}
|
|
}
|
|
stickiness.hita.duration.value=hitaTime;
|
|
stickiness.hita.duration.value=hitaTime;
|
|
stickiness.hiteach.duration.value=hiteachTime;
|
|
stickiness.hiteach.duration.value=hiteachTime;
|
|
@@ -218,34 +290,180 @@ namespace TEAMModelOS.SDK.Models.Service
|
|
stickiness.ies5Stu.count.value=ies5StuCount;
|
|
stickiness.ies5Stu.count.value=ies5StuCount;
|
|
stickiness.otherStu.count.value=otherStuCount;
|
|
stickiness.otherStu.count.value=otherStuCount;
|
|
stickiness.tmd.count.value=hitaCount+hiteachCount+ies5TchCount+otherTchCount+ies5StuCount+otherStuCount;
|
|
stickiness.tmd.count.value=hitaCount+hiteachCount+ies5TchCount+otherTchCount+ies5StuCount+otherStuCount;
|
|
-
|
|
|
|
-
|
|
|
|
stickiness.lesson.value=lessonCount;
|
|
stickiness.lesson.value=lessonCount;
|
|
stickiness.tmd.userCount=teacherCount+studentCount;
|
|
stickiness.tmd.userCount=teacherCount+studentCount;
|
|
|
|
+ if(stickiness.hita.count.value>0 && stickiness.hita.duration.value>0)
|
|
|
|
+ {
|
|
|
|
+ stickiness.hita.stick.value=(stickiness.hita.userCount* stickiness.hita.count.value)/(stickiness.hita.duration.value/1000/stickiness.hita.count.value);
|
|
|
|
+ }
|
|
|
|
+ if (stickiness.ies5Stu.count.value>0 && stickiness.ies5Stu.duration.value>0)
|
|
|
|
+ {
|
|
|
|
+ stickiness.ies5Stu.stick.value=(stickiness.ies5Stu.userCount* stickiness.ies5Stu.count.value)/(stickiness.ies5Stu.duration.value/1000/stickiness.ies5Stu.count.value);
|
|
|
|
+ }
|
|
|
|
+ if (stickiness.ies5Tch.count.value>0 && stickiness.ies5Tch.duration.value>0)
|
|
|
|
+ {
|
|
|
|
+ stickiness.ies5Tch.stick.value=(stickiness.ies5Tch.userCount* stickiness.ies5Tch.count.value)/(stickiness.ies5Tch.duration.value/1000/stickiness.ies5Tch.count.value);
|
|
|
|
+ }
|
|
|
|
+ if (stickiness.otherStu.count.value>0 && stickiness.otherStu.duration.value>0)
|
|
|
|
+ {
|
|
|
|
+ stickiness.otherStu.stick.value=(stickiness.otherStu.userCount* stickiness.otherStu.count.value)/(stickiness.otherStu.duration.value/1000/stickiness.otherStu.count.value);
|
|
|
|
+ }
|
|
|
|
+ if (stickiness.otherTch.count.value>0 && stickiness.otherTch.duration.value>0)
|
|
|
|
+ {
|
|
|
|
+ stickiness.otherTch.stick.value=(stickiness.otherTch.userCount* stickiness.otherTch.count.value)/(stickiness.otherTch.duration.value/1000/stickiness.otherTch.count.value);
|
|
|
|
+ }
|
|
|
|
+ if (stickiness.hiteach.count.value>0 && stickiness.hiteach.duration.value>0)
|
|
|
|
+ {
|
|
|
|
+ stickiness.hiteach.stick.value=(stickiness.hiteach.userCount* stickiness.hiteach.count.value)/(stickiness.hiteach.duration.value/1000/stickiness.hiteach.count.value)+stickiness.lesson.value;
|
|
|
|
+ }
|
|
|
|
+ if (stickiness.tmd.count.value>0 && stickiness.tmd.duration.value>0)
|
|
|
|
+ {
|
|
|
|
+ stickiness.tmd.stick.value=(stickiness.tmd.userCount* stickiness.tmd.count.value)/(stickiness.tmd.duration.value/1000/stickiness.tmd.count.value)+ stickiness.lesson.value;
|
|
|
|
+ }
|
|
|
|
+ stickiness.tchSticks= OrderByTchStick(stickiness.tchSticks);
|
|
|
|
+ stickiness.stuSticks= OrderByStuStick(stickiness.stuSticks);
|
|
schoolStickiness.Add(stickiness);
|
|
schoolStickiness.Add(stickiness);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ return OrderBySchoolStick(schoolStickiness);
|
|
|
|
+ }
|
|
|
|
+ private static List<StuStick> OrderByStuStick(List<StuStick> stuStickiness)
|
|
|
|
+ {
|
|
// 假设visit已经填充了数据
|
|
// 假设visit已经填充了数据
|
|
|
|
|
|
#region
|
|
#region
|
|
- var rank_tmd_count = schoolStickiness.Select(x=> x.tmd.count.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
- var rank_hita_count = schoolStickiness.Select(x => x.hita.count.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
- var rank_hiteach_count = schoolStickiness.Select(x => x.hiteach.count.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
- var rank_ies5Tch_count = schoolStickiness.Select(x => x.ies5Tch.count.value).Distinct().OrderByDescending(v => v).ToList() ;
|
|
|
|
- var rank_otherTch_count = schoolStickiness.Select(x => x.otherTch.count.value).Distinct().OrderByDescending(v => v).ToList() ;
|
|
|
|
- var rank_ies5Stu_count = schoolStickiness.Select(x => x.ies5Stu.count.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
- var rank_otherStu_count = schoolStickiness.Select(x => x.otherStu.count.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
- var rank_lesson_count = schoolStickiness.Select(x => x.lesson.value).Distinct().OrderByDescending(v => v).ToList() ;
|
|
|
|
|
|
+ var rank_tmd_count = stuStickiness.Select(x => x.tmd.count.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_ies5Stu_count = stuStickiness.Select(x => x.ies5Stu.count.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_otherStu_count = stuStickiness.Select(x => x.otherStu.count.value).Distinct().OrderByDescending(v => v).ToList();
|
|
#endregion
|
|
#endregion
|
|
#region
|
|
#region
|
|
- var rank_tmd_duration = schoolStickiness.Select(x => x.tmd.duration.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
- var rank_hita_duration = schoolStickiness.Select(x => x.hita.duration.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
- var rank_hiteach_duration = schoolStickiness.Select(x => x.hiteach.duration.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
- var rank_ies5Tch_duration = schoolStickiness.Select(x => x.ies5Tch.duration.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
- var rank_otherTch_duration = schoolStickiness.Select(x => x.otherTch.duration.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
- var rank_ies5Stu_duration = schoolStickiness.Select(x => x.ies5Stu.duration.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
- var rank_otherStu_duration = schoolStickiness.Select(x => x.otherStu.duration.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
|
|
+ var rank_tmd_duration = stuStickiness.Select(x => x.tmd.duration.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_ies5Stu_duration = stuStickiness.Select(x => x.ies5Stu.duration.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_otherStu_duration = stuStickiness.Select(x => x.otherStu.duration.value).Distinct().OrderByDescending(v => v).ToList();
|
|
#endregion
|
|
#endregion
|
|
- schoolStickiness.ForEach(x => {
|
|
|
|
|
|
+
|
|
|
|
+ #region
|
|
|
|
+ var rank_tmd_stick = stuStickiness.Select(x => x.tmd.stick.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_ies5Stu_stick = stuStickiness.Select(x => x.ies5Stu.stick.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_otherStu_stick = stuStickiness.Select(x => x.otherStu.stick.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ #endregion
|
|
|
|
+ stuStickiness.ForEach(x =>
|
|
|
|
+ {
|
|
|
|
+ #region
|
|
|
|
+ if (x.tmd.count.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_tmd_count = rank_tmd_count.FindIndex(i => i==x.tmd.count.value);
|
|
|
|
+ if (index_tmd_count!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.tmd.count.rank = index_tmd_count + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (x.ies5Stu.count.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_ies5Stu_count = rank_ies5Stu_count.FindIndex(i => i==x.ies5Stu.count.value);
|
|
|
|
+ if (index_ies5Stu_count!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.ies5Stu.count.rank = index_ies5Stu_count + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (x.otherStu.count.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_otherStu_count = rank_otherStu_count.FindIndex(i => i==x.otherStu.count.value);
|
|
|
|
+ if (index_otherStu_count!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.otherStu.count.rank = index_otherStu_count + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ #endregion
|
|
|
|
+ #region
|
|
|
|
+ if (x.tmd.duration.value> 0) {
|
|
|
|
+ int index_tmd_duration = rank_tmd_duration.FindIndex(i => i==x.tmd.duration.value);
|
|
|
|
+ if (index_tmd_duration!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.tmd.duration.rank = index_tmd_duration + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if (x.ies5Stu.duration.value>0) {
|
|
|
|
+ int index_ies5Stu_duration = rank_ies5Stu_duration.FindIndex(i => i==x.ies5Stu.duration.value);
|
|
|
|
+ if (index_ies5Stu_duration!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.ies5Stu.duration.rank = index_ies5Stu_duration + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (x.otherStu.duration.value>0) {
|
|
|
|
+ int index_otherStu_duration = rank_otherStu_duration.FindIndex(i => i==x.otherStu.duration.value);
|
|
|
|
+ if (index_otherStu_duration!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.otherStu.duration.rank = index_otherStu_duration + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ #endregion
|
|
|
|
+ #region
|
|
|
|
+ if (x.tmd.stick.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_tmd_stick = rank_tmd_stick.FindIndex(i => i==x.tmd.stick.value);
|
|
|
|
+ if (index_tmd_stick!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.tmd.stick.rank = index_tmd_stick + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (x.ies5Stu.stick.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_ies5Stu_stick = rank_ies5Stu_stick.FindIndex(i => i==x.ies5Stu.stick.value);
|
|
|
|
+ if (index_ies5Stu_stick!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.ies5Stu.stick.rank = index_ies5Stu_stick + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (x.otherStu.stick.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_otherStu_stick = rank_otherStu_stick.FindIndex(i => i==x.otherStu.stick.value);
|
|
|
|
+ if (index_otherStu_stick!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.otherStu.stick.rank = index_otherStu_stick + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ #endregion
|
|
|
|
+ });
|
|
|
|
+ return stuStickiness;
|
|
|
|
+ }
|
|
|
|
+ private static List<TchStick> OrderByTchStick(List<TchStick> tchStickiness)
|
|
|
|
+ {
|
|
|
|
+ // 假设visit已经填充了数据
|
|
|
|
+
|
|
|
|
+ #region
|
|
|
|
+ var rank_tmd_count = tchStickiness.Select(x => x.tmd.count.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_hita_count = tchStickiness.Select(x => x.hita.count.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_hiteach_count = tchStickiness.Select(x => x.hiteach.count.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_ies5Tch_count = tchStickiness.Select(x => x.ies5Tch.count.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_otherTch_count = tchStickiness.Select(x => x.otherTch.count.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_lesson_count = tchStickiness.Select(x => x.lesson.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ #endregion
|
|
|
|
+ #region
|
|
|
|
+ var rank_tmd_duration = tchStickiness.Select(x => x.tmd.duration.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_hita_duration = tchStickiness.Select(x => x.hita.duration.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_hiteach_duration = tchStickiness.Select(x => x.hiteach.duration.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_ies5Tch_duration = tchStickiness.Select(x => x.ies5Tch.duration.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_otherTch_duration = tchStickiness.Select(x => x.otherTch.duration.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ #endregion
|
|
|
|
+
|
|
|
|
+ #region
|
|
|
|
+ var rank_tmd_stick = tchStickiness.Select(x => x.tmd.stick.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_hita_stick = tchStickiness.Select(x => x.hita.stick.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_hiteach_stick = tchStickiness.Select(x => x.hiteach.stick.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_ies5Tch_stick = tchStickiness.Select(x => x.ies5Tch.stick.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_otherTch_stick = tchStickiness.Select(x => x.otherTch.stick.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ #endregion
|
|
|
|
+ tchStickiness.ForEach(x => {
|
|
#region
|
|
#region
|
|
int index_tmd_count = rank_tmd_count.FindIndex(i => i==x.tmd.count.value);
|
|
int index_tmd_count = rank_tmd_count.FindIndex(i => i==x.tmd.count.value);
|
|
if (index_tmd_count!=-1)
|
|
if (index_tmd_count!=-1)
|
|
@@ -273,18 +491,6 @@ namespace TEAMModelOS.SDK.Models.Service
|
|
x.otherTch.count.rank = index_otherTch_count + 1;
|
|
x.otherTch.count.rank = index_otherTch_count + 1;
|
|
}
|
|
}
|
|
|
|
|
|
- int index_ies5Stu_count = rank_ies5Stu_count.FindIndex(i => i==x.ies5Stu.count.value);
|
|
|
|
- if (index_ies5Stu_count!=-1)
|
|
|
|
- {
|
|
|
|
- x.ies5Stu.count.rank = index_ies5Stu_count + 1;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- int index_otherStu_count = rank_otherStu_count.FindIndex(i => i==x.otherStu.count.value);
|
|
|
|
- if (index_otherStu_count!=-1)
|
|
|
|
- {
|
|
|
|
- x.otherStu.count.rank = index_otherStu_count + 1;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
int index_lesson_count = rank_lesson_count.FindIndex(i => i==x.lesson.value);
|
|
int index_lesson_count = rank_lesson_count.FindIndex(i => i==x.lesson.value);
|
|
if (index_lesson_count!=-1)
|
|
if (index_lesson_count!=-1)
|
|
{
|
|
{
|
|
@@ -318,20 +524,271 @@ namespace TEAMModelOS.SDK.Models.Service
|
|
x.otherTch.duration.rank = index_otherTch_duration + 1;
|
|
x.otherTch.duration.rank = index_otherTch_duration + 1;
|
|
}
|
|
}
|
|
|
|
|
|
- int index_ies5Stu_duration = rank_ies5Stu_duration.FindIndex(i => i==x.ies5Stu.duration.value);
|
|
|
|
- if (index_ies5Stu_duration!=-1)
|
|
|
|
|
|
+
|
|
|
|
+ #endregion
|
|
|
|
+ #region
|
|
|
|
+ int index_tmd_stick = rank_tmd_stick.FindIndex(i => i==x.tmd.stick.value);
|
|
|
|
+ if (index_tmd_stick!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.tmd.stick.rank = index_tmd_stick + 1;
|
|
|
|
+ }
|
|
|
|
+ int index_hita_stick = rank_hita_stick.FindIndex(i => i==x.hita.stick.value);
|
|
|
|
+ if (index_hita_stick!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.hita.stick.rank = index_hita_stick + 1;
|
|
|
|
+ }
|
|
|
|
+ int index_hiteach_stick = rank_hiteach_stick.FindIndex(i => i==x.hiteach.stick.value);
|
|
|
|
+ if (index_hiteach_stick!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.hiteach.stick.rank = index_hiteach_stick + 1;
|
|
|
|
+ }
|
|
|
|
+ int index_ies5Tch_stick = rank_ies5Tch_stick.FindIndex(i => i==x.ies5Tch.stick.value);
|
|
|
|
+ if (index_ies5Tch_stick!=-1)
|
|
{
|
|
{
|
|
- x.ies5Stu.duration.rank = index_ies5Stu_duration + 1;
|
|
|
|
|
|
+ x.ies5Tch.stick.rank = index_ies5Tch_stick + 1;
|
|
}
|
|
}
|
|
|
|
+ int index_otherTch_stick = rank_otherTch_stick.FindIndex(i => i==x.otherTch.stick.value);
|
|
|
|
+ if (index_otherTch_stick!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.otherTch.stick.rank = index_otherTch_stick + 1;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ #endregion
|
|
|
|
+ });
|
|
|
|
+ return tchStickiness;
|
|
|
|
+ }
|
|
|
|
+ private static List<SchoolStick> OrderBySchoolStick(List<SchoolStick> schoolStickiness)
|
|
|
|
+ {
|
|
|
|
+ // 假设visit已经填充了数据
|
|
|
|
+
|
|
|
|
+ #region
|
|
|
|
+ var rank_tmd_count = schoolStickiness.Select(x => x.tmd.count.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_hita_count = schoolStickiness.Select(x => x.hita.count.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_hiteach_count = schoolStickiness.Select(x => x.hiteach.count.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_ies5Tch_count = schoolStickiness.Select(x => x.ies5Tch.count.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_otherTch_count = schoolStickiness.Select(x => x.otherTch.count.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_ies5Stu_count = schoolStickiness.Select(x => x.ies5Stu.count.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_otherStu_count = schoolStickiness.Select(x => x.otherStu.count.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_lesson_count = schoolStickiness.Select(x => x.lesson.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ #endregion
|
|
|
|
+ #region
|
|
|
|
+ var rank_tmd_duration = schoolStickiness.Select(x => x.tmd.duration.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_hita_duration = schoolStickiness.Select(x => x.hita.duration.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_hiteach_duration = schoolStickiness.Select(x => x.hiteach.duration.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_ies5Tch_duration = schoolStickiness.Select(x => x.ies5Tch.duration.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_otherTch_duration = schoolStickiness.Select(x => x.otherTch.duration.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_ies5Stu_duration = schoolStickiness.Select(x => x.ies5Stu.duration.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_otherStu_duration = schoolStickiness.Select(x => x.otherStu.duration.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ #endregion
|
|
|
|
|
|
- int index_otherStu_duration = rank_otherStu_duration.FindIndex(i => i==x.otherStu.duration.value);
|
|
|
|
- if (index_otherStu_duration!=-1)
|
|
|
|
|
|
+ #region
|
|
|
|
+ var rank_tmd_stick = schoolStickiness.Select(x => x.tmd.stick.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_hita_stick = schoolStickiness.Select(x => x.hita.stick.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_hiteach_stick = schoolStickiness.Select(x => x.hiteach.stick.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_ies5Tch_stick = schoolStickiness.Select(x => x.ies5Tch.stick.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_otherTch_stick = schoolStickiness.Select(x => x.otherTch.stick.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_ies5Stu_stick = schoolStickiness.Select(x => x.ies5Stu.stick.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ var rank_otherStu_stick = schoolStickiness.Select(x => x.otherStu.stick.value).Distinct().OrderByDescending(v => v).ToList();
|
|
|
|
+ #endregion
|
|
|
|
+ schoolStickiness.ForEach(x => {
|
|
|
|
+ #region
|
|
|
|
+ if (x.tmd.count.value>0)
|
|
{
|
|
{
|
|
- x.otherStu.duration.rank = index_otherStu_duration + 1;
|
|
|
|
|
|
+ int index_tmd_count = rank_tmd_count.FindIndex(i => i==x.tmd.count.value);
|
|
|
|
+ if (index_tmd_count!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.tmd.count.rank = index_tmd_count + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (x.hita.count.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_hita_count = rank_hita_count.FindIndex(i => i==x.hita.count.value);
|
|
|
|
+ if (index_hita_count!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.hita.count.rank = index_hita_count + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (x.hiteach.count.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_hiteach_count = rank_hiteach_count.FindIndex(i => i==x.hiteach.count.value);
|
|
|
|
+ if (index_hiteach_count!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.hiteach.count.rank = index_hiteach_count + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (x.ies5Tch.count.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_ies5Tch_count = rank_ies5Tch_count.FindIndex(i => i==x.ies5Tch.count.value);
|
|
|
|
+ if (index_ies5Tch_count!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.ies5Tch.count.rank = index_ies5Tch_count + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (x.otherTch.count.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_otherTch_count = rank_otherTch_count.FindIndex(i => i==x.otherTch.count.value);
|
|
|
|
+ if (index_otherTch_count!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.otherTch.count.rank = index_otherTch_count + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (x.ies5Stu.count.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_ies5Stu_count = rank_ies5Stu_count.FindIndex(i => i==x.ies5Stu.count.value);
|
|
|
|
+ if (index_ies5Stu_count!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.ies5Stu.count.rank = index_ies5Stu_count + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (x.otherStu.count.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_otherStu_count = rank_otherStu_count.FindIndex(i => i==x.otherStu.count.value);
|
|
|
|
+ if (index_otherStu_count!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.otherStu.count.rank = index_otherStu_count + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (x.lesson.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_lesson_count = rank_lesson_count.FindIndex(i => i==x.lesson.value);
|
|
|
|
+ if (index_lesson_count!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.lesson.rank = index_lesson_count + 1;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
#endregion
|
|
#endregion
|
|
|
|
+ #region
|
|
|
|
+ if (x.tmd.duration.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_tmd_duration = rank_tmd_duration.FindIndex(i => i==x.tmd.duration.value);
|
|
|
|
+ if (index_tmd_duration!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.tmd.duration.rank = index_tmd_duration + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (x.hita.duration.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_hita_duration = rank_hita_duration.FindIndex(i => i==x.hita.duration.value);
|
|
|
|
+ if (index_hita_duration!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.hita.duration.rank = index_hita_duration + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (x.hiteach.duration.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_hiteach_duration = rank_hiteach_duration.FindIndex(i => i==x.hiteach.duration.value);
|
|
|
|
+ if (index_hiteach_duration!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.hiteach.duration.rank = index_hiteach_duration + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (x.ies5Tch.duration.value>0) {
|
|
|
|
+ int index_ies5Tch_duration = rank_ies5Tch_duration.FindIndex(i => i==x.ies5Tch.duration.value);
|
|
|
|
+ if (index_ies5Tch_duration!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.ies5Tch.duration.rank = index_ies5Tch_duration + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (x.otherTch.duration.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_otherTch_duration = rank_otherTch_duration.FindIndex(i => i==x.otherTch.duration.value);
|
|
|
|
+ if (index_otherTch_duration!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.otherTch.duration.rank = index_otherTch_duration + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (x.ies5Stu.duration.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_ies5Stu_duration = rank_ies5Stu_duration.FindIndex(i => i==x.ies5Stu.duration.value);
|
|
|
|
+ if (index_ies5Stu_duration!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.ies5Stu.duration.rank = index_ies5Stu_duration + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (x.otherStu.duration.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_otherStu_duration = rank_otherStu_duration.FindIndex(i => i==x.otherStu.duration.value);
|
|
|
|
+ if (index_otherStu_duration!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.otherStu.duration.rank = index_otherStu_duration + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ #endregion
|
|
|
|
+ #region
|
|
|
|
+ if (x.tmd.stick.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_tmd_stick = rank_tmd_stick.FindIndex(i => i==x.tmd.stick.value);
|
|
|
|
+ if (index_tmd_stick!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.tmd.stick.rank = index_tmd_stick + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (x.hita.stick.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_hita_stick = rank_hita_stick.FindIndex(i => i==x.hita.stick.value);
|
|
|
|
+ if (index_hita_stick!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.hita.stick.rank = index_hita_stick + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (x.hiteach.stick.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_hiteach_stick = rank_hiteach_stick.FindIndex(i => i==x.hiteach.stick.value);
|
|
|
|
+ if (index_hiteach_stick!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.hiteach.stick.rank = index_hiteach_stick + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (x.ies5Tch.stick.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_ies5Tch_stick = rank_ies5Tch_stick.FindIndex(i => i==x.ies5Tch.stick.value);
|
|
|
|
+ if (index_ies5Tch_stick!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.ies5Tch.stick.rank = index_ies5Tch_stick + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (x.otherTch.stick.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_otherTch_stick = rank_otherTch_stick.FindIndex(i => i==x.otherTch.stick.value);
|
|
|
|
+ if (index_otherTch_stick!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.otherTch.stick.rank = index_otherTch_stick + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (x.ies5Stu.stick.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_ies5Stu_stick = rank_ies5Stu_stick.FindIndex(i => i==x.ies5Stu.stick.value);
|
|
|
|
+ if (index_ies5Stu_stick!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.ies5Stu.stick.rank = index_ies5Stu_stick + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (x.otherStu.stick.value>0)
|
|
|
|
+ {
|
|
|
|
+ int index_otherStu_stick = rank_otherStu_stick.FindIndex(i => i==x.otherStu.stick.value);
|
|
|
|
+ if (index_otherStu_stick!=-1)
|
|
|
|
+ {
|
|
|
|
+ x.otherStu.stick.rank = index_otherStu_stick + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ #endregion
|
|
});
|
|
});
|
|
- return schoolStickiness;
|
|
|
|
|
|
+ return schoolStickiness;
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -1237,9 +1694,10 @@ namespace TEAMModelOS.SDK.Models.Service
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
public List<TchStick> tchSticks { get; set; } = new List<TchStick>();
|
|
public List<TchStick> tchSticks { get; set; } = new List<TchStick>();
|
|
- public List<SutStick> stuSticks { get; set; } = new List<SutStick>();
|
|
|
|
|
|
+ public List<StuStick> stuSticks { get; set; } = new List<StuStick>();
|
|
}
|
|
}
|
|
public class TchStick {
|
|
public class TchStick {
|
|
|
|
+ public string school { get; set; }
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 名字
|
|
/// 名字
|
|
/// </summary>
|
|
/// </summary>
|
|
@@ -1277,8 +1735,10 @@ namespace TEAMModelOS.SDK.Models.Service
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
- public class SutStick
|
|
|
|
|
|
+ public class StuStick
|
|
{
|
|
{
|
|
|
|
+ public string school { get; set; }
|
|
|
|
+
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 名字
|
|
/// 名字
|
|
/// </summary>
|
|
/// </summary>
|