|
@@ -1,6 +1,5 @@
|
1
|
1
|
package com.xhkjedu.smarking.service.paper;
|
2
|
2
|
|
3
|
|
-import com.alibaba.fastjson.JSON;
|
4
|
3
|
import com.xhkjedu.exception.MissingParametersException;
|
5
|
4
|
import com.xhkjedu.smarking.mapper.exam.MsSubjectMapper;
|
6
|
5
|
import com.xhkjedu.smarking.mapper.paper.*;
|
|
@@ -22,7 +21,10 @@ import org.springframework.stereotype.Service;
|
22
|
21
|
import org.springframework.transaction.annotation.Transactional;
|
23
|
22
|
|
24
|
23
|
import javax.annotation.Resource;
|
25
|
|
-import java.util.*;
|
|
24
|
+import java.util.ArrayList;
|
|
25
|
+import java.util.List;
|
|
26
|
+import java.util.Map;
|
|
27
|
+import java.util.TreeMap;
|
26
|
28
|
import java.util.stream.Collectors;
|
27
|
29
|
|
28
|
30
|
/**
|
|
@@ -57,6 +59,8 @@ public class MsPaperQtypeService {
|
57
|
59
|
private MsPaperStudentMapper msPaperStudentMapper;
|
58
|
60
|
@Resource
|
59
|
61
|
private MsPaperCheckTeacherMapper msPaperCheckTeacherMapper;
|
|
62
|
+ @Resource
|
|
63
|
+ private MsPaperAnalyzeService msPaperAnalyzeService;
|
60
|
64
|
private final ConvertUtil convertUtil;
|
61
|
65
|
|
62
|
66
|
public MsPaperQtypeService(ConvertUtil convertUtil) {
|
|
@@ -104,14 +108,14 @@ public class MsPaperQtypeService {
|
104
|
108
|
List<String> imgs = new ArrayList<>();
|
105
|
109
|
// 保存试卷分析
|
106
|
110
|
if (paper.getPtype() == 1) {
|
107
|
|
- savePaperAnalyzeForQuestion(paper);
|
|
111
|
+ msPaperAnalyzeService.savePaperAnalyzeForQuestion(paper);
|
108
|
112
|
} else {
|
109
|
113
|
List<MsPaperFile> pfiles = paper.getPfiles();// 附件
|
110
|
114
|
if (paper.getYjstate() == 1) {
|
111
|
115
|
setPaperFiles(paper, pfiles, imgs);
|
112
|
116
|
msPaperFileMapper.insertList(pfiles);
|
113
|
117
|
}
|
114
|
|
- savePaperAnalyzeForFj(paper);
|
|
118
|
+ msPaperAnalyzeService.savePaperAnalyzeForFj(paper);
|
115
|
119
|
}
|
116
|
120
|
|
117
|
121
|
// 更改科目状态
|
|
@@ -215,459 +219,7 @@ public class MsPaperQtypeService {
|
215
|
219
|
msPaperQtypeQuestionMapper.insertList(qtqs);
|
216
|
220
|
}
|
217
|
221
|
|
218
|
|
- // 保存试卷分析--题库
|
219
|
|
- private void savePaperAnalyzeForQuestion(MsPaper paper) {
|
220
|
|
- Integer mpid = paper.getMpid();
|
221
|
|
-
|
222
|
|
- // 总体分析(主观题、客观题)
|
223
|
|
- List<MsPaperQtypeVo> qtypelist = msPaperQtypeMapper.listPaperQtypeQuestions(paper.getMpid());// 试卷题型试题信息
|
224
|
|
- List<MsPaperQtypeQuestion> uplist = new ArrayList<>();// 改试卷中客观题选项数量
|
225
|
|
- List<MsPaperQtypeQuestion> upComplexitylist = new ArrayList<>();// 改试卷中客观题难易度
|
226
|
|
- List<MsPaperQtypeQuestionPoint> upQpointlist = new ArrayList<>();// 保存试卷中试题知识点关联关系
|
227
|
|
-
|
228
|
|
- List<QuestionOrderVo> pointqlist = new ArrayList<>();// 用于存放知识点,以及知识点下得分
|
229
|
|
- List<MsPaperQtypeQuestionVo> mquestions = new ArrayList<>();// 存放单题和母题
|
230
|
|
- List<QuestionOrderVo> complexitylist = new ArrayList<>();// 试题难易度存放试题
|
231
|
|
- List<QuestionPointVo> quesplist = new ArrayList<>();// 单题、母题对应知识点
|
232
|
|
-
|
233
|
|
- // 处理出试卷中所有试题、知识点
|
234
|
|
- List<Map<String, Object>> typelist = new ArrayList<>();// 题型分析
|
235
|
|
- for (MsPaperQtypeVo qt : qtypelist) {
|
236
|
|
- List<Integer> qorderlist = new ArrayList<>();
|
237
|
|
- List<QuestionOrderVo> qtypeqlist = new ArrayList<>();
|
238
|
|
- List<MsPaperQtypeQuestionVo> tqlist = qt.getQuestions();
|
239
|
|
- int hasmt = 0;
|
240
|
|
- for (MsPaperQtypeQuestionVo q : tqlist) {
|
241
|
|
- int ctype = q.getCtype();
|
242
|
|
- // 单题的pid设置为默认值,方便后续进行单题和母题处理
|
243
|
|
- if (q.getQlevel() == 1) {
|
244
|
|
- q.setQuestionpid("000");
|
245
|
|
- // 判断试题是否是客观题
|
246
|
|
- if (N_Utils.isObjectiveQuestion(ctype)) {
|
247
|
|
- // 判断试题是否是客观题,暂时用mctype进行标识
|
248
|
|
- q.setMctype(111);
|
249
|
|
- } else {
|
250
|
|
- q.setMctype(112);
|
251
|
|
- }
|
252
|
|
- // 设置知识点
|
253
|
|
- mquestions.add(q);
|
254
|
|
- // 获取试题知识点
|
255
|
|
- List<Map<String, Object>> qpoints = q.getPoints();
|
256
|
|
- // 处理试题知识点占分
|
257
|
|
- setPaperQuestionPointScore(pointqlist, quesplist, qpoints, q, null, null);
|
258
|
|
- setPaperQuestionPointRelation(qpoints, q, null, upQpointlist, mpid);
|
259
|
|
- setPaperQuestionQtypeScore(qtypeqlist, q, null, null);// 处理试题题型
|
260
|
|
- setPaperQuestionComplexityScore(complexitylist, q, null, null, upComplexitylist);// 处理试题难易度
|
261
|
|
-
|
262
|
|
- }
|
263
|
|
- if (q.getQlevel() == 3) {
|
264
|
|
- hasmt++;
|
265
|
|
- }
|
266
|
|
- if (!qorderlist.contains(q.getQorder())) {
|
267
|
|
- qorderlist.add(q.getQorder());
|
268
|
|
- }
|
269
|
|
- // 为了处理客观题中选项数量
|
270
|
|
- if (ctype == 1 || ctype == 2 || ctype == 4 || ctype == 5 || ctype == 6) {
|
271
|
|
- List<String> strlst = JSON.parseArray(q.getQoption(), String.class);
|
272
|
|
- MsPaperQtypeQuestion eqq = new MsPaperQtypeQuestion();
|
273
|
|
- eqq.setMptqid(q.getMptqid());
|
274
|
|
- eqq.setOptionnum(strlst.size());
|
275
|
|
- uplist.add(eqq);
|
276
|
|
- }
|
277
|
|
- }
|
278
|
|
-
|
279
|
|
- if (hasmt > 0) {
|
280
|
|
- // 说明该题型下有复合题,复合体进行知识点、题型下试题题号及id进行操作
|
281
|
|
- LinkedHashMap<String, List<MsPaperQtypeQuestionVo>> quesMap = tqlist.stream().collect(Collectors.groupingBy(MsPaperQtypeQuestionVo::getQuestionpid,
|
282
|
|
- LinkedHashMap::new, Collectors.toList()));
|
283
|
|
- for (Map.Entry<String, List<MsPaperQtypeQuestionVo>> entry : quesMap.entrySet()) {
|
284
|
|
- if (!entry.getKey().equals("000")) {
|
285
|
|
- // 说明该题为母题,
|
286
|
|
- MsPaperQtypeQuestionVo mq = new MsPaperQtypeQuestionVo();
|
287
|
|
- List<MsPaperQtypeQuestionVo> sonques = entry.getValue();
|
288
|
|
- int k = 0;// 如果k大于1说明有小题是主观题,则母题为主观题
|
289
|
|
- double score = 0;
|
290
|
|
- for (MsPaperQtypeQuestionVo sq : sonques) {
|
291
|
|
- if (!N_Utils.isObjectiveQuestion(sq.getCtype())) {
|
292
|
|
- k++;
|
293
|
|
- }
|
294
|
|
- score = N_Utils.getDoubleSum(score, sq.getQscore());
|
295
|
|
- }
|
296
|
|
-
|
297
|
|
- MsPaperQtypeQuestionVo qobj = sonques.get(0);
|
298
|
|
- mq.setQuestionid(qobj.getQuestionpid());
|
299
|
|
- mq.setComplexity(qobj.getMcomplexity());
|
300
|
|
- mq.setQorder(qobj.getQorder());
|
301
|
|
- mq.setQscore(score);
|
302
|
|
- mq.setQtypename(qobj.getMqtypename());
|
303
|
|
- if (k == 0) {
|
304
|
|
- mq.setMctype(111);
|
305
|
|
- } else {
|
306
|
|
- mq.setMctype(112);
|
307
|
|
- }
|
308
|
|
- mq.setQlevel(qobj.getMqlevel());
|
309
|
|
- mq.setSonques(sonques);
|
310
|
|
- // 获取所有子题的试题题号
|
311
|
|
- String[] qnstr = sonques.stream().map(MsPaperQtypeQuestionVo::getQn).toArray(String[]::new);
|
312
|
|
- // 所有子题的试题eptqid
|
313
|
|
- List<Integer> eptqids = sonques.stream().map(MsPaperQtypeQuestionVo::getMptqid).collect(Collectors.toList());
|
314
|
|
- Integer[] eptqidstr = eptqids.toArray(new Integer[0]);
|
315
|
|
-
|
316
|
|
- // 获取知识点
|
317
|
|
- List<Map<String, Object>> qpoints = sonques.get(0).getPoints();
|
318
|
|
- mq.setPoints(qpoints);
|
319
|
|
- mquestions.add(mq);
|
320
|
|
- setPaperQuestionPointScore(pointqlist, quesplist, qpoints, mq, qnstr, eptqids);
|
321
|
|
- setPaperQuestionPointRelation(qpoints, mq, eptqids, upQpointlist, mpid);
|
322
|
|
- setPaperQuestionQtypeScore(qtypeqlist, mq, qnstr, eptqidstr);// 处理试题题型
|
323
|
|
- setPaperQuestionComplexityScore(complexitylist, mq, qnstr, eptqidstr, upComplexitylist);// 处理试题难易度
|
324
|
|
- }
|
325
|
|
- }
|
326
|
|
- }
|
327
|
222
|
|
328
|
|
- // 试题题型分析数据
|
329
|
|
- double storerate = N_Utils.getDoubleDivideAndMulitiply(qt.getMptscore(), paper.getPscore());
|
330
|
|
- Map<String, Object> tmap = new TreeMap<>();
|
331
|
|
- tmap.put("qtid", qt.getMptid());
|
332
|
|
- tmap.put("qtname", qt.getMptname());
|
333
|
|
- tmap.put("num", qt.getMptnum());
|
334
|
|
- tmap.put("score", qt.getMptscore());
|
335
|
|
- tmap.put("srate", storerate);
|
336
|
|
- qtypeqlist = qtypeqlist.stream().sorted(Comparator.comparing(QuestionOrderVo::getOrder)).collect(Collectors.toList());
|
337
|
|
- tmap.put("ques", qtypeqlist);
|
338
|
|
- typelist.add(tmap);
|
339
|
|
- }
|
340
|
|
-
|
341
|
|
- // 进行客观题选项处理
|
342
|
|
- if (N_Utils.isListNotEmpty(uplist)) {
|
343
|
|
- msPaperQtypeQuestionMapper.updateBatchQuestionOptionnum(uplist);
|
344
|
|
- }
|
345
|
|
-
|
346
|
|
- // 试题总体分布进行分析
|
347
|
|
- // 客观题集合
|
348
|
|
- List<MsPaperQtypeQuestionVo> ktlst = mquestions.stream().filter(q -> q.getMctype() == 111).collect(Collectors.toList());
|
349
|
|
- int ktnum = ktlst.size();
|
350
|
|
- double ktscore = ktlst.stream().mapToDouble(MsPaperQtypeQuestionVo::getQscore).sum();
|
351
|
|
- double ktnrate = N_Utils.getIntegerDivideAndMulitiply(ktnum, paper.getPnum());
|
352
|
|
- double ktsrate = N_Utils.getDoubleDivideAndMulitiply(ktscore, paper.getPscore());
|
353
|
|
- List<MsPaperQsVo> ranglist = new ArrayList<>();
|
354
|
|
- ranglist.add(new MsPaperQsVo("客观题", ktscore, ktnum, ktsrate, ktnrate));
|
355
|
|
- MsPaperQsVo zgq = new MsPaperQsVo();
|
356
|
|
- zgq.setQtname("主观题");
|
357
|
|
- zgq.setNum(paper.getPnum() - ktnum);
|
358
|
|
- zgq.setNrate(N_Utils.getDoubleReduce(100.0, ktnrate));
|
359
|
|
- zgq.setScore(N_Utils.getDoubleReduce(paper.getPscore(), ktscore));
|
360
|
|
- zgq.setSrate(N_Utils.getDoubleReduce(100.0, ktsrate));
|
361
|
|
- ranglist.add(zgq);
|
362
|
|
- Map<String, Object> ztmap = new TreeMap<>();
|
363
|
|
- ztmap.put("pnum", paper.getPnum());
|
364
|
|
- ztmap.put("pscore", paper.getPscore());
|
365
|
|
- ztmap.put("ranglist", ranglist);
|
366
|
|
-
|
367
|
|
- // 设置试卷中试题难易度
|
368
|
|
- msPaperQtypeQuestionMapper.updateBatchQuestionComplexity(upComplexitylist);
|
369
|
|
-
|
370
|
|
- // 难易度
|
371
|
|
- List<Map<String, Object>> clist = new ArrayList<>();
|
372
|
|
- if (N_Utils.isListNotEmpty(complexitylist)) {
|
373
|
|
- Map<String, List<QuestionOrderVo>> complxmap = complexitylist.stream().collect(Collectors.groupingBy(QuestionOrderVo::getId, Collectors.toList()));
|
374
|
|
- for (Map.Entry<String, List<QuestionOrderVo>> entry : complxmap.entrySet()) {
|
375
|
|
- List<QuestionOrderVo> pgblist = entry.getValue();
|
376
|
|
- Double score = pgblist.stream().mapToDouble(QuestionOrderVo::getScore).sum();
|
377
|
|
- score = N_Utils.formatDouble(score, 1);
|
378
|
|
- Double srate = N_Utils.getDoubleDivideAndMulitiply(score, paper.getPscore());
|
379
|
|
- Map<String, Object> prate = new TreeMap<>();
|
380
|
|
- prate.put("level", Integer.parseInt(entry.getKey()));
|
381
|
|
- prate.put("score", score);
|
382
|
|
- prate.put("srate", srate);
|
383
|
|
- prate.put("ques", pgblist.stream().sorted(Comparator.comparing(QuestionOrderVo::getOrder)).collect(Collectors.toList()));
|
384
|
|
- clist.add(prate);
|
385
|
|
- }
|
386
|
|
- }
|
387
|
|
-
|
388
|
|
- // 保存试卷试题知识点关系
|
389
|
|
- msPaperQtypeQuestionPointMapper.deleteByMpid(mpid);
|
390
|
|
- msPaperQtypeQuestionPointMapper.insertList(upQpointlist);
|
391
|
|
-
|
392
|
|
- // 知识点分析
|
393
|
|
- List<Map<String, Object>> pointlist = new ArrayList<>();
|
394
|
|
- if (N_Utils.isListNotEmpty(pointqlist)) {
|
395
|
|
- LinkedHashMap<String, List<QuestionOrderVo>> pointmap = pointqlist.stream().collect(Collectors.groupingBy(QuestionOrderVo::getId, LinkedHashMap::new,
|
396
|
|
- Collectors.toList()));
|
397
|
|
- // 根据指示进行分组,
|
398
|
|
- for (Map.Entry<String, List<QuestionOrderVo>> entry : pointmap.entrySet()) {
|
399
|
|
- List<QuestionOrderVo> pgblist = entry.getValue();
|
400
|
|
- // 获取知识点的总分
|
401
|
|
- Double score = pgblist.stream().mapToDouble(QuestionOrderVo::getScore).sum();
|
402
|
|
- score = N_Utils.formatDouble(score, 1);
|
403
|
|
- Double srate = N_Utils.getDoubleDivideAndMulitiply(score, paper.getPscore());
|
404
|
|
- Map<String, Object> prate = new LinkedHashMap<>();
|
405
|
|
- prate.put("pointid", entry.getKey());
|
406
|
|
- prate.put("pointname", pgblist.get(0).getName());
|
407
|
|
- prate.put("score", score);
|
408
|
|
- prate.put("srate", srate);
|
409
|
|
- prate.put("ques", pgblist.stream().sorted(Comparator.comparing(QuestionOrderVo::getOrder)).collect(Collectors.toList()));
|
410
|
|
- pointlist.add(prate);
|
411
|
|
- }
|
412
|
|
- }
|
413
|
|
-
|
414
|
|
- MsPaperAnalyze epa = new MsPaperAnalyze();
|
415
|
|
- epa.setMpid(paper.getMpid());
|
416
|
|
- epa.setAlljson(JSON.toJSONString(ztmap));// 总体分析
|
417
|
|
- epa.setQnumjson(JSON.toJSONString(typelist));// 试题栏题型分析
|
418
|
|
- epa.setComplexityjson(JSON.toJSONString(clist));// 难易度分析
|
419
|
|
- epa.setPointjson(JSON.toJSONString(pointlist));// 知识点分析
|
420
|
|
- epa.setQuespointjson(JSON.toJSONString(quesplist));
|
421
|
|
-
|
422
|
|
- // 判断试卷你是否有分析,如果没有直接保存
|
423
|
|
- MsPaperAnalyze existEpa = msPaperAnalyzeMapper.getObjByMpId(paper.getMpid());
|
424
|
|
- if (existEpa == null || !N_Utils.isTrueInteger(existEpa.getMpaid())) {
|
425
|
|
- msPaperAnalyzeMapper.insertUseGeneratedKeys(epa);
|
426
|
|
- } else {
|
427
|
|
- epa.setMpaid(existEpa.getMpaid());
|
428
|
|
- msPaperAnalyzeMapper.updateByPrimaryKey(epa);
|
429
|
|
- }
|
430
|
|
- }
|
431
|
|
-
|
432
|
|
- // 设置知识点
|
433
|
|
- private void setPaperQuestionPointScore(List<QuestionOrderVo> pointqlist, List<QuestionPointVo> quesplist, List<Map<String, Object>> qpoints, MsPaperQtypeQuestionVo dq,
|
434
|
|
- String[] qnstr, List<Integer> mptqids) {
|
435
|
|
- if (N_Utils.isListNotEmpty(qpoints)) {
|
436
|
|
- if (qpoints.size() == 1) {
|
437
|
|
- // 试题只有一个知识点
|
438
|
|
- Map<String, Object> pointmap = qpoints.get(0);
|
439
|
|
- QuestionOrderVo qpoint = new QuestionOrderVo();
|
440
|
|
- qpoint.setId(pointmap.get("pointid").toString());
|
441
|
|
- qpoint.setName(pointmap.get("pointname").toString());
|
442
|
|
- qpoint.setOrder(dq.getQorder());
|
443
|
|
- qpoint.setScore(dq.getQscore());
|
444
|
|
- qpoint.setQlevel(dq.getQlevel());
|
445
|
|
- qpoint.setQuestionid(dq.getQuestionid());
|
446
|
|
- if (qnstr == null) {
|
447
|
|
- qpoint.setQns(new String[]{dq.getQn()});
|
448
|
|
- } else {
|
449
|
|
- qpoint.setQns(qnstr);
|
450
|
|
- }
|
451
|
|
-
|
452
|
|
- if (N_Utils.isListEmpty(mptqids)) {
|
453
|
|
- qpoint.setMptqids(new Integer[]{dq.getMptqid()});
|
454
|
|
- } else {
|
455
|
|
- Integer[] mptqidstr = mptqids.toArray(new Integer[0]);
|
456
|
|
- qpoint.setMptqids(mptqidstr);
|
457
|
|
- }
|
458
|
|
- pointqlist.add(qpoint);
|
459
|
|
-
|
460
|
|
- // 试题对应知识点
|
461
|
|
- QuestionPointVo questionPointVo = new QuestionPointVo();
|
462
|
|
- questionPointVo.setOrder(dq.getQorder());
|
463
|
|
- questionPointVo.setScore(dq.getQscore());
|
464
|
|
- questionPointVo.setQlevel(dq.getQlevel());
|
465
|
|
- questionPointVo.setQuestionid(dq.getQuestionid());
|
466
|
|
- List<Map<String, Object>> pointids = new ArrayList<>();
|
467
|
|
- Map<String, Object> map = new HashMap<>();
|
468
|
|
- map.put("pointid", pointmap.get("pointid").toString());
|
469
|
|
- map.put("score", dq.getQscore());
|
470
|
|
- pointids.add(map);
|
471
|
|
- questionPointVo.setPointids(pointids);
|
472
|
|
-
|
473
|
|
- if (N_Utils.isListEmpty(mptqids)) {
|
474
|
|
- List<Integer> saveids = new ArrayList<>();
|
475
|
|
- saveids.add(dq.getMptqid());
|
476
|
|
- questionPointVo.setMptqids(saveids);
|
477
|
|
- questionPointVo.setMptqid(dq.getMptqid());
|
478
|
|
- } else {
|
479
|
|
- questionPointVo.setMptqids(mptqids);
|
480
|
|
- questionPointVo.setMptqid(0);
|
481
|
|
- }
|
482
|
|
- quesplist.add(questionPointVo);
|
483
|
|
- } else {
|
484
|
|
-
|
485
|
|
- // 试题有多个知识点
|
486
|
|
- // 计算每个知识点所占分值(平均分配)
|
487
|
|
- Double[] avgps = N_Utils.getPointAvgScore(qpoints.size(), dq.getQscore());
|
488
|
|
- List<Map<String, Object>> pointids = new ArrayList<>();
|
489
|
|
- for (int m = 0; m < qpoints.size(); m++) {
|
490
|
|
- Map<String, Object> pointmap = qpoints.get(m);
|
491
|
|
- QuestionOrderVo qpoint = new QuestionOrderVo();
|
492
|
|
- qpoint.setId(pointmap.get("pointid").toString());
|
493
|
|
- qpoint.setName(pointmap.get("pointname").toString());
|
494
|
|
- qpoint.setOrder(dq.getQorder());
|
495
|
|
- qpoint.setQlevel(dq.getQlevel());
|
496
|
|
- qpoint.setQuestionid(dq.getQuestionid());
|
497
|
|
-
|
498
|
|
-
|
499
|
|
- Map<String, Object> quesmap = new HashMap<>();// 试题对应知识点
|
500
|
|
- quesmap.put("pointid", pointmap.get("pointid").toString());
|
501
|
|
-
|
502
|
|
- if (avgps.length == 2 && (m + 1) == qpoints.size()) {
|
503
|
|
- // 不能整除分,并且是最后一个知识点
|
504
|
|
- qpoint.setScore(avgps[1]);
|
505
|
|
- quesmap.put("score", avgps[1]);
|
506
|
|
- } else {
|
507
|
|
- qpoint.setScore(avgps[0]);
|
508
|
|
- quesmap.put("score", avgps[0]);
|
509
|
|
- }
|
510
|
|
- pointids.add(quesmap);
|
511
|
|
-
|
512
|
|
- // 题号集合
|
513
|
|
- if (qnstr == null) {
|
514
|
|
- qpoint.setQns(new String[]{dq.getQn()});
|
515
|
|
- } else {
|
516
|
|
- qpoint.setQns(qnstr);
|
517
|
|
- }
|
518
|
|
- // 试卷中试题id集合
|
519
|
|
- if (N_Utils.isListEmpty(mptqids)) {
|
520
|
|
- qpoint.setMptqids(new Integer[]{dq.getMptqid()});
|
521
|
|
- } else {
|
522
|
|
- Integer[] eptqidstr = mptqids.toArray(new Integer[0]);
|
523
|
|
- qpoint.setMptqids(eptqidstr);
|
524
|
|
- }
|
525
|
|
- pointqlist.add(qpoint);
|
526
|
|
- }
|
527
|
|
-
|
528
|
|
- // 试题对应知识点
|
529
|
|
- QuestionPointVo questionPointVo = new QuestionPointVo();
|
530
|
|
- questionPointVo.setOrder(dq.getQorder());
|
531
|
|
- questionPointVo.setScore(dq.getQscore());
|
532
|
|
- questionPointVo.setQlevel(dq.getQlevel());
|
533
|
|
- questionPointVo.setQuestionid(dq.getQuestionid());
|
534
|
|
- questionPointVo.setPointids(pointids);
|
535
|
|
- if (N_Utils.isListEmpty(mptqids)) {
|
536
|
|
- List<Integer> saveids = new ArrayList<>();
|
537
|
|
- saveids.add(dq.getMptqid());
|
538
|
|
- questionPointVo.setMptqids(saveids);
|
539
|
|
- questionPointVo.setMptqid(dq.getMptqid());
|
540
|
|
-
|
541
|
|
- } else {
|
542
|
|
- questionPointVo.setMptqids(mptqids);
|
543
|
|
- questionPointVo.setMptqid(0);
|
544
|
|
- }
|
545
|
|
- quesplist.add(questionPointVo);
|
546
|
|
-
|
547
|
|
- }
|
548
|
|
-
|
549
|
|
- } else {
|
550
|
|
- QuestionPointVo questionPointVo = new QuestionPointVo();
|
551
|
|
- questionPointVo.setOrder(dq.getQorder());
|
552
|
|
- questionPointVo.setScore(dq.getQscore());
|
553
|
|
- questionPointVo.setQlevel(dq.getQlevel());
|
554
|
|
- questionPointVo.setQuestionid(dq.getQuestionid());
|
555
|
|
- questionPointVo.setPointids(null);
|
556
|
|
- if (N_Utils.isListEmpty(mptqids)) {
|
557
|
|
- List<Integer> saveids = new ArrayList<>();
|
558
|
|
- saveids.add(dq.getMptqid());
|
559
|
|
- questionPointVo.setMptqids(saveids);
|
560
|
|
- questionPointVo.setMptqid(dq.getMptqid());
|
561
|
|
- } else {
|
562
|
|
- questionPointVo.setMptqids(mptqids);
|
563
|
|
- questionPointVo.setMptqid(0);
|
564
|
|
- }
|
565
|
|
-
|
566
|
|
- quesplist.add(questionPointVo);
|
567
|
|
- }
|
568
|
|
- }
|
569
|
|
-
|
570
|
|
- // 设置知识点--试卷试题知识点关联关系
|
571
|
|
- private void setPaperQuestionPointRelation(List<Map<String, Object>> qpoints, MsPaperQtypeQuestionVo dq, List<Integer> mptqids, List<MsPaperQtypeQuestionPoint> upQpointlist,
|
572
|
|
- Integer mpid) {
|
573
|
|
- if (N_Utils.isListNotEmpty(qpoints)) {
|
574
|
|
- // 试题对应知识点关系
|
575
|
|
- int i = 0;
|
576
|
|
- for (Map<String, Object> pointmap : qpoints) {
|
577
|
|
- String pointid = pointmap.get("pointid").toString();
|
578
|
|
- String pointname = pointmap.get("pointname").toString();
|
579
|
|
-
|
580
|
|
- if (N_Utils.isListEmpty(mptqids)) {
|
581
|
|
- MsPaperQtypeQuestionPoint upPoint = new MsPaperQtypeQuestionPoint();
|
582
|
|
- upPoint.setMpid(mpid);
|
583
|
|
- upPoint.setMptqid(dq.getMptqid());
|
584
|
|
- upPoint.setPointid(pointid);
|
585
|
|
- upPoint.setPointname(pointname);
|
586
|
|
- upPoint.setMporder(i++);
|
587
|
|
-
|
588
|
|
- upQpointlist.add(upPoint);
|
589
|
|
- } else {
|
590
|
|
- for (Integer mptqid : mptqids) {
|
591
|
|
- MsPaperQtypeQuestionPoint upPoint = new MsPaperQtypeQuestionPoint();
|
592
|
|
- upPoint.setMpid(mpid);
|
593
|
|
- upPoint.setMptqid(mptqid);
|
594
|
|
- upPoint.setPointid(pointid);
|
595
|
|
- upPoint.setPointname(pointname);
|
596
|
|
- upPoint.setMporder(i++);
|
597
|
|
-
|
598
|
|
- upQpointlist.add(upPoint);
|
599
|
|
- }
|
600
|
|
- }
|
601
|
|
- }
|
602
|
|
- }
|
603
|
|
-
|
604
|
|
- }
|
605
|
|
-
|
606
|
|
- // 设置题型下试题题号及分值
|
607
|
|
- private void setPaperQuestionQtypeScore(List<QuestionOrderVo> qtypelist, MsPaperQtypeQuestionVo dq, String[] qnstr, Integer[] mptqidstr) {
|
608
|
|
- QuestionOrderVo qtype = new QuestionOrderVo();
|
609
|
|
- qtype.setId(dq.getQtypeid());
|
610
|
|
- qtype.setName(dq.getQtypename());
|
611
|
|
- qtype.setComplexity(dq.getComplexity());
|
612
|
|
- qtype.setOrder(dq.getQorder());
|
613
|
|
- qtype.setScore(dq.getQscore());
|
614
|
|
- qtype.setQlevel(dq.getQlevel());
|
615
|
|
- qtype.setQuestionid(dq.getQuestionid());
|
616
|
|
- if (qnstr == null) {
|
617
|
|
- qtype.setQns(new String[]{dq.getQn()});
|
618
|
|
- } else {
|
619
|
|
- qtype.setQns(qnstr);
|
620
|
|
- }
|
621
|
|
- if (mptqidstr == null) {
|
622
|
|
- qtype.setMptqids(new Integer[]{dq.getMptqid()});
|
623
|
|
- } else {
|
624
|
|
- qtype.setMptqids(mptqidstr);
|
625
|
|
- }
|
626
|
|
-
|
627
|
|
- qtypelist.add(qtype);
|
628
|
|
- }
|
629
|
|
-
|
630
|
|
- // 设置试题难易度
|
631
|
|
- private void setPaperQuestionComplexityScore(List<QuestionOrderVo> complexityList, MsPaperQtypeQuestionVo dq, String[] qnstr, Integer[] mptqidstr,
|
632
|
|
- List<MsPaperQtypeQuestion> upComplexitylist) {
|
633
|
|
- QuestionOrderVo qtype = new QuestionOrderVo();
|
634
|
|
- qtype.setId(dq.getComplexity().toString());// 存放试题难易度
|
635
|
|
- qtype.setOrder(dq.getQorder());
|
636
|
|
- qtype.setScore(dq.getQscore());
|
637
|
|
- qtype.setQlevel(dq.getQlevel());
|
638
|
|
- qtype.setQuestionid(dq.getQuestionid());
|
639
|
|
- if (qnstr == null) {
|
640
|
|
- qtype.setQns(new String[]{dq.getQn()});
|
641
|
|
- } else {
|
642
|
|
- qtype.setQns(qnstr);
|
643
|
|
- }
|
644
|
|
-
|
645
|
|
- if (mptqidstr == null) {
|
646
|
|
- qtype.setMptqids(new Integer[]{dq.getMptqid()});
|
647
|
|
- } else {
|
648
|
|
- qtype.setMptqids(mptqidstr);
|
649
|
|
- }
|
650
|
|
-
|
651
|
|
- complexityList.add(qtype);
|
652
|
|
- // 设置试题难易度
|
653
|
|
- if (mptqidstr == null) {
|
654
|
|
- MsPaperQtypeQuestion upComplexity = new MsPaperQtypeQuestion();
|
655
|
|
- upComplexity.setMptqid(dq.getMptqid());
|
656
|
|
- upComplexity.setComplexity(dq.getComplexity());
|
657
|
|
-
|
658
|
|
- upComplexitylist.add(upComplexity);
|
659
|
|
- } else {
|
660
|
|
- for (Integer mptqid : mptqidstr) {
|
661
|
|
- MsPaperQtypeQuestion upComplexity = new MsPaperQtypeQuestion();
|
662
|
|
- upComplexity.setMptqid(mptqid);
|
663
|
|
- upComplexity.setComplexity(dq.getComplexity());
|
664
|
|
-
|
665
|
|
- upComplexitylist.add(upComplexity);
|
666
|
|
- }
|
667
|
|
- }
|
668
|
|
-
|
669
|
|
-
|
670
|
|
- }
|
671
|
223
|
|
672
|
224
|
// 设置附件
|
673
|
225
|
private void setPaperFiles(MsPaper paper, List<MsPaperFile> pfiles, List<String> imgs) {
|
|
@@ -694,191 +246,7 @@ public class MsPaperQtypeService {
|
694
|
246
|
|
695
|
247
|
}
|
696
|
248
|
|
697
|
|
- // 保存试卷分析--附件
|
698
|
|
- private void savePaperAnalyzeForFj(MsPaper paper) {
|
699
|
|
- List<MsPaperQtypeVo> fjtypelist = msPaperQtypeMapper.listPaperQtypeQuesitonsForFj(paper.getMpid());
|
700
|
|
- List<MsPaperQtypeQuestionVo> queslist = new ArrayList<>();
|
701
|
|
- for (MsPaperQtypeVo fj : fjtypelist) {
|
702
|
|
- List<MsPaperQtypeQuestionVo> qlist = fj.getQuestions();
|
703
|
|
- queslist.addAll(qlist);
|
704
|
|
- }
|
705
|
249
|
|
706
|
|
- List<QuestionOrderVo> pointqlist = new ArrayList<>();// 用于存放知识点,以及知识点下得分
|
707
|
|
- List<QuestionPointVo> quesplist = new ArrayList<>();// 单题对应知识点
|
708
|
|
-
|
709
|
|
- // 总体分析(主观题、客观题)
|
710
|
|
- // 处理题型1单选题2多选题3主观题4判断对错5判断√×6判断TF11综合题12听力13填空题
|
711
|
|
- int znum = 0;
|
712
|
|
- double zscore = 0;
|
713
|
|
- int knum = 0;
|
714
|
|
- double kscore = 0;
|
715
|
|
- for (MsPaperQtypeQuestionVo q : queslist) {
|
716
|
|
- if (N_Utils.isObjectiveQuestion(q.getCtype())) {
|
717
|
|
- knum++;
|
718
|
|
- kscore = kscore + q.getQscore();
|
719
|
|
- } else {
|
720
|
|
- znum++;
|
721
|
|
- zscore = zscore + q.getQscore();
|
722
|
|
- }
|
723
|
|
-
|
724
|
|
- List<Map<String, Object>> qpoints = q.getPoints();
|
725
|
|
- if(qpoints != null) {
|
726
|
|
- // 存放知识点
|
727
|
|
- setPaperQuestionPointScore(pointqlist, quesplist, qpoints, q, null, null);
|
728
|
|
- }
|
729
|
|
- }
|
730
|
|
-
|
731
|
|
- double znumrate = N_Utils.getIntegerDivideAndMulitiply(znum, paper.getPnum());
|
732
|
|
- double knumrate = N_Utils.getDoubleReduce(100.0, znumrate);
|
733
|
|
-
|
734
|
|
- double zscorerate = N_Utils.getDoubleDivideAndMulitiply(zscore, paper.getPscore());
|
735
|
|
- double kscorerate = N_Utils.getDoubleReduce(100.0, zscorerate);
|
736
|
|
-
|
737
|
|
- List<Map<String, Object>> ranglist = new ArrayList<>();
|
738
|
|
- Map<String, Object> zgmap = new TreeMap<>();
|
739
|
|
- zgmap.put("qtname", "主观题");
|
740
|
|
- zgmap.put("score", zscore);
|
741
|
|
- zgmap.put("num", znum);
|
742
|
|
- zgmap.put("srate", zscorerate);
|
743
|
|
- zgmap.put("nrate", znumrate);
|
744
|
|
- ranglist.add(zgmap);
|
745
|
|
- Map<String, Object> kgmap = new TreeMap<>();
|
746
|
|
- kgmap.put("qtname", "客观题");
|
747
|
|
- kgmap.put("score", kscore);
|
748
|
|
- kgmap.put("num", knum);
|
749
|
|
- kgmap.put("srate", kscorerate);
|
750
|
|
- kgmap.put("nrate", knumrate);
|
751
|
|
- ranglist.add(kgmap);
|
752
|
|
-
|
753
|
|
- Map<String, Object> ztmap = new TreeMap<>();
|
754
|
|
- ztmap.put("pnum", paper.getPnum());
|
755
|
|
- ztmap.put("pscore", paper.getPscore());
|
756
|
|
- ztmap.put("ranglist", ranglist);
|
757
|
|
-
|
758
|
|
- // 题型分布(按照名称进行分组)
|
759
|
|
- fjtypelist.sort(Comparator.comparing(MsPaperQtypeVo::getMptorder));
|
760
|
|
- Map<String, List<MsPaperQtypeVo>> qtypemap = fjtypelist.stream().collect(Collectors.groupingBy(MsPaperQtypeVo::getMptname, Collectors.toList()));
|
761
|
|
- List<Map<String, Object>> qtlist = new ArrayList<>();
|
762
|
|
- for (Map.Entry<String, List<MsPaperQtypeVo>> entry : qtypemap.entrySet()) {
|
763
|
|
- List<MsPaperQtypeVo> aq = entry.getValue();
|
764
|
|
- int num = aq.stream().mapToInt(MsPaperQtypeVo::getMptnum).sum();
|
765
|
|
- double tscore = aq.stream().mapToDouble(MsPaperQtypeVo::getMptscore).sum();
|
766
|
|
- tscore = N_Utils.formatDouble(tscore, 1);
|
767
|
|
- double storerate = N_Utils.getDoubleDivideAndMulitiply(tscore, paper.getPscore());
|
768
|
|
- // 获取小题题号
|
769
|
|
-
|
770
|
|
- List<Integer> orderlist = new ArrayList<>();
|
771
|
|
- List<Integer> mptqidlist = new ArrayList<>();
|
772
|
|
- List<String> qnlist = new ArrayList<>();
|
773
|
|
- List<Double> scorelist = new ArrayList<>();
|
774
|
|
- List<String> qnamelist = new ArrayList<>();
|
775
|
|
- for (MsPaperQtypeVo t : aq) {
|
776
|
|
- List<MsPaperQtypeQuestionVo> qlist = t.getQuestions();
|
777
|
|
- for (MsPaperQtypeQuestionVo q : qlist) {
|
778
|
|
- orderlist.add(q.getQorder());
|
779
|
|
- mptqidlist.add(q.getMptqid());
|
780
|
|
- qnlist.add(q.getQn());
|
781
|
|
- scorelist.add(q.getQscore());
|
782
|
|
- qnamelist.add(q.getQtypename());
|
783
|
|
- }
|
784
|
|
- }
|
785
|
|
-
|
786
|
|
- Map<String, Object> anmap = new TreeMap<>();// 题型对应试题的id和基础信息
|
787
|
|
- anmap.put("orders", orderlist);
|
788
|
|
- anmap.put("mptqids", mptqidlist);
|
789
|
|
- anmap.put("qns", qnlist);
|
790
|
|
- anmap.put("scores", scorelist);
|
791
|
|
- anmap.put("qtypenames", qnamelist);
|
792
|
|
-
|
793
|
|
- Map<String, Object> tmap = new TreeMap<>();
|
794
|
|
- tmap.put("qtname", entry.getKey());
|
795
|
|
- tmap.put("qtid", aq.get(0).getMptid());
|
796
|
|
- tmap.put("num", num);
|
797
|
|
- tmap.put("score", tscore);
|
798
|
|
- tmap.put("srate", storerate);
|
799
|
|
- tmap.put("ques", anmap);
|
800
|
|
- qtlist.add(tmap);
|
801
|
|
- }
|
802
|
|
-
|
803
|
|
- // 试卷中试题难易度
|
804
|
|
- String complexityJson = null;
|
805
|
|
- List<MsPaperQtypeQuestionVo> hasComplexitys = queslist.stream().filter(q -> N_Utils.isTrueInteger(q.getComplexity())).collect(Collectors.toList());
|
806
|
|
- if (!hasComplexitys.isEmpty()) {
|
807
|
|
- Map<Integer, List<MsPaperQtypeQuestionVo>> complexmap = queslist.stream().collect(Collectors.groupingBy(MsPaperQtypeQuestionVo::getComplexity, Collectors.toList()));
|
808
|
|
- List<Map<String, Object>> clist = new ArrayList<>();
|
809
|
|
- for (Map.Entry<Integer, List<MsPaperQtypeQuestionVo>> entry : complexmap.entrySet()) {
|
810
|
|
- List<MsPaperQtypeQuestionVo> pgblist = entry.getValue();
|
811
|
|
- // 处理需要保存的ques集合
|
812
|
|
- List<Map<String, Object>> quesList = new ArrayList<>();
|
813
|
|
- for (MsPaperQtypeQuestionVo q : pgblist) {
|
814
|
|
- Map<String, Object> qmap = new TreeMap<>();
|
815
|
|
- qmap.put("id", entry.getKey());
|
816
|
|
- qmap.put("mptqid", q.getMptqid());
|
817
|
|
- qmap.put("order", q.getQorder());
|
818
|
|
- qmap.put("qlevel", 1);
|
819
|
|
- qmap.put("qns", q.getQn());
|
820
|
|
- qmap.put("score", q.getQscore());
|
821
|
|
-
|
822
|
|
- quesList.add(qmap);
|
823
|
|
- }
|
824
|
|
-
|
825
|
|
- Double score = pgblist.stream().mapToDouble(MsPaperQtypeQuestionVo::getQscore).sum();
|
826
|
|
- score = N_Utils.formatDouble(score, 1);
|
827
|
|
- Double srate = N_Utils.getDoubleDivideAndMulitiply(score, paper.getPscore());
|
828
|
|
- Map<String, Object> prate = new TreeMap<>();
|
829
|
|
- prate.put("level", entry.getKey());
|
830
|
|
- prate.put("score", score);
|
831
|
|
- prate.put("srate", srate);
|
832
|
|
- prate.put("ques", quesList);
|
833
|
|
- clist.add(prate);
|
834
|
|
- }
|
835
|
|
- complexityJson = JSON.toJSONString(clist);
|
836
|
|
- }
|
837
|
|
-
|
838
|
|
- // 试卷中试题知识点
|
839
|
|
- String pointJson = null;
|
840
|
|
- String quesPointJson = null;
|
841
|
|
- if (N_Utils.isListNotEmpty(pointqlist)) {
|
842
|
|
- List<Map<String, Object>> pointlist = new ArrayList<>();
|
843
|
|
- LinkedHashMap<String, List<QuestionOrderVo>> pointmap = pointqlist.stream().collect(Collectors.groupingBy(QuestionOrderVo::getId, LinkedHashMap::new,
|
844
|
|
- Collectors.toList()));
|
845
|
|
- // 根据指示进行分组,
|
846
|
|
- for (Map.Entry<String, List<QuestionOrderVo>> entry : pointmap.entrySet()) {
|
847
|
|
- List<QuestionOrderVo> pgblist = entry.getValue();
|
848
|
|
- // 获取知识点的总分
|
849
|
|
- Double score = pgblist.stream().mapToDouble(QuestionOrderVo::getScore).sum();
|
850
|
|
- score = N_Utils.formatDouble(score, 1);
|
851
|
|
- Double srate = N_Utils.getDoubleDivideAndMulitiply(score, paper.getPscore());
|
852
|
|
- Map<String, Object> prate = new LinkedHashMap<>();
|
853
|
|
- prate.put("pointid", entry.getKey());
|
854
|
|
- prate.put("pointname", pgblist.get(0).getName());
|
855
|
|
- prate.put("score", score);
|
856
|
|
- prate.put("srate", srate);
|
857
|
|
- prate.put("ques", pgblist.stream().sorted(Comparator.comparing(QuestionOrderVo::getOrder)).collect(Collectors.toList()));
|
858
|
|
- pointlist.add(prate);
|
859
|
|
- }
|
860
|
|
-
|
861
|
|
- pointJson = JSON.toJSONString(pointlist);
|
862
|
|
- quesPointJson = JSON.toJSONString(quesplist);
|
863
|
|
- }
|
864
|
|
-
|
865
|
|
- MsPaperAnalyze epa = new MsPaperAnalyze();
|
866
|
|
- epa.setMpid(paper.getMpid());
|
867
|
|
- epa.setAlljson(JSON.toJSONString(ztmap));
|
868
|
|
- epa.setQnumjson(JSON.toJSONString(qtlist));
|
869
|
|
- epa.setComplexityjson(complexityJson);
|
870
|
|
- epa.setPointjson(pointJson);
|
871
|
|
- epa.setQuespointjson(quesPointJson);
|
872
|
|
-
|
873
|
|
- // 判断试卷你是否有分析,如果没有直接保存
|
874
|
|
- MsPaperAnalyze existEpa = msPaperAnalyzeMapper.getObjByMpId(paper.getMpid());
|
875
|
|
- if (existEpa == null || !N_Utils.isTrueInteger(existEpa.getMpaid())) {
|
876
|
|
- msPaperAnalyzeMapper.insertUseGeneratedKeys(epa);
|
877
|
|
- } else {
|
878
|
|
- epa.setMpaid(existEpa.getMpaid());
|
879
|
|
- msPaperAnalyzeMapper.updateByPrimaryKey(epa);
|
880
|
|
- }
|
881
|
|
- }
|
882
|
250
|
|
883
|
251
|
|
884
|
252
|
/*
|
|
@@ -1090,9 +458,7 @@ public class MsPaperQtypeService {
|
1090
|
458
|
|
1091
|
459
|
// 保存完知识点难易度后,更新试卷分析
|
1092
|
460
|
MsPaper apaper = msPaperMapper.selectByPrimaryKey(mpid);
|
1093
|
|
- savePaperAnalyzeForFj(apaper);
|
1094
|
|
-
|
1095
|
|
- // 生成考试报告中知识点难易度相关分析
|
|
461
|
+ msPaperAnalyzeService.savePaperAnalyzeForFj(apaper);
|
1096
|
462
|
}
|
1097
|
463
|
|
1098
|
464
|
/*
|
|
@@ -1142,7 +508,7 @@ public class MsPaperQtypeService {
|
1142
|
508
|
List<MsPaperQtypeQuestionVo> qlist = qt.getQuestions();
|
1143
|
509
|
List<MsPaperQtypeQuestionVo> rtnqlist = new ArrayList<>();//保存处理后的试题
|
1144
|
510
|
String qpid = "";//母题id
|
1145
|
|
- List<MsPaperQtypeQuestionVo> sonqlist = new ArrayList<>();
|
|
511
|
+ List<MsPaperQtypeQuestionVo> sonqlist;
|
1146
|
512
|
for(MsPaperQtypeQuestionVo q : qlist){
|
1147
|
513
|
//试题类型1单题2母题3子题
|
1148
|
514
|
if(q.getQlevel() == 3){
|
|
@@ -1161,7 +527,7 @@ public class MsPaperQtypeService {
|
1161
|
527
|
mq.setQlevel(q.getMqlevel());
|
1162
|
528
|
mq.setHashear(q.getMhashear());
|
1163
|
529
|
mq.setHearfile(q.getMhearfile());
|
1164
|
|
- Double mscore = sonqlist.stream().collect(Collectors.summingDouble(MsPaperQtypeQuestionVo:: getQscore));
|
|
530
|
+ Double mscore = sonqlist.stream().mapToDouble(MsPaperQtypeQuestionVo::getQscore).sum();
|
1165
|
531
|
mq.setQscore(mscore);
|
1166
|
532
|
|
1167
|
533
|
for(MsPaperQtypeQuestionVo sonQ : sonqlist){
|
|
@@ -1302,7 +668,7 @@ public class MsPaperQtypeService {
|
1302
|
668
|
setPaperNumAndScore(paper);
|
1303
|
669
|
msPaperMapper.updateByPrimaryKeySelective(paper);
|
1304
|
670
|
|
1305
|
|
- savePaperAnalyzeForFj(paper);
|
|
671
|
+ msPaperAnalyzeService.savePaperAnalyzeForFj(paper);
|
1306
|
672
|
|
1307
|
673
|
if (exam.getPstate() != 2) {
|
1308
|
674
|
// 更改科目状态
|
|
@@ -1384,7 +750,7 @@ public class MsPaperQtypeService {
|
1384
|
750
|
// 试卷中小题重新排序
|
1385
|
751
|
chandleQuestionOrder(paper);
|
1386
|
752
|
|
1387
|
|
- savePaperAnalyzeForFj(paper);
|
|
753
|
+ msPaperAnalyzeService.savePaperAnalyzeForFj(paper);
|
1388
|
754
|
deletePaperOtherInfo(mpid);
|
1389
|
755
|
|
1390
|
756
|
return new ResultVo(0, "保存成功", paper.getMpid());
|
|
@@ -1414,7 +780,7 @@ public class MsPaperQtypeService {
|
1414
|
780
|
chandlePaperNumQtypeOrder(paper);
|
1415
|
781
|
|
1416
|
782
|
// 重新生成试卷分析
|
1417
|
|
- savePaperAnalyzeForFj(paper);
|
|
783
|
+ msPaperAnalyzeService.savePaperAnalyzeForFj(paper);
|
1418
|
784
|
return new ResultVo(0, "删除成功", paper.getMpid());
|
1419
|
785
|
}
|
1420
|
786
|
|
|
@@ -1638,8 +1004,6 @@ public class MsPaperQtypeService {
|
1638
|
1004
|
if (paper == null || !N_Utils.isTrueInteger(paper.getPnum())) {
|
1639
|
1005
|
paper = msPaperMapper.selectByPrimaryKey(mpid);
|
1640
|
1006
|
}
|
1641
|
|
- savePaperAnalyzeForFj(paper);
|
|
1007
|
+ msPaperAnalyzeService.savePaperAnalyzeForFj(paper);
|
1642
|
1008
|
}
|
1643
|
|
-
|
1644
|
|
-
|
1645
|
1009
|
}
|