| | |
| | | import com.mindskip.xzs.service.ExamTemplatesUserCountService; |
| | | import com.mindskip.xzs.utility.convert.ExamTemplatesClassConvert; |
| | | import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVM; |
| | | import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVO; |
| | | import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperTitleItemVM; |
| | | import com.mindskip.xzs.viewmodel.admin.exam.QuestionTypeVM; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | if (model.getId() != null) { |
| | | removes(model.getId()); |
| | | } |
| | | |
| | | ExamTemplates examTemplates = ExamTemplatesClassConvert.INSTANCE.ExamPaperEditRequestVMToExamTemplates(model); |
| | | if (!CollectionUtils.isEmpty(model.getLimitDateTime())) { |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | |
| | | vm.setType("1"); |
| | | vm.setId(null); |
| | | ExamPaper examPaper = examPaperService.savePaperFromVM(vm, user); |
| | | ExamPaperEditRequestVM newVM = examPaperService.examPaperToVM(examPaper.getId()); |
| | | ExamPaperEditRequestVO newVM = examPaperService.examPaperToVM(examPaper.getId()); |
| | | count.setExamPaperId(examPaper.getId()); |
| | | count.setUserId(user.getId()); |
| | | examTemplatesUserCountService.add(count); |
| | |
| | | vm.setType("1"); |
| | | vm.setId(null); |
| | | ExamPaper examPaper = examPaperService.savePaperFromVM(vm, user); |
| | | ExamPaperEditRequestVM newVM = examPaperService.examPaperToVM(examPaper.getId()); |
| | | ExamPaperEditRequestVO newVM = examPaperService.examPaperToVM(examPaper.getId()); |
| | | // count.setExamPaperId(examPaper.getId()); |
| | | // count.setUserId(user.getId()); |
| | | // examTemplatesUserCountService.add(count); |