| | |
| | | import com.mindskip.xzs.utility.DateTimeUtil; |
| | | import com.mindskip.xzs.utility.PageInfoHelper; |
| | | import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVM; |
| | | import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVO; |
| | | import com.mindskip.xzs.viewmodel.student.exam.ExamPaperPageResponseVM; |
| | | import com.mindskip.xzs.viewmodel.student.exam.ExamPaperPageVM; |
| | | import com.github.pagehelper.PageInfo; |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 开始考试 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/select/{id}", method = RequestMethod.POST) |
| | | public RestResponse<ExamPaperEditRequestVM> select(@PathVariable Integer id) { |
| | | ExamPaperEditRequestVM vm = examPaperService.examPaperToVM(id); |
| | | return RestResponse.ok(vm); |
| | | public RestResponse<ExamPaperEditRequestVO> select(@PathVariable Integer id) { |
| | | return RestResponse.ok(examPaperService.examPaperToVM(id)); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/edit", method = RequestMethod.POST) |
| | | public RestResponse<ExamPaperEditRequestVM> edit(@RequestBody @Valid ExamPaperEditRequestVM model) throws Exception { |
| | | public RestResponse<ExamPaperEditRequestVO> edit(@RequestBody @Valid ExamPaperEditRequestVM model) throws Exception { |
| | | ExamPaperUser examPaperUser = new ExamPaperUser(); |
| | | User user = getCurrentUser(); |
| | | model.setDepartmentIds(new Integer[0]); |
| | |
| | | examPaperUser.setDeleted("0"); |
| | | examPaperUserService.add(examPaperUser); |
| | | |
| | | |
| | | ExamPaperEditRequestVM newVM = examPaperService.examPaperToVM(examPaper.getId()); |
| | | return RestResponse.ok(newVM); |
| | | return RestResponse.ok(examPaperService.examPaperToVM(examPaper.getId())); |
| | | } |
| | | } |