| | |
| | | import org.springblade.modules.exam.service.ExamPaperService; |
| | | import org.springblade.modules.exam.vo.ExamPaperSubjectVO; |
| | | import org.springblade.modules.exam.vo.ExamPaperVO; |
| | | import org.springblade.modules.exam.vo.ExamScoreVO; |
| | | import org.springblade.modules.exam.wrapper.ExamPaperWrapper; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | |
| | | return R.data(ExamPaperWrapper.build().pageVO(pages)); |
| | | } |
| | | |
| | | /** |
| | | * 分页 |
| | | */ |
| | | @GetMapping("/pages") |
| | | public R<IPage<ExamPaperVO>> page(ExamPaperVO exam, Query query) { |
| | | IPage<ExamPaperVO> pages = examPaperService.selectExamPaperPage(Condition.getPage(query), exam); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 新增 |
| | |
| | | */ |
| | | public interface ExamPaperMapper extends BaseMapper<ExamPaper> { |
| | | |
| | | IPage<ExamPaperVO> selectExamPaperPage(IPage page, ExamPaperVO exam); |
| | | |
| | | ExamPaperSubjectVO queryPagerSubject(@Param("paper") ExamPaper paper); |
| | | |
| | | ExamPaperSubjectVO PagerSubject(@Param("paper") ExamPaper paper); |
| | | |
| | | /** |
| | | * 自定义树 |
| | | * |
| | | * @param examPaper 试卷对象 |
| | | * @return |
| | | */ |
| | | List<ExamPaper> selectExamPaperPageTree(@Param("paper") ExamPaper examPaper); |
| | | List<ExamPaper> selectExamPaperPageTree(@Param("paper") ExamPaper examPaper); |
| | | |
| | | boolean UnbindSubject(String paperid,String subjectid); |
| | | boolean UnbindSubject(String paperid, String subjectid); |
| | | } |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectExamPaperPage" resultType="org.springblade.modules.exam.vo.ExamPaperVO"> |
| | | SELECT |
| | | sj.*, |
| | | tm.id tid, |
| | | tmxq.id as sid,tmxq.* |
| | | FROM |
| | | ksxt_exam sj |
| | | LEFT JOIN exam_examination_subject tm ON sj.id = tm.examination_id |
| | | LEFT JOIN exam_subject_choices tmxq ON tm.subject_id = tmxq.id |
| | | WHERE |
| | | 1 = 1 |
| | | <if test="paper.id !=null"> |
| | | and sj.id = #{paper.id} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="PagerSubject" resultMap="PagerSubjectAnswer"> |
| | | SELECT |
| | | sj.*, |
| | |
| | | */ |
| | | package org.springblade.modules.exam.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.modules.exam.entity.ExamPaper; |
| | | import org.springblade.modules.exam.vo.ExamPaperSubjectVO; |
| | | import org.springblade.modules.exam.vo.ExamPaperVO; |
| | | import org.springblade.modules.exam.vo.ExamScoreVO; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | public interface ExamPaperService extends IService<ExamPaper> { |
| | | |
| | | IPage<ExamPaperVO> selectExamPaperPage(IPage<ExamScoreVO> page, ExamPaperVO exam); |
| | | |
| | | ExamPaperSubjectVO queryPagerSubject(ExamPaper paper); |
| | | |
| | | /** |
| | |
| | | */ |
| | | package org.springblade.modules.exam.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.modules.exam.entity.ExamPaper; |
| | | import org.springblade.modules.exam.mapper.ExamPaperMapper; |
| | | import org.springblade.modules.exam.service.ExamPaperService; |
| | | import org.springblade.modules.exam.vo.ExamPaperSubjectVO; |
| | | import org.springblade.modules.exam.vo.ExamPaperVO; |
| | | import org.springblade.modules.exam.vo.ExamScoreVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | |
| | | @Override |
| | | public IPage<ExamPaperVO> selectExamPaperPage(IPage<ExamScoreVO> page, ExamPaperVO exam) { |
| | | return baseMapper.selectExamPaperPage(page,exam); |
| | | } |
| | | |
| | | @Override |
| | | public ExamPaperSubjectVO queryPagerSubject(ExamPaper paper) { |
| | | //查询试卷分类信息 |
| | | return baseMapper.queryPagerSubject(paper); |