Преглед на файлове

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

tags/正式版本
雍文秀 преди 2 години
родител
ревизия
2c86b5f71a

+ 9
- 9
sexam/src/main/java/com/xhkjedu/sexam/service/report/EReportGenerateService.java Целия файл

@@ -1036,17 +1036,17 @@ public class EReportGenerateService {
1036 1036
 
1037 1037
             if (ptype == 1) {
1038 1038
                 //处理题型下试题:题库显示题号时为母题的题号即order(qn是英语为顺延题号其他学科为母题号和子题排序拼接)
1039
-               /* String qtypejson = panalyze.get("qnumjson").toString();//原试卷题型分析
1039
+                String qtypejson = panalyze.get("qnumjson").toString();//原试卷题型分析
1040 1040
                 List<Map> qtypelist = JSON.parseArray(qtypejson, Map.class);
1041
-                setPaperQuestionTkQtypes(qtypelist, paperstulist, rtypelist, rqueslist, stutypelist, examPaperClassVo);*/
1041
+                setPaperQuestionTkQtypes(qtypelist, paperstulist, rtypelist, rqueslist, stutypelist, examPaperClassVo);
1042 1042
 
1043 1043
                 //处理知识点
1044 1044
                 setEPaperQuestionPoints(panalyze, paperstulist, rpointlist, stupointlist, examPaperClassVo);
1045 1045
 
1046 1046
                 //处理难易度
1047
-               /* String complexityjson = panalyze.get("complexityjson").toString();
1047
+                String complexityjson = panalyze.get("complexityjson").toString();
1048 1048
                 List<Map> complexitylist = JSON.parseArray(complexityjson, Map.class);
1049
-                setEPaperQuestionComplexitys(complexitylist, paperstulist, complist, stucomplist, examPaperClassVo);*/
1049
+                setEPaperQuestionComplexitys(complexitylist, paperstulist, complist, stucomplist, examPaperClassVo);
1050 1050
 
1051 1051
             } else {
1052 1052
                 //处理题型及题型下试题:附件显示题号为qn(order)作为排序使用
@@ -1055,11 +1055,11 @@ public class EReportGenerateService {
1055 1055
                 setPaperQuestionFjQtypes(qtypelist, paperstulist, rtypelist, rqueslist, stutypelist, examPaperClassVo);
1056 1056
             }
1057 1057
         }
1058
-        /*eRclassQtypeMapper.insertList(rtypelist);
1058
+        eRclassQtypeMapper.insertList(rtypelist);
1059 1059
         eRstudentQtypeMapper.insertList(stutypelist);
1060 1060
         eRclassQuestionMapper.insertList(rqueslist);
1061 1061
         eRclassComplexityMapper.insertList(complist);
1062
-        erStudentComplexityMapper.insertList(stucomplist);*/
1062
+        erStudentComplexityMapper.insertList(stucomplist);
1063 1063
         eRclassPointMapper.insertList(rpointlist);
1064 1064
         eRstudentPointMapper.insertList(stupointlist);
1065 1065
     }
@@ -1368,8 +1368,9 @@ public class EReportGenerateService {
1368 1368
                     qgstulist = paperstulist.stream().filter(s -> s.getEptqid().equals(eptqid)).collect(Collectors.toList());
1369 1369
                 } else {
1370 1370
                     qgstulist = new ArrayList<>();
1371
+                    List<EPaperStudentQuestion> stuqlist = paperstulist.stream().filter(s -> eptqids.contains(s.getEptqid())).collect(Collectors.toList());
1371 1372
                     //母子题情况,计算所有子题的和即为母题。把试题按照学生分组,分组为一组的即为
1372
-                    Map<Integer, List<EPaperStudentQuestion>> stuQuesMap = paperstulist.stream().collect(Collectors.groupingBy(EPaperStudentQuestion::getStudentid));
1373
+                    Map<Integer, List<EPaperStudentQuestion>> stuQuesMap = stuqlist.stream().collect(Collectors.groupingBy(EPaperStudentQuestion::getStudentid));
1373 1374
                     for (Map.Entry<Integer, List<EPaperStudentQuestion>> entry : stuQuesMap.entrySet()) {
1374 1375
                         List<EPaperStudentQuestion> stuqueslist = entry.getValue();
1375 1376
                         EPaperStudentQuestion pstq = stuqueslist.get(0);
@@ -1377,7 +1378,7 @@ public class EReportGenerateService {
1377 1378
                         Double qscore = stuqueslist.stream().mapToDouble(EPaperStudentQuestion::getQscore).sum();
1378 1379
                         pstq.setQscore(qscore);
1379 1380
                         pstq.setStuscore(qstuscore);
1380
-                        pstq.setCtype(11);//母子题关系的均设置为复合,不再进行选项区分
1381
+                        pstq.setCtype(11);//母子题关系的均设置为复合,不再进行选项区分
1381 1382
                         int bad = 0;
1382 1383
                         int good = 0;
1383 1384
                         for (EPaperStudentQuestion sq : stuqueslist) {
@@ -1453,7 +1454,6 @@ public class EReportGenerateService {
1453 1454
                 eRclassQtype.setScore(score);
1454 1455
                 eRclassQtype.setNum(num);
1455 1456
                 eRclassQtype.setSrate(srate);
1456
-                eRclassQtype.setScore(tgstuscore);
1457 1457
                 eRclassQtype.setGradescore(tgstuscore);
1458 1458
                 eRclassQtype.setGradeavgscore(tgavgscore);
1459 1459
                 eRclassQtype.setGradesrate(tgsrate);

+ 45
- 15
sexam/src/main/java/com/xhkjedu/sexam/service/report/EReportStudentService.java Целия файл

@@ -8,6 +8,7 @@ import com.xhkjedu.sexam.mapper.paper.EPaperAnalyzeMapper;
8 8
 import com.xhkjedu.sexam.mapper.paper.EPaperFileMapper;
9 9
 import com.xhkjedu.sexam.mapper.paper.EPaperMapper;
10 10
 import com.xhkjedu.sexam.mapper.reportstu.ERstudentMapper;
11
+import com.xhkjedu.sexam.model.paper.EPaper;
11 12
 import com.xhkjedu.sexam.vo.paper.QuestionOrderVo;
12 13
 import com.xhkjedu.sexam.vo.paper.QuestionPointVo;
13 14
 import com.xhkjedu.utils.N_Utils;
@@ -210,13 +211,26 @@ public class EReportStudentService {
210 211
                 map.put("stuanswertxt", q.get("stuanswertxt").toString());
211 212
                 map.put("answer", q.get("answer").toString());
212 213
                 map.put("qstem", q.get("qstem").toString());
213
-                map.put("qoption", q.get("qoption").toString());
214
-                map.put("qanalyze", q.get("qanalyze").toString());
215
-                map.put("hashear", Integer.parseInt(q.get("hashear").toString()));
216
-                map.put("hearfile", q.get("hearfile").toString());
214
+                if(N_Utils.isNotEmpty(q.get("qoption"))){
215
+                    map.put("qoption", q.get("qoption").toString());
216
+                }else{
217
+                    map.put("qoption", "");
218
+                }
219
+                if(N_Utils.isNotEmpty(q.get("qanalyze"))){
220
+                    map.put("qanalyze", q.get("qanalyze").toString());
221
+                }else{
222
+                    map.put("qanalyze", "");
223
+                }
224
+
225
+                Integer hashear = Integer.parseInt(q.get("hashear").toString());
226
+                map.put("hashear", hashear);
227
+                if(hashear == 1){
228
+                    map.put("hearfile", q.get("hearfile").toString());
229
+                }
230
+
217 231
                 map.put("qlevel", qlevel);
218
-                map.put("classavgscore", Integer.parseInt(q.get("classavgscore").toString()));
219
-                map.put("gradeavgscore", Integer.parseInt(q.get("gradeavgscore").toString()));
232
+                map.put("classavgscore", Double.parseDouble(q.get("classavgscore").toString()));
233
+                map.put("gradeavgscore", Double.parseDouble(q.get("gradeavgscore").toString()));
220 234
                 if (q.get("points") != null) {
221 235
                     List<Map> points = (List<Map>) q.get("points");
222 236
                     map.put("points", points);
@@ -236,10 +250,27 @@ public class EReportStudentService {
236 250
                     mq.put("ctype", Integer.parseInt(q.get("mctype").toString()));
237 251
                     mq.put("qstem", q.get("mqstem").toString());
238 252
                     mq.put("qoption", q.get("mqoption").toString());
239
-                    mq.put("qanswer", q.get("mqanswer").toString());
240
-                    mq.put("qanalyze", q.get("mqanalyze").toString());
241
-                    mq.put("hashear", Integer.parseInt(q.get("mhashear").toString()));
242
-                    mq.put("hearfile", q.get("mhearfile").toString());
253
+                    if(N_Utils.isNotEmpty(q.get("mqoption"))){
254
+                        mq.put("qoption", q.get("mqoption").toString());
255
+                    }else{
256
+                        mq.put("qoption", "");
257
+                    }
258
+                    if(N_Utils.isNotEmpty(q.get("mqanalyze"))){
259
+                        mq.put("qanalyze", q.get("mqanalyze").toString());
260
+                    }else{
261
+                        mq.put("qanalyze", "");
262
+                    }
263
+                    if(N_Utils.isNotEmpty(q.get("mqanswer"))){
264
+                        mq.put("qanalyze", q.get("mqanswer").toString());
265
+                    }else{
266
+                        mq.put("qanalyze", "");
267
+                    }
268
+
269
+                    Integer hashear = Integer.parseInt(q.get("mhashear").toString());
270
+                    mq.put("hashear", hashear);
271
+                    if(hashear == 1){
272
+                        mq.put("hearfile", q.get("mhearfile").toString());
273
+                    }
243 274
                     if (q.get("points") != null) {
244 275
                         List<Map> points = (List<Map>) q.get("points");
245 276
                         mq.put("points", points);
@@ -282,7 +313,6 @@ public class EReportStudentService {
282 313
                 map.put("num",queslist.size());
283 314
             }
284 315
             map.remove("questions");
285
-            return list;
286 316
         }
287 317
         return list;
288 318
     }
@@ -302,11 +332,11 @@ public class EReportStudentService {
302 332
         List<Map> pointqueslist = new ArrayList<>();
303 333
         for(Map pointmap : pointlist){
304 334
             //知识点包含的试题
305
-            List<QuestionOrderVo> ques = (List<QuestionOrderVo>) pointmap.get("ques");
335
+            List<Map> ques = (List<Map>) pointmap.get("ques");
306 336
             List<Integer> eptqidlist = new ArrayList<>();//知识点关联的所有试题
307
-            for(QuestionOrderVo qovo : ques){
308
-                Integer[] eptqids = qovo.getEptqids();
309
-                eptqidlist.addAll(Arrays.asList(eptqids));
337
+            for(Map qovo : ques){
338
+                List<Integer> eptqids = (List<Integer>) qovo.get("eptqids");
339
+                eptqidlist.addAll(eptqids);
310 340
             }
311 341
             //获取知识点下试题
312 342
             List<Map> poinques = list.stream().filter(s -> eptqidlist.contains(Integer.parseInt(s.get("eptqid").toString()))).collect(Collectors.toList());

+ 5
- 3
sexam/src/main/resources/mapper/report/ERstudentMapper.xml Целия файл

@@ -137,7 +137,7 @@
137 137
     </select>
138 138
     <select id="listQuesPoints" resultType="java.util.Map">
139 139
         select p.pointid,p.pointname
140
-        from t_question_point qp left join t_point p on qp.pointid=p.poingid
140
+        from t_question_point qp left join t_point p on qp.pointid=p.pointid
141 141
         where
142 142
         <if test="qlevel==1">
143 143
             qp.questionid=#{questionid}
@@ -161,6 +161,7 @@
161 161
         <result property="subjectname" column="subjectname" />
162 162
         <result property="ptype" column="ptype" />
163 163
         <collection property="questions" ofType="java.util.Map" javaType="java.util.List">
164
+            <result property="epsqid" column="epsqid" />
164 165
             <result property="eptqid" column="eptqid" />
165 166
             <result property="questionid" column="questionid" />
166 167
             <result property="qlevel" column="qlevel" />
@@ -168,12 +169,13 @@
168 169
         </collection>
169 170
     </resultMap>
170 171
     <select id="listStudentSubjectErrorQues" resultMap="listStudentSubjectErrorQues">
171
-        select sq.subjectid,s.subjectname,sq.eptqid,q.questionid,q.qlevel,q.questionpid
172
+        select sq.subjectid,s.subjectname,p.ptype,sq.epsqid,sq.eptqid,q.questionid,q.qlevel,q.questionpid
172 173
         from e_paper_student_question sq
173 174
         left join t_question q on q.questionid=sq.questionid
174 175
         left join t_subject s on sq.subjectid=s.subjectid
175 176
         left join t_question mq on q.questionpid=mq.questionid
176
-        where sq.examid=#{examid} and sq.studentid=#{studentid} and sq.stuscore &lt; sq.qscore group by s.subjectid order by s.subjectorder
177
+        left join e_paper p on sq.epid=p.epid
178
+        where sq.examid=#{examid} and sq.studentid=#{studentid} and sq.stuscore &lt; sq.qscore group by sq.epsqid order by s.subjectorder
177 179
     </select>
178 180
     <!--学生报告-错题集-学生科目下错题(题库)-->
179 181
     <select id="listStudentErrorQuestionsForTk" resultMap="listStudentQues">

Loading…
Отказ
Запис