Browse Source

Merge remote-tracking branch 'origin/wn' into ywx

ywx
雍文秀 5 days ago
parent
commit
99d3b6c7ff

+ 14
- 0
smarking/src/main/java/com/xhkjedu/smarking/controller/exam/MsExamController.java View File

@@ -232,4 +232,18 @@ public class MsExamController {
232 232
         N_Utils.validation(new Object[]{examid, "考试id", 1});
233 233
         return new ResultVo(0, "查询成功", msExamService.listSubject(examid));
234 234
     }
235
+
236
+    /*
237
+     * @Description 考试状态
238
+     * @Date 2025/1/7 17:19:25
239
+     * @Author WN
240
+     * @Param [msExam]
241
+     * @Return com.xhkjedu.vo.ResultVo
242
+     **/
243
+    @PostMapping("/get_state")
244
+    public ResultVo getExamstate(@RequestBody MsExam msExam) {
245
+        Integer examid = msExam.getExamid();
246
+        N_Utils.validation(new Object[]{examid, "考试id", 1});
247
+        return new ResultVo(0, "查询成功", msExamService.getExamstate(examid));
248
+    }
235 249
 }

+ 11
- 0
smarking/src/main/java/com/xhkjedu/smarking/service/exam/MsExamService.java View File

@@ -424,4 +424,15 @@ public class MsExamService {
424 424
         map.put("subjects", msSubjectMapper.listByExamId(examid));
425 425
         return map;
426 426
     }
427
+
428
+    /*
429
+     * @Description 获取考试状态
430
+     * @Date 2025/1/7 17:18:40
431
+     * @Author WN
432
+     * @Param [examid]
433
+     * @Return java.lang.Integer
434
+     **/
435
+    public Integer getExamstate(Integer examid){
436
+        return msExamMapper.getExamstate(examid);
437
+    }
427 438
 }

+ 3
- 5
smarking/src/main/java/com/xhkjedu/smarking/service/paper/MsPaperBlockService.java View File

@@ -5,7 +5,6 @@ import com.xhkjedu.smarking.mapper.paper.MsPaperBlockMapper;
5 5
 import com.xhkjedu.smarking.mapper.paper.MsPaperBlockQuestionMapper;
6 6
 import com.xhkjedu.smarking.mapper.paper.MsPaperMapper;
7 7
 import com.xhkjedu.smarking.mapper.paper.MsPaperQtypeQuestionMapper;
8
-import com.xhkjedu.smarking.mapper.stupaper.MsPaperStudentBlockMapper;
9 8
 import com.xhkjedu.smarking.mapper.stupaper.MsPaperStudentMapper;
10 9
 import com.xhkjedu.smarking.model.paper.MsPaperBlock;
11 10
 import com.xhkjedu.smarking.model.paper.MsPaperBlockQuestion;
@@ -35,11 +34,9 @@ public class MsPaperBlockService {
35 34
     @Resource
36 35
     private MsSubjectMapper msSubjectMapper;
37 36
     @Resource
38
-    private MsPaperQtypeQuestionMapper msPaperQtypeQuestionMapper;
39
-    @Resource
40
-    private MsPaperStudentBlockMapper msPaperStudentBlockMapper;
41
-    @Resource
42 37
     private MsPaperStudentMapper msPaperStudentMapper;
38
+    @Resource
39
+    private MsPaperQtypeQuestionMapper msPaperQtypeQuestionMapper;
43 40
 
44 41
     /*
45 42
      * @Description 获取试卷所有题块
@@ -91,6 +88,7 @@ public class MsPaperBlockService {
91 88
                 bq.setMpid(mpid);
92 89
                 bq.setCreateid(createid);
93 90
                 bq.setCreatetime(timestamp);
91
+
94 92
                 questions.add(bq);
95 93
             }
96 94
         }

+ 1
- 1
smarking/src/main/java/com/xhkjedu/smarking/service/paper/MsTemplateService.java View File

@@ -238,7 +238,7 @@ public class MsTemplateService {
238 238
                 pbquestion.setMpid(mpid);
239 239
                 pbquestion.setMbqtype(1);
240 240
                 pbquestion.setMptqid(q.getMptqid());
241
-                pbquestion.setBqn(tbquestion.getQn());
241
+                pbquestion.setBqn(q.getQnstr());
242 242
                 pbquestion.setBqscore(q.getQscore());
243 243
                 pbquestion.setBqorder(tbquestion.getMtbqorder());
244 244
                 pbquestion.setCreateid(createid);

+ 3
- 3
smarking/src/main/resources/mapper/exam/SubjectScoreMapper.xml View File

@@ -28,10 +28,10 @@
28 28
         left join t_user u on cs.studentid=u.userid
29 29
         where ps.examid=#{stu.examid} and ps.subjectid=#{stu.subjectid} and ps.sstate=3
30 30
         <if test="stu.classid!=null and stu.classid!=0">
31
-            ,and cs.classid=#{stu.classid}
31
+            and cs.classid=#{stu.classid}
32 32
         </if>
33 33
         <if test="stu.studentname!=null and stu.studentname!=''">
34
-            and (u.username like concat('%', #{stu.studentname}, '%') or u.examno like concat('%',#{stu.studentname},'%')
34
+            and (u.username like concat('%', #{stu.studentname}, '%') or u.examno like concat('%',#{stu.studentname},'%'))
35 35
         </if>
36 36
         order by cs.mcsid
37 37
     </select>
@@ -44,7 +44,7 @@
44 44
         left join ms_class c on cs.classid=c.classid and ps.examid=c.examid
45 45
         left join t_user u on cs.studentid=u.userid
46 46
         left join ms_subject s on ps.subjectid=s.subjectid
47
-        where ps.examid=#{stu.examid} and ps.subjectid in
47
+        where ps.examid=#{stu.examid} and ps.sstate=3 and ps.subjectid in
48 48
         <foreach collection="stu.subjectids" item="s" open="(" close=")" separator=",">
49 49
             #{s}
50 50
         </foreach>

Loading…
Cancel
Save