|
|
|
@ -75,43 +75,71 @@ import static com.ibeetl.jlw.web.IpAddressController.ipAddressMap;
|
|
|
|
|
@Transactional
|
|
|
|
|
public class StudentService extends CoreBaseService<Student> {
|
|
|
|
|
|
|
|
|
|
@Autowired private StudentDao studentDao;
|
|
|
|
|
@Autowired private SchoolClassDao schoolClassDao;
|
|
|
|
|
@Autowired private CoreUserRoleDao coreUserRoleDao;
|
|
|
|
|
@Autowired private StudentQuestionLogService studentQuestionLogService;
|
|
|
|
|
@Autowired private StudentQuestionLogInfoService studentQuestionLogInfoService;
|
|
|
|
|
@Autowired private StudentQuestionLogAnswerService studentQuestionLogAnswerService;
|
|
|
|
|
@Autowired private WrongQuestionService wrongQuestionService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private StudentDao studentDao;
|
|
|
|
|
@Autowired
|
|
|
|
|
private SchoolClassDao schoolClassDao;
|
|
|
|
|
@Autowired
|
|
|
|
|
private CoreUserRoleDao coreUserRoleDao;
|
|
|
|
|
@Autowired
|
|
|
|
|
private StudentQuestionLogService studentQuestionLogService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private StudentQuestionLogInfoService studentQuestionLogInfoService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private StudentQuestionLogAnswerService studentQuestionLogAnswerService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private WrongQuestionService wrongQuestionService;
|
|
|
|
|
|
|
|
|
|
@Autowired CorePlatformService platformService;
|
|
|
|
|
@Autowired
|
|
|
|
|
CorePlatformService platformService;
|
|
|
|
|
|
|
|
|
|
@Autowired UserConsoleService userConsoleService;
|
|
|
|
|
@Autowired
|
|
|
|
|
UserConsoleService userConsoleService;
|
|
|
|
|
|
|
|
|
|
@Autowired SchoolClassService schoolClassService;
|
|
|
|
|
@Autowired
|
|
|
|
|
SchoolClassService schoolClassService;
|
|
|
|
|
|
|
|
|
|
@Autowired private CompetitionService competitionService;
|
|
|
|
|
@Autowired private CompetitionStudentsService competitionStudentsService;
|
|
|
|
|
@Autowired private CompetitionTaskOneQuestionService competitionTaskOneQuestionService;
|
|
|
|
|
@Autowired private CompetitionTaskSecondQuestionService competitionTaskSecondQuestionService;
|
|
|
|
|
@Autowired private CompetitionTaskSecondQuestionStepService competitionTaskSecondQuestionStepService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private CompetitionService competitionService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private CompetitionStudentsService competitionStudentsService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private CompetitionTaskOneQuestionService competitionTaskOneQuestionService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private CompetitionTaskSecondQuestionService competitionTaskSecondQuestionService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private CompetitionTaskSecondQuestionStepService competitionTaskSecondQuestionStepService;
|
|
|
|
|
|
|
|
|
|
@Autowired private ExamService examService;
|
|
|
|
|
@Autowired private ExamStudentsService examStudentsService;
|
|
|
|
|
@Autowired private ExamTaskOneQuestionService examTaskOneQuestionService;
|
|
|
|
|
@Autowired private ExamTaskSecondQuestionService examTaskSecondQuestionService;
|
|
|
|
|
@Autowired private ExamTaskSecondQuestionStepService examTaskSecondQuestionStepService;
|
|
|
|
|
@Autowired private ExamTaskThreeQuestionService examTaskThreeQuestionService;
|
|
|
|
|
@Autowired private ExamTaskThreeQuestionStepService examTaskThreeQuestionStepService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ExamService examService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ExamStudentsService examStudentsService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ExamTaskOneQuestionService examTaskOneQuestionService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ExamTaskSecondQuestionService examTaskSecondQuestionService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ExamTaskSecondQuestionStepService examTaskSecondQuestionStepService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ExamTaskThreeQuestionService examTaskThreeQuestionService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ExamTaskThreeQuestionStepService examTaskThreeQuestionStepService;
|
|
|
|
|
|
|
|
|
|
@Autowired private ResourcesQuestionService resourcesQuestionService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ResourcesQuestionService resourcesQuestionService;
|
|
|
|
|
|
|
|
|
|
@Autowired private CourseInfoService courseInfoService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private CourseInfoService courseInfoService;
|
|
|
|
|
|
|
|
|
|
@Autowired private StudentDefenceLogService studentDefenceLogService;
|
|
|
|
|
@Autowired private StudentDefenceLogInfoService studentDefenceLogInfoService;
|
|
|
|
|
@Autowired private StudentDefenceLogNoteService studentDefenceLogNoteService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private StudentDefenceLogService studentDefenceLogService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private StudentDefenceLogInfoService studentDefenceLogInfoService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private StudentDefenceLogNoteService studentDefenceLogNoteService;
|
|
|
|
|
|
|
|
|
|
@Autowired private StudentAccountAssetAllocationService studentAccountAssetAllocationService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private StudentAccountAssetAllocationService studentAccountAssetAllocationService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final ExecutorService pool = Executors.newCachedThreadPool();
|
|
|
|
@ -129,10 +157,10 @@ public class StudentService extends CoreBaseService<Student>{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询学生日志
|
|
|
|
|
* 操作日志,Mock
|
|
|
|
|
*
|
|
|
|
|
* @param query
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
@ -194,6 +222,7 @@ public class StudentService extends CoreBaseService<Student>{
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 登录日志
|
|
|
|
|
*
|
|
|
|
|
* @param query
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
@ -209,13 +238,14 @@ public class StudentService extends CoreBaseService<Student>{
|
|
|
|
|
/**
|
|
|
|
|
* 查询学生日志
|
|
|
|
|
* 操作日志,真实数据
|
|
|
|
|
*
|
|
|
|
|
* <p>
|
|
|
|
|
* 返回值:
|
|
|
|
|
* lastLoginTime 最后登录时间
|
|
|
|
|
* onlineDuration 在线时长
|
|
|
|
|
* ip 登录IP
|
|
|
|
|
* ipAddress (IP转换成省市区)
|
|
|
|
|
* 等等
|
|
|
|
|
*
|
|
|
|
|
* @param query
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
@ -231,6 +261,7 @@ public class StudentService extends CoreBaseService<Student>{
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 行为日志分析
|
|
|
|
|
*
|
|
|
|
|
* @param query
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
@ -245,6 +276,7 @@ public class StudentService extends CoreBaseService<Student>{
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 统计报表-总人数统计
|
|
|
|
|
*
|
|
|
|
|
* @param query
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
@ -303,7 +335,8 @@ public class StudentService extends CoreBaseService<Student>{
|
|
|
|
|
List<Student> studentLogList = getPracticePerformanceStatisticInfo(query);
|
|
|
|
|
try {
|
|
|
|
|
groupByCourseInfoId = studentLogList.stream().collect(Collectors.groupingBy(e -> Long.parseLong(null != e.get("courseInfoId") ? e.get("courseInfoId").toString() : "-1")));
|
|
|
|
|
}catch (Exception e){}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (null != groupByCourseInfoId) {
|
|
|
|
@ -373,7 +406,8 @@ public class StudentService extends CoreBaseService<Student>{
|
|
|
|
|
List<Student> studentLogList = getPracticeProgress(query);
|
|
|
|
|
try {
|
|
|
|
|
groupByCourseInfoId = studentLogList.stream().collect(Collectors.groupingBy(e -> Long.parseLong(null != e.get("courseInfoId") ? e.get("courseInfoId").toString() : "-1")));
|
|
|
|
|
}catch (Exception e){}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (null != groupByCourseInfoId) {
|
|
|
|
@ -402,7 +436,6 @@ public class StudentService extends CoreBaseService<Student>{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public PageQuery<Student> queryByCondition2Student(PageQuery query) {
|
|
|
|
|
PageQuery ret = studentDao.queryByCondition2Student(query);
|
|
|
|
|
queryListAfter(ret.getList());
|
|
|
|
@ -876,7 +909,8 @@ public class StudentService extends CoreBaseService<Student>{
|
|
|
|
|
Map<Long, List<CompetitionTaskOneQuestion>> groupByCT1QId = null;
|
|
|
|
|
try {
|
|
|
|
|
groupByCT1QId = oldCT1QuestionList.stream().collect(Collectors.groupingBy(e -> e.getCompetitionTaskOneQuestionId()));
|
|
|
|
|
}catch (Exception e){}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
}
|
|
|
|
|
if (null == groupByCT1QId) {
|
|
|
|
|
return JsonResult.failMessage("数据有误,请联系管理员");
|
|
|
|
|
}
|
|
|
|
@ -885,7 +919,8 @@ public class StudentService extends CoreBaseService<Student>{
|
|
|
|
|
Map<String, JSONObject> cT1QuestionMap = new HashMap<>();
|
|
|
|
|
try {
|
|
|
|
|
cT1QuestionMap = (JSONObject.parseObject(condition.getCT1QuestionMapJson(), HashMap.class));
|
|
|
|
|
} catch (Exception e) {}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
}
|
|
|
|
|
List<CompetitionTaskOneQuestion> competitionTaskOneQuestionList = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
for (Map.Entry<String, JSONObject> entry : cT1QuestionMap.entrySet()) {
|
|
|
|
@ -1074,7 +1109,8 @@ public class StudentService extends CoreBaseService<Student>{
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
try {
|
|
|
|
|
studentAnswerList.add(JSONObject.parseObject(condition.getStudentAnswer(), String.class));
|
|
|
|
|
} catch (Exception e1) {}
|
|
|
|
|
} catch (Exception e1) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//将学生答案替换到题目中
|
|
|
|
@ -1146,7 +1182,8 @@ public class StudentService extends CoreBaseService<Student>{
|
|
|
|
|
Map<Long, List<ExamTaskOneQuestion>> groupByET1QId = null;
|
|
|
|
|
try {
|
|
|
|
|
groupByET1QId = oldET1QuestionList.stream().collect(Collectors.groupingBy(e -> e.getExamTaskOneQuestionId()));
|
|
|
|
|
}catch (Exception e){}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
}
|
|
|
|
|
if (null == groupByET1QId) {
|
|
|
|
|
return JsonResult.failMessage("数据有误,请联系管理员");
|
|
|
|
|
}
|
|
|
|
@ -1155,7 +1192,8 @@ public class StudentService extends CoreBaseService<Student>{
|
|
|
|
|
Map<String, JSONObject> eT1QuestionMap = new HashMap<>();
|
|
|
|
|
try {
|
|
|
|
|
eT1QuestionMap = (JSONObject.parseObject(condition.getET1QuestionMapJson(), HashMap.class));
|
|
|
|
|
} catch (Exception e) {}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
}
|
|
|
|
|
List<ExamTaskOneQuestion> examTaskOneQuestionList = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
for (Map.Entry<String, JSONObject> entry : eT1QuestionMap.entrySet()) {
|
|
|
|
@ -1276,7 +1314,8 @@ public class StudentService extends CoreBaseService<Student>{
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
try {
|
|
|
|
|
studentAnswerList.add(JSONObject.parseObject(condition.getStudentAnswer(), String.class));
|
|
|
|
|
} catch (Exception e1) {}
|
|
|
|
|
} catch (Exception e1) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//将学生答案替换到题目中
|
|
|
|
@ -1387,7 +1426,8 @@ public class StudentService extends CoreBaseService<Student>{
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
try {
|
|
|
|
|
studentAnswerList.add(JSONObject.parseObject(condition.getStudentAnswer(), String.class));
|
|
|
|
|
} catch (Exception e1) {}
|
|
|
|
|
} catch (Exception e1) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//将学生答案替换到题目中
|
|
|
|
@ -1578,4 +1618,17 @@ public class StudentService extends CoreBaseService<Student>{
|
|
|
|
|
return studentDao.getStudentInfoByClassId(classId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<Map<String, Object>> getStudentInfoByKeyword(String keyword, Long schoolId) {
|
|
|
|
|
return studentDao.getStudentInfoByKeyword(keyword, schoolId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public PageQuery<Map<String, Object>> pagedListStudentInfoByClassId(String classIds,Integer pageNo, Integer pageSize) {
|
|
|
|
|
PageQuery pageQuery = new PageQuery();
|
|
|
|
|
pageQuery.setPageSize(pageSize);
|
|
|
|
|
pageQuery.setPageNumber(pageNo);
|
|
|
|
|
Map<String,Object> map = new HashMap<>();
|
|
|
|
|
map.put("classIds",classIds);
|
|
|
|
|
pageQuery.setParas(map);
|
|
|
|
|
return studentDao.pagedListStudentInfoByClassId(pageQuery);
|
|
|
|
|
}
|
|
|
|
|
}
|