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
|
@TenantIgnore
|
||||||
public CommonResult add(@RequestBody DriveSchoolContract driveSchoolContract)
|
public CommonResult add(@RequestBody DriveSchoolContract driveSchoolContract)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -449,6 +449,7 @@ public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> impl
|
|||||||
.orderByDesc(Process::getExamTime)
|
.orderByDesc(Process::getExamTime)
|
||||||
);
|
);
|
||||||
List<ExamVO> examBatchItemNew = examBatchItemMapper.selectExamByUserIdAndCoachId(userId, null);
|
List<ExamVO> examBatchItemNew = examBatchItemMapper.selectExamByUserIdAndCoachId(userId, null);
|
||||||
|
|
||||||
List<ExamVO> result = new ArrayList<>();
|
List<ExamVO> result = new ArrayList<>();
|
||||||
result.addAll(BeanUtil.copyToList(processList, ExamVO.class));
|
result.addAll(BeanUtil.copyToList(processList, ExamVO.class));
|
||||||
result.addAll(examBatchItemNew);
|
result.addAll(examBatchItemNew);
|
||||||
|
|||||||
@ -252,7 +252,7 @@ public class ExamBatchItemServiceImpl extends ServiceImpl<ExamBatchItemMapper, E
|
|||||||
process.setRemark(examBatchVO.getRemark());
|
process.setRemark(examBatchVO.getRemark());
|
||||||
//已完成
|
//已完成
|
||||||
|
|
||||||
process.setExamStatus(examBatchVO.getIfPass() ? "1" : "0");
|
process.setExamStatus(examBatchVO.getIfPass() ? "1" : "null");
|
||||||
processService.updateById(process);
|
processService.updateById(process);
|
||||||
//更新考试批次的通过率
|
//更新考试批次的通过率
|
||||||
this.updateBatchPassRate(examBatch.getId());
|
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());
|
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;
|
Integer nextSubject = process.getSubject() + 1;
|
||||||
LambdaQueryWrapper<Process> queryWrapper = new LambdaQueryWrapper<Process>()
|
LambdaQueryWrapper<Process> queryWrapper = new LambdaQueryWrapper<Process>()
|
||||||
.eq(Process::getCourseId, process.getCourseId())
|
.eq(Process::getCourseId, process.getCourseId())
|
||||||
@ -272,23 +271,7 @@ public class ExamBatchItemServiceImpl extends ServiceImpl<ExamBatchItemMapper, E
|
|||||||
.eq(Process::getSubject, nextSubject)
|
.eq(Process::getSubject, nextSubject)
|
||||||
.eq(Process::getTenantId,process.getTenantId());
|
.eq(Process::getTenantId,process.getTenantId());
|
||||||
List<Process> list = processService.list(queryWrapper);
|
List<Process> list = processService.list(queryWrapper);
|
||||||
if (list.isEmpty()) {
|
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);
|
Process nextProcess = list.get(0);
|
||||||
if(!"2".equals(nextProcess.getStatus())){
|
if(!"2".equals(nextProcess.getStatus())){
|
||||||
nextProcess.setStatus("1");
|
nextProcess.setStatus("1");
|
||||||
|
|||||||
@ -74,7 +74,36 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectExamByUserIdAndCoachId" resultType="cn.iocoder.yudao.module.exam.vo.ExamVO">
|
<select id="selectExamByUserIdAndCoachId" resultType="cn.iocoder.yudao.module.exam.vo.ExamVO">
|
||||||
|
|
||||||
SELECT
|
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.*,
|
dsp.*,
|
||||||
|
|
||||||
dseb.batch_name,
|
dseb.batch_name,
|
||||||
@ -105,34 +134,7 @@
|
|||||||
AND dseb.coach_id=#{coachId}
|
AND dseb.coach_id=#{coachId}
|
||||||
</if>
|
</if>
|
||||||
ORDER BY
|
ORDER BY
|
||||||
dseb.start_time DESC;
|
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>
|
</select>
|
||||||
<select id="listJoinBatchByIds" resultType="cn.iocoder.yudao.module.exam.vo.ExamBatchItemVO">
|
<select id="listJoinBatchByIds" resultType="cn.iocoder.yudao.module.exam.vo.ExamBatchItemVO">
|
||||||
SELECT
|
SELECT
|
||||||
|
|||||||
@ -50,6 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="updater != null">updater,</if>
|
<if test="updater != null">updater,</if>
|
||||||
<if test="userName != null">user_name,</if>
|
<if test="userName != null">user_name,</if>
|
||||||
<if test="userUrl != null">user_url,</if>
|
<if test="userUrl != null">user_url,</if>
|
||||||
|
<if test="tenantId != null">tenant_id,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="deptId != null">#{deptId},</if>
|
<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="updater != null">#{updater},</if>
|
||||||
<if test="userName != null">#{userName},</if>
|
<if test="userName != null">#{userName},</if>
|
||||||
<if test="userUrl != null">#{userUrl},</if>
|
<if test="userUrl != null">#{userUrl},</if>
|
||||||
|
<if test="tenantId != null">#{tenantId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user