Procházet zdrojové kódy

考试结束可以看单科的报告不影响后面的考试

tags/正式版本
雍文秀 před 2 roky
rodič
revize
9ca05fd5ef

+ 2
- 1
sexam/src/main/java/com/xhkjedu/sexam/controller/exam/EBaseController.java Zobrazit soubor

@@ -309,7 +309,8 @@ public class EBaseController {
309 309
         //非进行中的考试结束不处理数据,直接返回结束成功
310 310
         Integer exammode = vo.getExammode();
311 311
         if (2 == exammode && 1 != vo.getAnswered()) return new ResultVo(1, "试卷未设答案");
312
-        if (1 == exammode && 2 != vo.getAnswered()) return new ResultVo(1, "考试未结束");
312
+        //没有一科结束的考试不能结束
313
+        if (1 == exammode && 0 == vo.getAnswered()) return new ResultVo(1, "考试未结束");
313 314
         if (1 != vo.getExamstate()) return new ResultVo(0, "结束成功");
314 315
         try {
315 316
             eBaseService.updateExamStateEnd(eBase);

+ 1
- 1
sexam/src/main/resources/mapper/exam/EBaseMapper.xml Zobrazit soubor

@@ -114,7 +114,7 @@
114 114
     <select id="getExamStateAnseredById" resultType="com.xhkjedu.sexam.vo.exam.EBaseVo">
115 115
         select eb.examstate,eb.exammode
116 116
         ,(case when eb.exammode=2 then (select min(ep.answered) from e_paper ep where eb.examid = ep.examid)
117
-        else (select min(es.pstate) from e_subject es where es.examid=eb.examid) end)answered
117
+        else (select count(*) from e_subject es where es.examid=eb.examid and es.pstate=2) end)answered
118 118
         from e_base eb where eb.examid=#{examid}
119 119
     </select>
120 120
     <!--考试未批阅试题数量-->

+ 1
- 1
sexam/src/main/resources/mapper/paperstudent/EPaperStudentMapper.xml Zobrazit soubor

@@ -37,7 +37,7 @@
37 37
         select es.esid,es.subjectid,es.subjectname,es.sdate,es.begintime,es.endtime,eps.epsid
38 38
              ,(select ep.ptype from e_paper ep where ep.esid=es.esid)ptype
39 39
         from e_subject es left join e_paper_student eps on es.esid=eps.esid
40
-        where eps.studentid=#{studentid} and es.examid=#{examid} order by es.begintime
40
+        where eps.studentid=#{studentid} and es.examid=#{examid} and es.pstate=2 order by es.begintime
41 41
     </select>
42 42
 
43 43
     <!--获取考试科目时间信息-->

Načítá se…
Zrušit
Uložit