|
@@ -201,7 +201,7 @@ public class EPaperQtypeService {
|
201
|
201
|
//总体分析(主观题、客观题)
|
202
|
202
|
List<EPaperQtypeVo> qtypelist = ePaperQtypeMapper.listPaperQtypeQuestions(ePaper.getEpid());//试卷题型试题信息
|
203
|
203
|
List<EPaperQtypeQuestionVo> queslist = new ArrayList<>();//试卷中所有试题(子题)
|
204
|
|
- List<EPaperQPointVo> quespoints = new ArrayList<>();//试卷中所有单题和子题以及对应知识点
|
|
204
|
+ List<Map> quespoints = new ArrayList<>();//试卷中所有单题和子题以及对应知识点
|
205
|
205
|
List<EPaperQtypeQuestion> uplist = new ArrayList<>();//如果是客观题则获取客观题选项数量更改试卷中客观题选项数量
|
206
|
206
|
|
207
|
207
|
//处理题型1单选题2多选题3主观题4判断对错5判断√×6判断TF7完形填空8阅读理解10任务型阅读11综合题12听力
|
|
@@ -211,15 +211,15 @@ public class EPaperQtypeService {
|
211
|
211
|
List<Integer> qorderlist = new ArrayList<>();
|
212
|
212
|
for(EPaperQtypeQuestionVo q : qt.getQuestions()){
|
213
|
213
|
//处理试题关联知识点
|
214
|
|
- List<EPaperQPointVo> pointslist = q.getPoints();
|
|
214
|
+ List<Map> pointslist = q.getPoints();
|
215
|
215
|
if(pointslist != null && pointslist.size()>0){
|
216
|
|
- for(EPaperQPointVo point : pointslist){
|
217
|
|
- EPaperQPointVo p = new EPaperQPointVo();
|
218
|
|
- p.setPointid(point.getPointid());
|
219
|
|
- p.setPointname(point.getPointname());
|
220
|
|
- p.setQuestionid(q.getQuestionid());
|
221
|
|
- p.setQorder(q.getQorder());
|
222
|
|
- p.setScore(q.getScore());
|
|
216
|
+ for(Map point : pointslist){
|
|
217
|
+ Map p = new HashMap();
|
|
218
|
+ p.put("pointid",point.get("pointid").toString());
|
|
219
|
+ p.put("pointname",point.get("pointname").toString());
|
|
220
|
+ p.put("eptqid",q.getEptqid());
|
|
221
|
+ p.put("order",q.getQorder());
|
|
222
|
+ p.put("score",q.getScore());
|
223
|
223
|
quespoints.add(p);
|
224
|
224
|
}
|
225
|
225
|
}
|
|
@@ -326,17 +326,17 @@ public class EPaperQtypeService {
|
326
|
326
|
}
|
327
|
327
|
|
328
|
328
|
//知识点
|
329
|
|
- Map<String,List<EPaperQPointVo>> pointmap = quespoints.stream().collect(Collectors.groupingBy(EPaperQPointVo:: getPointid, Collectors.toList()));
|
|
329
|
+ Map<String,List<Map>> pointmap = quespoints.stream().collect(Collectors.groupingBy(item -> item.get("pointid").toString(), Collectors.toList()));
|
330
|
330
|
List<Map> pointlist = new ArrayList<>();
|
331
|
|
- for(Map.Entry<String, List<EPaperQPointVo>> entry : pointmap.entrySet()){
|
|
331
|
+ for(Map.Entry<String, List<Map>> entry : pointmap.entrySet()){
|
332
|
332
|
Map pm = new HashMap();
|
333
|
|
- List<EPaperQPointVo> pvo = entry.getValue();
|
334
|
|
- double cscore = pvo.stream().collect(Collectors.summingDouble(EPaperQPointVo:: getScore));
|
|
333
|
+ List<Map> pvo = entry.getValue();
|
|
334
|
+ double cscore = pvo.stream().collect(Collectors.summingDouble(item -> Double.valueOf(item.get("score").toString())));
|
335
|
335
|
double scorerate = N_Utils.getDoubleDivideAndMulitiply(cscore, ePaper.getPscore());
|
336
|
|
- List<Integer> thlist = pvo.stream().map(EPaperQPointVo :: getQorder).collect(Collectors.toList());
|
|
336
|
+ List<Integer> thlist = pvo.stream().map(item -> Integer.parseInt(item.get("order").toString())).collect(Collectors.toList());
|
337
|
337
|
thlist = thlist.stream().distinct().collect(Collectors.toList());
|
338
|
|
- pm.put("pointid",pvo.get(0).getPointid());
|
339
|
|
- pm.put("pointname",pvo.get(0).getPointname());
|
|
338
|
+ pm.put("pointid",pvo.get(0).get("pointid").toString());
|
|
339
|
+ pm.put("pointname",pvo.get(0).get("pointname").toString());
|
340
|
340
|
pm.put("score",cscore);
|
341
|
341
|
pm.put("srate",scorerate);
|
342
|
342
|
pm.put("order",thlist);
|
|
@@ -493,10 +493,10 @@ public class EPaperQtypeService {
|
493
|
493
|
mq.setQlevel(q.getMqlevel());
|
494
|
494
|
mq.setMhashear(q.getMhashear());
|
495
|
495
|
mq.setMhearfile(q.getMhearfile());
|
496
|
|
- List<EPaperQPointVo> allpoint = new ArrayList<>();
|
|
496
|
+ List<Map> allpoint = new ArrayList<>();
|
497
|
497
|
for(EPaperQtypeQuestionVo sq : sonqlist){
|
498
|
|
- List<EPaperQPointVo> sqpoints = sq.getPoints();
|
499
|
|
- for(EPaperQPointVo p : sqpoints){
|
|
498
|
+ List<Map> sqpoints = sq.getPoints();
|
|
499
|
+ for(Map p : sqpoints){
|
500
|
500
|
if(!isExistEPaperPoints(allpoint,p)){
|
501
|
501
|
allpoint.add(p);
|
502
|
502
|
}
|
|
@@ -521,9 +521,11 @@ public class EPaperQtypeService {
|
521
|
521
|
|
522
|
522
|
}
|
523
|
523
|
|
524
|
|
- private boolean isExistEPaperPoints(List<EPaperQPointVo> allpoint,EPaperQPointVo p){
|
525
|
|
- for(EPaperQPointVo pvo : allpoint){
|
526
|
|
- if(p.getPointid().equals(pvo.getPointid())){
|
|
524
|
+ private boolean isExistEPaperPoints(List<Map> allpoint,Map p){
|
|
525
|
+ String ppointid = p.get("pointid").toString();
|
|
526
|
+ for(Map pvo : allpoint){
|
|
527
|
+ String pvopointid = pvo.get("pointid").toString();
|
|
528
|
+ if(ppointid.equals(pvopointid)){
|
527
|
529
|
return true;
|
528
|
530
|
}
|
529
|
531
|
}
|