|
@@ -16,7 +16,6 @@ import com.qmth.themis.business.service.MqDtoService;
|
|
import com.qmth.themis.business.service.TBAttachmentService;
|
|
import com.qmth.themis.business.service.TBAttachmentService;
|
|
import com.qmth.themis.business.service.TBExamInvigilateUserService;
|
|
import com.qmth.themis.business.service.TBExamInvigilateUserService;
|
|
import com.qmth.themis.business.service.TBTaskHistoryService;
|
|
import com.qmth.themis.business.service.TBTaskHistoryService;
|
|
-import com.qmth.themis.business.util.JacksonUtil;
|
|
|
|
import com.qmth.themis.business.util.ServletUtil;
|
|
import com.qmth.themis.business.util.ServletUtil;
|
|
import com.qmth.themis.common.enums.ExceptionResultEnum;
|
|
import com.qmth.themis.common.enums.ExceptionResultEnum;
|
|
import com.qmth.themis.common.exception.BusinessException;
|
|
import com.qmth.themis.common.exception.BusinessException;
|
|
@@ -62,8 +61,8 @@ public class TBExamInvigilateUserController {
|
|
@ApiOperation(value = "监考员查询接口")
|
|
@ApiOperation(value = "监考员查询接口")
|
|
@RequestMapping(value = "/query", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/query", method = RequestMethod.POST)
|
|
@ApiResponses({@ApiResponse(code = 200, message = "监考员信息", response = TBExamInvigilateUserDto.class)})
|
|
@ApiResponses({@ApiResponse(code = 200, message = "监考员信息", response = TBExamInvigilateUserDto.class)})
|
|
- public Result query(@ApiParam(value = "考试批次id", required = true) @RequestParam Long examId,@ApiParam(value = "考场代码", required = false) @RequestParam(required = false) String roomCode, @ApiParam(value = "用户id", required = false) @RequestParam(required = false) Long userId, @ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber, @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
|
|
|
|
- IPage<TBExamInvigilateUserDto> examInvigilateUserDtoIPage = tbExamInvigilateUserService.examInvigilateUserQuery(new Page<>(pageNumber, pageSize), examId,roomCode, userId);
|
|
|
|
|
|
+ public Result query(@ApiParam(value = "考试批次id", required = true) @RequestParam(required = false) Long examId, @ApiParam(value = "考场代码", required = false) @RequestParam(required = false) String roomCode, @ApiParam(value = "用户id", required = false) @RequestParam(required = false) Long userId, @ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber, @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
|
|
|
|
+ IPage<TBExamInvigilateUserDto> examInvigilateUserDtoIPage = tbExamInvigilateUserService.examInvigilateUserQuery(new Page<>(pageNumber, pageSize), examId, roomCode, userId);
|
|
BasePage basePage = new BasePage(examInvigilateUserDtoIPage.getRecords(), examInvigilateUserDtoIPage.getCurrent(), examInvigilateUserDtoIPage.getSize(), examInvigilateUserDtoIPage.getTotal());
|
|
BasePage basePage = new BasePage(examInvigilateUserDtoIPage.getRecords(), examInvigilateUserDtoIPage.getCurrent(), examInvigilateUserDtoIPage.getSize(), examInvigilateUserDtoIPage.getTotal());
|
|
return ResultUtil.ok(basePage);
|
|
return ResultUtil.ok(basePage);
|
|
}
|
|
}
|
|
@@ -126,10 +125,13 @@ public class TBExamInvigilateUserController {
|
|
@RequestMapping(value = "/import", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/import", method = RequestMethod.POST)
|
|
@Transactional
|
|
@Transactional
|
|
@ApiResponses({@ApiResponse(code = 200, message = "{\"taskId\":0}", response = Result.class)})
|
|
@ApiResponses({@ApiResponse(code = 200, message = "{\"taskId\":0}", response = Result.class)})
|
|
- public Result importData(@ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file) {
|
|
|
|
|
|
+ public Result importData(@ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file, @ApiParam(value = "考试批次id", required = true) @RequestParam Long examId) {
|
|
if (Objects.isNull(file) || Objects.equals(file, "")) {
|
|
if (Objects.isNull(file) || Objects.equals(file, "")) {
|
|
throw new BusinessException(ExceptionResultEnum.ATTACHMENT_IS_NULL);
|
|
throw new BusinessException(ExceptionResultEnum.ATTACHMENT_IS_NULL);
|
|
}
|
|
}
|
|
|
|
+ if (Objects.isNull(examId) || Objects.equals(examId, "")) {
|
|
|
|
+ throw new BusinessException(ExceptionResultEnum.EXAM_ID_IS_NULL);
|
|
|
|
+ }
|
|
Map<String, Object> mapParameter = systemConfig.getOssEnv(UploadFileEnum.file.getId());
|
|
Map<String, Object> mapParameter = systemConfig.getOssEnv(UploadFileEnum.file.getId());
|
|
TBAttachment tbAttachment = null;
|
|
TBAttachment tbAttachment = null;
|
|
TBTaskHistory tbTaskHistory = null;
|
|
TBTaskHistory tbTaskHistory = null;
|
|
@@ -141,10 +143,11 @@ public class TBExamInvigilateUserController {
|
|
throw new BusinessException(ExceptionResultEnum.ATTACHMENT_ERROR);
|
|
throw new BusinessException(ExceptionResultEnum.ATTACHMENT_ERROR);
|
|
} else {
|
|
} else {
|
|
//往任务表里插一条数据
|
|
//往任务表里插一条数据
|
|
- tbTaskHistory = new TBTaskHistory(TaskTypeEnum.IMPORT_INVIGILATE_USER, tbAttachment.getId(), TaskStatusEnum.INIT, SystemConstant.IMPORT_INIT, 0d, tbAttachment.getName(), tbAttachment.getRemark(), tbUser.getId());
|
|
|
|
|
|
+ tbTaskHistory = new TBTaskHistory(TaskTypeEnum.IMPORT_INVIGILATE_USER, examId, TaskStatusEnum.INIT, SystemConstant.IMPORT_INIT, 0d, tbAttachment.getName(), tbAttachment.getRemark(), tbUser.getId());
|
|
taskHistoryService.save(tbTaskHistory);
|
|
taskHistoryService.save(tbTaskHistory);
|
|
transMap.put("tbTaskHistory", tbTaskHistory);
|
|
transMap.put("tbTaskHistory", tbTaskHistory);
|
|
}
|
|
}
|
|
|
|
+ transMap.put("examId", examId);
|
|
transMap.put("createId", tbUser.getId());
|
|
transMap.put("createId", tbUser.getId());
|
|
transMap.put("orgId", tbUser.getOrgId());
|
|
transMap.put("orgId", tbUser.getOrgId());
|
|
transMap.put("remark", tbAttachment.getRemark());
|
|
transMap.put("remark", tbAttachment.getRemark());
|