Merge branch 'master' into insp
This commit is contained in:
commit
4b60ceaac2
@ -69,6 +69,64 @@ public class DataViewServiceImpl implements DataViewService {
|
|||||||
@Override
|
@Override
|
||||||
public StudentInfoVO selectStudentInfo(Long id,Long coachId) {
|
public StudentInfoVO selectStudentInfo(Long id,Long coachId) {
|
||||||
StudentInfoVO studentInfoVO = new StudentInfoVO();
|
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);
|
DlDriveSchoolStudent student = studentService.getStudentByUserId(id);
|
||||||
studentInfoVO.setStudentInfo(student);
|
studentInfoVO.setStudentInfo(student);
|
||||||
@ -106,7 +164,7 @@ public class DataViewServiceImpl implements DataViewService {
|
|||||||
List<ExamBatchItemVO> examList = examBatchItemService.selectByUserIdAndCoachId(id, coachId);
|
List<ExamBatchItemVO> examList = examBatchItemService.selectByUserIdAndCoachId(id, coachId);
|
||||||
examList.forEach(item->item.setShowMore(false));
|
examList.forEach(item->item.setShowMore(false));
|
||||||
studentInfoVO.setExamList(examList);
|
studentInfoVO.setExamList(examList);
|
||||||
return studentInfoVO;
|
return studentInfoVO;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -287,7 +287,7 @@ public class DlDriveSchoolCoachServiceImpl extends ServiceImpl<DlDriveSchoolCoac
|
|||||||
DlDriveSchoolCoach coach = getById(id);
|
DlDriveSchoolCoach coach = getById(id);
|
||||||
result.setCoachInfo(coach);
|
result.setCoachInfo(coach);
|
||||||
/*2.车辆信息*/
|
/*2.车辆信息*/
|
||||||
DriveSchoolCar schoolCar = new DriveSchoolCar();
|
/*DriveSchoolCar schoolCar = new DriveSchoolCar();
|
||||||
if (ObjectUtil.isNotEmpty(schoolCar)) {
|
if (ObjectUtil.isNotEmpty(schoolCar)) {
|
||||||
if (null != coach.getUserId()) {
|
if (null != coach.getUserId()) {
|
||||||
schoolCar = schoolCarService.selectByCoachId(coach.getUserId());
|
schoolCar = schoolCarService.selectByCoachId(coach.getUserId());
|
||||||
@ -296,6 +296,14 @@ public class DlDriveSchoolCoachServiceImpl extends ServiceImpl<DlDriveSchoolCoac
|
|||||||
schoolCar.setCarOld(carOld);
|
schoolCar.setCarOld(carOld);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}*/
|
||||||
|
DriveSchoolCar schoolCar = null;
|
||||||
|
if (coach.getUserId() != null) {
|
||||||
|
schoolCar = schoolCarService.selectByCoachId(coach.getUserId());
|
||||||
|
if (schoolCar != null && schoolCar.getCarRegisterDate() != null) {
|
||||||
|
Long carOld = DateUtil.betweenYear(schoolCar.getCarRegisterDate(), new Date(), true);
|
||||||
|
schoolCar.setCarOld(carOld);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
result.setCar(schoolCar);
|
result.setCar(schoolCar);
|
||||||
/*3.统计教练的学生基本信息*/
|
/*3.统计教练的学生基本信息*/
|
||||||
|
@ -416,7 +416,7 @@ public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> impl
|
|||||||
// .set(process.getUserName() != null, Process::getUserName, process.getUserName())
|
// .set(process.getUserName() != null, Process::getUserName, process.getUserName())
|
||||||
.set(process.getExamStatus() != null, Process::getExamStatus, process.getExamStatus())
|
.set(process.getExamStatus() != null, Process::getExamStatus, process.getExamStatus())
|
||||||
.set(process.getExamScore() != null, Process::getExamScore, process.getExamScore())
|
.set(process.getExamScore() != null, Process::getExamScore, process.getExamScore())
|
||||||
|
.set(Process::getExamNum, process.getExamNum() + 1)
|
||||||
.set(process.getRemark() != null, Process::getRemark, process.getRemark())
|
.set(process.getRemark() != null, Process::getRemark, process.getRemark())
|
||||||
.set(process.getExamTime() != null, Process::getExamTime, process.getExamTime())
|
.set(process.getExamTime() != null, Process::getExamTime, process.getExamTime())
|
||||||
.set(process.getImages() != null, Process::getImages, process.getImages()));
|
.set(process.getImages() != null, Process::getImages, process.getImages()));
|
||||||
@ -564,7 +564,8 @@ public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> impl
|
|||||||
public void autoAssignCoach(ProcessNewVO request){
|
public void autoAssignCoach(ProcessNewVO request){
|
||||||
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
||||||
AdminUserRespDTO user = userApi.getUser(userId);
|
AdminUserRespDTO user = userApi.getUser(userId);
|
||||||
String userName = user.getNickname();
|
// String userName = user.getNickname();
|
||||||
|
String userName= request.getUserName();
|
||||||
String mobile = user.getMobile();
|
String mobile = user.getMobile();
|
||||||
|
|
||||||
DlDriveSchoolCourseVO dlDriveSchoolCourseVO = courseService.queryDetailById(request.getCourseId());
|
DlDriveSchoolCourseVO dlDriveSchoolCourseVO = courseService.queryDetailById(request.getCourseId());
|
||||||
|
@ -28,6 +28,11 @@ public class ProcessNewVO {
|
|||||||
*/
|
*/
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学员名称
|
||||||
|
*/
|
||||||
|
private String userName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 教练ID
|
* 教练ID
|
||||||
*/
|
*/
|
||||||
|
@ -306,7 +306,7 @@ public class ExamBatchItemServiceImpl extends ServiceImpl<ExamBatchItemMapper, E
|
|||||||
process.setExamTime(examBatch.getStartTime());
|
process.setExamTime(examBatch.getStartTime());
|
||||||
process.setRemark(examBatchVO.getRemark());
|
process.setRemark(examBatchVO.getRemark());
|
||||||
//已完成
|
//已完成
|
||||||
|
process.setExamNum(process.getExamNum() + 1);
|
||||||
process.setExamStatus(examBatchVO.getIfPass() ? "1" : "0");
|
process.setExamStatus(examBatchVO.getIfPass() ? "1" : "0");
|
||||||
|
|
||||||
processService.updateById(process);
|
processService.updateById(process);
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
LEFT JOIN drive_school_coach_course dscc ON main.id = dscc.coach_id AND dscc.deleted = 0
|
LEFT JOIN drive_school_coach_course dscc ON main.id = dscc.coach_id AND dscc.deleted = 0
|
||||||
LEFT JOIN drive_school_car dsc ON main.user_id = dsc.user_id AND dsc.deleted = 0
|
LEFT JOIN drive_school_car dsc ON main.user_id = dsc.user_id AND dsc.deleted = 0
|
||||||
<where>
|
<where>
|
||||||
main.deleted = 0 AND dscc.is_sign = 1 AND dscc.deleted = 0 AND dscc.if_end = 0
|
main.deleted = 0
|
||||||
<if test="entity.type != null and entity.type != ''">
|
<if test="entity.type != null and entity.type != ''">
|
||||||
AND main.type = #{entity.type}
|
AND main.type = #{entity.type}
|
||||||
</if>
|
</if>
|
||||||
|
@ -103,7 +103,6 @@
|
|||||||
dsco.create_time DESC
|
dsco.create_time DESC
|
||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<select id="selectByCoachId" resultType="cn.iocoder.yudao.module.base.vo.DlDriveSchoolStudentVO">
|
<select id="selectByCoachId" resultType="cn.iocoder.yudao.module.base.vo.DlDriveSchoolStudentVO">
|
||||||
SELECT
|
SELECT
|
||||||
|
Loading…
Reference in New Issue
Block a user