| | |
| | | import com.ycl.jxkg.domain.vo.admin.paper.ExamPaperAnswerPageRequestVO; |
| | | import com.ycl.jxkg.domain.vo.student.exam.ExamPaperReadVO; |
| | | import com.ycl.jxkg.domain.vo.student.exam.ExamPaperSubmitVO; |
| | | import com.ycl.jxkg.domain.vo.student.exampaper.ExamPaperAnswerExportVO; |
| | | import com.ycl.jxkg.domain.vo.student.exampaper.ExamPaperAnswerPageResponseVO; |
| | | import com.ycl.jxkg.service.ExamPaperAnswerService; |
| | | import com.ycl.jxkg.service.ExamPaperService; |
| | | import com.ycl.jxkg.utils.ExcelUtils; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.SneakyThrows; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | @RequiredArgsConstructor |
| | | @RestController("AdminExamPaperAnswerController") |
| | |
| | | return Result.ok(examPaperAnswerService.adminPage(model)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/exportExcel", method = RequestMethod.POST) |
| | | @SneakyThrows |
| | | public void exportExcel(ExamPaperAnswerPageRequestVO model, HttpServletResponse response) { |
| | | List<ExamPaperAnswerPageResponseVO> list = examPaperAnswerService.list(model); |
| | | ExcelUtils.exportExcelToTarget(response, "", "成绩列表", list, ExamPaperAnswerExportVO.class); |
| | | } |
| | | |
| | | @PostMapping("/read/{id}") |
| | | public Result<ExamPaperReadVO> read(@PathVariable Integer id) { |
| | | ExamPaperAnswer examPaperAnswer = examPaperAnswerService.getById(id); |