|
@@ -4,22 +4,20 @@ import com.qmth.boot.api.constant.ApiConstant;
|
|
|
import com.qmth.teachcloud.common.contant.SystemConstant;
|
|
|
import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
|
|
|
import com.qmth.teachcloud.common.enums.ScanStatus;
|
|
|
-import com.qmth.teachcloud.common.enums.mark.MarkPaperStatus;
|
|
|
import com.qmth.teachcloud.common.util.Result;
|
|
|
import com.qmth.teachcloud.common.util.ResultUtil;
|
|
|
import com.qmth.teachcloud.mark.bean.UpdateTimeVo;
|
|
|
import com.qmth.teachcloud.mark.bean.student.AbsentManualUpdateVo;
|
|
|
import com.qmth.teachcloud.mark.bean.student.StudentQuery;
|
|
|
-import com.qmth.teachcloud.mark.entity.MarkPaper;
|
|
|
import com.qmth.teachcloud.mark.entity.MarkStudent;
|
|
|
import com.qmth.teachcloud.mark.service.MarkStudentService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
/**
|
|
@@ -34,7 +32,8 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
@RestController
|
|
|
@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + SystemConstant.PREFIX_URL_SCAN + "/student")
|
|
|
public class ScanStudentController extends BaseController {
|
|
|
- @Autowired
|
|
|
+
|
|
|
+ @Resource
|
|
|
private MarkStudentService markStudentService;
|
|
|
|
|
|
@ApiOperation(value = "考生查询")
|
|
@@ -46,18 +45,16 @@ public class ScanStudentController extends BaseController {
|
|
|
@ApiOperation(value = "更新缺考状态")
|
|
|
@PostMapping("absent/update")
|
|
|
public AbsentManualUpdateVo absentManualUpdate(@ApiParam(name = "考试ID", required = true) @RequestParam Long examId,
|
|
|
- @ApiParam(name = "课程试卷号", required = true) @RequestParam String coursePaperId,
|
|
|
- @ApiParam(name = "学号", required = true) @RequestParam String studentCode,
|
|
|
- @ApiParam(name = "状态", required = true) @RequestParam ScanStatus status) {
|
|
|
+ @ApiParam(name = "课程试卷号", required = true) @RequestParam String coursePaperId, @ApiParam(name = "学号", required = true) @RequestParam String studentCode,
|
|
|
+ @ApiParam(name = "状态", required = true) @RequestParam ScanStatus status) {
|
|
|
validMarkPaperForScan(examId, coursePaperId);
|
|
|
return markStudentService.absentManualUpdate(examId, coursePaperId, studentCode, status);
|
|
|
}
|
|
|
+
|
|
|
@ApiOperation(value = "更新漏扫状态")
|
|
|
@PostMapping("missScan/update")
|
|
|
- public Result missScanUpdate(@ApiParam(name = "考试ID", required = true) @RequestParam Long examId,
|
|
|
- @ApiParam(name = "课程试卷号", required = true) @RequestParam String coursePaperId,
|
|
|
- @ApiParam(name = "学号", required = true) @RequestParam String studentCode,
|
|
|
- @ApiParam(name = "状态", required = true) @RequestParam Boolean missScan) {
|
|
|
+ public Result missScanUpdate(@ApiParam(name = "考试ID", required = true) @RequestParam Long examId, @ApiParam(name = "课程试卷号", required = true) @RequestParam String coursePaperId,
|
|
|
+ @ApiParam(name = "学号", required = true) @RequestParam String studentCode, @ApiParam(name = "状态", required = true) @RequestParam Boolean missScan) {
|
|
|
validMarkPaperForScan(examId, coursePaperId);
|
|
|
return ResultUtil.success(markStudentService.missScanUpdate(examId, coursePaperId, studentCode, missScan));
|
|
|
}
|
|
@@ -75,9 +72,8 @@ public class ScanStudentController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "识别缺考-任务确认")
|
|
|
@PostMapping("confirm")
|
|
|
- public UpdateTimeVo confirm(@RequestParam Long examId, @RequestParam String coursePaperId,
|
|
|
- @RequestParam String studentCode,
|
|
|
- @RequestParam(required = false) Boolean omrAbsent) {
|
|
|
+ public UpdateTimeVo confirm(@RequestParam Long examId, @RequestParam String coursePaperId, @RequestParam String studentCode,
|
|
|
+ @RequestParam(required = false) Boolean omrAbsent) {
|
|
|
validMarkPaperForScan(examId, coursePaperId);
|
|
|
return markStudentService.confirm(examId, coursePaperId, studentCode, omrAbsent);
|
|
|
}
|
|
@@ -87,10 +83,23 @@ public class ScanStudentController extends BaseController {
|
|
|
*/
|
|
|
@ApiOperation(value = "未扫描-导出")
|
|
|
@RequestMapping(value = "/unexist/export", method = RequestMethod.POST)
|
|
|
- public void exportUnexist(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
|
|
|
- @ApiParam(value = "课程ID") @RequestParam(required = false) Long courseId,
|
|
|
- @ApiParam(value = "试卷编号") @RequestParam(required = false) String coursePaperId,
|
|
|
- HttpServletResponse response) {
|
|
|
+ public void exportUnexist(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId, @ApiParam(value = "课程ID") @RequestParam(required = false) Long courseId,
|
|
|
+ @ApiParam(value = "试卷编号") @RequestParam(required = false) String coursePaperId, HttpServletResponse response) {
|
|
|
markStudentService.exportUnexist(examId, courseId, coursePaperId, response);
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value = "卷型检查任务-状态数量")
|
|
|
+ @RequestMapping(value = "/paper_type_check/status/count", method = RequestMethod.POST)
|
|
|
+ public Result paperTypeCheckStatusCount(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
|
|
|
+ @ApiParam(value = "课程ID") @RequestParam(required = false) Long courseId,
|
|
|
+ @ApiParam(value = "课程试卷编号") @RequestParam(required = false) String coursePaperId) {
|
|
|
+ return ResultUtil.ok(markStudentService.getStatus(examId, courseId, coursePaperId));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "卷型检查任务-任务确认")
|
|
|
+ @PostMapping("/paper_type_check/confirm")
|
|
|
+ public Result paperTypeCheckConfirm(@ApiParam(name = "考生id", required = true) @RequestParam Long studentId,
|
|
|
+ @ApiParam(name = "卷型", required = true) @RequestParam String paperType) {
|
|
|
+ return ResultUtil.ok(markStudentService.disposePaperTypeCheck(studentId, paperType));
|
|
|
+ }
|
|
|
}
|