1
0
ting.yin 5 gadi atpakaļ
vecāks
revīzija
7f538617bd

+ 11 - 2
stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/ScoreController.java

@@ -95,6 +95,9 @@ public class ScoreController extends BaseParameterController {
 
 
     @Autowired
     @Autowired
     private CheckStudentService checkStudentService;
     private CheckStudentService checkStudentService;
+    
+    @Autowired
+    private MarkLibraryService libraryService ;
 
 
     @Value("${sheet.image.server}")
     @Value("${sheet.image.server}")
     private String imageServer;
     private String imageServer;
@@ -321,7 +324,7 @@ public class ScoreController extends BaseParameterController {
         obj.accumulate("running", exam.getStatus().equals(ExamStatus.CALCULATING) ? true : false);
         obj.accumulate("running", exam.getStatus().equals(ExamStatus.CALCULATING) ? true : false);
         if (exam.getProcess() != null) {
         if (exam.getProcess() != null) {
             DecimalFormat format = new DecimalFormat("##.##");
             DecimalFormat format = new DecimalFormat("##.##");
-            obj.accumulate("process", format.format(exam.getProcess() * 100));
+            obj.accumulate("process", format.format(exam.getProcess()));
         } else {
         } else {
             obj.accumulate("process", 0);
             obj.accumulate("process", 0);
         }
         }
@@ -491,11 +494,17 @@ public class ScoreController extends BaseParameterController {
 
 
     private String enableExport(int examId) {
     private String enableExport(int examId) {
         Exam exam = examService.findById(examId);
         Exam exam = examService.findById(examId);
+        long total = subjectService.sumLibraryCount(examId, 0, 0);
+        long finish = libraryService.countByExamAndStatus(examId, LibraryStatus.MARKED);
+        
+        if(total != finish){
+            String message = "未评卷完成";
+            return message;
+        }
         if (exam.isNeedCalculate()) {
         if (exam.isNeedCalculate()) {
             String message = "该考试需要统分";
             String message = "该考试需要统分";
             return message;
             return message;
         }
         }
-
         if (checkStudentService.countByExamIdAndChecked(examId, false) != 0) {
         if (checkStudentService.countByExamIdAndChecked(examId, false) != 0) {
             String message = "人工确认未完成";
             String message = "人工确认未完成";
             return message;
             return message;