0515 更新
This commit is contained in:
parent
5b0ae0a561
commit
644e064338
@ -69,6 +69,64 @@ public class DataViewServiceImpl implements DataViewService {
|
||||
@Override
|
||||
public StudentInfoVO selectStudentInfo(Long id,Long coachId) {
|
||||
StudentInfoVO studentInfoVO = new StudentInfoVO();
|
||||
|
||||
// 学员主信息
|
||||
DlDriveSchoolStudent student = studentService.getStudentByUserId(id);
|
||||
studentInfoVO.setStudentInfo(student);
|
||||
|
||||
// 查询学员订单信息
|
||||
SchoolCourseOrder orderInfo = courseOrderMapper.getOrderInfo(id);
|
||||
studentInfoVO.setStudentOrderInfo(orderInfo);
|
||||
|
||||
// 当前学习进度
|
||||
Process process = processService.selectByUserId(id, coachId);
|
||||
studentInfoVO.setProcess(process);
|
||||
|
||||
// 学习进度列表
|
||||
String courseId = "";
|
||||
if (orderInfo != null && orderInfo.getCourseId() != null) {
|
||||
courseId = orderInfo.getCourseId();
|
||||
}
|
||||
List<Process> processList = processMapper.getProcessList(id, courseId);
|
||||
studentInfoVO.setProcessList(processList != null ? processList : new ArrayList<>());
|
||||
|
||||
// 查这个课程累计总训练时长
|
||||
if (process != null && process.getCourseId() != null) {
|
||||
studentInfoVO.setTrainTime(processService.getAllTrainTime(id, process.getCourseId()));
|
||||
} else {
|
||||
studentInfoVO.setTrainTime(0.0);
|
||||
}
|
||||
|
||||
// 查归属教练信息
|
||||
if (process != null && process.getCoachId() != null) {
|
||||
DlDriveSchoolCoachRespVO coachRespVO = coachService.getDlDriveSchoolCoachByUserId(process.getCoachId());
|
||||
if (coachRespVO != null) {
|
||||
coachRespVO.setDataMap(processService.selectByCoachId(coachRespVO.getUserId()));
|
||||
studentInfoVO.setCoachInfo(coachRespVO);
|
||||
}
|
||||
}
|
||||
|
||||
// 查该学生的培训记录
|
||||
List<Train> trainList = trainService.selectByUserIdAndCoachId(id, coachId);
|
||||
if (trainList != null) {
|
||||
trainList.forEach(item -> item.setShowMore(false));
|
||||
studentInfoVO.setTrainList(trainList);
|
||||
} else {
|
||||
studentInfoVO.setTrainList(new ArrayList<>());
|
||||
}
|
||||
|
||||
// 查该学生的考试记录
|
||||
List<ExamBatchItemVO> examList = examBatchItemService.selectByUserIdAndCoachId(id, coachId);
|
||||
if (examList != null) {
|
||||
examList.forEach(item -> item.setShowMore(false));
|
||||
studentInfoVO.setExamList(examList);
|
||||
} else {
|
||||
studentInfoVO.setExamList(new ArrayList<>());
|
||||
}
|
||||
|
||||
return studentInfoVO;
|
||||
|
||||
/*StudentInfoVO studentInfoVO = new StudentInfoVO();
|
||||
//学员主信息
|
||||
DlDriveSchoolStudent student = studentService.getStudentByUserId(id);
|
||||
studentInfoVO.setStudentInfo(student);
|
||||
@ -106,7 +164,7 @@ public class DataViewServiceImpl implements DataViewService {
|
||||
List<ExamBatchItemVO> examList = examBatchItemService.selectByUserIdAndCoachId(id, coachId);
|
||||
examList.forEach(item->item.setShowMore(false));
|
||||
studentInfoVO.setExamList(examList);
|
||||
return studentInfoVO;
|
||||
return studentInfoVO;*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -103,7 +103,6 @@
|
||||
dsco.create_time DESC
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
<select id="selectByCoachId" resultType="cn.iocoder.yudao.module.base.vo.DlDriveSchoolStudentVO">
|
||||
SELECT
|
||||
|
Loading…
Reference in New Issue
Block a user