|
@@ -10,9 +10,6 @@ import java.util.stream.Collectors;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
-import cn.com.qmth.stmms.biz.exam.bean.ResultMessage;
|
|
|
-import io.swagger.annotations.Api;
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -33,13 +30,23 @@ import cn.com.qmth.stmms.admin.vo.CollationLabelVO;
|
|
|
import cn.com.qmth.stmms.admin.vo.ExamStudentVO;
|
|
|
import cn.com.qmth.stmms.admin.vo.UploadStudentVO;
|
|
|
import cn.com.qmth.stmms.api.controller.BaseApiController;
|
|
|
-import cn.com.qmth.stmms.biz.config.service.impl.SystemCache;
|
|
|
-import cn.com.qmth.stmms.biz.exam.model.*;
|
|
|
+import cn.com.qmth.stmms.biz.exam.bean.AnswerAiCheckSaveParam;
|
|
|
+import cn.com.qmth.stmms.biz.exam.bean.ResultMessage;
|
|
|
+import cn.com.qmth.stmms.biz.exam.model.CollationLabel;
|
|
|
+import cn.com.qmth.stmms.biz.exam.model.Exam;
|
|
|
+import cn.com.qmth.stmms.biz.exam.model.ExamPackage;
|
|
|
+import cn.com.qmth.stmms.biz.exam.model.ExamStudent;
|
|
|
+import cn.com.qmth.stmms.biz.exam.model.ExamSubject;
|
|
|
+import cn.com.qmth.stmms.biz.exam.model.MarkGroup;
|
|
|
import cn.com.qmth.stmms.biz.exam.query.ExamStudentSearchQuery;
|
|
|
-import cn.com.qmth.stmms.biz.exam.service.*;
|
|
|
+import cn.com.qmth.stmms.biz.exam.service.CollationLabelService;
|
|
|
+import cn.com.qmth.stmms.biz.exam.service.ExamPackageService;
|
|
|
+import cn.com.qmth.stmms.biz.exam.service.ExamService;
|
|
|
+import cn.com.qmth.stmms.biz.exam.service.ExamStudentService;
|
|
|
+import cn.com.qmth.stmms.biz.exam.service.ExamSubjectService;
|
|
|
+import cn.com.qmth.stmms.biz.exam.service.MarkGroupService;
|
|
|
import cn.com.qmth.stmms.biz.file.service.FileService;
|
|
|
import cn.com.qmth.stmms.biz.mark.service.MarkService;
|
|
|
-import cn.com.qmth.stmms.biz.user.model.User;
|
|
|
import cn.com.qmth.stmms.biz.utils.PageUtil;
|
|
|
import cn.com.qmth.stmms.common.annotation.Logging;
|
|
|
import cn.com.qmth.stmms.common.enums.ExamType;
|
|
@@ -49,6 +56,8 @@ import cn.com.qmth.stmms.common.enums.SubjectiveStatus;
|
|
|
import cn.com.qmth.stmms.common.utils.ExportExcel;
|
|
|
import cn.com.qmth.stmms.common.utils.ImportExcel;
|
|
|
import cn.com.qmth.stmms.common.utils.RequestUtils;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
import net.sf.json.JSONObject;
|
|
|
|
|
|
@Api(tags = "考生管理")
|
|
@@ -86,13 +95,20 @@ public class StudentController extends BaseApiController {
|
|
|
|
|
|
private static final String PAPER_TYPES_REGEX = "[a-zA-Z#]";
|
|
|
|
|
|
+ @ApiOperation(value = "题卡ai检测结果保存")
|
|
|
+ @RequestMapping(value = "answer-ai-check/save", method = RequestMethod.POST)
|
|
|
+ @ResponseBody
|
|
|
+ public String answerAiCheckSave(AnswerAiCheckSaveParam req) {
|
|
|
+ studentService.answerAiCheckSave(req);
|
|
|
+ return req.getExamNumber();
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value = "查询考生")
|
|
|
@RequestMapping(value = "/list", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
@Logging(menu = "查询考生", type = LogType.QUERY)
|
|
|
public PageResult<ExamStudent> list(HttpServletRequest request, ExamStudentSearchQuery query) {
|
|
|
int examId = getSessionExamId(request);
|
|
|
- User user = RequestUtils.getApiUser(request).getUser();
|
|
|
List<CollationLabel> collationLabel = collationLabelService.list(examId);
|
|
|
Map<String, CollationLabel> collationLabelMap = collationLabel.stream()
|
|
|
.collect(Collectors.toMap(CollationLabel::getCode, Function.identity()));
|
|
@@ -194,13 +210,13 @@ public class StudentController extends BaseApiController {
|
|
|
}
|
|
|
return resultOk();
|
|
|
}
|
|
|
+
|
|
|
@ApiOperation(value = "修改考生")
|
|
|
@RequestMapping(value = "/update", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
@Logging(menu = "修改考生", type = LogType.UPDATE)
|
|
|
public ResultMessage update(HttpServletRequest request, ExamStudent student) {
|
|
|
int examId = getSessionExamId(request);
|
|
|
- Exam exam = examService.findById(examId);
|
|
|
ExamSubject subject = subjectService.find(examId, student.getSubjectCode());
|
|
|
if (subject == null) {
|
|
|
throw new StatusException("科目不存在");
|
|
@@ -518,7 +534,7 @@ public class StudentController extends BaseApiController {
|
|
|
groupService.updateStatus(student.getExamId(), student.getSubjectCode(), markGroup.getNumber(),
|
|
|
MarkStatus.FORMAL, MarkStatus.FINISH);
|
|
|
}
|
|
|
- return resultOk();
|
|
|
+ return resultOk();
|
|
|
} else {
|
|
|
throw new StatusException("将违纪考生信息重置为正常时出错!");
|
|
|
}
|