|
@@ -253,10 +253,13 @@ public class InspectedController extends BaseExamController {
|
|
JSONObject obj = new JSONObject();
|
|
JSONObject obj = new JSONObject();
|
|
ExamStudent student = studentService.findById(rejectResult.getStudentId());
|
|
ExamStudent student = studentService.findById(rejectResult.getStudentId());
|
|
WebUser wu = RequestUtils.getWebUser(request);
|
|
WebUser wu = RequestUtils.getWebUser(request);
|
|
- if (student != null
|
|
|
|
- && inspectedService.hasApplied(student, wu.getId())
|
|
|
|
- && (student.getSubjectiveStatus().equals(SubjectiveStatus.MARKED) || student.getSubjectiveStatus()
|
|
|
|
- .equals(SubjectiveStatus.INSPECTED))) {
|
|
|
|
|
|
+ if (student == null) {
|
|
|
|
+ obj.accumulate("success", false);
|
|
|
|
+ obj.accumulate("message", "无法打回");
|
|
|
|
+ return obj;
|
|
|
|
+ }
|
|
|
|
+ if ((inspectedService.hasApplied(student, wu.getId()) && (student.getSubjectiveStatus()
|
|
|
|
+ .equals(SubjectiveStatus.MARKED))) || student.getSubjectiveStatus().equals(SubjectiveStatus.INSPECTED)) {
|
|
if (subjectCheck(student.getSubjectCode(), wu) && lockService.trylock(LockType.STUDENT, student.getId())) {
|
|
if (subjectCheck(student.getSubjectCode(), wu) && lockService.trylock(LockType.STUDENT, student.getId())) {
|
|
try {
|
|
try {
|
|
lockService.watch(LockType.EXAM_SUBJECT, student.getExamId(), student.getSubjectCode());
|
|
lockService.watch(LockType.EXAM_SUBJECT, student.getExamId(), student.getSubjectCode());
|
|
@@ -279,9 +282,6 @@ public class InspectedController extends BaseExamController {
|
|
obj.accumulate("success", false);
|
|
obj.accumulate("success", false);
|
|
obj.accumulate("message", "无法打回");
|
|
obj.accumulate("message", "无法打回");
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
- obj.accumulate("success", false);
|
|
|
|
- obj.accumulate("message", "无法打回");
|
|
|
|
}
|
|
}
|
|
return obj;
|
|
return obj;
|
|
}
|
|
}
|