Commit 62b96d49 by zhengyunfei

bugfix

parent 707aa257
......@@ -63,7 +63,7 @@ public class DbTestPaperRecordController extends BaseController {
/**
* 【PC】 完成批卷完成批卷
*/
@PostMapping("/completeReadOver")
@GetMapping("/completeReadOver")
public R<Void> completeReadOver(DbTestPaperRecordBo bo) {
return iDbTestPaperRecordService.completeReadOver(bo);
}
......
......@@ -103,4 +103,8 @@ public class MyErrorTopicListVo implements Serializable {
private Long goodsAnswerCount;
private Integer good;
private String testName;
private String studentName;
}
......@@ -74,6 +74,11 @@ public class DbTestPaperServiceImpl implements IDbTestPaperService {
}
LambdaQueryWrapper<DbTestPaper> lqw = buildQueryWrapper(bo);
Page<DbTestPaperVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
result.getRecords().forEach(vo -> {
SysDept phase = deptService.selectDeptById(vo.getPhaseId());
SysDept clas = deptService.selectDeptById(vo.getClassId());
vo.setPhaseClass(phase.getDeptName() + clas.getDeptName());
});
return TableDataInfo.build(result);
}
......@@ -95,7 +100,7 @@ public class DbTestPaperServiceImpl implements IDbTestPaperService {
lqw.eq(bo.getClassId() != null, DbTestPaper::getClassId, bo.getClassId());
lqw.eq(bo.getTotalPoints() != null, DbTestPaper::getTotalPoints, bo.getTotalPoints());
lqw.eq(bo.getStatus() != null, DbTestPaper::getStatus, bo.getStatus());
lqw.last(StringUtils.isNotEmpty(bo.getIntensity()), "and FIND_IN_SET('" + bo.getIntensity() + "',intensity)");
lqw.last(StringUtils.isNotEmpty(bo.getIntensity()), "and intensity like '%" + bo.getIntensity() + "'");
return lqw;
}
......@@ -188,14 +193,14 @@ public class DbTestPaperServiceImpl implements IDbTestPaperService {
if (CollectionUtil.isEmpty(select) || select.size() < 4) {
throw new ServiceException("符合条件的题目数量不足");
}
if (CollectionUtil.isEmpty(gapFilling) || gapFilling.size() < 5) {
if (CollectionUtil.isEmpty(gapFilling) || gapFilling.size() < 10) {
throw new ServiceException("符合条件的题目数量不足");
}
if (CollectionUtil.isEmpty(resolve) || resolve.size() < 2) {
throw new ServiceException("符合条件的题目数量不足");
}
selectList = generatePaper(select, 4, bo.getTotalPoints(), add.getId());
List<DbQuestionBankTestPaper> gapFillingList = generatePaper(gapFilling, 5, bo.getTotalPoints(), add.getId());
List<DbQuestionBankTestPaper> gapFillingList = generatePaper(gapFilling, 10, bo.getTotalPoints(), add.getId());
List<DbQuestionBankTestPaper> resolveList = generatePaper(resolve, 2, bo.getTotalPoints(), add.getId());
papers.addAll(selectList);
papers.addAll(gapFillingList);
......
......@@ -29,6 +29,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="topicScore" column="topicScore"/>
<result property="correctAnswer" column="correctAnswer"/>
<result property="correctAnswerPic" column="correctAnswerPic"/>
<result property="testName" column="test_name"/>
<result property="studentName" column="nick_name"/>
<result property="good" column="good"/>
<collection property="options" javaType="java.util.List" column="question_bank_id" select="getOptionList" ofType="com.ruoyi.school.paper.domain.vo.DbQuestionBankAnswerTestPaperVo">
<result property="optionTag" column="option_tag"/>
......@@ -51,11 +53,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
dtprd.score,
dqbatp.species,
dqbatp.score as topicScore,
dtprd.good
dtprd.good,
dtp.test_name,
su.nick_name
FROM
db_test_paper_record_detail dtprd
LEFT JOIN db_question_bank_test_paper dqbatp ON dtprd.question_bank_id = dqbatp.id
LEFT JOIN db_test_paper_record dtpr ON dtprd.record_id = dtpr.id
left join db_test_paper dtp on dtpr.test_paper_id = dtp.id
left join sys_user su on dtpr.user_id = su.user_id
WHERE
dtprd.record_id = #{bo.recordId}
AND
......
......@@ -47,6 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SU.user_id,
su.nick_name,
dtp.total_points,
dtpr.status,
concat(phase.dept_name, '', class.dept_name) as phase_class
from db_test_paper_record dtpr
left join db_test_paper dtp on dtp.id = dtpr.test_paper_id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment