|
@@ -11,12 +11,10 @@ import com.qmth.themis.business.constant.SystemConstant;
|
|
import com.qmth.themis.business.dto.MqDto;
|
|
import com.qmth.themis.business.dto.MqDto;
|
|
import com.qmth.themis.business.dto.cache.TEStudentCacheDto;
|
|
import com.qmth.themis.business.dto.cache.TEStudentCacheDto;
|
|
import com.qmth.themis.business.dto.response.TEExamDto;
|
|
import com.qmth.themis.business.dto.response.TEExamDto;
|
|
-import com.qmth.themis.business.dto.response.TEExamResultDto;
|
|
|
|
import com.qmth.themis.business.entity.TEExam;
|
|
import com.qmth.themis.business.entity.TEExam;
|
|
import com.qmth.themis.business.enums.*;
|
|
import com.qmth.themis.business.enums.*;
|
|
import com.qmth.themis.business.service.MqDtoService;
|
|
import com.qmth.themis.business.service.MqDtoService;
|
|
import com.qmth.themis.business.service.TEExamService;
|
|
import com.qmth.themis.business.service.TEExamService;
|
|
-import com.qmth.themis.business.service.TEExamStudentService;
|
|
|
|
import com.qmth.themis.business.util.JacksonUtil;
|
|
import com.qmth.themis.business.util.JacksonUtil;
|
|
import com.qmth.themis.business.util.RedisUtil;
|
|
import com.qmth.themis.business.util.RedisUtil;
|
|
import com.qmth.themis.business.util.ServletUtil;
|
|
import com.qmth.themis.business.util.ServletUtil;
|
|
@@ -46,14 +44,11 @@ public class TEExamController {
|
|
@Resource
|
|
@Resource
|
|
MqDtoService mqDtoService;
|
|
MqDtoService mqDtoService;
|
|
|
|
|
|
- @Resource
|
|
|
|
- TEExamStudentService teExamStudentService;
|
|
|
|
-
|
|
|
|
@ApiOperation(value = "验证考试口令接口")
|
|
@ApiOperation(value = "验证考试口令接口")
|
|
@RequestMapping(value = "/short_code", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/short_code", method = RequestMethod.POST)
|
|
@ApiResponses({@ApiResponse(code = 200, message = "考试信息", response = TEExam.class)})
|
|
@ApiResponses({@ApiResponse(code = 200, message = "考试信息", response = TEExam.class)})
|
|
public Result shortCode(@ApiJsonObject(name = "shortCode", value = {
|
|
public Result shortCode(@ApiJsonObject(name = "shortCode", value = {
|
|
- @ApiJsonProperty(key = "shortCode", description = "考试口令"),
|
|
|
|
|
|
+ @ApiJsonProperty(key = "shortCode", description = "考试口令")
|
|
}) @ApiParam(value = "考试口令", required = true) @RequestBody Map<String, Object> mapParameter) {
|
|
}) @ApiParam(value = "考试口令", required = true) @RequestBody Map<String, Object> mapParameter) {
|
|
if (Objects.isNull(mapParameter.get("shortCode")) || Objects.equals(mapParameter.get("shortCode"), "")) {
|
|
if (Objects.isNull(mapParameter.get("shortCode")) || Objects.equals(mapParameter.get("shortCode"), "")) {
|
|
throw new BusinessException(ExceptionResultEnum.SHORT_CODE_IS_NULL);
|
|
throw new BusinessException(ExceptionResultEnum.SHORT_CODE_IS_NULL);
|
|
@@ -73,10 +68,13 @@ public class TEExamController {
|
|
|
|
|
|
@ApiOperation(value = "获取待考列表接口")
|
|
@ApiOperation(value = "获取待考列表接口")
|
|
@RequestMapping(value = "/waiting", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/waiting", method = RequestMethod.POST)
|
|
- @ApiResponses({@ApiResponse(code = 200, message = "考试信息", response = TEExamResultDto.class)})
|
|
|
|
- public Result waiting() {
|
|
|
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "考试列表", response = TEExamDto.class)})
|
|
|
|
+ public Result waiting(@ApiJsonObject(name = "examWaiting", value = {
|
|
|
|
+ @ApiJsonProperty(key = "examId", type = "long", example = "1", description = "批次id")
|
|
|
|
+ }) @ApiParam(value = "考试口令", required = true) @RequestBody Map<String, Object> mapParameter) {
|
|
|
|
+ Long examId = Objects.nonNull(mapParameter.get("examId")) ? Long.parseLong(String.valueOf(mapParameter.get("examId"))) : null;
|
|
TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
|
|
TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
|
|
- List<TEExamDto> list = teExamService.getWaitingExam(teStudent.getId(), null, teStudent.getOrgId());
|
|
|
|
|
|
+ List<TEExamDto> list = teExamService.getWaitingExam(teStudent.getId(), examId, teStudent.getOrgId());
|
|
Map<String, Object> map = new HashMap<>();
|
|
Map<String, Object> map = new HashMap<>();
|
|
if (Objects.nonNull(list) && list.size() > 0) {
|
|
if (Objects.nonNull(list) && list.size() > 0) {
|
|
map.put("waiting", list);
|
|
map.put("waiting", list);
|