|
@@ -1,7 +1,10 @@
|
|
|
package cn.com.qmth.stmms.admin.exam;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
-import java.util.*;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
@@ -27,20 +30,40 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
|
|
import cn.com.qmth.stmms.admin.thread.MarkGroupDeleteThread;
|
|
|
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.model.Exam;
|
|
|
+import cn.com.qmth.stmms.biz.exam.model.ExamQuestion;
|
|
|
+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.model.SelectiveGroup;
|
|
|
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.ExamQuestionService;
|
|
|
+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.InspectHistoryService;
|
|
|
+import cn.com.qmth.stmms.biz.exam.service.MarkGroupService;
|
|
|
+import cn.com.qmth.stmms.biz.exam.service.MarkerService;
|
|
|
+import cn.com.qmth.stmms.biz.exam.service.SelectiveGroupService;
|
|
|
import cn.com.qmth.stmms.biz.file.service.FileService;
|
|
|
import cn.com.qmth.stmms.biz.lock.LockService;
|
|
|
import cn.com.qmth.stmms.biz.mark.model.MarkConfigItem;
|
|
|
import cn.com.qmth.stmms.biz.mark.service.MarkService;
|
|
|
-import cn.com.qmth.stmms.biz.report.service.ReportSubjectService;
|
|
|
import cn.com.qmth.stmms.biz.school.model.School;
|
|
|
import cn.com.qmth.stmms.biz.school.service.SchoolService;
|
|
|
import cn.com.qmth.stmms.common.annotation.Logging;
|
|
|
import cn.com.qmth.stmms.common.annotation.RoleRequire;
|
|
|
import cn.com.qmth.stmms.common.domain.WebUser;
|
|
|
-import cn.com.qmth.stmms.common.enums.*;
|
|
|
+import cn.com.qmth.stmms.common.enums.ArbitrateType;
|
|
|
+import cn.com.qmth.stmms.common.enums.ExamType;
|
|
|
+import cn.com.qmth.stmms.common.enums.LockType;
|
|
|
+import cn.com.qmth.stmms.common.enums.LogType;
|
|
|
+import cn.com.qmth.stmms.common.enums.MarkMode;
|
|
|
+import cn.com.qmth.stmms.common.enums.MarkStatus;
|
|
|
+import cn.com.qmth.stmms.common.enums.Role;
|
|
|
+import cn.com.qmth.stmms.common.enums.ScorePolicy;
|
|
|
+import cn.com.qmth.stmms.common.enums.SubjectiveStatus;
|
|
|
+import cn.com.qmth.stmms.common.enums.ThirdPolicy;
|
|
|
import cn.com.qmth.stmms.common.utils.RequestUtils;
|
|
|
import net.sf.json.JSONArray;
|
|
|
import net.sf.json.JSONObject;
|
|
@@ -82,9 +105,6 @@ public class MarkGroupController extends BaseExamController {
|
|
|
@Autowired
|
|
|
private SelectiveGroupService selectiveGroupService;
|
|
|
|
|
|
- @Autowired
|
|
|
- private ReportSubjectService reportSubjectService;
|
|
|
-
|
|
|
@Autowired
|
|
|
private InspectHistoryService inspectHistoryService;
|
|
|
|
|
@@ -402,7 +422,7 @@ public class MarkGroupController extends BaseExamController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @Logging(menu = "删除大题", type = LogType.DELETE)
|
|
|
+ @Logging(menu = "分组重置-删除", type = LogType.DELETE)
|
|
|
@RequestMapping("/delete")
|
|
|
@RoleRequire({ Role.SCHOOL_ADMIN, Role.SUBJECT_HEADER, Role.COLLEGE_ADMIN })
|
|
|
public String delete(HttpServletRequest request, Model model, RedirectAttributes redirectAttributes,
|
|
@@ -424,7 +444,7 @@ public class MarkGroupController extends BaseExamController {
|
|
|
}
|
|
|
if (lockService.trylock(LockType.GROUP_DELETE, group.getExamId(), group.getSubjectCode(), group.getNumber())) {
|
|
|
taskExecutor.submit(new MarkGroupDeleteThread(group, markService, lockService));
|
|
|
- RequestUtils.setLog(request, "开始删除分组,subjectCode:" + subjectCode + " number:" + number);
|
|
|
+ RequestUtils.setLog(request, "删除分组,科目代码:" + subjectCode + " 分组号:" + number);
|
|
|
}
|
|
|
|
|
|
// try {
|
|
@@ -450,7 +470,7 @@ public class MarkGroupController extends BaseExamController {
|
|
|
return "redirect:/admin/exam/group";
|
|
|
}
|
|
|
|
|
|
- @Logging(menu = "修改大题", type = LogType.UPDATE)
|
|
|
+ @Logging(menu = "分组修改", type = LogType.UPDATE)
|
|
|
@SuppressWarnings("unchecked")
|
|
|
@RequestMapping("/update")
|
|
|
@RoleRequire({ Role.SCHOOL_ADMIN, Role.SUBJECT_HEADER, Role.COLLEGE_ADMIN })
|
|
@@ -519,6 +539,7 @@ public class MarkGroupController extends BaseExamController {
|
|
|
lockService.waitlock(LockType.GROUP, true, group.getExamId(), group.getSubjectCode(),
|
|
|
group.getNumber());
|
|
|
markService.updateGroup(group, questionList, policy, at, third, selective);
|
|
|
+ RequestUtils.setLog(request, "重置分组,科目代码:" + subjectCode + " 分组号:" + number);
|
|
|
} catch (Exception e) {
|
|
|
log.error("update group error", e);
|
|
|
throw new RuntimeException("重置更新大题失败", e);
|