Browse Source

附件作业返回听力文件

tags/正式版本
王宁 2 years ago
parent
commit
3fbb395432

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

308
         paperService.listPapersForAnalyze(paperid);
308
         paperService.listPapersForAnalyze(paperid);
309
         return new ResultVo(0, "成功处理作业分析");
309
         return new ResultVo(0, "成功处理作业分析");
310
     }
310
     }
311
+
312
+    //获取作业中听力文件
313
+    @PostMapping("/hfile")
314
+    public ResultVo getPaperHearfile(@RequestBody TPaper paper) {
315
+        Integer paperid = paper.getPaperid();
316
+        N_Utils.validation(new Object[]{paperid, "作业id", 1});
317
+        String hearfile = paperService.getHearfileByPaperid(paperid);
318
+        return new ResultVo(0, "获取作业听力文件", hearfile);
319
+    }
311
 }
320
 }

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

150
 
150
 
151
     //获取所有试卷用于重新生成分析
151
     //获取所有试卷用于重新生成分析
152
     List<TPaper> listPapersForAnalyze(@Param("paperid") Integer paperid);
152
     List<TPaper> listPapersForAnalyze(@Param("paperid") Integer paperid);
153
+
154
+    //获取作业听力文件
155
+    String getHearfileByPaperid(@Param("paperid") Integer paperid);
153
 }
156
 }

+ 5
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/service/paper/PaperService.java View File

1228
         }
1228
         }
1229
     }
1229
     }
1230
 
1230
 
1231
+    //获取作业听力文件地址
1232
+    public String getHearfileByPaperid(Integer paperid){
1233
+        return paperMapper.getHearfileByPaperid(paperid);
1234
+    }
1235
+
1231
 }
1236
 }

+ 3
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/vo/paperstudent/StudentPaperVo.java View File

78
 
78
 
79
     //靶向作业学生关联的试题集合
79
     //靶向作业学生关联的试题集合
80
     private String questionids;
80
     private String questionids;
81
+
82
+    //听力文件
83
+    private String hearfile;
81
 }
84
 }

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

158
     </select>
158
     </select>
159
     <!--作业统计按人详情-->
159
     <!--作业统计按人详情-->
160
     <select id="getStudentPaperAnalyze" resultType="com.xhkjedu.sstudy.vo.paperstudent.StudentPaperVo">
160
     <select id="getStudentPaperAnalyze" resultType="com.xhkjedu.sstudy.vo.paperstudent.StudentPaperVo">
161
-        select p.paperid,p.papername,p.papertype,ps.papernum,ps.paperscore,ps.userscore,u.username studentname,ps.classid
161
+        select p.paperid,p.papername,p.papertype,p.hearfile,ps.papernum,ps.paperscore,ps.userscore,u.username studentname,ps.classid
162
         ,ps.questionids,(select username from t_user where userid=ps.checkid)checkname
162
         ,ps.questionids,(select username from t_user where userid=ps.checkid)checkname
163
         from t_paper_student ps left join t_paper p on ps.paperid = p.paperid
163
         from t_paper_student ps left join t_paper p on ps.paperid = p.paperid
164
         LEFT JOIN t_user u ON ps.studentid=u.userid
164
         LEFT JOIN t_user u ON ps.studentid=u.userid

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

305
         </if>
305
         </if>
306
         order by paperid
306
         order by paperid
307
     </select>
307
     </select>
308
+
309
+    <!--获取作业听力文件-->
310
+    <select id="getHearfileByPaperid" resultType="java.lang.String">
311
+        select hearfile from t_paper where paperid=#{paperid}
312
+    </select>
308
 </mapper>
313
 </mapper>

Loading…
Cancel
Save