update 苏格拉底新增参数

develop
hhb@hotmail.com 3 months ago
parent c6b2b1c6b2
commit 66aa7ede34

@ -751,13 +751,19 @@ public class TeacherServiceImpl implements TeacherService {
List<SugVo> sugVos = sugVoList.stream().filter(sugVo -> sugVo.getHabook().equals(teacherDto.getTmdId())).collect(Collectors.toList()); List<SugVo> sugVos = sugVoList.stream().filter(sugVo -> sugVo.getHabook().equals(teacherDto.getTmdId())).collect(Collectors.toList());
LinkedHashMap<String,Object> mapTeach = new LinkedHashMap<>(); LinkedHashMap<String,Object> mapTeach = new LinkedHashMap<>();
int[] scores = new int[5]; int[] scores = new int[10];
for (SugVo sugVo : sugVos) { for (SugVo sugVo : sugVos) {
scores[0] += sugVo.getT_data(); scores[0] += sugVo.getT_data();
scores[1] += sugVo.getT_green(); scores[1] += sugVo.getT_green();
scores[2] += sugVo.getT_duration(); scores[2] += sugVo.getT_duration();
scores[3] += sugVo.getT_attendance(); scores[3] += sugVo.getT_attendance();
scores[4] += sugVo.getT_interaction(); scores[4] += sugVo.getT_interaction();
scores[5] += sugVo.getLesson_count();
scores[6] += sugVo.getPublic_count();
scores[7] += sugVo.getDouble_green_count();
scores[8] += sugVo.getMaterial_count();
scores[9] += sugVo.getTpcplan_count();
} }
//T(数据) //T(数据)
mapTeach.put("TData",scores[0]); mapTeach.put("TData",scores[0]);
@ -769,6 +775,12 @@ public class TeacherServiceImpl implements TeacherService {
mapTeach.put("TAttendance",scores[3]); mapTeach.put("TAttendance",scores[3]);
//T(数据)互动次数 //T(数据)互动次数
mapTeach.put("TInteraction",scores[4]); mapTeach.put("TInteraction",scores[4]);
mapTeach.put("LessonCount",scores[5]);
mapTeach.put("PublicCount",scores[6]);
mapTeach.put("DoubleGreenCount",scores[7]);
mapTeach.put("MaterialCount",scores[8]);
mapTeach.put("TpcplanCount",scores[9]);
mapTeach.put("Lessons",lessonRecords.size()); mapTeach.put("Lessons",lessonRecords.size());
return mapTeach; return mapTeach;
@ -786,13 +798,18 @@ public class TeacherServiceImpl implements TeacherService {
.filter(sugVo -> teachers.contains(sugVo.getHabook())) .filter(sugVo -> teachers.contains(sugVo.getHabook()))
.collect(Collectors.toList()); .collect(Collectors.toList());
LinkedHashMap<String,Object> mapTeach = new LinkedHashMap<>(); LinkedHashMap<String,Object> mapTeach = new LinkedHashMap<>();
int[] scores = new int[5]; int[] scores = new int[10];
for (SugVo sugVo : filteredSugVoList) { for (SugVo sugVo : filteredSugVoList) {
scores[0] += sugVo.getT_data(); scores[0] += sugVo.getT_data();
scores[1] += sugVo.getT_green(); scores[1] += sugVo.getT_green();
scores[2] += sugVo.getT_duration(); scores[2] += sugVo.getT_duration();
scores[3] += sugVo.getT_attendance(); scores[3] += sugVo.getT_attendance();
scores[4] += sugVo.getT_interaction(); scores[4] += sugVo.getT_interaction();
scores[5] += sugVo.getLesson_count();
scores[6] += sugVo.getPublic_count();
scores[7] += sugVo.getDouble_green_count();
scores[8] += sugVo.getMaterial_count();
scores[9] += sugVo.getTpcplan_count();
} }
//T(数据) //T(数据)
mapTeach.put("TData",scores[0]); mapTeach.put("TData",scores[0]);
@ -804,18 +821,28 @@ public class TeacherServiceImpl implements TeacherService {
mapTeach.put("TAttendance",scores[3]); mapTeach.put("TAttendance",scores[3]);
//T(数据)互动次数 //T(数据)互动次数
mapTeach.put("TInteraction",scores[4]); mapTeach.put("TInteraction",scores[4]);
mapTeach.put("LessonCount",scores[5]);
mapTeach.put("PublicCount",scores[6]);
mapTeach.put("DoubleGreenCount",scores[7]);
mapTeach.put("MaterialCount",scores[8]);
mapTeach.put("TpcplanCount",scores[9]);
mapTeach.put("Lessons",lessonRecords.size()); mapTeach.put("Lessons",lessonRecords.size());
return mapTeach; return mapTeach;
}else { }else {
LinkedHashMap<String, Object> mapTeach = new LinkedHashMap<>(); LinkedHashMap<String, Object> mapTeach = new LinkedHashMap<>();
int[] scores = new int[5]; int[] scores = new int[10];
for (SugVo sugVo : sugVoList) { for (SugVo sugVo : sugVoList) {
scores[0] += sugVo.getT_data(); scores[0] += sugVo.getT_data();
scores[1] += sugVo.getT_green(); scores[1] += sugVo.getT_green();
scores[2] += sugVo.getT_duration(); scores[2] += sugVo.getT_duration();
scores[3] += sugVo.getT_attendance(); scores[3] += sugVo.getT_attendance();
scores[4] += sugVo.getT_interaction(); scores[4] += sugVo.getT_interaction();
scores[5] += sugVo.getLesson_count();
scores[6] += sugVo.getPublic_count();
scores[7] += sugVo.getDouble_green_count();
scores[8] += sugVo.getMaterial_count();
scores[9] += sugVo.getTpcplan_count();
} }
//T(数据) //T(数据)
mapTeach.put("TData", scores[0]); mapTeach.put("TData", scores[0]);
@ -827,6 +854,11 @@ public class TeacherServiceImpl implements TeacherService {
mapTeach.put("TAttendance", scores[3]); mapTeach.put("TAttendance", scores[3]);
//T(数据)互动次数 //T(数据)互动次数
mapTeach.put("TInteraction", scores[4]); mapTeach.put("TInteraction", scores[4]);
mapTeach.put("LessonCount",scores[5]);
mapTeach.put("PublicCount",scores[6]);
mapTeach.put("DoubleGreenCount",scores[7]);
mapTeach.put("MaterialCount",scores[8]);
mapTeach.put("TpcplanCount",scores[9]);
mapTeach.put("Lessons",lessonRecords.size()); mapTeach.put("Lessons",lessonRecords.size());
return mapTeach; return mapTeach;
@ -1005,6 +1037,11 @@ public class TeacherServiceImpl implements TeacherService {
sugVo.setDiffential(Integer.parseInt(dataMap.get("diffential").toString())); sugVo.setDiffential(Integer.parseInt(dataMap.get("diffential").toString()));
sugVo.setSmartRating(Integer.parseInt(dataMap.get("smartRating").toString())); sugVo.setSmartRating(Integer.parseInt(dataMap.get("smartRating").toString()));
sugVo.setCowork(Integer.parseInt(dataMap.get("cowork").toString())); sugVo.setCowork(Integer.parseInt(dataMap.get("cowork").toString()));
sugVo.setLesson_count(Integer.parseInt(dataMap.get("lesson_count").toString()));
sugVo.setPublic_count(Integer.parseInt(dataMap.get("public_count").toString()));
sugVo.setDouble_green_count(Integer.parseInt(dataMap.get("double_green_count").toString()));
sugVo.setMaterial_count(Integer.parseInt(dataMap.get("material_count").toString()));
sugVo.setTpcplan_count(Integer.parseInt(dataMap.get("tpcplan_count").toString()));
return sugVo; return sugVo;
} }

@ -18,4 +18,9 @@ public class SugVo {
private Integer diffential; private Integer diffential;
private Integer smartRating; private Integer smartRating;
private Integer cowork; private Integer cowork;
private Integer lesson_count;
private Integer public_count;
private Integer double_green_count;
private Integer material_count;
private Integer tpcplan_count;
} }

@ -1,7 +1,6 @@
package cn.teammodel.repository; package cn.teammodel.repository;
import cn.teammodel.model.entity.common.Exam; import cn.teammodel.model.entity.common.Exam;
import cn.teammodel.model.vo.admin.ArtElementsVo;
import com.azure.spring.data.cosmos.repository.CosmosRepository; import com.azure.spring.data.cosmos.repository.CosmosRepository;
import com.azure.spring.data.cosmos.repository.Query; import com.azure.spring.data.cosmos.repository.Query;
import org.springframework.data.repository.query.Param; import org.springframework.data.repository.query.Param;

Loading…
Cancel
Save