Browse Source

教师app作业列表返回发布人 题库复合题计算学生小题得分

tags/正式3.9.0
雍文秀 1 year ago
parent
commit
15c8c6a9cf

+ 1
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/utils/StudyUtil.java View File

@@ -104,6 +104,7 @@ public class StudyUtil {
104 104
                     q.setQscore(score);
105 105
                     q.setQorder(tq.getQorder());
106 106
                     q.setSonques(sonques);
107
+                    q.setStuscore(sonques.stream().mapToDouble(sq->sq.getStuscore()).sum());
107 108
                 }else {
108 109
                     q=tq;
109 110
                 }

+ 3
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/vo/paper/PaperTeacherAppVo.java View File

@@ -71,4 +71,7 @@ public class PaperTeacherAppVo {
71 71
     private Integer schoolid;
72 72
 
73 73
     private Integer logschoolid;
74
+
75
+    //创建人姓名
76
+    private String createname;
74 77
 }

+ 3
- 0
sstudy/src/main/resources/mapper/paper/PaperTeaAppMapper.xml View File

@@ -12,6 +12,7 @@
12 12
         <result property="stoptime" column="stoptime"></result>
13 13
         <result property="schoolid" column="schoolid"></result>
14 14
         <result property="logschoolid" column="logschoolid"></result>
15
+        <result property="createname" column="createname"></result>
15 16
         <collection property="students" ofType="com.xhkjedu.sstudy.vo.paperstudent.StudentVo"
16 17
                     select="listPaperStu" column="{paperid=paperid,createid=createid,checkid=checkid,logschoolid=logschoolid,classids=classids}">
17 18
         </collection>
@@ -28,6 +29,7 @@
28 29
         select p.paperid,p.papername,p.papernum,p.papertype,p.paperclass,p.paperstate,p.checktype,p.createid,#{paper.teacherid} checkid
29 30
         ,min(pg.starttime)starttime,min(pg.stoptime)stoptime,pg.checked,p.subjectid,p.paperscore,p.schoolid,#{paper.schoolid} logschoolid
30 31
         ,group_concat(pg.classid) classids
32
+        ,(select u.username from t_user u where u.userid=p.createid)createname
31 33
         from t_paper p left join t_paper_class pg on p.paperid=pg.paperid
32 34
         where (p.createid=#{paper.teacherid} or pg.checkid=#{paper.teacherid} or
33 35
         (p.hashb=1 and pg.classid in (${paper.classids})) or
@@ -46,6 +48,7 @@
46 48
     <select id="listWbz" resultType="com.xhkjedu.sstudy.vo.paper.PaperTeacherAppVo">
47 49
         select p.paperid,p.papername,p.papernum,p.papertype,p.paperclass,p.paperstate,p.checktype,p.createid
48 50
         ,p.subjectid,p.paperscore,p.schoolid
51
+        ,(select u.username from t_user u where u.userid=p.createid)createname
49 52
         from t_paper p where p.createid=#{paper.teacherid} and p.paperstate=#{paper.psstate}
50 53
         order by p.createtime desc,p.paperid desc
51 54
     </select>

Loading…
Cancel
Save