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
                     q.setQscore(score);
104
                     q.setQscore(score);
105
                     q.setQorder(tq.getQorder());
105
                     q.setQorder(tq.getQorder());
106
                     q.setSonques(sonques);
106
                     q.setSonques(sonques);
107
+                    q.setStuscore(sonques.stream().mapToDouble(sq->sq.getStuscore()).sum());
107
                 }else {
108
                 }else {
108
                     q=tq;
109
                     q=tq;
109
                 }
110
                 }

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

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

Loading…
Cancel
Save