0406
This commit is contained in:
parent
8d6a160434
commit
7bcb10f0fd
@ -82,6 +82,6 @@ public class ProcessSmallProgramController {
|
||||
@TenantIgnore
|
||||
@PermitAll
|
||||
public CommonResult<?> getExamListByUserId(Long userId) {
|
||||
return success(processService.getExamListByUserId(userId));
|
||||
return success(processService.getExamListByUserIdTest(userId));
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package cn.iocoder.yudao.module.course.service;
|
||||
|
||||
import cn.iocoder.yudao.module.course.entity.Process;
|
||||
import cn.iocoder.yudao.module.exam.vo.ExamVO;
|
||||
import cn.iocoder.yudao.module.course.vo.ProcessAddVO;
|
||||
import cn.iocoder.yudao.module.course.vo.ProcessVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@ -125,4 +126,5 @@ public interface ProcessService extends IService<Process> {
|
||||
* @param userId 用户id
|
||||
*/
|
||||
List<ProcessVO> getExamListByUserId(Long userId);
|
||||
List<ExamVO> getExamListByUserIdTest(Long userId);
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.iocoder.yudao.module.base.constant.SchoolBaseConstants;
|
||||
import cn.iocoder.yudao.module.base.service.DlDriveSchoolStudentService;
|
||||
@ -15,16 +14,16 @@ import cn.iocoder.yudao.module.course.mapper.ProcessMapper;
|
||||
import cn.iocoder.yudao.module.course.service.ProcessService;
|
||||
import cn.iocoder.yudao.module.course.service.SchoolCommissionService;
|
||||
import cn.iocoder.yudao.module.course.service.SchoolCourseOrderService;
|
||||
import cn.iocoder.yudao.module.exam.vo.ExamVO;
|
||||
import cn.iocoder.yudao.module.course.vo.ProcessAddVO;
|
||||
import cn.iocoder.yudao.module.course.vo.ProcessVO;
|
||||
import cn.iocoder.yudao.module.exam.mapper.ExamBatchItemMapper;
|
||||
import cn.iocoder.yudao.module.exam.vo.ExamBatchItemNewVO;
|
||||
import cn.iocoder.yudao.module.jx.domain.DriveSchoolDeduct;
|
||||
import cn.iocoder.yudao.module.jx.service.IDriveSchoolDeductService;
|
||||
import cn.iocoder.yudao.module.payment.service.IFzRecordService;
|
||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@ -61,6 +60,8 @@ public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> impl
|
||||
@Lazy
|
||||
@Resource
|
||||
private DlDriveSchoolStudentService dlDriveSchoolStudentService;
|
||||
@Autowired
|
||||
private ExamBatchItemMapper examBatchItemMapper;
|
||||
|
||||
|
||||
/**
|
||||
@ -336,8 +337,7 @@ public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> impl
|
||||
|
||||
.set(process.getRemark() != null, Process::getRemark, process.getRemark())
|
||||
.set(process.getExamTime() != null, Process::getExamTime, process.getExamTime())
|
||||
.set(process.getImages() != null, Process::getImages, process.getImages())
|
||||
.setSql("exam_num = IFNULL(exam_num, 0) + 1"));
|
||||
.set(process.getImages() != null, Process::getImages, process.getImages()));
|
||||
|
||||
if(process.getSubject() == 1){
|
||||
update(Wrappers.lambdaUpdate(Process.class)
|
||||
@ -384,11 +384,35 @@ public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> impl
|
||||
Wrappers.lambdaQuery(Process.class)
|
||||
.eq(Process::getUserId, userId)
|
||||
.in(Process::getStatus, Arrays.asList("1", "2"))
|
||||
.in(Process::getSubject, Arrays.asList(1, 4))
|
||||
.isNotNull(Process::getExamScore)
|
||||
);
|
||||
return BeanUtil.copyToList(processList, ProcessVO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据userId查询考试列表
|
||||
* @param userId 用户id
|
||||
*/
|
||||
@Override
|
||||
public List<ExamVO> getExamListByUserIdTest(Long userId) {
|
||||
if (userId == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<Process> processList = processMapper.selectList(
|
||||
Wrappers.lambdaQuery(Process.class)
|
||||
.eq(Process::getUserId, userId)
|
||||
.in(Process::getStatus, Arrays.asList("1", "2"))
|
||||
.in(Process::getSubject, Arrays.asList(1, 4))
|
||||
.isNotNull(Process::getExamScore)
|
||||
);
|
||||
List<ExamVO> examBatchItemNew = examBatchItemMapper.selectExamByUserIdAndCoachId(userId, null);
|
||||
List<ExamVO> result = new ArrayList<>();
|
||||
result.addAll(BeanUtil.copyToList(processList, ExamVO.class));
|
||||
result.addAll(examBatchItemNew);
|
||||
return result;
|
||||
}
|
||||
|
||||
private static void verify(List<Process> processes) {
|
||||
for (Process process : processes) {
|
||||
// 校验状态
|
||||
|
@ -1,13 +1,23 @@
|
||||
package cn.iocoder.yudao.module.exam.controller.app;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||
import cn.iocoder.yudao.module.exam.service.ExamBatchItemService;
|
||||
import cn.iocoder.yudao.module.exam.service.ExamBatchService;
|
||||
import cn.iocoder.yudao.module.exam.vo.ExamBatchItemNewVO;
|
||||
import cn.iocoder.yudao.module.exam.vo.ExamBatchItemVO;
|
||||
import cn.iocoder.yudao.module.exam.vo.ExamVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.annotation.security.PermitAll;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* @Description: 小程序-考试批次
|
||||
@ -23,4 +33,36 @@ public class AppExamBatchController {
|
||||
|
||||
@Resource
|
||||
private ExamBatchService examBatchService;
|
||||
@Autowired
|
||||
private ExamBatchItemService examBatchItemService;
|
||||
|
||||
/**
|
||||
* 根据学生id和教练ID查询考试记录
|
||||
*
|
||||
* @param userId 学生ID
|
||||
* @param coachId 教练ID,可能为空
|
||||
* @return java.util.List<cn.iocoder.yudao.module.exam.vo.ExamBatchItemVO>
|
||||
* @author vinjor-M
|
||||
* @date 16:38 2025/2/10
|
||||
**/
|
||||
@GetMapping("/selectExamByUserIdAndCoachId")
|
||||
@TenantIgnore
|
||||
@PermitAll
|
||||
public CommonResult<List<ExamVO>> selectExamByUserIdAndCoachId(Long userId, Long coachId) {
|
||||
List<ExamVO> examList = examBatchItemService.selectExamByUserIdAndCoachId(userId, coachId);
|
||||
return CommonResult.success(examList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 录入学生考试成绩
|
||||
* @param examBatchVO
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "录入考试成绩")
|
||||
@TenantIgnore
|
||||
public CommonResult<?> updateObj( @RequestBody ExamBatchItemVO examBatchVO) {
|
||||
examBatchItemService.updateObj(examBatchVO);
|
||||
return success(true);
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,10 @@
|
||||
package cn.iocoder.yudao.module.exam.mapper;
|
||||
|
||||
import cn.iocoder.yudao.module.exam.entity.ExamBatchItem;
|
||||
import cn.iocoder.yudao.module.exam.vo.ExamBatchItemNewVO;
|
||||
import cn.iocoder.yudao.module.exam.vo.ExamBatchItemVO;
|
||||
import cn.iocoder.yudao.module.exam.vo.ExamBatchVO;
|
||||
import cn.iocoder.yudao.module.exam.vo.ExamVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@ -26,4 +28,6 @@ public interface ExamBatchItemMapper extends BaseMapper<ExamBatchItem> {
|
||||
List<ExamBatchItemVO> selectByUserIdAndCoachId(@Param("userId")Long userId,@Param("coachId")Long coachId);
|
||||
|
||||
List<ExamBatchItemVO> selectByCoachId(@Param("coachId")Long coachId,@Param("startTime")String startTime,@Param("endTime")String endTime);
|
||||
}
|
||||
|
||||
List<ExamVO> selectExamByUserIdAndCoachId(@Param("userId")Long userId, @Param("coachId")Long coachId);
|
||||
}
|
||||
|
@ -1,8 +1,10 @@
|
||||
package cn.iocoder.yudao.module.exam.service;
|
||||
|
||||
import cn.iocoder.yudao.module.exam.entity.ExamBatchItem;
|
||||
import cn.iocoder.yudao.module.exam.vo.ExamBatchItemNewVO;
|
||||
import cn.iocoder.yudao.module.exam.vo.ExamBatchItemVO;
|
||||
import cn.iocoder.yudao.module.exam.vo.ExamBatchVO;
|
||||
import cn.iocoder.yudao.module.exam.vo.ExamVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
@ -41,6 +43,7 @@ public interface ExamBatchItemService extends IService<ExamBatchItem> {
|
||||
**/
|
||||
void updateObj(ExamBatchItemVO examBatchVO);
|
||||
|
||||
|
||||
/**
|
||||
* 根据学生id和教练ID查询考试记录
|
||||
* @author vinjor-M
|
||||
@ -50,4 +53,21 @@ public interface ExamBatchItemService extends IService<ExamBatchItem> {
|
||||
* @return java.util.List<cn.iocoder.yudao.module.exam.vo.ExamBatchItemVO>
|
||||
**/
|
||||
List<ExamBatchItemVO> selectByUserIdAndCoachId(Long userId,Long coachId);
|
||||
|
||||
/**
|
||||
* 根据学生id和教练ID查询考试记录
|
||||
* @author vinjor-M
|
||||
* @date 16:38 2025/2/10
|
||||
* @param userId 学生ID
|
||||
* @param coachId 教练ID,可能为空
|
||||
* @return java.util.List<cn.iocoder.yudao.module.exam.vo.ExamBatchItemVO>
|
||||
**/
|
||||
List<ExamVO> selectExamByUserIdAndCoachId(Long userId, Long coachId);
|
||||
|
||||
/**
|
||||
* 录入学生考试成绩
|
||||
* @author vinjor-M
|
||||
* @date 13:48 2025/1/21
|
||||
**/
|
||||
void updateObjNew(ExamBatchItemVO examBatchVO);
|
||||
}
|
||||
|
@ -9,8 +9,10 @@ import cn.iocoder.yudao.module.exam.entity.ExamBatchItem;
|
||||
import cn.iocoder.yudao.module.exam.mapper.ExamBatchItemMapper;
|
||||
import cn.iocoder.yudao.module.exam.service.ExamBatchItemService;
|
||||
import cn.iocoder.yudao.module.exam.service.ExamBatchService;
|
||||
import cn.iocoder.yudao.module.exam.vo.ExamBatchItemNewVO;
|
||||
import cn.iocoder.yudao.module.exam.vo.ExamBatchItemVO;
|
||||
import cn.iocoder.yudao.module.exam.vo.ExamBatchVO;
|
||||
import cn.iocoder.yudao.module.exam.vo.ExamVO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@ -115,7 +117,6 @@ public class ExamBatchItemServiceImpl extends ServiceImpl<ExamBatchItemMapper, E
|
||||
LambdaQueryWrapper<Process> queryWrapper = new LambdaQueryWrapper<Process>()
|
||||
.eq(Process::getCourseId,process.getCourseId())
|
||||
.eq(Process::getUserId,process.getUserId())
|
||||
.eq(Process::getCoachId,process.getCoachId())
|
||||
.eq(Process::getSubject,nextSubject)
|
||||
.eq(Process::getStatus,"0");
|
||||
List<Process> list = processService.list(queryWrapper);
|
||||
@ -127,7 +128,6 @@ public class ExamBatchItemServiceImpl extends ServiceImpl<ExamBatchItemMapper, E
|
||||
nextProcess.setUserId(process.getUserId());
|
||||
nextProcess.setUserName(process.getUserName());
|
||||
nextProcess.setUserMobile(process.getUserMobile());
|
||||
nextProcess.setCoachId(process.getCoachId());
|
||||
nextProcess.setCoachName(process.getCoachName());
|
||||
nextProcess.setSubject(process.getSubject()+1);
|
||||
nextProcess.setExamNum(process.getExamNum()+1);
|
||||
@ -194,4 +194,106 @@ public class ExamBatchItemServiceImpl extends ServiceImpl<ExamBatchItemMapper, E
|
||||
public List<ExamBatchItemVO> selectByUserIdAndCoachId(Long userId, Long coachId) {
|
||||
return examBatchItemMapper.selectByUserIdAndCoachId(userId, coachId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据学生id和教练ID查询考试记录
|
||||
*
|
||||
* @param userId 学生ID
|
||||
* @param coachId 教练ID,可能为空
|
||||
* @return java.util.List<cn.iocoder.yudao.module.exam.vo.ExamBatchItemVO>
|
||||
* @author vinjor-M
|
||||
* @date 16:38 2025/2/10
|
||||
**/
|
||||
@Override
|
||||
public List<ExamVO> selectExamByUserIdAndCoachId(Long userId, Long coachId) {
|
||||
return examBatchItemMapper.selectExamByUserIdAndCoachId(userId, coachId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 录入学生考试成绩
|
||||
*
|
||||
* @param examBatchVO
|
||||
* @author vinjor-M
|
||||
* @date 13:48 2025/1/21
|
||||
*/
|
||||
@SneakyThrows
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateObjNew(ExamBatchItemVO examBatchVO) {
|
||||
//教练ID
|
||||
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
||||
ExamBatchItem updateItem = this.getById(examBatchVO.getId());
|
||||
updateItem.setFraction(examBatchVO.getFraction());
|
||||
updateItem.setImages(examBatchVO.getImages());
|
||||
updateItem.setIfPass(examBatchVO.getIfPass());
|
||||
//更新子表考试结果
|
||||
this.updateById(updateItem);
|
||||
ExamBatch examBatch = examBatchService.getById(updateItem.getBatchId());
|
||||
Process process = processService.getByStudentAndCourse(updateItem.getUserId(),examBatch.getCourseId(),examBatch.getSubject(),examBatch.getCoachId(),"9");
|
||||
if(null==process){
|
||||
throw new Exception("未找到该学生学习进度信息,请联系管理员");
|
||||
}
|
||||
//考试分数
|
||||
process.setExamScore(examBatchVO.getFraction());
|
||||
process.setImages(examBatchVO.getImages());
|
||||
process.setExamTime(examBatch.getStartTime());
|
||||
process.setRemark(examBatch.getRemark());
|
||||
//已完成
|
||||
process.setStatus("2");
|
||||
process.setExamStatus(examBatchVO.getIfPass()?"1":"0");
|
||||
processService.updateById(process);
|
||||
//更新考试批次的通过率
|
||||
this.updateBatchPassRate(examBatch.getId());
|
||||
if(examBatchVO.getIfPass()){
|
||||
//考试通过
|
||||
if(process.getSubject()<3){
|
||||
//科目一、二插入一条,需要查出下一个的学习进度(如果不存在,手动插入一个)
|
||||
Integer nextSubject = process.getSubject()+1;
|
||||
LambdaQueryWrapper<Process> queryWrapper = new LambdaQueryWrapper<Process>()
|
||||
.eq(Process::getCourseId,process.getCourseId())
|
||||
.eq(Process::getUserId,process.getUserId())
|
||||
.eq(Process::getCoachId,process.getCoachId())
|
||||
.eq(Process::getSubject,nextSubject)
|
||||
.eq(Process::getStatus,"0");
|
||||
List<Process> list = processService.list(queryWrapper);
|
||||
if(list.isEmpty()){
|
||||
//插入
|
||||
Process nextProcess = new Process();
|
||||
nextProcess.setCourseId(process.getCourseId());
|
||||
nextProcess.setCourseName(process.getCourseName());
|
||||
nextProcess.setUserId(process.getUserId());
|
||||
nextProcess.setUserName(process.getUserName());
|
||||
nextProcess.setUserMobile(process.getUserMobile());
|
||||
nextProcess.setCoachId(process.getCoachId());
|
||||
nextProcess.setCoachName(process.getCoachName());
|
||||
nextProcess.setSubject(process.getSubject()+1);
|
||||
nextProcess.setExamNum(process.getExamNum()+1);
|
||||
nextProcess.setStatus("1");
|
||||
nextProcess.setTrainTime((double) 0);
|
||||
processService.save(nextProcess);
|
||||
}else{
|
||||
//更新状态为进行中
|
||||
Process nextProcess = list.get(0);
|
||||
nextProcess.setStatus("1");
|
||||
processService.updateById(nextProcess);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
//考试不通过,重新插入一条本科目的学习记录-并改为进行中
|
||||
Process thisProcess = new Process();
|
||||
thisProcess.setCourseId(process.getCourseId());
|
||||
thisProcess.setCourseName(process.getCourseName());
|
||||
thisProcess.setUserId(process.getUserId());
|
||||
thisProcess.setUserName(process.getUserName());
|
||||
thisProcess.setUserMobile(process.getUserMobile());
|
||||
thisProcess.setCoachId(process.getCoachId());
|
||||
thisProcess.setCoachName(process.getCoachName());
|
||||
thisProcess.setSubject(process.getSubject());
|
||||
thisProcess.setExamNum(process.getExamNum()+1);
|
||||
thisProcess.setStatus("1");
|
||||
thisProcess.setTrainTime(process.getTrainTime());
|
||||
processService.save(thisProcess);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,69 @@
|
||||
package cn.iocoder.yudao.module.exam.vo;
|
||||
|
||||
import cn.iocoder.yudao.module.exam.entity.ExamBatchItem;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class ExamBatchItemNewVO extends ExamBatchItem {
|
||||
|
||||
|
||||
/**
|
||||
* 考试课程名称
|
||||
*/
|
||||
private String courseName;
|
||||
/**
|
||||
* 考试课程id
|
||||
*/
|
||||
private String courseId;
|
||||
/**
|
||||
* 考试科目
|
||||
*/
|
||||
private Integer subject;
|
||||
/**
|
||||
* 学生电话
|
||||
*/
|
||||
private String userMobile;
|
||||
/**
|
||||
* 考试批次编号
|
||||
*/
|
||||
private String batchName;
|
||||
/**
|
||||
* 本科目累计训练时长
|
||||
*/
|
||||
private Double trainTime;
|
||||
|
||||
/**
|
||||
* 考试开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
/**
|
||||
* 考试结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
/**
|
||||
* 考试地址
|
||||
*/
|
||||
private String addr;
|
||||
/**
|
||||
* 考试交通方式
|
||||
*/
|
||||
private String transWay;
|
||||
/**
|
||||
* 是否展示更多
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Boolean showMore;
|
||||
|
||||
/**
|
||||
* 考试类型
|
||||
*/
|
||||
private String courseType;
|
||||
|
||||
/**
|
||||
* 教练Id
|
||||
*/
|
||||
private Long coachId;
|
||||
}
|
@ -54,4 +54,6 @@ public class ExamBatchItemVO extends ExamBatchItem {
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Boolean showMore;
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,89 @@
|
||||
package cn.iocoder.yudao.module.exam.vo;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.util.Date;
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ExamVO extends ExamBatchItemNewVO {
|
||||
|
||||
private String id;
|
||||
/**
|
||||
* 课程ID
|
||||
*/
|
||||
private String courseId;
|
||||
/**
|
||||
* 课程名称
|
||||
*/
|
||||
private String courseName;
|
||||
/**
|
||||
* 用户(学员)ID
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 用户(学员)姓名
|
||||
*/
|
||||
private String userName;
|
||||
/**
|
||||
* 学员手机号
|
||||
*/
|
||||
private String userMobile;
|
||||
/**
|
||||
* 教练ID
|
||||
*/
|
||||
private Long coachId;
|
||||
/**
|
||||
* 教练姓名
|
||||
*/
|
||||
private String coachName;
|
||||
/**
|
||||
* 科目(1-科目一;2-科目二;3科目三;4科目四)
|
||||
*/
|
||||
private Integer subject;
|
||||
/**
|
||||
* 考试次数(第一次考试为1,第二次为2...)
|
||||
*/
|
||||
private Integer examNum;
|
||||
/**
|
||||
* 当前状态(0-未开始;1-训练中;2-已完成)
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 考试状态(0未通过;1已通过;9已送考;null未送考)
|
||||
*/
|
||||
private String examStatus;
|
||||
/**
|
||||
* 考试分数
|
||||
*/
|
||||
private Double examScore;
|
||||
/**
|
||||
* 图片证明材料
|
||||
*/
|
||||
private String images;
|
||||
/**
|
||||
* 考试时间
|
||||
*/
|
||||
private Date examTime;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 本科目累计训练时长
|
||||
*/
|
||||
private Double trainTime;
|
||||
/**
|
||||
* 财务审核是否通过(0未通过;1通过;null待审核)
|
||||
*/
|
||||
private Boolean financePass;
|
||||
/**
|
||||
* 财务审核备注
|
||||
*/
|
||||
private String financeRemark;
|
||||
/**
|
||||
* 课程类型(字典:course_type)
|
||||
*/
|
||||
private String courseType;
|
||||
}
|
@ -72,4 +72,64 @@
|
||||
AND dseb.start_time <= #{endTime}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectExamByUserIdAndCoachId" resultType="cn.iocoder.yudao.module.exam.vo.ExamVO">
|
||||
SELECT
|
||||
dsp.*,
|
||||
|
||||
dseb.batch_name,
|
||||
dseb.start_time,
|
||||
dseb.end_time,
|
||||
dseb.addr,
|
||||
dseb.trans_way,
|
||||
|
||||
dsebi.fraction,
|
||||
dsebi.if_pass,
|
||||
dsebi.if_evaluate,
|
||||
dsebi.evaluate_id
|
||||
|
||||
FROM
|
||||
drive_school_process dsp
|
||||
LEFT JOIN
|
||||
drive_school_exam_batch dseb ON dsp.course_id = dseb.course_id AND dsp.subject = dseb.subject
|
||||
LEFT JOIN
|
||||
drive_school_exam_batch_item dsebi ON dseb.id = dsebi.batch_id AND dsp.user_id = dsebi.user_id
|
||||
WHERE
|
||||
dsebi.user_id = #{userId}
|
||||
AND dsp.deleted = 0
|
||||
AND (dseb.deleted = 0 OR dseb.deleted IS NULL)
|
||||
AND (dsebi.deleted = 0 OR dsebi.deleted IS NULL)
|
||||
<if test="coachId != null and coachId != ''">
|
||||
AND dseb.coach_id=#{coachId}
|
||||
</if>
|
||||
ORDER BY
|
||||
dseb.start_time DESC;
|
||||
|
||||
|
||||
<!--SELECT
|
||||
dsebi.*,
|
||||
dseb.batch_name,
|
||||
dseb.course_id,
|
||||
dseb.start_time,
|
||||
dseb.end_time,
|
||||
dseb.`subject`,
|
||||
dseb.addr,
|
||||
dseb.trans_way,
|
||||
dseb.coach_id,
|
||||
dsc.name AS courseName,
|
||||
dsc.type AS courseType,
|
||||
dsc.exam_time
|
||||
dsc.remark,
|
||||
dsc.
|
||||
FROM
|
||||
drive_school_exam_batch_item dsebi
|
||||
LEFT JOIN drive_school_exam_batch dseb ON dsebi.batch_id = dseb.id
|
||||
LEFT JOIN drive_school_course dsc ON dseb.course_id = dsc.id
|
||||
WHERE
|
||||
dsebi.user_id = #{userId}
|
||||
<if test="coachId != null and coachId != ''">
|
||||
AND dseb.coach_id=#{coachId}
|
||||
</if>
|
||||
ORDER BY dseb.create_time DESC-->
|
||||
</select>
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue
Block a user