ソースを参照

考生列表新增整理异常显示

yin 6 ヶ月 前
コミット
fbc6ec0378

+ 11 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/model/ExamStudent.java

@@ -383,6 +383,9 @@ public class ExamStudent implements Serializable {
     @Transient
     private String problemRestTime;
 
+    @Transient
+    private String collationLabel;
+
     public Integer getId() {
         return id;
     }
@@ -1002,4 +1005,12 @@ public class ExamStudent implements Serializable {
     public void setCollationLabelCode(String collationLabelCode) {
         this.collationLabelCode = collationLabelCode;
     }
+
+    public String getCollationLabel() {
+        return collationLabel;
+    }
+
+    public void setCollationLabel(String collationLabel) {
+        this.collationLabel = collationLabel;
+    }
 }

+ 7 - 2
stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/StudentController.java

@@ -89,6 +89,8 @@ public class StudentController extends BaseExamController {
     public String list(Model model, HttpServletRequest request, ExamStudentSearchQuery query) {
         WebUser wu = RequestUtils.getWebUser(request);
         int examId = getSessionExamId(request);
+        List<CollationLabel> collationLabel =collationLabelService.list(examId);
+        Map<String,CollationLabel> collationLabelMap =collationLabel.stream().collect(Collectors.toMap(CollationLabel::getCode, Function.identity()));
         query.setExamId(examId);
         if (query.getBatchCode() != null) {
             query.setBatchCode(StringUtils.upperCase(query.getBatchCode()));
@@ -100,6 +102,9 @@ public class StudentController extends BaseExamController {
                 student.setSubject(subjectService.find(student.getExamId(), student.getSubjectCode()));
                 buildSheetUrl(student);
                 buildPackageUrl(student);
+                if(StringUtils.isNotBlank(student.getCollationLabelCode())){
+                    student.setCollationLabel(collationLabelMap.get(student.getCollationLabelCode()).getName());
+                }
             }
             model.addAttribute("studentList", query.getResult());
         }
@@ -651,9 +656,9 @@ public class StudentController extends BaseExamController {
 
             }
             if (failureNum > 0) {
-                failureMsg.insert(0, ",失败 " + failureNum + " 条用户");
+                failureMsg.insert(0, ",失败 " + failureNum + " 条");
             }
-            String message = "已成功导入 " + successNum + " 条用户";
+            String message = "已成功导入 " + successNum + " 条";
             addMessage(redirectAttributes, message + failureMsg);
             RequestUtils.setLog(request, message);
         } catch (Exception e) {

+ 6 - 0
stmms-web/src/main/webapp/WEB-INF/views/modules/exam/studentList.jsp

@@ -224,6 +224,7 @@
         <th>任课老师</th>
         <th>考点</th>
         <th>考场</th>
+        <th>整理异常</th>
         <th>操作</th>
     </tr>
     </thead>
@@ -295,6 +296,11 @@
             <td>${student.teacher}</td>
             <td>${student.examSite}</td>
             <td>${student.examRoom}</td>
+            <td><span title="${result.collationLabel}">
+            	<c:if test="${result.collationLabel.length()>10}">${result.collationLabel.substring(0,10) }...</c:if>
+            	<c:if test="${result.collationLabel.length()<=10}">${result.collationLabel}</c:if>
+            	</span>
+            </td>
             <td>
                 <c:if test="${web_user.schoolAdmin==true}">
                     <a href="${ctx}/admin/exam/student/update?id=${student.id}" class="update-btn">修改</a>