|
@@ -29,17 +29,20 @@ 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.ExamPackage;
|
|
import cn.com.qmth.stmms.biz.exam.model.ExamStudent;
|
|
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.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.query.ExamStudentSearchQuery;
|
|
import cn.com.qmth.stmms.biz.exam.service.ExamPackageService;
|
|
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.ExamService;
|
|
import cn.com.qmth.stmms.biz.exam.service.ExamStudentService;
|
|
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.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.file.service.FileService;
|
|
import cn.com.qmth.stmms.biz.mark.service.MarkService;
|
|
import cn.com.qmth.stmms.biz.mark.service.MarkService;
|
|
import cn.com.qmth.stmms.common.annotation.Logging;
|
|
import cn.com.qmth.stmms.common.annotation.Logging;
|
|
import cn.com.qmth.stmms.common.annotation.RoleRequire;
|
|
import cn.com.qmth.stmms.common.annotation.RoleRequire;
|
|
import cn.com.qmth.stmms.common.domain.WebUser;
|
|
import cn.com.qmth.stmms.common.domain.WebUser;
|
|
import cn.com.qmth.stmms.common.enums.LogType;
|
|
import cn.com.qmth.stmms.common.enums.LogType;
|
|
|
|
+import cn.com.qmth.stmms.common.enums.MarkStatus;
|
|
import cn.com.qmth.stmms.common.enums.Role;
|
|
import cn.com.qmth.stmms.common.enums.Role;
|
|
import cn.com.qmth.stmms.common.enums.SubjectiveStatus;
|
|
import cn.com.qmth.stmms.common.enums.SubjectiveStatus;
|
|
import cn.com.qmth.stmms.common.utils.ExportExcel;
|
|
import cn.com.qmth.stmms.common.utils.ExportExcel;
|
|
@@ -72,6 +75,9 @@ public class StudentController extends BaseExamController {
|
|
@Autowired
|
|
@Autowired
|
|
private FileService fileService;
|
|
private FileService fileService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private MarkGroupService groupService;
|
|
|
|
+
|
|
private static final String NULL_PAPER_TYPE_PLACEHOLDER = "#";
|
|
private static final String NULL_PAPER_TYPE_PLACEHOLDER = "#";
|
|
|
|
|
|
private static final String PAPER_TYPES_REGEX = "[a-zA-Z#]";
|
|
private static final String PAPER_TYPES_REGEX = "[a-zA-Z#]";
|
|
@@ -467,8 +473,13 @@ public class StudentController extends BaseExamController {
|
|
public JSONObject updateBreach(HttpServletRequest request, Integer id) {
|
|
public JSONObject updateBreach(HttpServletRequest request, Integer id) {
|
|
JSONObject result = new JSONObject();
|
|
JSONObject result = new JSONObject();
|
|
ExamStudent student = studentService.findById(id);
|
|
ExamStudent student = studentService.findById(id);
|
|
- if (student != null) {
|
|
|
|
- studentService.updateBreach(id, false);
|
|
|
|
|
|
+ if (student != null && studentService.updateBreach(id, false)) {
|
|
|
|
+ List<MarkGroup> groupList = groupService.findByExamAndSubjectAndStatus(student.getExamId(),
|
|
|
|
+ student.getSubjectCode(), MarkStatus.FINISH);
|
|
|
|
+ for (MarkGroup markGroup : groupList) {
|
|
|
|
+ groupService.updateStatus(student.getExamId(), student.getSubjectCode(), markGroup.getNumber(),
|
|
|
|
+ MarkStatus.FORMAL, MarkStatus.FINISH);
|
|
|
|
+ }
|
|
result.accumulate("message", "重置成功!");
|
|
result.accumulate("message", "重置成功!");
|
|
result.accumulate("success", true);
|
|
result.accumulate("success", true);
|
|
} else {
|
|
} else {
|