| | |
| | | package com.mindskip.xzs.controller.admin; |
| | | |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.mindskip.xzs.base.BaseApiController; |
| | | import com.mindskip.xzs.base.RestResponse; |
| | | import com.mindskip.xzs.domain.ExamPaper; |
| | | import com.mindskip.xzs.domain.ExamPaperSubject; |
| | | import com.mindskip.xzs.domain.vo.PaperExcelVO; |
| | | import com.mindskip.xzs.domain.vo.UserCountExcelVO; |
| | | import com.mindskip.xzs.service.ExamPaperDepartmentService; |
| | | import com.mindskip.xzs.service.ExamPaperService; |
| | | import com.mindskip.xzs.service.ExamPaperSubjectService; |
| | |
| | | import com.mindskip.xzs.utility.DateTimeUtil; |
| | | import com.mindskip.xzs.utility.PageInfoHelper; |
| | | import com.mindskip.xzs.utility.excel.ExcelUtils; |
| | | import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVM; |
| | | import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVO; |
| | | import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperPageRequestVM; |
| | | import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVM; |
| | | import com.mindskip.xzs.viewmodel.admin.exam.ExamResponseVM; |
| | | import com.github.pagehelper.PageInfo; |
| | | import lombok.SneakyThrows; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | model.setUserIds(userIds); |
| | | ExamPaper examPaper = examPaperService.savePaperFromVM(model, getCurrentUser()); |
| | | ExamPaperEditRequestVO newVM = examPaperService.examPaperToVM(examPaper.getId()); |
| | | |
| | | return RestResponse.ok(newVM); |
| | | } |
| | | |
| | | /** |
| | | * 补考 |
| | | * @param model 数据 |
| | | * @return 操作结果 |
| | | */ |
| | | @RequestMapping(value = "/missExam", method = RequestMethod.POST) |
| | | public RestResponse<String> missExam(@RequestBody ExamPaperEditRequestVM model) { |
| | | examPaperService.missExam(model); |
| | | return RestResponse.ok("操作成功"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/select/{id}", method = RequestMethod.POST) |
| | | public RestResponse<ExamPaperEditRequestVO> select(@PathVariable Integer id) { |
| | | ExamPaperEditRequestVO vm = examPaperService.examPaperToVM(id); |