| | |
| | | package org.springblade.modules.exam.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.secure.BladeUser; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.constant.BladeConstant; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.dispatcher.entity.Dispatcher; |
| | | import org.springblade.modules.exam.entity.ExamSubjectChoices; |
| | | import org.springblade.modules.exam.service.ExamSubjectChoicesService; |
| | | import org.springblade.modules.exam.vo.ExamSubjectChoicesVO; |
| | | import org.springblade.modules.jurisdiction.entity.Jurisdiction; |
| | | import org.springblade.modules.jurisdiction.vo.JurisdictionVO; |
| | | import org.springblade.modules.jurisdiction.wrapper.JurisdictionWrapper; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author zhongrj |
| | |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * @param query page,size |
| | | * |
| | | * @param query page,size |
| | | * @param examSubjectChoices 选择题信息对象 |
| | | */ |
| | | @GetMapping("/page") |
| | |
| | | } |
| | | |
| | | /** |
| | | * 分页 |
| | | */ |
| | | @GetMapping("/list") |
| | | public R<IPage<ExamSubjectChoices>> list(ExamSubjectChoices examSubjectChoices, Query query) { |
| | | IPage<ExamSubjectChoices> pages = examSubjectChoicesService.page(Condition.getPage(query), Condition.getQueryWrapper(examSubjectChoices)); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 新增 |
| | | * |
| | | * @param examSubjectChoices 选择题信息对象 |
| | | */ |
| | | @PostMapping("/save") |
| | |
| | | |
| | | /** |
| | | * 修改 |
| | | * |
| | | * @param examSubjectChoices 选择题信息对象 |
| | | */ |
| | | @PostMapping("/update") |
| | |
| | | |
| | | /** |
| | | * 新增或修改 |
| | | * |
| | | * @param examSubjectChoices 选择题信息对象 |
| | | */ |
| | | @PostMapping("/submit") |
| | | public R submit(@RequestBody ExamSubjectChoices examSubjectChoices) { |
| | | if (null!=examSubjectChoices.getId()){ |
| | | if (null != examSubjectChoices.getId()) { |
| | | examSubjectChoices.setCreateDate(new Date()); |
| | | }else { |
| | | } else { |
| | | examSubjectChoices.setModifyDate(new Date()); |
| | | } |
| | | return R.status(examSubjectChoicesService.saveOrUpdate(examSubjectChoices)); |
| | |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param ids 选择题信息ids 数组 |
| | | */ |
| | | @PostMapping("/remove") |
| | |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param examSubjectChoices 选择题信息对象 |
| | | */ |
| | | @GetMapping("/detail") |
| | |
| | | |
| | | /** |
| | | * 详情(包含选项信息) |
| | | * |
| | | * @param examSubjectChoices 选择题信息对象 |
| | | */ |
| | | @GetMapping("/details") |
| | |
| | | return R.data(detail); |
| | | } |
| | | |
| | | /** |
| | | * 查询试卷包含的题目 |
| | | */ |
| | | @GetMapping("/getEexPaperChoices") |
| | | public R<IPage<ExamSubjectChoicesVO>> getEexPaperChoices(ExamSubjectChoicesVO examSubjectChoices, Query query) { |
| | | IPage<ExamSubjectChoicesVO> pages = examSubjectChoicesService.getEexPaperChoices(Condition.getPage(query), examSubjectChoices); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 修改单项题目分值 |
| | | */ |
| | | @PostMapping("/updateChoicesValue") |
| | | public R updateChoicesValue(String id,String value) { |
| | | return R.status(examSubjectChoicesService.updateChoicesValue(id,value)); |
| | | } |
| | | |
| | | } |