Explorar el Código

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

tags/正式版本
雍文秀 hace 2 años
padre
commit
fa5c46764f

+ 1
- 1
scommons/src/main/java/com/xhkjedu/utils/N_Utils.java Ver fichero

@@ -1023,7 +1023,7 @@ public class N_Utils {
1023 1023
     }
1024 1024
 
1025 1025
     //处理题型中客观题
1026
-    private static int[] octypelist = new int[]{1,2,4,5,6,7,8,10};
1026
+    private static int[] octypelist = new int[]{1,2,4,5,6,7,8,10,16,17};
1027 1027
     /**
1028 1028
      * @Description 判断ctype是否是客观题
1029 1029
      * @Param [ctype]

+ 0
- 9
sexam/src/main/java/com/xhkjedu/sexam/mapper/paper/EPaperQtypeMapper.java Ver fichero

@@ -26,15 +26,6 @@ public interface EPaperQtypeMapper extends TkMapper<EPaperQtype> {
26 26
     //制作答题卡时获取试卷中试题
27 27
     List<Map> listPaperqtypeQuestionsForScan(@Param("epid") Integer epid);
28 28
 
29
-    //保存试题正确答案
30
-    void updateBatchQuestionAnswer(@Param("list")List<EPaperQtypeQuestion> list);
31
-
32
-    //批量保存答题卡
33
-    void updateBatchQuestionForScan(@Param("list")List<EPaperQtypeQuestion> list);
34
-
35
-    //试卷中所有试题基础信息
36
-    List<EPaperQtypeQuestion> listQuestionsByEpid(@Param("epid") Integer epid);
37
-
38 29
     //根据试卷id删除试题
39 30
     void deleteByEpid(@Param("epid") Integer epid);
40 31
 

+ 13
- 0
sexam/src/main/java/com/xhkjedu/sexam/mapper/paper/EPaperQtypeQuestionMapper.java Ver fichero

@@ -2,6 +2,9 @@ package com.xhkjedu.sexam.mapper.paper;
2 2
 
3 3
 import com.xhkjedu.sexam.base.TkMapper;
4 4
 import com.xhkjedu.sexam.model.paper.EPaperQtypeQuestion;
5
+import org.apache.ibatis.annotations.Param;
6
+
7
+import java.util.List;
5 8
 
6 9
 /**
7 10
  * @Description 题库题型试题
@@ -9,5 +12,15 @@ import com.xhkjedu.sexam.model.paper.EPaperQtypeQuestion;
9 12
  * Date 2022/7/19 8:57
10 13
  **/
11 14
 public interface EPaperQtypeQuestionMapper extends TkMapper<EPaperQtypeQuestion> {
15
+    //保存试题正确答案
16
+    void updateBatchQuestionAnswer(@Param("list") List<EPaperQtypeQuestion> list);
17
+
18
+    //批量保存答题卡
19
+    void updateBatchQuestionForScan(@Param("list")List<EPaperQtypeQuestion> list);
20
+
21
+    //修改客观题选项数量
22
+    void updateBatchQuestionOptionnum(@Param("list")List<EPaperQtypeQuestion> list);
12 23
 
24
+    //试卷中所有试题基础信息
25
+    List<EPaperQtypeQuestion> listQuestionsByEpid(@Param("epid") Integer epid);
13 26
 }

+ 6
- 0
sexam/src/main/java/com/xhkjedu/sexam/model/paper/EPaperQtypeQuestion.java Ver fichero

@@ -56,6 +56,12 @@ public class EPaperQtypeQuestion extends BaseBean {
56 56
     //作文格数
57 57
     private Integer gnum;
58 58
 
59
+    //答题区高度
60
+    private Integer height;
61
+
62
+    //答题区富文本
63
+    private String queshtml;
64
+
59 65
     //难易度
60 66
     @Transient
61 67
     private Integer complexity;

+ 3
- 2
sexam/src/main/java/com/xhkjedu/sexam/service/exam/EBaseService.java Ver fichero

@@ -7,6 +7,7 @@ import com.xhkjedu.sexam.mapper.exam.EClassStudentMapper;
7 7
 import com.xhkjedu.sexam.mapper.exam.ESubjectMapper;
8 8
 import com.xhkjedu.sexam.mapper.paper.EPaperMapper;
9 9
 import com.xhkjedu.sexam.mapper.paper.EPaperQtypeMapper;
10
+import com.xhkjedu.sexam.mapper.paper.EPaperQtypeQuestionMapper;
10 11
 import com.xhkjedu.sexam.mapper.paperstudent.EPaperStudentMapper;
11 12
 import com.xhkjedu.sexam.mapper.paperstudent.EPaperStudentQuestionMapper;
12 13
 import com.xhkjedu.sexam.mapper.system.UserMapper;
@@ -54,7 +55,7 @@ public class EBaseService {
54 55
     @Resource
55 56
     private EBaseMacMapper eBaseMacMapper;
56 57
     @Resource
57
-    private EPaperQtypeMapper ePaperQtypeMapper;
58
+    private EPaperQtypeQuestionMapper ePaperQtypeQuestionMapper;
58 59
     @Resource
59 60
     private EPaperStudentQuestionMapper ePaperStudentQuestionMapper;
60 61
 
@@ -225,7 +226,7 @@ public class EBaseService {
225 226
             for (EPaper paper : papers) {
226 227
                 Integer epid = paper.getEpid();
227 228
                 //获取试卷中所有试题
228
-                List<EPaperQtypeQuestion> queslist = ePaperQtypeMapper.listQuestionsByEpid(epid);
229
+                List<EPaperQtypeQuestion> queslist = ePaperQtypeQuestionMapper.listQuestionsByEpid(epid);
229 230
                 for (EPaperStudent ps : studentList) {
230 231
                     for(EPaperQtypeQuestion q : queslist){
231 232
                         EPaperStudentQuestion epsq = new EPaperStudentQuestion();

+ 19
- 32
sexam/src/main/java/com/xhkjedu/sexam/service/paper/EPaperQtypeService.java Ver fichero

@@ -158,12 +158,12 @@ public class EPaperQtypeService {
158 158
                 if(q.getOptionnum()==null){
159 159
                     q.setOptionnum(0);
160 160
                 }
161
-                Integer qorder = q.getQorder();
161
+                /*Integer qorder = q.getQorder();
162 162
                 if (ptype == 1 && ctype != 11) {
163 163
                     q.setQn(qorder.toString());
164 164
                 } else if (ptype == 1 && ctype == 11) {
165 165
                     q.setQn(qorder + "." + (i + 1));
166
-                }
166
+                }*/
167 167
                 if(q.getCtype() == 14){
168 168
                     q.setGnum(900);//语文作文格数
169 169
                 }else if(q.getCtype() == 15){
@@ -191,13 +191,14 @@ public class EPaperQtypeService {
191 191
     }
192 192
 
193 193
     //保存试卷分析--题库
194
-    private void savePaperAnalyzeForQuestion(EPaper ePaper){
194
+    public void savePaperAnalyzeForQuestion(EPaper ePaper){
195 195
         //保存之前先清除之前的试卷分析
196 196
         ePaperAnalyzeMapper.deleteByEpid(ePaper.getEpid());
197 197
         //总体分析(主观题、客观题)
198 198
         List<EPaperQtypeVo> qtypelist = ePaperQtypeMapper.listPaperQtypeQuestions(ePaper.getEpid());//试卷题型试题信息
199 199
         List<EPaperQtypeQuestionVo> queslist = new ArrayList<>();//试卷中所有试题(子题)
200 200
         List<EPaperQPointVo> quespoints = new ArrayList<>();//试卷中所有单题和子题以及对应知识点
201
+        List<EPaperQtypeQuestion> uplist = new ArrayList<>();//如果是客观题则获取客观题选项数量更改试卷中客观题选项数量
201 202
 
202 203
         //处理题型1单选题2多选题3主观题4判断对错5判断√×6判断TF7完形填空8阅读理解10任务型阅读11综合题12听力
203 204
         List<Map> typelist = new ArrayList<>();//题型分析
@@ -225,10 +226,17 @@ public class EPaperQtypeService {
225 226
                 if(!qorderlist.contains(q.getQorder())){
226 227
                     qorderlist.add(q.getQorder());
227 228
                 }
229
+                int ctype = q.getCtype();
230
+                if(ctype == 1 || ctype ==2 || ctype==4 || ctype ==5 || ctype==6){
231
+                    List<String> strlst = JSON.parseArray(q.getQoption(),String.class);
232
+                    EPaperQtypeQuestion eqq = new EPaperQtypeQuestion();
233
+                    eqq.setEptqid(q.getEptqid());
234
+                    eqq.setOptionnum(strlst.size());
235
+                    uplist.add(eqq);
236
+                }
228 237
             }
229 238
 
230 239
             double storerate = N_Utils.getDoubleDivideAndMulitiply(qt.getEptscore(), ePaper.getPscore());
231
-            EPaperQsVo tvo = new EPaperQsVo();
232 240
             Map tmap = new HashMap();
233 241
             tmap.put("qtname",qt.getEptname());
234 242
             tmap.put("num",qt.getEptnum());
@@ -337,7 +345,9 @@ public class EPaperQtypeService {
337 345
         epa.setComplexityjson(JSON.toJSONString(clist));//难易度分析
338 346
         epa.setPointjson(JSON.toJSONString(pointlist));//知识点分析
339 347
         ePaperAnalyzeMapper.insertUseGeneratedKeys(epa);
340
-
348
+        if(N_Utils.isListNotEmpty(uplist)){
349
+            ePaperQtypeQuestionMapper.updateBatchQuestionOptionnum(uplist);
350
+        }
341 351
     }
342 352
 
343 353
     //保存试卷分析--附件
@@ -524,7 +534,7 @@ public class EPaperQtypeService {
524 534
     public void saveQuesitonAnswer(EPaper ePaper){
525 535
         List<EPaperQtypeQuestion> questions = ePaper.getQuestions();
526 536
         if(questions != null && questions.size() > 0){
527
-            ePaperQtypeMapper.updateBatchQuestionAnswer(questions);
537
+            ePaperQtypeQuestionMapper.updateBatchQuestionAnswer(questions);
528 538
             ePaper.setAnswered(1);
529 539
             ePaperMapper.updateEPaperAnswered(ePaper);
530 540
             //设置完答案进行匹配
@@ -539,7 +549,7 @@ public class EPaperQtypeService {
539 549
         Integer examstate = Integer.parseInt(map.get("examstate").toString());
540 550
         if(examstate > 0){
541 551
             //获取试卷中原试题答案
542
-            List<EPaperQtypeQuestion> yqlist = ePaperQtypeMapper.listQuestionsByEpid(epid);
552
+            List<EPaperQtypeQuestion> yqlist = ePaperQtypeQuestionMapper.listQuestionsByEpid(epid);
543 553
             List<EPaperQtypeQuestion> changeQs = new ArrayList<>();//改变答案的试题
544 554
             for(EPaperQtypeQuestion tq : questions){
545 555
                 EPaperQtypeQuestion yq = yqlist.stream().filter(y -> y.getEptqid().equals(tq.getEptqid())).findFirst().orElse(null);
@@ -635,31 +645,8 @@ public class EPaperQtypeService {
635 645
     public Map getPaperAndQuesitons(Integer epid){
636 646
         Map eps = ePaperMapper.getExamPaperAndSubject(epid);//考试考试科目名称
637 647
         List<Map> qtypes = new ArrayList<>();//题型试题
638
-        if(eps!=null && eps.get("ptype")!=null){
639
-            int ptype = Integer.parseInt(eps.get("ptype").toString());//试卷类型1题库2附件
648
+        if(eps!=null){
640 649
             qtypes = ePaperQtypeMapper.listPaperqtypeQuestionsForScan(epid);
641
-            if(ptype == 1){
642
-                //处理试卷中试题选项数量
643
-                for(Map qtm : qtypes){
644
-                    List<Map> qlist = (List<Map>) qtm.get("questions");
645
-                    for(Map qm : qlist){
646
-                        String qoption = qm.get("qoption").toString();
647
-                        Integer ctype = Integer.parseInt(qm.get("ctype").toString());
648
-                        if(ctype == 1 || ctype ==2 || ctype==4 || ctype ==5 || ctype==6 ){
649
-                            List<String> strlst = JSON.parseArray(qoption,String.class);
650
-                            qm.put("qoption","");
651
-                            qm.put("optionnum",strlst.size());
652
-                        }else if(ctype == 7 || ctype == 8 || ctype ==10){
653
-                            //完形填空、阅读理解、任务型阅读
654
-                            List<QuestionOptionVo> qopt = JSON.parseArray(qoption,QuestionOptionVo.class);
655
-                            qm.put("optionnum",qopt.get(0).getSqoptions().size());
656
-                            qm.put("quenum",qopt.size());
657
-                            qm.put("qoption","");
658
-
659
-                        }
660
-                    }
661
-                }
662
-            }
663 650
 
664 651
             //设置答题卡需要默认值
665 652
             if(eps.get("scantronnote") == null){
@@ -693,7 +680,7 @@ public class EPaperQtypeService {
693 680
             paper.setScantronnum(pn);
694 681
         }
695 682
         ePaperMapper.updatePaperScantron(paper);
696
-        ePaperQtypeMapper.updateBatchQuestionForScan(questions);
683
+        ePaperQtypeQuestionMapper.updateBatchQuestionForScan(questions);
697 684
         if(paper.getPstate() == 1){
698 685
             eSubjectMapper.updateEsubjectStateByEpid(1,paper.getEpid());
699 686
             //提交之后把答题卡base图片转成pdf

+ 3
- 2
sexam/src/main/java/com/xhkjedu/sexam/service/paperstudent/EPaperStudentService.java Ver fichero

@@ -3,6 +3,7 @@ package com.xhkjedu.sexam.service.paperstudent;
3 3
 import com.alibaba.fastjson.JSON;
4 4
 import com.xhkjedu.sexam.mapper.paper.EPaperFileMapper;
5 5
 import com.xhkjedu.sexam.mapper.paper.EPaperQtypeMapper;
6
+import com.xhkjedu.sexam.mapper.paper.EPaperQtypeQuestionMapper;
6 7
 import com.xhkjedu.sexam.mapper.paperstudent.EPaperStudentMapper;
7 8
 import com.xhkjedu.sexam.mapper.paperstudent.EPaperStudentQuestionMapper;
8 9
 import com.xhkjedu.sexam.mapper.paperstudent.EScanbatchMapper;
@@ -42,7 +43,7 @@ public class EPaperStudentService {
42 43
     @Resource
43 44
     private EPaperStudentMapper ePaperStudentMapper;
44 45
     @Resource
45
-    private EPaperQtypeMapper ePaperQtypeMapper;
46
+    private EPaperQtypeQuestionMapper ePaperQtypeQuestionMapper;
46 47
     @Resource
47 48
     private EPaperStudentQuestionMapper ePaperStudentQuestionMapper;
48 49
     @Resource
@@ -131,7 +132,7 @@ public class EPaperStudentService {
131 132
     //保存学生试卷关联信息
132 133
     private void savePaperStudentQuestion(EPaperStudentVo psvo) {
133 134
         //生成学生试卷
134
-        List<EPaperQtypeQuestion> pqlist = ePaperQtypeMapper.listQuestionsByEpid(psvo.getEpid());
135
+        List<EPaperQtypeQuestion> pqlist = ePaperQtypeQuestionMapper.listQuestionsByEpid(psvo.getEpid());
135 136
 
136 137
         List<EPaperStudentQuestion> psqlist = new ArrayList<>();
137 138
         for (EPaperQtypeQuestion q : pqlist) {

+ 1
- 0
sexam/src/main/java/com/xhkjedu/sexam/vo/paper/EPaperQPointVo.java Ver fichero

@@ -13,6 +13,7 @@ public class EPaperQPointVo {
13 13
     private String pointname;//知识点名称
14 14
 
15 15
     private String questionid;//试题id
16
+    private Integer eptqid;//试题id
16 17
     private double score;//分值
17 18
     private Integer qorder;//试题排序
18 19
 }

+ 14
- 7
sexam/src/main/resources/mapper/paper/EPaperQtypeMapper.xml Ver fichero

@@ -40,7 +40,7 @@
40 40
             <result column="mqanalyze" property="mqanalyze"></result>
41 41
             <result column="mqlevel" property="mqlevel"></result>
42 42
             <collection property="points" ofType="com.xhkjedu.sexam.vo.paper.EPaperQPointVo" javaType="java.util.List"
43
-                        column="questionid" select="listQuestionPoints">
43
+                        column="{questionid=questionid,qlevel=qlevel,questionpid=questionpid" select="listQuestionPoints">
44 44
                 <result column="pointid" property="pointid"></result>
45 45
                 <result column="pointname" property="pointname"></result>
46 46
             </collection>
@@ -62,7 +62,14 @@
62 62
     <select id="listQuestionPoints" resultType="com.xhkjedu.sexam.vo.paper.EPaperQPointVo">
63 63
         select qp.pointid,p.pointname from t_question_point qp
64 64
         left join t_point p on qp.pointid=p.pointid
65
-        where qp.questionid=#{questionid} order by p.pointorder
65
+        where
66
+        <if test="qlevel==1">
67
+            qp.questionid=#{questionid}
68
+        </if>
69
+        <if test="qlevel==3">
70
+            qp.questionid=#{questionpid}
71
+        </if>
72
+        order by p.pointorder
66 73
     </select>
67 74
 
68 75
     <!--试卷题型试题信息(附件)-->
@@ -109,17 +116,17 @@
109 116
             <result column="optionnum" property="optionnum"></result>
110 117
             <result column="coord" property="coord"></result>
111 118
             <result column="gnum" property="gnum"></result>
112
-            <result column="qoption" property="qoption"></result>
119
+            <result column="height" property="height"></result>
120
+            <result column="queshtml" property="queshtml"></result>
113 121
         </collection>
114 122
     </resultMap>
115 123
 
116 124
     <!--制作答题卡时获取试卷中试题-->
117 125
     <select id="listPaperqtypeQuestionsForScan" resultMap="qtypesQuestionsForScan">
118
-        select t.eptname ,t.ctype,t.eptnum,t.eptorder,t.eptscore,
119
-        tq.eptqid,tq.ctype qctype,tq.score,tq.qorder,tq.qn,tq.optionnum,tq.coord,tq.gnum,q.qoption
126
+        select t.eptname,t.ctype,t.eptnum,t.eptorder,t.eptscore,tq.eptqid,tq.ctype qctype,tq.score,
127
+        tq.qorder,tq.qn,tq.optionnum,tq.coord,tq.gnum,tq.height,tq.queshtml
120 128
         from e_paper_qtype_question tq  left join e_paper_qtype t on t.eptid=tq.eptid
121
-        left join t_question q on tq.questionid=q.questionid
122
-        where t.epid=#{epid} order by t.eptorder,tq.qorder,q.sorder
129
+        where t.epid=#{epid} order by t.eptorder,tq.qorder
123 130
     </select>
124 131
 
125 132
     <!--保存试题正确答案-->

+ 75
- 0
sexam/src/main/resources/mapper/paper/EPaperQtypeQuestionMapper.xml Ver fichero

@@ -0,0 +1,75 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.xhkjedu.sexam.mapper.paper.EPaperQtypeQuestionMapper">
4
+
5
+    <!--保存试题正确答案-->
6
+    <update id="updateBatchQuestionAnswer">
7
+        update e_paper_qtype_question set
8
+        <trim prefix="answer=case" suffix="end">
9
+            <foreach collection="list" item="q">
10
+                when eptqid=#{q.eptqid} then #{q.answer}
11
+            </foreach>
12
+        </trim>
13
+        <where>
14
+            <foreach collection="list" item="q" separator="or">
15
+                eptqid=#{q.eptqid}
16
+            </foreach>
17
+        </where>
18
+    </update>
19
+
20
+    <!--保存试卷答题卡坐标-->
21
+    <update id="updateBatchQuestionForScan">
22
+        update e_paper_qtype_question
23
+        <trim prefix="set" suffixOverrides=",">
24
+            <trim prefix="coord = case" suffix="end,">
25
+                <foreach collection="list" item="q">
26
+                    when eptqid=#{q.eptqid} then #{q.coord}
27
+                </foreach>
28
+            </trim>
29
+            <trim prefix="gnum = case" suffix="end,">
30
+                <foreach collection="list" item="q">
31
+                    when eptqid=#{q.eptqid} then #{q.gnum}
32
+                </foreach>
33
+            </trim>
34
+            <trim prefix="height = case" suffix="end,">
35
+                <foreach collection="list" item="q">
36
+                    when eptqid=#{q.eptqid} then #{q.height}
37
+                </foreach>
38
+            </trim>
39
+            <trim prefix="queshtml = case" suffix="end,">
40
+                <foreach collection="list" item="q">
41
+                    when eptqid=#{q.eptqid} then #{q.queshtml}
42
+                </foreach>
43
+            </trim>
44
+        </trim>
45
+        <where>
46
+            <foreach collection="list" item="q" separator="or">
47
+                eptqid=#{q.eptqid}
48
+            </foreach>
49
+        </where>
50
+    </update>
51
+
52
+    <!--保存主观题选项数量-->
53
+    <update id="updateBatchQuestionOptionnum">
54
+        update e_paper_qtype_question
55
+        <trim prefix="set" suffixOverrides=",">
56
+            <trim prefix="optionnum = case" suffix="end,">
57
+                <foreach collection="list" item="q">
58
+                    when eptqid=#{q.eptqid} then #{q.optionnum}
59
+                </foreach>
60
+            </trim>
61
+        </trim>
62
+        <where>
63
+            <foreach collection="list" item="q" separator="or">
64
+                eptqid=#{q.eptqid}
65
+            </foreach>
66
+        </where>
67
+    </update>
68
+
69
+    <!--试卷中所有试题基础信息-->
70
+    <select id="listQuestionsByEpid" resultType="com.xhkjedu.sexam.model.paper.EPaperQtypeQuestion">
71
+        select * from e_paper_qtype_question where epid=#{epid} order by qorder
72
+    </select>
73
+
74
+
75
+</mapper>

+ 4
- 4
sexam/src/test/java/com/xhkjedu/sexam/SexamApplicationTests.java Ver fichero

@@ -20,11 +20,11 @@ class SexamApplicationTests {
20 20
     @Test
21 21
     void contextLoads() {
22 22
         EPaper ePaper = new EPaper();
23
-        ePaper.setEpid(68);
24
-        ePaper.setPnum(15);
25
-        ePaper.setPscore(172.0);
23
+        ePaper.setEpid(289);
24
+        ePaper.setPnum(7);
25
+        ePaper.setPscore(80.0);
26 26
 
27
-        ePaperQtypeService.chandleScantronFile(156);
27
+        ePaperQtypeService.savePaperAnalyzeForQuestion(ePaper);
28 28
     }
29 29
 
30 30
 }

+ 2
- 3
sstudy/src/main/java/com/xhkjedu/sstudy/service/question/UserBasketService.java Ver fichero

@@ -69,7 +69,7 @@ public class UserBasketService {
69 69
                 List<QuestionVo> questions = b.getQuestions();
70 70
 
71 71
                 List<QuestionVo> tllist = questions.stream().filter( o -> o.getHashear() ==1).collect(Collectors.toList());
72
-                if(N_Utils.isNotEmpty(tllist)){
72
+                if(N_Utils.isListNotEmpty(tllist)){
73 73
                     hearqs.addAll(tllist);
74 74
 
75 75
                     questions = questions.stream().filter( o -> o.getHashear() ==0).collect(Collectors.toList());
@@ -80,7 +80,7 @@ public class UserBasketService {
80 80
                 b.setQuestions(questions);
81 81
             }
82 82
 
83
-            if(N_Utils.isNotEmpty(hearqs)){
83
+            if(N_Utils.isListNotEmpty(hearqs)){
84 84
                 UserBasketVo tlvo = new UserBasketVo();
85 85
                 tlvo.setQtypename("听力题");
86 86
                 tlvo.setPtnum(hearqs.size());
@@ -88,7 +88,6 @@ public class UserBasketService {
88 88
                 tlvo.setPtscore(scoretotal);
89 89
                 tlvo.setQuestions(hearqs);
90 90
                 baskets.add(0,tlvo);
91
-
92 91
             }
93 92
         }else{
94 93
             for (UserBasketVo b : baskets) {

+ 5
- 2
sstudy/src/main/resources/mapper/question/QuestionMapper.xml Ver fichero

@@ -245,8 +245,11 @@
245 245
         <if test="question.pointid!=null and question.pointid!='0'.toString() and question.pointid!=''">
246 246
             and qp.pointid=#{question.pointid}
247 247
         </if>
248
-        <if test="question.qtypeid!=null and question.qtypeid!='0'.toString() and question.qtypeid!=''">
249
-            and q.qtypeid=#{question.qtypeid}
248
+        <if test="question.hashear!=null and question.hashear == 1">
249
+            and q.hashear=1
250
+        </if>
251
+        <if test="question.hashear!=1 and question.qtypeid!=null and question.qtypeid!='0'.toString() and question.qtypeid!=''">
252
+            and q.hashear=0 and q.qtypeid=#{question.qtypeid}
250 253
         </if>
251 254
         <if test="question.complexity!=null and question.complexity!=0">
252 255
             and q.complexity=#{question.complexity}

Loading…
Cancelar
Guardar