Browse Source

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

tags/正式版本
雍文秀 2 years ago
parent
commit
2bf1a1a128

+ 2
- 0
sexam/src/main/java/com/xhkjedu/sexam/controller/report/EReportStudentController.java View File

@@ -1,6 +1,7 @@
1 1
 package com.xhkjedu.sexam.controller.report;
2 2
 
3 3
 import org.springframework.web.bind.annotation.RequestMapping;
4
+import org.springframework.web.bind.annotation.RestController;
4 5
 
5 6
 /**
6 7
  * @author ywx
@@ -8,6 +9,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
8 9
  * @description 学生报告
9 10
  * @date 2022/8/8 9:44
10 11
  **/
12
+@RestController
11 13
 @RequestMapping("erstu")
12 14
 public class EReportStudentController {
13 15
 }

+ 1
- 1
sexam/src/main/java/com/xhkjedu/sexam/model/reportclass/ERclassQtype.java View File

@@ -50,5 +50,5 @@ public class ERclassQtype extends BaseBean {
50 50
     private Double classsrate;
51 51
 
52 52
     //小题题号字符串(1,2)
53
-    private String qn;
53
+    private String qns;
54 54
 }

+ 3
- 0
sexam/src/main/java/com/xhkjedu/sexam/model/reportclass/ERclassQuestionPoint.java View File

@@ -25,6 +25,9 @@ public class ERclassQuestionPoint extends BaseBean {
25 25
     //科目id
26 26
     private String subjectid;
27 27
 
28
+    //知识点id
29
+    private String pointid;
30
+
28 31
     //知识点名称
29 32
     private String pointname;
30 33
 

+ 4
- 1
sexam/src/main/java/com/xhkjedu/sexam/model/reportstu/ERstudentPoint.java View File

@@ -25,11 +25,14 @@ public class ERstudentPoint extends BaseBean {
25 25
     //班级id
26 26
     private Integer classid;
27 27
 
28
+    //知识点id
29
+    private String pointid;
30
+
28 31
     //知识点名称
29 32
     private String pointname;
30 33
 
31 34
     //知识点题号
32
-    private String pqn;
35
+    private String qns;
33 36
 
34 37
     //知识点分值
35 38
     private Double score;

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

@@ -316,6 +316,7 @@ public class EPaperQtypeService {
316 316
             double scorerate = N_Utils.getDoubleDivideAndMulitiply(cscore, ePaper.getPscore());
317 317
             List<Integer> thlist = pvo.stream().map(EPaperQPointVo :: getQorder).collect(Collectors.toList());
318 318
             thlist = thlist.stream().distinct().collect(Collectors.toList());
319
+            pm.put("pointid",pvo.get(0).getPointid());
319 320
             pm.put("pointname",pvo.get(0).getPointname());
320 321
             pm.put("score",cscore);
321 322
             pm.put("srate",scorerate);

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

@@ -378,7 +378,6 @@ public class EReportGenerateService {
378 378
                         qnstr = qnstr + "," + q.getQn();
379 379
                     }
380 380
 
381
-
382 381
                     //获取指定试题试题得分
383 382
                     List<EPaperStudentQuestion> qstu = stulist.stream().filter(o -> o.getEpid().equals(t.getEpid())
384 383
                              && o.getEptqid().equals(q.getEptqid())).collect(Collectors.toList());
@@ -451,7 +450,6 @@ public class EReportGenerateService {
451 450
                     eRclassQtype.setEpid(epid);
452 451
                     eRclassQtype.setClassid(entry.getKey());
453 452
                     eRclassQtype.setQtypename(t.getEptname());
454
-                    eRclassQtype.setQn(t.getEptorder().toString());
455 453
                     eRclassQtype.setScore(eptscore);
456 454
                     eRclassQtype.setNum(t.getEptnum());
457 455
                     eRclassQtype.setSrate(N_Utils.getDoubleDivideAndMulitiply(eptscore,pscore));
@@ -459,7 +457,7 @@ public class EReportGenerateService {
459 457
                     eRclassQtype.setGradesrate(tgsrate);
460 458
                     eRclassQtype.setClassavgscore(N_Utils.getDoubleDivideAndMulitiply(erClassScoreVo.getTcscore(),erClassScoreVo.getStunum()));
461 459
                     eRclassQtype.setClasssrate(N_Utils.getDoubleDivideAndMulitiply(erClassScoreVo.getTcscore(),eptscore * erClassScoreVo.getStunum() ));
462
-                    eRclassQtype.setQn(qnstr);
460
+                    eRclassQtype.setQns(qnstr);
463 461
 
464 462
                     rtypelist.add(eRclassQtype);
465 463
                 }
@@ -474,6 +472,7 @@ public class EReportGenerateService {
474 472
                 //遍历知识点处理年级班级知识点情况
475 473
                 for(int j=0;j<pointlist.size();j++){
476 474
                     Map pointmap = pointlist.get(j);
475
+                    String pointid = pointmap.get("pointid").toString();
477 476
                     String pointname = pointmap.get("pointname").toString();
478 477
                     Double score = Double.parseDouble(pointmap.get("score").toString());
479 478
                     Double scorerate = Double.parseDouble(pointmap.get("scorerate").toString());
@@ -498,6 +497,7 @@ public class EReportGenerateService {
498 497
                         pointvo.setClassid(classid);
499 498
                         pointvo.setEpid(epid);
500 499
                         pointvo.setSubjectid(subjectid);
500
+                        pointvo.setPointid(pointid);
501 501
                         pointvo.setPointname(pointname);
502 502
                         pointvo.setScore(score);
503 503
                         pointvo.setSrate(scorerate);

+ 6
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/service/question/QuestionService.java View File

@@ -333,8 +333,12 @@ public class QuestionService {
333 333
         Map map = setSaveUpdateQuestion(question,saveQues,saveQPoints);
334 334
         setSaveUpdateQuesitonDirector(oldQuestion,question,saveQDirs);
335 335
         questionMapper.saveBathQuestion(saveQues);//保存试题
336
-        questionPointMapper.batchSave(saveQPoints);//保存试题关联知识点信息
337
-        questionDirectorMapper.batchSave(saveQDirs);//保存试题关联章节
336
+        if(N_Utils.isListNotEmpty(saveQPoints)){
337
+            questionPointMapper.batchSave(saveQPoints);//保存试题关联知识点信息
338
+        }
339
+        if(N_Utils.isListNotEmpty(saveQDirs)){
340
+            questionDirectorMapper.batchSave(saveQDirs);//保存试题关联章节
341
+        }
338 342
 
339 343
         //删除试题栏中原题,加入新题
340 344
        /* userBasketMapper.deleteByQuestioniduid(question.getCreateid(),oldQuestion.getQuestionid());

+ 3
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/vo/question/QuestionVo.java View File

@@ -45,6 +45,9 @@ public class QuestionVo {
45 45
     //创建人
46 46
     private String createname;
47 47
 
48
+    //听力题文件地址
49
+    private String hearfile;
50
+
48 51
     //试题关联知识点
49 52
     private List<PointVo> points;
50 53
 

+ 3
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/vo/question/SelectQuestionVo.java View File

@@ -48,4 +48,7 @@ public class SelectQuestionVo {
48 48
 
49 49
     //创建人id
50 50
     private Integer createid;
51
+
52
+    //听力题听力文件地址
53
+    private String hearfile;
51 54
 }

+ 1
- 1
sstudy/src/main/resources/application.properties View File

@@ -64,7 +64,7 @@ rabbitmq.resourceDelQueue=xhkjedutest.xhschool.resourceDelQueue_dev
64 64
 rabbitmq.resourceHandleQueue=xhkjedutest.xhschool.resourceHandleQueue_dev
65 65
 rabbitmq.imgMergeQueue=xhkjedutest.xhschool.imgMergeQueue_dev
66 66
 rabbitmq.imgMergeHandleQueue=xhkjedutest.xhschool.imgMergeHandleQueue_dev
67
-spring.rabbitmq.host=116.63.199.166
67
+spring.rabbitmq.host=49.4.26.249
68 68
 spring.rabbitmq.port=5672
69 69
 spring.rabbitmq.username=xhkjedu
70 70
 spring.rabbitmq.password=xhkjedud07

+ 4
- 3
sstudy/src/main/resources/mapper/question/QuestionMapper.xml View File

@@ -68,6 +68,7 @@
68 68
         <result property="count" column="count"></result>
69 69
         <result property="directorid" column="directorid"></result>
70 70
         <result property="directorname" column="directorname"></result>
71
+        <result property="hearfile" column="hearfile"></result>
71 72
         <result property="belong" column="belong"></result>
72 73
         <result property="createid" column="createid"></result>
73 74
         <result property="source" column="source"></result>
@@ -114,7 +115,7 @@
114 115
     <select id="findById" resultMap="questionResult">
115 116
         select q.questionid,q.score,q.complexity,q.ctype,q.qstem,q.qoption,q.qanswer,q.qanalyze,q.belong
116 117
         ,q.qtypeid,q.qtypename,q.createtime,q.source,q.year,q.region,q.schoolname,q.subjectid,q.schoolid
117
-        ,qd.directorid,d.directorall directorname,d.lsbid,
118
+        ,qd.directorid,d.directorall directorname,d.lsbid,q.hearfile
118 119
         sb.level,sb.subjectid,s.subjectname,v.versionname,sb.lsbname
119 120
         ,(select a.areaall from t_areazone a where a.areacode=q.region)areaall
120 121
         from t_question q left join t_question_director qd on q.questionid=qd.questionid
@@ -127,7 +128,7 @@
127 128
     <!--管理端试题列表-->
128 129
     <select id="findAll" resultType="com.xhkjedu.sstudy.vo.question.QuestionVo">
129 130
         select q.questionid,q.score,q.complexity,q.ctype,q.qstem,q.qoption,q.qanswer,q.qanalyze,q.belong,q.createid
130
-        ,q.qtypeid,q.qtypename,q.createtime,q.count,q.qstate,q.source,q.year,q.region,q.schoolname
131
+        ,q.qtypeid,q.qtypename,q.createtime,q.count,q.qstate,q.source,q.year,q.region,q.schoolname,q.hearfile
131 132
         from t_question q left join t_question_director qd on q.questionid=qd.questionid
132 133
         <if test="question.belong!=null and question.belong==5">
133 134
             left join t_question_collect qc on q.questionid = qc.questionid
@@ -189,7 +190,7 @@
189 190
     <select id="listForSelect" resultType="com.xhkjedu.sstudy.vo.question.SelectQuestionVo">
190 191
         select q.questionid,q.score,q.complexity,q.qstem,q.qoption,q.qanswer,q.qanalyze
191 192
         ,q.qtypeid,q.qtypename,q.count,GROUP_CONCAT(p.pointname)points,q.ctype,q.belong,q.createid
192
-        ,q.source,q.year,q.region,q.schoolname,q.qlevel
193
+        ,q.source,q.year,q.region,q.schoolname,q.qlevel,q.hearfile
193 194
         from t_question q left join t_question_point qp on q.questionid = qp.questionid
194 195
         left join t_point p on p.pointid=qp.pointid
195 196
         left join t_question_director qd on q.questionid=qd.questionid

Loading…
Cancel
Save