瀏覽代碼

Merge branch 'dev20190426' of http://git.qmth.com.cn/luoshi/stmms-gx.git into test20190428

ting.yin 6 年之前
父節點
當前提交
e5d06cddf7

+ 82 - 80
stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/ExamController.java

@@ -45,16 +45,19 @@ public class ExamController extends BaseParameterController {
 
     @Autowired
     private ExamService examService;
+
     @Autowired
     private ExamStudentService examStudentService;
+
     @Autowired
     private ExamSubjectService examSubjectService;
+
     @Autowired
     private MarkerService markerService;
+
     @Autowired
     private MarkLibraryService libraryService;
 
-
     @RequestMapping(value = { "", "/list" })
     @AuthRequire(value = { Auth.EXAM_VIEW_SELF, Auth.EXAM_VIEW_CAMPUS }, isAny = true)
     public String examList(Model model, HttpServletRequest request, ExamSearchQuery query) {
@@ -87,17 +90,16 @@ public class ExamController extends BaseParameterController {
         model.addAttribute("markModeList", MarkMode.values());
         return "modules/exam/examForm";
     }
-    
-    
+
     @RequestMapping("/edit/{examId}")
     public String edit(@PathVariable Integer examId, Model model) {
-    	Exam exam = examService.findById(examId);
+        Exam exam = examService.findById(examId);
         model.addAttribute("exam", exam);
         model.addAttribute("statusList", ExamStatus.getStatusList());
         model.addAttribute("markModeList", MarkMode.values());
         return "modules/exam/examEdit";
     }
-    
+
     @RequestMapping(value = "/save", method = RequestMethod.POST)
     // @AuthRequire({ Auth.EXAM_CREATE })
     public String save(HttpServletRequest request, Exam exam, RedirectAttributes redirectAttributes) {
@@ -112,7 +114,7 @@ public class ExamController extends BaseParameterController {
 
     @RequestMapping(value = "/edit", method = RequestMethod.POST)
     // @AuthRequire({ Auth.EXAM_CREATE })
-    public String examEdit(HttpServletRequest request, Exam exam,int StatusValue) {
+    public String examEdit(HttpServletRequest request, Exam exam, int StatusValue) {
         User user = RequestUtils.getWebUser(request).getUser();
         Exam oldExam = examService.findById(exam.getId());
         if (oldExam != null && oldExam.getCreatorId().intValue() == user.getId().intValue()) {
@@ -128,80 +130,80 @@ public class ExamController extends BaseParameterController {
         return "redirect:/admin/exam";
     }
 
-	@RequestMapping("/view/{examId}")
-	@AuthRequire({ Auth.EXAM_VIEW_SELF })
-	public String view(Model model, HttpServletRequest request,@PathVariable Integer examId) {
-		StmmsSession session = RequestUtils.getSession(request);
-		session.setParameter("examId", examId.toString());
-		return "redirect:/admin/exam-param/student";
-	}
-	
-	@RequestMapping("/view/{examId}/info")
-	@AuthRequire({ Auth.EXAM_VIEW_SELF })
-	public String info(Model model, HttpServletRequest request,@PathVariable Integer examId) {
-		StmmsSession session = RequestUtils.getSession(request);
-		session.setParameter("examId", examId.toString());
-		Exam exam = examService.findById(examId);
-		long studentCount = examStudentService.countByExamId(exam.getId());
-		long subjectCount = examSubjectService.count(examId);
-		long campusCount = examStudentService.countCampusByExam(examId);
-		long markerCount = markerService.countByExam(exam.getId());
-		long scanCount = examStudentService.countByExamIdAndUpload(examId, true);
-		long markedCount = libraryService.countByExamAndStatus(examId,LibraryStatus.MARKED);
-
-		List<ExamInfoVO> voList = new ArrayList<ExamInfoVO>();
-
-		ExamInfoVO student = new ExamInfoVO();
-		student.setName("考生");
-		student.setAttr("共导入 " + studentCount + " 个考生");
-		student.setUrl("/admin/exam-param/student");
-
-		ExamInfoVO subject = new ExamInfoVO();
-		subject.setName("科目");
-		subject.setAttr("共导入 " + subjectCount + " 个科目");
-		subject.setUrl("/admin/exam-param/paper");
-
-		ExamInfoVO campus = new ExamInfoVO();
-		campus.setName("学习中心");
-		campus.setAttr("共导入 " + campusCount + " 个学习中心");
-		campus.setUrl("/admin/exam-param/student");
-
-		ExamInfoVO marker = new ExamInfoVO();
-		marker.setName("评卷员");
-		marker.setAttr("已创建 " + markerCount + " 个评卷员");
-		marker.setUrl("/admin/exam-param/marker");
-
-		ExamInfoVO scan = new ExamInfoVO();
-		scan.setName("扫描进度");
-		scan.setAttr("已扫描 " + scanCount + " 个考生");
-		scan.setUrl("/admin/exam/scan");
-
-		ExamInfoVO mark = new ExamInfoVO();
-		mark.setName("评卷进度");
-		mark.setAttr("已评完 " + markedCount + " 个考生");
-		mark.setUrl("/admin/exam/mark");
-
-		// ExamInfoVO objective = new ExamInfoVO();
-		// objective.setName("客观题");
-		// objective.setAttr("已设置 " + objectiveCount + " 个科目");
-		// objective.setUrl("/admin/exam-param/objective");
-		// ExamInfoVO subjective = new ExamInfoVO();
-		// subjective.setName("主观题");
-		// subjective.setAttr("已设置 " + subjectiveCount + " 个科目");
-		// subjective.setUrl("/admin/exam-param/subjective");
-
-		voList.add(student);
-		voList.add(subject);
-		voList.add(campus);
-		voList.add(marker);
-		voList.add(scan);
-		voList.add(mark);
-		// voList.add(objective);
-		// voList.add(subjective);
-		model.addAttribute("exam", exam);
-		model.addAttribute("list", voList);
-		return "modules/exam/examInfo";
-	}
+    @RequestMapping("/view/{examId}")
+    @AuthRequire({ Auth.EXAM_VIEW_SELF })
+    public String view(Model model, HttpServletRequest request, @PathVariable Integer examId) {
+        StmmsSession session = RequestUtils.getSession(request);
+        session.setParameter("examId", examId.toString());
+        return "redirect:/admin/exam-param/student";
+    }
+
+    @RequestMapping("/view/{examId}/info")
+    @AuthRequire({ Auth.EXAM_VIEW_SELF })
+    public String info(Model model, HttpServletRequest request, @PathVariable Integer examId) {
+        StmmsSession session = RequestUtils.getSession(request);
+        session.setParameter("examId", examId.toString());
+        Exam exam = examService.findById(examId);
+        long studentCount = examStudentService.countByExamId(exam.getId());
+        long subjectCount = examSubjectService.count(examId);
+        long campusCount = examStudentService.countCampusByExam(examId);
+        long markerCount = markerService.countByExam(exam.getId());
+        long scanCount = examStudentService.countByExamIdAndUpload(examId, true);
+        long markedCount = libraryService.countByExamAndStatus(examId, LibraryStatus.MARKED);
+
+        List<ExamInfoVO> voList = new ArrayList<ExamInfoVO>();
+
+        ExamInfoVO student = new ExamInfoVO();
+        student.setName("考生");
+        student.setAttr("共导入 " + studentCount + " 个考生");
+        student.setUrl("/admin/exam-param/student");
+
+        ExamInfoVO subject = new ExamInfoVO();
+        subject.setName("科目");
+        subject.setAttr("共导入 " + subjectCount + " 个科目");
+        subject.setUrl("/admin/exam-param/paper");
+
+        ExamInfoVO campus = new ExamInfoVO();
+        campus.setName("学习中心");
+        campus.setAttr("共导入 " + campusCount + " 个学习中心");
+        campus.setUrl("/admin/exam-param/student");
+
+        ExamInfoVO marker = new ExamInfoVO();
+        marker.setName("评卷员");
+        marker.setAttr("已创建 " + markerCount + " 个评卷员");
+        marker.setUrl("/admin/exam-param/marker");
+
+        ExamInfoVO scan = new ExamInfoVO();
+        scan.setName("扫描进度");
+        scan.setAttr("已扫描 " + scanCount + " 个考生");
+        scan.setUrl("/admin/exam/scan");
+
+        ExamInfoVO mark = new ExamInfoVO();
+        mark.setName("评卷进度");
+        mark.setAttr("已评完 " + markedCount + " 个考生");
+        mark.setUrl("/admin/exam/mark");
+
+        // ExamInfoVO objective = new ExamInfoVO();
+        // objective.setName("客观题");
+        // objective.setAttr("已设置 " + objectiveCount + " 个科目");
+        // objective.setUrl("/admin/exam-param/objective");
+        // ExamInfoVO subjective = new ExamInfoVO();
+        // subjective.setName("主观题");
+        // subjective.setAttr("已设置 " + subjectiveCount + " 个科目");
+        // subjective.setUrl("/admin/exam-param/subjective");
+
+        voList.add(student);
+        voList.add(subject);
+        voList.add(campus);
+        voList.add(marker);
+        voList.add(scan);
+        voList.add(mark);
+        // voList.add(objective);
+        // voList.add(subjective);
+        model.addAttribute("exam", exam);
+        model.addAttribute("list", voList);
+        return "modules/exam/examInfo";
+    }
 
     @RequestMapping("/analysisinfo")
     @AuthRequire({ Auth.EXAM_VIEW_SELF })

+ 1 - 0
stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/parameter/ExamMarkerController.java

@@ -527,6 +527,7 @@ public class ExamMarkerController extends BaseParameterController {
             		if (marker.getPassword().length() > 0 && marker.getPassword().length() < 4) {
             			failureMsg.append("<br/>评卷员 " + marker.getLoginName() + "," +  MarkerExcelError.MARKERPWERROR.getName());
             			failureNum++;
+            			continue;
                     }
             		saveMap.put(marker.getLoginName(), marker);
             	}