Merge branch 'driver' of http://192.168.1.26:3000/dianliang/lanan-system into driver
This commit is contained in:
commit
efdafde527
@ -33,7 +33,7 @@ public class ObtainDriveContractController {
|
||||
/**
|
||||
* 新增驾校合同
|
||||
*/
|
||||
@PostMapping
|
||||
@PostMapping("/add")
|
||||
@TenantIgnore
|
||||
public CommonResult add(@RequestBody DriveSchoolContract driveSchoolContract)
|
||||
{
|
||||
|
@ -449,6 +449,7 @@ public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> impl
|
||||
.orderByDesc(Process::getExamTime)
|
||||
);
|
||||
List<ExamVO> examBatchItemNew = examBatchItemMapper.selectExamByUserIdAndCoachId(userId, null);
|
||||
|
||||
List<ExamVO> result = new ArrayList<>();
|
||||
result.addAll(BeanUtil.copyToList(processList, ExamVO.class));
|
||||
result.addAll(examBatchItemNew);
|
||||
|
@ -252,7 +252,7 @@ public class ExamBatchItemServiceImpl extends ServiceImpl<ExamBatchItemMapper, E
|
||||
process.setRemark(examBatchVO.getRemark());
|
||||
//已完成
|
||||
|
||||
process.setExamStatus(examBatchVO.getIfPass() ? "1" : "0");
|
||||
process.setExamStatus(examBatchVO.getIfPass() ? "1" : "null");
|
||||
processService.updateById(process);
|
||||
//更新考试批次的通过率
|
||||
this.updateBatchPassRate(examBatch.getId());
|
||||
@ -263,8 +263,7 @@ public class ExamBatchItemServiceImpl extends ServiceImpl<ExamBatchItemMapper, E
|
||||
schoolNotifyMessageSendService.sendMessage(examBatchVO.getCoachId(), message, SchoolBaseConstants.SCHOOL_NOTIFY_MESSAGE_TYPE_ADMIN, examBatchVO.getTenantId());
|
||||
|
||||
//考试通过
|
||||
if (process.getSubject() < 3) {
|
||||
//科目一、二插入一条,需要查出下一个的学习进度(如果不存在,手动插入一个)
|
||||
if (process.getSubject() == 3 || process.getSubject() == 2) {
|
||||
Integer nextSubject = process.getSubject() + 1;
|
||||
LambdaQueryWrapper<Process> queryWrapper = new LambdaQueryWrapper<Process>()
|
||||
.eq(Process::getCourseId, process.getCourseId())
|
||||
@ -272,23 +271,7 @@ public class ExamBatchItemServiceImpl extends ServiceImpl<ExamBatchItemMapper, E
|
||||
.eq(Process::getSubject, nextSubject)
|
||||
.eq(Process::getTenantId,process.getTenantId());
|
||||
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 {
|
||||
//更新状态为进行中
|
||||
if (!list.isEmpty()) {
|
||||
Process nextProcess = list.get(0);
|
||||
if(!"2".equals(nextProcess.getStatus())){
|
||||
nextProcess.setStatus("1");
|
||||
|
@ -74,7 +74,36 @@
|
||||
</select>
|
||||
|
||||
<select id="selectExamByUserIdAndCoachId" resultType="cn.iocoder.yudao.module.exam.vo.ExamVO">
|
||||
|
||||
SELECT
|
||||
dseb.*,
|
||||
/*dseb.batch_name,
|
||||
dseb.start_time,
|
||||
dseb.end_time,
|
||||
dseb.addr,
|
||||
dseb.trans_way,*/
|
||||
dseb.start_time AS examStartTime,
|
||||
|
||||
dsc.type AS courseType,
|
||||
|
||||
dsebi.batch_id,
|
||||
dsebi.user_name,
|
||||
dsebi.fraction,
|
||||
dsebi.fraction AS examScore,
|
||||
dsebi.if_pass,
|
||||
dsebi.if_pass AS examStatus,
|
||||
dsebi.if_evaluate,
|
||||
dsebi.evaluate_id,
|
||||
dsebi.id AS batchItemId
|
||||
FROM drive_school_exam_batch dseb
|
||||
LEFT JOIN drive_school_exam_batch_item dsebi ON dseb.id = dsebi.batch_id
|
||||
LEFT JOIN drive_school_course dsc ON dseb.course_id = dsc.id
|
||||
WHERE
|
||||
dsebi.user_id = #{userId}
|
||||
AND (dseb.deleted = 0 OR dseb.deleted IS NULL)
|
||||
AND (dsebi.deleted = 0 OR dsebi.deleted IS NULL)
|
||||
order by dseb.start_time DESC;
|
||||
<!--SELECT
|
||||
dsp.*,
|
||||
|
||||
dseb.batch_name,
|
||||
@ -105,34 +134,7 @@
|
||||
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-->
|
||||
dseb.start_time DESC;-->
|
||||
</select>
|
||||
<select id="listJoinBatchByIds" resultType="cn.iocoder.yudao.module.exam.vo.ExamBatchItemVO">
|
||||
SELECT
|
||||
|
@ -50,6 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updater != null">updater,</if>
|
||||
<if test="userName != null">user_name,</if>
|
||||
<if test="userUrl != null">user_url,</if>
|
||||
<if test="tenantId != null">tenant_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
@ -61,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updater != null">#{updater},</if>
|
||||
<if test="userName != null">#{userName},</if>
|
||||
<if test="userUrl != null">#{userUrl},</if>
|
||||
<if test="tenantId != null">#{tenantId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user