Browse Source

更改作业考试集合sum时精度问题

tags/正式版本
王宁 2 years ago
parent
commit
7bda347588

+ 3
- 0
sexam/src/main/java/com/xhkjedu/sexam/service/paper/EPaperQtypeService.java View File

339
             for(Map.Entry<String, List<QuestionOrderVo>> entry : complxmap.entrySet()){
339
             for(Map.Entry<String, List<QuestionOrderVo>> entry : complxmap.entrySet()){
340
                 List<QuestionOrderVo> pgblist = entry.getValue();
340
                 List<QuestionOrderVo> pgblist = entry.getValue();
341
                 Double score = pgblist.stream().mapToDouble(s -> s.getScore()).sum();
341
                 Double score = pgblist.stream().mapToDouble(s -> s.getScore()).sum();
342
+                score = N_Utils.formatDouble(score,1);
342
                 Double srate = N_Utils.getDoubleDivideAndMulitiply(score,ePaper.getPscore());
343
                 Double srate = N_Utils.getDoubleDivideAndMulitiply(score,ePaper.getPscore());
343
                 Map prate = new TreeMap();
344
                 Map prate = new TreeMap();
344
                 prate.put("level",Integer.parseInt(entry.getKey()));
345
                 prate.put("level",Integer.parseInt(entry.getKey()));
358
                 List<QuestionOrderVo> pgblist = entry.getValue();
359
                 List<QuestionOrderVo> pgblist = entry.getValue();
359
                 //获取知识点的总分
360
                 //获取知识点的总分
360
                 Double score = pgblist.stream().mapToDouble(s -> s.getScore()).sum();
361
                 Double score = pgblist.stream().mapToDouble(s -> s.getScore()).sum();
362
+                score = N_Utils.formatDouble(score,1);
361
                 Double srate = N_Utils.getDoubleDivideAndMulitiply(score,ePaper.getPscore());
363
                 Double srate = N_Utils.getDoubleDivideAndMulitiply(score,ePaper.getPscore());
362
                 Map prate = new TreeMap();
364
                 Map prate = new TreeMap();
363
                 prate.put("pointid",entry.getKey());
365
                 prate.put("pointid",entry.getKey());
615
             List<EPaperQtype> aq = entry.getValue();
617
             List<EPaperQtype> aq = entry.getValue();
616
             int num = aq.stream().mapToInt(EPaperQtype::getEptnum).sum();
618
             int num = aq.stream().mapToInt(EPaperQtype::getEptnum).sum();
617
             double tscore = aq.stream().collect(Collectors.summingDouble(EPaperQtype:: getEptscore));
619
             double tscore = aq.stream().collect(Collectors.summingDouble(EPaperQtype:: getEptscore));
620
+            tscore = N_Utils.formatDouble(tscore,1);
618
             double storerate = N_Utils.getDoubleDivideAndMulitiply(tscore, ePaper.getPscore());
621
             double storerate = N_Utils.getDoubleDivideAndMulitiply(tscore, ePaper.getPscore());
619
             //获取小题题号
622
             //获取小题题号
620
 
623
 

+ 20
- 0
sexam/src/main/java/com/xhkjedu/sexam/service/report/EReportGenerateService.java View File

1841
                 gstunum = qgstulist.size();
1841
                 gstunum = qgstulist.size();
1842
                 EPaperStudentQuestion qgmaxstu = qgstulist.stream().max(Comparator.comparing(EPaperStudentQuestion::getStuscore)).get();
1842
                 EPaperStudentQuestion qgmaxstu = qgstulist.stream().max(Comparator.comparing(EPaperStudentQuestion::getStuscore)).get();
1843
                 Double qgscore = qgstulist.stream().mapToDouble(EPaperStudentQuestion::getQscore).sum();
1843
                 Double qgscore = qgstulist.stream().mapToDouble(EPaperStudentQuestion::getQscore).sum();
1844
+                qgscore = N_Utils.formatDouble(qgscore,1);
1844
                 Double qgstuscore = qgstulist.stream().mapToDouble(EPaperStudentQuestion::getStuscore).sum();
1845
                 Double qgstuscore = qgstulist.stream().mapToDouble(EPaperStudentQuestion::getStuscore).sum();
1846
+                qgstuscore = N_Utils.formatDouble(qgstuscore,1);
1845
                 Double qgavgscore = N_Utils.getDoubleDivideForAvg(qgstuscore, gstunum);//年级平均分
1847
                 Double qgavgscore = N_Utils.getDoubleDivideForAvg(qgstuscore, gstunum);//年级平均分
1846
                 Double qgsrate = N_Utils.getDoubleDivideAndMulitiply(qgstuscore, qgscore);
1848
                 Double qgsrate = N_Utils.getDoubleDivideAndMulitiply(qgstuscore, qgscore);
1847
                 tgscore = ExamUtil.add(tgscore, qgscore);
1849
                 tgscore = ExamUtil.add(tgscore, qgscore);
1855
                         int cstunum = qcstulist.size();//班级下试题作答学生数量
1857
                         int cstunum = qcstulist.size();//班级下试题作答学生数量
1856
                         EPaperStudentQuestion qcmaxstu = qcstulist.stream().max(Comparator.comparing(EPaperStudentQuestion::getStuscore)).get();
1858
                         EPaperStudentQuestion qcmaxstu = qcstulist.stream().max(Comparator.comparing(EPaperStudentQuestion::getStuscore)).get();
1857
                         Double qcscore = qcstulist.stream().mapToDouble(EPaperStudentQuestion::getQscore).sum();
1859
                         Double qcscore = qcstulist.stream().mapToDouble(EPaperStudentQuestion::getQscore).sum();
1860
+                        qcscore = N_Utils.formatDouble(qcscore,1);
1858
                         Double qcstuscore = qcstulist.stream().mapToDouble(EPaperStudentQuestion::getStuscore).sum();
1861
                         Double qcstuscore = qcstulist.stream().mapToDouble(EPaperStudentQuestion::getStuscore).sum();
1862
+                        qcstuscore = N_Utils.formatDouble(qcstuscore,1);
1859
                         Double qcavgscore = N_Utils.getDoubleDivideForAvg(qcstuscore, cstunum);
1863
                         Double qcavgscore = N_Utils.getDoubleDivideForAvg(qcstuscore, cstunum);
1860
                         Double qcsrate = N_Utils.getDoubleDivideAndMulitiply(qcstuscore, qcscore);
1864
                         Double qcsrate = N_Utils.getDoubleDivideAndMulitiply(qcstuscore, qcscore);
1861
 
1865
 
2013
                         pstq.setStudentid(entry.getKey());
2017
                         pstq.setStudentid(entry.getKey());
2014
 
2018
 
2015
                         Double qstuscore = stuqueslist.stream().mapToDouble(EPaperStudentQuestion::getStuscore).sum();
2019
                         Double qstuscore = stuqueslist.stream().mapToDouble(EPaperStudentQuestion::getStuscore).sum();
2020
+                        qstuscore = N_Utils.formatDouble(qstuscore,1);
2016
                         Double qscore = stuqueslist.stream().mapToDouble(EPaperStudentQuestion::getQscore).sum();
2021
                         Double qscore = stuqueslist.stream().mapToDouble(EPaperStudentQuestion::getQscore).sum();
2022
+                        qscore = N_Utils.formatDouble(qscore,1);
2017
                         pstq.setQscore(qscore);
2023
                         pstq.setQscore(qscore);
2018
                         pstq.setStuscore(qstuscore);
2024
                         pstq.setStuscore(qstuscore);
2019
                         pstq.setCtype(11);//母子题关系的均设置为复合题,不再进行选项区分
2025
                         pstq.setCtype(11);//母子题关系的均设置为复合题,不再进行选项区分
2039
 
2045
 
2040
                 gstunum = qgstulist.size();
2046
                 gstunum = qgstulist.size();
2041
                 Double qgscore = qgstulist.stream().mapToDouble(EPaperStudentQuestion::getQscore).sum();
2047
                 Double qgscore = qgstulist.stream().mapToDouble(EPaperStudentQuestion::getQscore).sum();
2048
+                qgscore = N_Utils.formatDouble(qgscore,1);
2042
                 Double qgstuscore = qgstulist.stream().mapToDouble(EPaperStudentQuestion::getStuscore).sum();
2049
                 Double qgstuscore = qgstulist.stream().mapToDouble(EPaperStudentQuestion::getStuscore).sum();
2050
+                qgstuscore = N_Utils.formatDouble(qgstuscore,1);
2043
                 EPaperStudentQuestion qgmaxscore = qgstulist.stream().max(Comparator.comparing(EPaperStudentQuestion::getStuscore)).get();
2051
                 EPaperStudentQuestion qgmaxscore = qgstulist.stream().max(Comparator.comparing(EPaperStudentQuestion::getStuscore)).get();
2044
                 tgscore = ExamUtil.add(tgscore, qgscore);
2052
                 tgscore = ExamUtil.add(tgscore, qgscore);
2045
                 tgstuscore = ExamUtil.add(tgstuscore, qgstuscore);
2053
                 tgstuscore = ExamUtil.add(tgstuscore, qgstuscore);
2050
                     if(N_Utils.isListNotEmpty(qcstulist)){
2058
                     if(N_Utils.isListNotEmpty(qcstulist)){
2051
                         int cstunum = qcstulist.size();//班级下试题作答学生数量
2059
                         int cstunum = qcstulist.size();//班级下试题作答学生数量
2052
                         Double qcscore = qcstulist.stream().mapToDouble(EPaperStudentQuestion::getQscore).sum();
2060
                         Double qcscore = qcstulist.stream().mapToDouble(EPaperStudentQuestion::getQscore).sum();
2061
+                        qcscore = N_Utils.formatDouble(qcscore,1);
2053
                         Double qcstuscore = qcstulist.stream().mapToDouble(EPaperStudentQuestion::getStuscore).sum();
2062
                         Double qcstuscore = qcstulist.stream().mapToDouble(EPaperStudentQuestion::getStuscore).sum();
2063
+                        qcstuscore = N_Utils.formatDouble(qcstuscore,1);
2054
                         Double qcavgscore = N_Utils.getDoubleDivideForAvg(qcstuscore,cstunum);
2064
                         Double qcavgscore = N_Utils.getDoubleDivideForAvg(qcstuscore,cstunum);
2055
                         EPaperStudentQuestion maxscore = qcstulist.stream().max(Comparator.comparing(EPaperStudentQuestion::getStuscore)).get();
2065
                         EPaperStudentQuestion maxscore = qcstulist.stream().max(Comparator.comparing(EPaperStudentQuestion::getStuscore)).get();
2056
 
2066
 
2188
                     for (Map.Entry<Integer, List<EPaperStudentQuestion>> entry : stuquesmap.entrySet()) {
2198
                     for (Map.Entry<Integer, List<EPaperStudentQuestion>> entry : stuquesmap.entrySet()) {
2189
                         List<EPaperStudentQuestion> stuques = entry.getValue();
2199
                         List<EPaperStudentQuestion> stuques = entry.getValue();
2190
                         Double stuscore = stuques.stream().mapToDouble(EPaperStudentQuestion::getStuscore).sum();
2200
                         Double stuscore = stuques.stream().mapToDouble(EPaperStudentQuestion::getStuscore).sum();
2201
+                        stuscore = N_Utils.formatDouble(stuscore,1);
2191
                         EPaperStudentQuestion sqfirst = stuques.get(0);
2202
                         EPaperStudentQuestion sqfirst = stuques.get(0);
2192
                         EPaperStudentQuestion sq = new EPaperStudentQuestion();
2203
                         EPaperStudentQuestion sq = new EPaperStudentQuestion();
2193
                         sq.setStudentid(entry.getKey());
2204
                         sq.setStudentid(entry.getKey());
2216
             for (Map.Entry<Integer, List<ERPointStuScoreVo>> entry : pointstuscoremap.entrySet()) {
2227
             for (Map.Entry<Integer, List<ERPointStuScoreVo>> entry : pointstuscoremap.entrySet()) {
2217
                 List<ERPointStuScoreVo> stuscorelist = entry.getValue();
2228
                 List<ERPointStuScoreVo> stuscorelist = entry.getValue();
2218
                 Double stuscore = stuscorelist.stream().mapToDouble(ERPointStuScoreVo::getStuscore).sum();
2229
                 Double stuscore = stuscorelist.stream().mapToDouble(ERPointStuScoreVo::getStuscore).sum();
2230
+                stuscore = N_Utils.formatDouble(stuscore,1);
2219
                 ERPointStuScoreVo sscorevofirst = stuscorelist.get(0);
2231
                 ERPointStuScoreVo sscorevofirst = stuscorelist.get(0);
2220
                 ERPointStuScoreVo sscorevo = new ERPointStuScoreVo();
2232
                 ERPointStuScoreVo sscorevo = new ERPointStuScoreVo();
2221
                 sscorevo.setStudentid(sscorevofirst.getStudentid());
2233
                 sscorevo.setStudentid(sscorevofirst.getStudentid());
2225
             }
2237
             }
2226
 
2238
 
2227
             Double gstuscore = pointstuscorelist.stream().mapToDouble(ERPointStuScoreVo::getStuscore).sum();
2239
             Double gstuscore = pointstuscorelist.stream().mapToDouble(ERPointStuScoreVo::getStuscore).sum();
2240
+            gstuscore = N_Utils.formatDouble(gstuscore,1);
2228
             Double gavgscore = N_Utils.getDoubleDivideForAvg(gstuscore, pointstuscorelist.size());
2241
             Double gavgscore = N_Utils.getDoubleDivideForAvg(gstuscore, pointstuscorelist.size());
2229
             Double gsrate = N_Utils.getDoubleDivideAndMulitiply(gstuscore, pointscore * pointstuscorelist.size());
2242
             Double gsrate = N_Utils.getDoubleDivideAndMulitiply(gstuscore, pointscore * pointstuscorelist.size());
2230
 
2243
 
2233
                 List<ERPointStuScoreVo> classpointstulist = pointstuscorelist.stream().filter(s -> s.getClassid().equals(classid)).collect(Collectors.toList());
2246
                 List<ERPointStuScoreVo> classpointstulist = pointstuscorelist.stream().filter(s -> s.getClassid().equals(classid)).collect(Collectors.toList());
2234
                 if(N_Utils.isListNotEmpty(classpointstulist)){
2247
                 if(N_Utils.isListNotEmpty(classpointstulist)){
2235
                     Double cstuscore = classpointstulist.stream().mapToDouble(ERPointStuScoreVo::getStuscore).sum();
2248
                     Double cstuscore = classpointstulist.stream().mapToDouble(ERPointStuScoreVo::getStuscore).sum();
2249
+                    cstuscore = N_Utils.formatDouble(cstuscore,1);
2236
 //                Double cscore = classpointstulist.stream().mapToDouble(ERPointStuScoreVo::getScore).sum();
2250
 //                Double cscore = classpointstulist.stream().mapToDouble(ERPointStuScoreVo::getScore).sum();
2237
                     Double cavgscore = N_Utils.getDoubleDivideForAvg(cstuscore, classpointstulist.size());
2251
                     Double cavgscore = N_Utils.getDoubleDivideForAvg(cstuscore, classpointstulist.size());
2238
                     Double csrate = N_Utils.getDoubleDivideAndMulitiply(cstuscore, pointscore * classpointstulist.size());
2252
                     Double csrate = N_Utils.getDoubleDivideAndMulitiply(cstuscore, pointscore * classpointstulist.size());
2343
                 pstq.setStudentid(entry.getKey());
2357
                 pstq.setStudentid(entry.getKey());
2344
                 pstq.setClassid(pfirst.getClassid());
2358
                 pstq.setClassid(pfirst.getClassid());
2345
                 Double qstuscore = stuqueslist.stream().mapToDouble(EPaperStudentQuestion::getStuscore).sum();
2359
                 Double qstuscore = stuqueslist.stream().mapToDouble(EPaperStudentQuestion::getStuscore).sum();
2360
+                qstuscore = N_Utils.formatDouble(qstuscore,1);
2346
                 Double qscore = stuqueslist.stream().mapToDouble(EPaperStudentQuestion::getQscore).sum();
2361
                 Double qscore = stuqueslist.stream().mapToDouble(EPaperStudentQuestion::getQscore).sum();
2362
+                qscore = N_Utils.formatDouble(qscore,1);
2347
                 pstq.setQscore(qscore);
2363
                 pstq.setQscore(qscore);
2348
                 pstq.setStuscore(qstuscore);
2364
                 pstq.setStuscore(qstuscore);
2349
                 qgstulist.add(pstq);
2365
                 qgstulist.add(pstq);
2361
             }
2377
             }
2362
 
2378
 
2363
             Double tgstuscore = qgstulist.stream().mapToDouble(EPaperStudentQuestion::getStuscore).sum();//难易度下学生得分
2379
             Double tgstuscore = qgstulist.stream().mapToDouble(EPaperStudentQuestion::getStuscore).sum();//难易度下学生得分
2380
+            tgstuscore = N_Utils.formatDouble(tgstuscore,1);
2364
             Double tgscore = qgstulist.stream().mapToDouble(EPaperStudentQuestion::getQscore).sum();//难易度下试题总分
2381
             Double tgscore = qgstulist.stream().mapToDouble(EPaperStudentQuestion::getQscore).sum();//难易度下试题总分
2382
+            tgscore = N_Utils.formatDouble(tgscore,1);
2365
             Double tgsrate = N_Utils.getDoubleDivideAndMulitiply(tgstuscore, tgscore);//年级得分率
2383
             Double tgsrate = N_Utils.getDoubleDivideAndMulitiply(tgstuscore, tgscore);//年级得分率
2366
             Double tgavgscore = N_Utils.getDoubleDivideForAvg(tgstuscore,qgstulist.size());
2384
             Double tgavgscore = N_Utils.getDoubleDivideForAvg(tgstuscore,qgstulist.size());
2367
 
2385
 
2371
                 List<EPaperStudentQuestion> qcstulist = qgstulist.stream().filter(s -> s.getClassid().equals(classid)).collect(Collectors.toList());
2389
                 List<EPaperStudentQuestion> qcstulist = qgstulist.stream().filter(s -> s.getClassid().equals(classid)).collect(Collectors.toList());
2372
                 if(N_Utils.isListNotEmpty(qcstulist)){
2390
                 if(N_Utils.isListNotEmpty(qcstulist)){
2373
                     Double qcscore = qcstulist.stream().mapToDouble(EPaperStudentQuestion::getQscore).sum();
2391
                     Double qcscore = qcstulist.stream().mapToDouble(EPaperStudentQuestion::getQscore).sum();
2392
+                    qcscore = N_Utils.formatDouble(qcscore,1);
2374
                     Double qcstuscore = qcstulist.stream().mapToDouble(EPaperStudentQuestion::getStuscore).sum();
2393
                     Double qcstuscore = qcstulist.stream().mapToDouble(EPaperStudentQuestion::getStuscore).sum();
2394
+                    qcstuscore = N_Utils.formatDouble(qcstuscore,1);
2375
                     Double qcavgscore = N_Utils.getDoubleDivideForAvg(qcstuscore,qcstulist.size());
2395
                     Double qcavgscore = N_Utils.getDoubleDivideForAvg(qcstuscore,qcstulist.size());
2376
 
2396
 
2377
                     ERclassComplexity erc = new ERclassComplexity();
2397
                     ERclassComplexity erc = new ERclassComplexity();

+ 2
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/controller/paper/PaperController.java View File

304
 
304
 
305
     //该方法用于重新生成之前的作业报告
305
     //该方法用于重新生成之前的作业报告
306
     @GetMapping("/hpa")
306
     @GetMapping("/hpa")
307
-    public ResultVo handlePaperAnalyze() {
308
-        paperService.listPapersForAnalyze();
307
+    public ResultVo handlePaperAnalyze(Integer paperid) {
308
+        paperService.listPapersForAnalyze(paperid);
309
         return new ResultVo(0, "成功处理作业分析");
309
         return new ResultVo(0, "成功处理作业分析");
310
     }
310
     }
311
 }
311
 }

+ 1
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/mapper/paper/PaperMapper.java View File

149
     String getSubjectIdByPid(@Param("paperid") Long paperid);
149
     String getSubjectIdByPid(@Param("paperid") Long paperid);
150
 
150
 
151
     //获取所有试卷用于重新生成分析
151
     //获取所有试卷用于重新生成分析
152
-    List<TPaper> listPapersForAnalyze();
152
+    List<TPaper> listPapersForAnalyze(@Param("paperid") Integer paperid);
153
 }
153
 }

+ 6
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/service/paper/PaperService.java View File

267
             List<TPaperScantronQtype> aq = entry.getValue();
267
             List<TPaperScantronQtype> aq = entry.getValue();
268
             int num = aq.stream().mapToInt(TPaperScantronQtype::getPstnum).sum();
268
             int num = aq.stream().mapToInt(TPaperScantronQtype::getPstnum).sum();
269
             double tscore = aq.stream().collect(Collectors.summingDouble(TPaperScantronQtype:: getPstscore));
269
             double tscore = aq.stream().collect(Collectors.summingDouble(TPaperScantronQtype:: getPstscore));
270
+            tscore = N_Utils.formatDouble(tscore,1);
270
             double storerate = N_Utils.getDoubleDivideAndMulitiply(tscore, paper.getPaperscore());
271
             double storerate = N_Utils.getDoubleDivideAndMulitiply(tscore, paper.getPaperscore());
271
             //获取小题题号
272
             //获取小题题号
272
             List<Integer> orderlist = new ArrayList<>();
273
             List<Integer> orderlist = new ArrayList<>();
592
         List<PaperQtypeQuesVo> ktlst = mquestions.stream().filter(q->q.getMctype() == 111).collect(Collectors.toList());
593
         List<PaperQtypeQuesVo> ktlst = mquestions.stream().filter(q->q.getMctype() == 111).collect(Collectors.toList());
593
         int ktnum = ktlst.size();
594
         int ktnum = ktlst.size();
594
         double ktscore = ktlst.stream().collect(Collectors.summingDouble(PaperQtypeQuesVo:: getPtqscore));
595
         double ktscore = ktlst.stream().collect(Collectors.summingDouble(PaperQtypeQuesVo:: getPtqscore));
596
+        ktscore = N_Utils.formatDouble(ktscore,1);
595
         double ktnrate = N_Utils.getIntegerDivideAndMulitiply(ktnum, paper.getPapernum());
597
         double ktnrate = N_Utils.getIntegerDivideAndMulitiply(ktnum, paper.getPapernum());
596
         double ktsrate = N_Utils.getDoubleDivideAndMulitiply(ktscore, paper.getPaperscore());
598
         double ktsrate = N_Utils.getDoubleDivideAndMulitiply(ktscore, paper.getPaperscore());
597
         List<PaperQsVo> ranglist = new ArrayList<>();
599
         List<PaperQsVo> ranglist = new ArrayList<>();
615
             for(Map.Entry<String, List<QuestionOrderVo>> entry : complxmap.entrySet()){
617
             for(Map.Entry<String, List<QuestionOrderVo>> entry : complxmap.entrySet()){
616
                 List<QuestionOrderVo> pgblist = entry.getValue();
618
                 List<QuestionOrderVo> pgblist = entry.getValue();
617
                 Double score = pgblist.stream().mapToDouble(s -> s.getScore()).sum();
619
                 Double score = pgblist.stream().mapToDouble(s -> s.getScore()).sum();
620
+                score = N_Utils.formatDouble(score,1);
618
                 Double srate = N_Utils.getDoubleDivideAndMulitiply(score,paper.getPaperscore());
621
                 Double srate = N_Utils.getDoubleDivideAndMulitiply(score,paper.getPaperscore());
619
                 Map prate = new TreeMap();
622
                 Map prate = new TreeMap();
620
                 prate.put("level",Integer.parseInt(entry.getKey()));
623
                 prate.put("level",Integer.parseInt(entry.getKey()));
634
                 List<QuestionOrderVo> pgblist = entry.getValue();
637
                 List<QuestionOrderVo> pgblist = entry.getValue();
635
                 //获取知识点的总分
638
                 //获取知识点的总分
636
                 Double score = pgblist.stream().mapToDouble(s -> s.getScore()).sum();
639
                 Double score = pgblist.stream().mapToDouble(s -> s.getScore()).sum();
640
+                score = N_Utils.formatDouble(score,1);
637
                 Double srate = N_Utils.getDoubleDivideAndMulitiply(score,paper.getPaperscore());
641
                 Double srate = N_Utils.getDoubleDivideAndMulitiply(score,paper.getPaperscore());
638
                 Map prate = new TreeMap();
642
                 Map prate = new TreeMap();
639
                 prate.put("pointid",entry.getKey());
643
                 prate.put("pointid",entry.getKey());
1206
     }
1210
     }
1207
 
1211
 
1208
     //处理作业分析
1212
     //处理作业分析
1209
-    public void listPapersForAnalyze(){
1210
-        List<TPaper> papers = paperMapper.listPapersForAnalyze();
1213
+    public void listPapersForAnalyze(Integer paperid){
1214
+        List<TPaper> papers = paperMapper.listPapersForAnalyze(paperid);
1211
         for(TPaper p : papers){
1215
         for(TPaper p : papers){
1212
             if(p.getPapertype() == 1){
1216
             if(p.getPapertype() == 1){
1213
                 //题库
1217
                 //题库

+ 5
- 1
sstudy/src/main/resources/mapper/paper/PaperMapper.xml View File

299
 
299
 
300
     <!--获取所有试卷用于重新生成分析-->
300
     <!--获取所有试卷用于重新生成分析-->
301
     <select id="listPapersForAnalyze" resultType="com.xhkjedu.sstudy.model.paper.TPaper">
301
     <select id="listPapersForAnalyze" resultType="com.xhkjedu.sstudy.model.paper.TPaper">
302
-        select * from t_paper order by paperid
302
+        select * from t_paper
303
+        <if test="paperid!=null and paperid!=''">
304
+            where paperid=#{paperid}
305
+        </if>
306
+        order by paperid
303
     </select>
307
     </select>
304
 </mapper>
308
 </mapper>

Loading…
Cancel
Save