Browse Source

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

ywx
雍文秀 2 weeks ago
parent
commit
99d3b6c7ff

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

232
         N_Utils.validation(new Object[]{examid, "考试id", 1});
232
         N_Utils.validation(new Object[]{examid, "考试id", 1});
233
         return new ResultVo(0, "查询成功", msExamService.listSubject(examid));
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
         map.put("subjects", msSubjectMapper.listByExamId(examid));
424
         map.put("subjects", msSubjectMapper.listByExamId(examid));
425
         return map;
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
 import com.xhkjedu.smarking.mapper.paper.MsPaperBlockQuestionMapper;
5
 import com.xhkjedu.smarking.mapper.paper.MsPaperBlockQuestionMapper;
6
 import com.xhkjedu.smarking.mapper.paper.MsPaperMapper;
6
 import com.xhkjedu.smarking.mapper.paper.MsPaperMapper;
7
 import com.xhkjedu.smarking.mapper.paper.MsPaperQtypeQuestionMapper;
7
 import com.xhkjedu.smarking.mapper.paper.MsPaperQtypeQuestionMapper;
8
-import com.xhkjedu.smarking.mapper.stupaper.MsPaperStudentBlockMapper;
9
 import com.xhkjedu.smarking.mapper.stupaper.MsPaperStudentMapper;
8
 import com.xhkjedu.smarking.mapper.stupaper.MsPaperStudentMapper;
10
 import com.xhkjedu.smarking.model.paper.MsPaperBlock;
9
 import com.xhkjedu.smarking.model.paper.MsPaperBlock;
11
 import com.xhkjedu.smarking.model.paper.MsPaperBlockQuestion;
10
 import com.xhkjedu.smarking.model.paper.MsPaperBlockQuestion;
35
     @Resource
34
     @Resource
36
     private MsSubjectMapper msSubjectMapper;
35
     private MsSubjectMapper msSubjectMapper;
37
     @Resource
36
     @Resource
38
-    private MsPaperQtypeQuestionMapper msPaperQtypeQuestionMapper;
39
-    @Resource
40
-    private MsPaperStudentBlockMapper msPaperStudentBlockMapper;
41
-    @Resource
42
     private MsPaperStudentMapper msPaperStudentMapper;
37
     private MsPaperStudentMapper msPaperStudentMapper;
38
+    @Resource
39
+    private MsPaperQtypeQuestionMapper msPaperQtypeQuestionMapper;
43
 
40
 
44
     /*
41
     /*
45
      * @Description 获取试卷所有题块
42
      * @Description 获取试卷所有题块
91
                 bq.setMpid(mpid);
88
                 bq.setMpid(mpid);
92
                 bq.setCreateid(createid);
89
                 bq.setCreateid(createid);
93
                 bq.setCreatetime(timestamp);
90
                 bq.setCreatetime(timestamp);
91
+
94
                 questions.add(bq);
92
                 questions.add(bq);
95
             }
93
             }
96
         }
94
         }

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

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

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

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

Loading…
Cancel
Save