|
@@ -200,9 +200,10 @@ public class EPaperQtypeService {
|
200
|
200
|
List<EPaperQPointVo> quespoints = new ArrayList<>();//试卷中所有单题和子题以及对应知识点
|
201
|
201
|
|
202
|
202
|
//处理题型1单选题2多选题3主观题4判断对错5判断√×6判断TF7完形填空8阅读理解10任务型阅读11综合题12听力
|
203
|
|
- List<EPaperQsVo> typelist = new ArrayList<>();//题型分析
|
|
203
|
+ List<Map> typelist = new ArrayList<>();//题型分析
|
204
|
204
|
//处理出试卷中所有试题、知识点
|
205
|
205
|
for(EPaperQtypeVo qt : qtypelist){
|
|
206
|
+ List<Integer> qorderlist = new ArrayList<>();
|
206
|
207
|
for(EPaperQtypeQuestionVo q : qt.getQuestions()){
|
207
|
208
|
//处理试题关联知识点
|
208
|
209
|
List<EPaperQPointVo> pointslist = q.getPoints();
|
|
@@ -221,15 +222,20 @@ public class EPaperQtypeService {
|
221
|
222
|
q.setQuestionpid("000");
|
222
|
223
|
}
|
223
|
224
|
queslist.add(q);
|
|
225
|
+ if(!qorderlist.contains(q.getQorder())){
|
|
226
|
+ qorderlist.add(q.getQorder());
|
|
227
|
+ }
|
224
|
228
|
}
|
225
|
229
|
|
226
|
230
|
double storerate = N_Utils.getDoubleDivideAndMulitiply(qt.getEptscore(), ePaper.getPscore());
|
227
|
231
|
EPaperQsVo tvo = new EPaperQsVo();
|
228
|
|
- tvo.setQtname(qt.getEptname());
|
229
|
|
- tvo.setNum(qt.getEptnum());
|
230
|
|
- tvo.setScore(qt.getEptscore());
|
231
|
|
- tvo.setSrate(storerate);
|
232
|
|
- typelist.add(tvo);
|
|
232
|
+ Map tmap = new HashMap();
|
|
233
|
+ tmap.put("qtname",qt.getEptname());
|
|
234
|
+ tmap.put("num",qt.getEptnum());
|
|
235
|
+ tmap.put("score",qt.getEptscore());
|
|
236
|
+ tmap.put("srate",storerate);
|
|
237
|
+ tmap.put("qns",qorderlist);
|
|
238
|
+ typelist.add(tmap);
|
233
|
239
|
}
|
234
|
240
|
|
235
|
241
|
//获取出所有单题和母题,进行判断区分
|
|
@@ -320,7 +326,7 @@ public class EPaperQtypeService {
|
320
|
326
|
pm.put("pointname",pvo.get(0).getPointname());
|
321
|
327
|
pm.put("score",cscore);
|
322
|
328
|
pm.put("srate",scorerate);
|
323
|
|
- pm.put("order",JSON.toJSONString(thlist));
|
|
329
|
+ pm.put("order",thlist);
|
324
|
330
|
pointlist.add(pm);
|
325
|
331
|
}
|
326
|
332
|
|
|
@@ -360,9 +366,21 @@ public class EPaperQtypeService {
|
360
|
366
|
double zscorerate = N_Utils.getDoubleDivideAndMulitiply(zscore, ePaper.getPscore());
|
361
|
367
|
double kscorerate = N_Utils.getDoubleReduce(100.0,zscorerate);
|
362
|
368
|
|
363
|
|
- List<EPaperQsVo> ranglist = new ArrayList<>();
|
364
|
|
- ranglist.add(new EPaperQsVo("主观题",zscore,znum,zscorerate,znumrate));
|
365
|
|
- ranglist.add(new EPaperQsVo("客观题",kscore,knum,kscorerate,knumrate));
|
|
369
|
+ List<Map> ranglist = new ArrayList<>();
|
|
370
|
+ Map zgmap = new HashMap();
|
|
371
|
+ zgmap.put("qtname","主观题");
|
|
372
|
+ zgmap.put("score","zscore");
|
|
373
|
+ zgmap.put("num","znum");
|
|
374
|
+ zgmap.put("srate","zscorerate");
|
|
375
|
+ zgmap.put("nrate","znumrate");
|
|
376
|
+ ranglist.add(zgmap);
|
|
377
|
+ Map kgmap = new HashMap();
|
|
378
|
+ kgmap.put("qtname","客观题");
|
|
379
|
+ kgmap.put("score","kscore");
|
|
380
|
+ kgmap.put("num","knum");
|
|
381
|
+ kgmap.put("srate","kscorerate");
|
|
382
|
+ kgmap.put("nrate","knumrate");
|
|
383
|
+ ranglist.add(kgmap);
|
366
|
384
|
|
367
|
385
|
Map ztmap = new HashMap<>();
|
368
|
386
|
ztmap.put("pnum", ePaper.getPnum());
|
|
@@ -372,18 +390,32 @@ public class EPaperQtypeService {
|
372
|
390
|
//题型分布(按照名称进行分组)
|
373
|
391
|
fjtypelist.stream().sorted(Comparator.comparing(EPaperQtype::getEptorder)).collect(Collectors.toList());
|
374
|
392
|
Map<String,List<EPaperQtype>> qtypemap = fjtypelist.stream().collect(Collectors.groupingBy(EPaperQtype:: getEptname, Collectors.toList()));
|
375
|
|
- List<EPaperQsVo> qtlist = new ArrayList<>();
|
|
393
|
+ List<Map> qtlist = new ArrayList<>();
|
376
|
394
|
for(Map.Entry<String, List<EPaperQtype>> entry : qtypemap.entrySet()){
|
377
|
395
|
List<EPaperQtype> aq = entry.getValue();
|
378
|
396
|
int num = aq.stream().mapToInt(EPaperQtype::getEptnum).sum();
|
379
|
397
|
double tscore = aq.stream().collect(Collectors.summingDouble(EPaperQtype:: getEptscore));
|
380
|
398
|
double storerate = N_Utils.getDoubleDivideAndMulitiply(tscore, ePaper.getPscore());
|
381
|
|
- EPaperQsVo qvo = new EPaperQsVo();
|
382
|
|
- qvo.setQtname(entry.getKey());
|
383
|
|
- qvo.setNum(num);
|
384
|
|
- qvo.setScore(tscore);
|
385
|
|
- qvo.setSrate(storerate);
|
386
|
|
- qtlist.add(qvo);
|
|
399
|
+ //获取小题题号
|
|
400
|
+
|
|
401
|
+ List<String> allqns = new ArrayList<>();
|
|
402
|
+ for(EPaperQtype t : aq){
|
|
403
|
+ List<EPaperQtypeQuestion> qlist = t.getQuestions();
|
|
404
|
+ List<String> qnlist = qlist.stream().map(EPaperQtypeQuestion :: getQn).collect(Collectors.toList());
|
|
405
|
+ for(String n : qnlist){
|
|
406
|
+ if(!allqns.contains(n)){
|
|
407
|
+ allqns.add(n);
|
|
408
|
+ }
|
|
409
|
+ }
|
|
410
|
+ }
|
|
411
|
+
|
|
412
|
+ Map tmap = new HashMap();
|
|
413
|
+ tmap.put("qtname",entry.getKey());
|
|
414
|
+ tmap.put("num",num);
|
|
415
|
+ tmap.put("score",tscore);
|
|
416
|
+ tmap.put("srate",storerate);
|
|
417
|
+ tmap.put("qns",allqns);
|
|
418
|
+ qtlist.add(tmap);
|
387
|
419
|
}
|
388
|
420
|
|
389
|
421
|
EPaperAnalyze epa = new EPaperAnalyze();
|