Browse Source

仲裁数仲裁率

xiatian 10 months ago
parent
commit
0febe1fb07

+ 22 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/model/Marker.java

@@ -99,6 +99,12 @@ public class Marker implements Serializable {
      */
      */
     @Transient
     @Transient
     private long classCount;
     private long classCount;
+    
+    @Transient
+    private long arbitrateCount;
+    
+    @Transient
+    private String arbitrateRatio;
 
 
     public Marker() {
     public Marker() {
     }
     }
@@ -303,4 +309,20 @@ public class Marker implements Serializable {
         this.rejectCount = rejectCount;
         this.rejectCount = rejectCount;
     }
     }
 
 
+	public long getArbitrateCount() {
+		return arbitrateCount;
+	}
+
+	public void setArbitrateCount(long arbitrateCount) {
+		this.arbitrateCount = arbitrateCount;
+	}
+
+	public String getArbitrateRatio() {
+		return arbitrateRatio;
+	}
+
+	public void setArbitrateRatio(String arbitrateRatio) {
+		this.arbitrateRatio = arbitrateRatio;
+	}
+
 }
 }

+ 10 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/query/MarkerSearchQuery.java

@@ -23,6 +23,8 @@ public class MarkerSearchQuery extends BaseQuery<Marker> {
     private String subjectCodeIn;
     private String subjectCodeIn;
     
     
     private Boolean marked;
     private Boolean marked;
+    
+    private Boolean noArbitrate;
 
 
     public void orderById() {
     public void orderById() {
         setSort(new Sort(Direction.ASC, "id"));
         setSort(new Sort(Direction.ASC, "id"));
@@ -92,4 +94,12 @@ public class MarkerSearchQuery extends BaseQuery<Marker> {
 		this.marked = marked;
 		this.marked = marked;
 	}
 	}
 
 
+	public Boolean getNoArbitrate() {
+		return noArbitrate;
+	}
+
+	public void setNoArbitrate(Boolean noArbitrate) {
+		this.noArbitrate = noArbitrate;
+	}
+
 }
 }

+ 5 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/mark/service/Impl/MarkLibraryServiceImpl.java

@@ -334,4 +334,9 @@ public class MarkLibraryServiceImpl extends BaseQueryService<MarkLibrary> implem
 	public void assigned(Integer libraryId, Integer userId) {
 	public void assigned(Integer libraryId, Integer userId) {
     	libraryDao.assigned(libraryId, userId);
     	libraryDao.assigned(libraryId, userId);
 	}
 	}
+
+	@Override
+	public long countByMarkerAndStatus(Integer markerId, LibraryStatus... status) {
+		return libraryDao.countByMarkerAndStatus(markerId, status);
+	}
 }
 }

+ 1 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/mark/service/MarkLibraryService.java

@@ -24,6 +24,7 @@ public interface MarkLibraryService {
             LibraryStatus... status);
             LibraryStatus... status);
 
 
     long countByMarker(int markerId);
     long countByMarker(int markerId);
+    long countByMarkerAndStatus(Integer markerId, LibraryStatus... status);
 
 
     List<MarkLibrary> findByStudentAndGroup(int studentId, int groupNumber);
     List<MarkLibrary> findByStudentAndGroup(int studentId, int groupNumber);
 
 

+ 8 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/utils/Calculator.java

@@ -157,4 +157,12 @@ public class Calculator {
         BigDecimal b2 = new BigDecimal(v2);
         BigDecimal b2 = new BigDecimal(v2);
         return String.valueOf(b1.divide(b2, len, BigDecimal.ROUND_HALF_UP).doubleValue());
         return String.valueOf(b1.divide(b2, len, BigDecimal.ROUND_HALF_UP).doubleValue());
     }
     }
+    
+    public static String percentage(double v1, double v2, int len) {
+        BigDecimal b1 = new BigDecimal(v1);
+        BigDecimal b2 = new BigDecimal(v2);
+        BigDecimal tem=b1.multiply(BigDecimal.valueOf(100));
+        return tem.divide(b2, len, BigDecimal.ROUND_HALF_UP).doubleValue()+"%";
+    }
+    
 }
 }

+ 16 - 8
stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/MarkQualityController.java

@@ -27,11 +27,9 @@ import cn.com.qmth.stmms.biz.exam.model.MarkGroup;
 import cn.com.qmth.stmms.biz.exam.model.Marker;
 import cn.com.qmth.stmms.biz.exam.model.Marker;
 import cn.com.qmth.stmms.biz.exam.query.MarkerSearchQuery;
 import cn.com.qmth.stmms.biz.exam.query.MarkerSearchQuery;
 import cn.com.qmth.stmms.biz.exam.service.ExamQuestionService;
 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.ExamSubjectService;
 import cn.com.qmth.stmms.biz.exam.service.ExamSubjectService;
 import cn.com.qmth.stmms.biz.exam.service.MarkGroupService;
 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.MarkerService;
-import cn.com.qmth.stmms.biz.file.service.FileService;
 import cn.com.qmth.stmms.biz.lock.LockService;
 import cn.com.qmth.stmms.biz.lock.LockService;
 import cn.com.qmth.stmms.biz.mark.model.Task;
 import cn.com.qmth.stmms.biz.mark.model.Task;
 import cn.com.qmth.stmms.biz.mark.model.TrialLibrary;
 import cn.com.qmth.stmms.biz.mark.model.TrialLibrary;
@@ -42,6 +40,7 @@ import cn.com.qmth.stmms.biz.mark.service.TrialService;
 import cn.com.qmth.stmms.biz.mark.thread.MarkQualityThread;
 import cn.com.qmth.stmms.biz.mark.thread.MarkQualityThread;
 import cn.com.qmth.stmms.biz.user.model.User;
 import cn.com.qmth.stmms.biz.user.model.User;
 import cn.com.qmth.stmms.biz.user.service.UserService;
 import cn.com.qmth.stmms.biz.user.service.UserService;
+import cn.com.qmth.stmms.biz.utils.Calculator;
 import cn.com.qmth.stmms.common.annotation.Logging;
 import cn.com.qmth.stmms.common.annotation.Logging;
 import cn.com.qmth.stmms.common.annotation.RoleRequire;
 import cn.com.qmth.stmms.common.annotation.RoleRequire;
 import cn.com.qmth.stmms.common.domain.WebUser;
 import cn.com.qmth.stmms.common.domain.WebUser;
@@ -86,15 +85,9 @@ public class MarkQualityController extends BaseExamController {
     @Autowired
     @Autowired
     private TrialService trialService;
     private TrialService trialService;
 
 
-    @Autowired
-    private ExamService examService;
-
     @Autowired
     @Autowired
     private UserService userService;
     private UserService userService;
 
 
-    @Autowired
-    private FileService fileService;
-
     @Logging(menu = "质量监控查询", type = LogType.QUERY)
     @Logging(menu = "质量监控查询", type = LogType.QUERY)
     @RequestMapping
     @RequestMapping
     public String list(Model model, HttpServletRequest request, MarkerSearchQuery query) {
     public String list(Model model, HttpServletRequest request, MarkerSearchQuery query) {
@@ -122,6 +115,21 @@ public class MarkQualityController extends BaseExamController {
                 group.setQuestionList(questionService.findByExamAndSubjectAndObjectiveAndGroupNumber(examId,
                 group.setQuestionList(questionService.findByExamAndSubjectAndObjectiveAndGroupNumber(examId,
                         marker.getSubjectCode(), false, group.getNumber()));
                         marker.getSubjectCode(), false, group.getNumber()));
                 marker.setGroup(group);
                 marker.setGroup(group);
+                int arbitrateCount=(int)libraryService.countByMarkerAndStatus(marker.getId(),LibraryStatus.WAIT_ARBITRATE,  LibraryStatus.ARBITRATED);
+                if(query.getNoArbitrate()!=null&&query.getNoArbitrate()) {
+                	if(marker.getFinishCount()!=null&&marker.getFinishCount()!=0) {
+                		marker.setFinishCount(marker.getFinishCount()-arbitrateCount);
+                	}
+                	marker.setArbitrateCount(0);
+                	marker.setArbitrateRatio("0%");
+                }else {
+                	marker.setArbitrateCount(arbitrateCount);
+                	if(marker.getFinishCount()!=null&&marker.getFinishCount()!=0) {
+                		marker.setArbitrateRatio(Calculator.percentage(arbitrateCount, marker.getFinishCount(), 2));
+                	}else {
+                		marker.setArbitrateRatio("0%");
+                	}
+                }
             }
             }
         }
         }
         model.addAttribute("query", query);
         model.addAttribute("query", query);

+ 22 - 7
stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/MarkerController.java

@@ -1,6 +1,11 @@
 package cn.com.qmth.stmms.admin.exam;
 package cn.com.qmth.stmms.admin.exam;
 
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponse;
@@ -15,7 +20,11 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.core.task.AsyncTaskExecutor;
 import org.springframework.core.task.AsyncTaskExecutor;
 import org.springframework.stereotype.Controller;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
 import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 
@@ -28,7 +37,12 @@ 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.MarkGroup;
 import cn.com.qmth.stmms.biz.exam.model.Marker;
 import cn.com.qmth.stmms.biz.exam.model.Marker;
 import cn.com.qmth.stmms.biz.exam.query.MarkerSearchQuery;
 import cn.com.qmth.stmms.biz.exam.query.MarkerSearchQuery;
-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.ExamSubjectService;
+import cn.com.qmth.stmms.biz.exam.service.MarkGroupService;
+import cn.com.qmth.stmms.biz.exam.service.MarkerClassService;
+import cn.com.qmth.stmms.biz.exam.service.MarkerService;
 import cn.com.qmth.stmms.biz.lock.LockService;
 import cn.com.qmth.stmms.biz.lock.LockService;
 import cn.com.qmth.stmms.biz.mark.service.MarkLibraryService;
 import cn.com.qmth.stmms.biz.mark.service.MarkLibraryService;
 import cn.com.qmth.stmms.biz.mark.service.MarkService;
 import cn.com.qmth.stmms.biz.mark.service.MarkService;
@@ -41,7 +55,11 @@ import cn.com.qmth.stmms.biz.user.service.query.UserSearchQuery;
 import cn.com.qmth.stmms.common.annotation.Logging;
 import cn.com.qmth.stmms.common.annotation.Logging;
 import cn.com.qmth.stmms.common.annotation.RoleRequire;
 import cn.com.qmth.stmms.common.annotation.RoleRequire;
 import cn.com.qmth.stmms.common.domain.WebUser;
 import cn.com.qmth.stmms.common.domain.WebUser;
-import cn.com.qmth.stmms.common.enums.*;
+import cn.com.qmth.stmms.common.enums.LockType;
+import cn.com.qmth.stmms.common.enums.LogType;
+import cn.com.qmth.stmms.common.enums.MarkerExcelError;
+import cn.com.qmth.stmms.common.enums.Role;
+import cn.com.qmth.stmms.common.enums.UserSource;
 import cn.com.qmth.stmms.common.utils.EncryptUtils;
 import cn.com.qmth.stmms.common.utils.EncryptUtils;
 import cn.com.qmth.stmms.common.utils.ExportExcel;
 import cn.com.qmth.stmms.common.utils.ExportExcel;
 import cn.com.qmth.stmms.common.utils.ImportExcel;
 import cn.com.qmth.stmms.common.utils.ImportExcel;
@@ -81,9 +99,6 @@ public class MarkerController extends BaseExamController {
     @Autowired
     @Autowired
     private MarkerClassService classService;
     private MarkerClassService classService;
 
 
-    @Autowired
-    private ExamStudentService studentService;
-
     @Autowired
     @Autowired
     private ExamQuestionService questionService;
     private ExamQuestionService questionService;
 
 

+ 7 - 1
stmms-web/src/main/webapp/WEB-INF/views/modules/exam/qualityList.jsp

@@ -46,6 +46,8 @@
             </select>
             </select>
             &nbsp;
             &nbsp;
         	<input name="marked" id="marked" type="checkbox" <c:if test="${query.marked}">checked</c:if>/>已评卷
         	<input name="marked" id="marked" type="checkbox" <c:if test="${query.marked}">checked</c:if>/>已评卷
+			&nbsp;
+			<input name="noArbitrate" id="noArbitrate" type="checkbox" <c:if test="${query.noArbitrate}">checked</c:if>/>不含仲裁
 			&nbsp;
 			&nbsp;
 			<input id="btnSubmit" class="btn btn-primary" type="button" value="查询" onclick="goSearch()"/>
 			<input id="btnSubmit" class="btn btn-primary" type="button" value="查询" onclick="goSearch()"/>
 			<c:if test="${running!=null}">
 			<c:if test="${running!=null}">
@@ -68,7 +70,9 @@
 				<th>评卷员</th>
 				<th>评卷员</th>
 				<th>姓名</th>
 				<th>姓名</th>
 				<th>完成任务数</th>
 				<th>完成任务数</th>
-				<th>打回任务数</th>
+				<th>仲裁任务数</th>
+				<th>仲裁率</th>
+				<th>打回次数</th>
 				<th>评卷采用率</th>
 				<th>评卷采用率</th>
 				<th>评卷速度(秒)</th>
 				<th>评卷速度(秒)</th>
 				<th>平均分</th>
 				<th>平均分</th>
@@ -85,6 +89,8 @@
 				<td>${marker.user.loginName}</td>
 				<td>${marker.user.loginName}</td>
 				<td>${marker.user.name}</td>
 				<td>${marker.user.name}</td>
 				<td>${marker.finishCount}</td>
 				<td>${marker.finishCount}</td>
+				<td>${marker.arbitrateCount}</td>
+				<td>${marker.arbitrateRatio}</td>
 				<td>${marker.rejectCount}</td>
 				<td>${marker.rejectCount}</td>
 				<td>
 				<td>
 				<c:choose>
 				<c:choose>