xiatian 8 months ago
parent
commit
b7c79bf97c

+ 1 - 1
src/main/java/cn/com/qmth/scancentral/service/impl/ImageCheckServiceImpl.java

@@ -42,7 +42,7 @@ public class ImageCheckServiceImpl implements ImageCheckService {
             if (vo.getTotalCount() == null || vo.getTotalCount() == 0) {
                 vo.setImageCheckProgress(null);
             } else {
-                double progress = MathUtil.percentage(vo.getTotalCount() - vo.getWaitingCount(), vo.getTotalCount());
+                double progress = MathUtil.percentage(vo.getDisposedCount(), vo.getTotalCount());
                 vo.setImageCheckProgress(progress);
             }
         }

+ 5 - 5
src/main/java/cn/com/qmth/scancentral/vo/imagecheck/ImageCheckVo.java

@@ -19,7 +19,7 @@ public class ImageCheckVo {
     @ApiModelProperty(value = "异常数量")
     private Integer failedCount;
 
-    private Integer waitingCount;
+    private Integer disposedCount;
 
     public String getSubjectCode() {
         return subjectCode;
@@ -61,12 +61,12 @@ public class ImageCheckVo {
         this.failedCount = failedCount;
     }
 
-    public Integer getWaitingCount() {
-        return waitingCount;
+    public Integer getDisposedCount() {
+        return disposedCount;
     }
 
-    public void setWaitingCount(Integer waitingCount) {
-        this.waitingCount = waitingCount;
+    public void setDisposedCount(Integer disposedCount) {
+        this.disposedCount = disposedCount;
     }
 
 }

+ 6 - 3
src/main/resources/mapper/StudentMapper.xml

@@ -670,10 +670,13 @@
                sb.name  as         subjectName,
                count(1) as         totalCount,
                sum(case
-                       when stu.image_check_status = 'WAITING' then 1
-                       else 0 end) waitingCount,
+                       when 
+                       (stu.file_upload_status = 'ERROR') 
+                       or (stu.file_upload_status = 'UPLOADED' or stu.image_check_status in('SUCCESS','FAILED') ) 
+                       then 1
+                       else 0 end) disposedCount,
                sum(case
-                       when stu.image_check_status = 'FAILED' then 1
+                       when stu.file_upload_status = 'ERROR' or stu.image_check_status = 'FAILED' then 1
                        else 0 end) failedCount
         from sc_student stu
                  inner join sc_subject sb on sb.exam_id = stu.exam_id and sb.code = stu.subject_code