|
|
|
@ -2,6 +2,7 @@ package com.sztzjy.forex.trading_trading.controller;
|
|
|
|
|
|
|
|
|
|
import com.sztzjy.forex.trading_trading.annotation.Permission;
|
|
|
|
|
import com.sztzjy.forex.trading_trading.annotation.aspect.PermissionType;
|
|
|
|
|
import com.sztzjy.forex.trading_trading.entity.Report;
|
|
|
|
|
import com.sztzjy.forex.trading_trading.entity.ReportWithBLOBs;
|
|
|
|
|
import com.sztzjy.forex.trading_trading.service.ReportService;
|
|
|
|
|
import com.sztzjy.forex.trading_trading.util.ResultEntity;
|
|
|
|
@ -27,7 +28,7 @@ public class ReportController {
|
|
|
|
|
@RequestParam String memberId,
|
|
|
|
|
@RequestParam String fileName,
|
|
|
|
|
@RequestParam String tariningId) throws IOException {
|
|
|
|
|
return new ResultEntity<>(reportService.uploadReport(file.getInputStream(),fileName,memberId,tariningId));
|
|
|
|
|
return new ResultEntity<>(reportService.uploadReport(file.getInputStream(), fileName, memberId, tariningId));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@PostMapping("/submitReport")
|
|
|
|
@ -48,6 +49,14 @@ public class ReportController {
|
|
|
|
|
@ApiOperation("教师端--实训报告下载")
|
|
|
|
|
@GetMapping("download")
|
|
|
|
|
public void download(@RequestParam String id, HttpServletResponse response) {
|
|
|
|
|
reportService.download(id,response);
|
|
|
|
|
reportService.download(id, response);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("教师端--获取学生上传的报告")
|
|
|
|
|
@GetMapping("getReportByMemberId")
|
|
|
|
|
public ResultEntity<Report> getReportByMemberId(@RequestParam String memberId
|
|
|
|
|
) {
|
|
|
|
|
return new ResultEntity<>(reportService.findByMemberId(memberId));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|