| | |
| | | import com.mindskip.xzs.domain.exam.ExamPaperTitleItemObject; |
| | | import com.mindskip.xzs.domain.other.KeyValue; |
| | | import com.mindskip.xzs.domain.vo.PaperExcelVO; |
| | | import com.mindskip.xzs.repository.ExamPaperAnswerMapper; |
| | | import com.mindskip.xzs.repository.ExamPaperMapper; |
| | | import com.mindskip.xzs.repository.QuestionMapper; |
| | | import com.mindskip.xzs.repository.UserDepartmentMapper; |
| | |
| | | import com.mindskip.xzs.viewmodel.student.dashboard.PaperFilter; |
| | | import com.mindskip.xzs.viewmodel.student.dashboard.PaperInfo; |
| | | import com.mindskip.xzs.viewmodel.student.exam.ExamPaperPageVM; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.modelmapper.ModelMapper; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.*; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | |
| | | |
| | | protected final static ModelMapper modelMapper = ModelMapperSingle.Instance(); |
| | | private final ExamPaperMapper examPaperMapper; |
| | | private final ExamPaperAnswerMapper examPaperAnswerMapper; |
| | | private final QuestionMapper questionMapper; |
| | | private final TextContentService textContentService; |
| | | private final QuestionService questionService; |
| | |
| | | |
| | | |
| | | @Autowired |
| | | public ExamPaperServiceImpl(ExamPaperMapper examPaperMapper, QuestionMapper questionMapper, TextContentService textContentService, QuestionService questionService, SubjectService subjectService, ExamPaperDepartmentService examPaperDepartmentService, ExamPaperSubjectService examPaperSubjectService, QuestionSubjectService questionSubjectService, ExamPaperUserService examPaperUserService, UserService userService, UserDepartmentMapper userDepartmentMapper, DepartmentService departmentService) { |
| | | public ExamPaperServiceImpl(ExamPaperMapper examPaperMapper, ExamPaperAnswerMapper examPaperAnswerMapper, QuestionMapper questionMapper, TextContentService textContentService, QuestionService questionService, SubjectService subjectService, ExamPaperDepartmentService examPaperDepartmentService, ExamPaperSubjectService examPaperSubjectService, QuestionSubjectService questionSubjectService, ExamPaperUserService examPaperUserService, UserService userService, UserDepartmentMapper userDepartmentMapper, DepartmentService departmentService) { |
| | | super(examPaperMapper); |
| | | this.examPaperMapper = examPaperMapper; |
| | | this.examPaperAnswerMapper = examPaperAnswerMapper; |
| | | this.questionMapper = questionMapper; |
| | | this.textContentService = textContentService; |
| | | this.questionService = questionService; |
| | |
| | | return randomNumber; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void missExam(ExamPaperEditRequestVM model) { |
| | | // 修改原来的试卷时间 |
| | | if (ObjectUtils.isNotEmpty(model.getLimitDateTime())) { |
| | | ExamPaper examPaper = new ExamPaper(); |
| | | examPaper.setId(model.getExamPaperId()); |
| | | examPaper.setLimitStartTime(DateTimeUtil.parse(model.getLimitDateTime().get(0), DateTimeUtil.STANDER_FORMAT)); |
| | | examPaper.setLimitEndTime(DateTimeUtil.parse(model.getLimitDateTime().get(1), DateTimeUtil.STANDER_FORMAT)); |
| | | examPaperMapper.updateByPrimaryKeySelective(examPaper); |
| | | } |
| | | // 根据考试id将选择的补考考生的考试成绩设置为无效 |
| | | examPaperAnswerMapper.setMissExam(model); |
| | | } |
| | | } |