Commit c2dc08ae authored by 法拉51246's avatar 法拉51246

1

parent e4cafd89
......@@ -198,18 +198,21 @@ public class ApiExamController {
}
}
}else{
statisticsTrueRate = "33.33";
statisticsFalseRate = "33.33";
statisticsUnRate = "33.33";
}
HashMap<Object, Object> map = new HashMap<>();
map.put("statisticsTrue", statisticsTrue);
map.put("statisticsTrueRate", statisticsTrueRate);
map.put("statisticsFalse", statisticsFalse);
map.put("statisticsFalseRate", statisticsFalseRate);
map.put("statisticsUn", statisticsUn);
map.put("statisticsUnRate", statisticsUnRate);
map.put("accuracyRate", accuracyRate);
map.put("doneNum", doneNum);
map.put("allNum", allNum);
map.put("statisticsTrue", statisticsTrue);//做对数
map.put("statisticsTrueRate", statisticsTrueRate);//做对比例
map.put("statisticsFalse", statisticsFalse);//做错数
map.put("statisticsFalseRate", statisticsFalseRate);//做错比例
map.put("statisticsUn", statisticsUn);//未做数
map.put("statisticsUnRate", statisticsUnRate);//未做比例
map.put("accuracyRate", accuracyRate);//正确率
map.put("doneNum", doneNum);//已做题目
map.put("allNum", allNum);//题目总数
return AjaxResult.success().put("data", map);
} catch (Exception e) {
e.printStackTrace();
......
......@@ -418,8 +418,13 @@ public class TbExamRegistrationServiceImpl implements ITbExamRegistrationService
}
TbExamBatch tbExamBatch = tbExamBatchList.get(0);
TbExamRegistration tbExamRegistration = tbExamRegistrationMapper.selectTbExamRegistrationByUserIdExamId(examRegistrationDTO.getMemberUserId(), tbExam.getExamId());
if (ObjectUtils.isNotEmpty(tbExamRegistration) && tbExamRegistration.getIsPay() == 1) {
// TbExamRegistration tbExamRegistration = tbExamRegistrationMapper.selectTbExamRegistrationByUserIdExamId(examRegistrationDTO.getMemberUserId(), tbExam.getExamId());
TbExamRegistration registrationParam = new TbExamRegistration();
registrationParam.setMemberUserId(examRegistrationDTO.getMemberUserId());
registrationParam.setExamId(tbExam.getExamId());
registrationParam.setExamBatchIndex(tbExamBatch.getBatchIndex().intValue());
TbExamRegistration tbExamRegistration = tbExamRegistrationMapper.selectTbExamRegistrationByBatchIndex(registrationParam);
if (ObjectUtils.isNotEmpty(tbExamRegistration)) {
return AjaxResult.error("已报名,请勿重复提交");
}else {
TbExamRegistration registration = new TbExamRegistration();
......
......@@ -316,6 +316,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
tb_exam te
LEFT JOIN tb_exam_notice ten ON ten.exam_id = te.exam_id
LEFT JOIN tb_exam_registration ter ON ter.exam_id = te.exam_id AND ter.is_pay = 1 AND ter.member_user_id = #{memberUserId}
<if test="examBatchIndex != null and examBatchIndex !=''">
and ter.exam_batch_index = #{examBatchIndex}
</if>
<if test="examNoticeId != null and examNoticeId !=''">
and ter.exam_batch_index = ten.batch_index
</if>
<choose>
<when test="examId != null and examId !=''">
INNER JOIN tb_exam_batch teb on te.exam_id = teb.exam_id and teb.batch_index = ter.exam_batch_index
......
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