瀏覽代碼

新增回卷整理异常

yin 6 月之前
父節點
當前提交
d65704875b
共有 29 個文件被更改,包括 691 次插入53 次删除
  1. 16 0
      install/mysql/init/stmms_ft.sql
  2. 12 0
      install/mysql/upgrade/1.5.2.sql
  3. 25 0
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/dao/CollationLabelDao.java
  4. 7 0
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/dao/ExamStudentDao.java
  5. 62 0
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/model/CollationLabel.java
  6. 75 0
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/model/CollationLabelPK.java
  7. 10 0
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/model/ExamStudent.java
  8. 15 0
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/CollationLabelService.java
  9. 4 0
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/ExamStudentService.java
  10. 36 0
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/impl/CollationLabelServiceImpl.java
  11. 12 0
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/impl/ExamStudentServiceImpl.java
  12. 0 4
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/impl/MarkerClassServiceImpl.java
  13. 2 6
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/impl/SubjectiveScoreServiceImpl.java
  14. 10 0
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/mark/model/Task.java
  15. 3 0
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/mark/service/Impl/TaskServiceImpl.java
  16. 2 2
      stmms-common/src/main/java/cn/com/qmth/stmms/common/utils/VersionInfo.java
  17. 17 9
      stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/ArbitrateController.java
  18. 86 0
      stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/CollationLabelController.java
  19. 18 6
      stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/InspectedController.java
  20. 61 0
      stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/StudentController.java
  21. 4 12
      stmms-web/src/main/java/cn/com/qmth/stmms/admin/user/SubjectUserController.java
  22. 26 0
      stmms-web/src/main/java/cn/com/qmth/stmms/admin/vo/CollationLabelVO.java
  23. 1 4
      stmms-web/src/main/java/cn/com/qmth/stmms/admin/vo/TrialMarkerVO.java
  24. 16 10
      stmms-web/src/main/java/cn/com/qmth/stmms/mark/MarkController.java
  25. 56 0
      stmms-web/src/main/webapp/WEB-INF/views/modules/exam/collationLabelEdit.jsp
  26. 55 0
      stmms-web/src/main/webapp/WEB-INF/views/modules/exam/collationLabelForm.jsp
  27. 42 0
      stmms-web/src/main/webapp/WEB-INF/views/modules/exam/collationLabelList.jsp
  28. 1 0
      stmms-web/src/main/webapp/WEB-INF/views/modules/exam/examList.jsp
  29. 17 0
      stmms-web/src/main/webapp/WEB-INF/views/modules/exam/studentList.jsp

+ 16 - 0
install/mysql/init/stmms_ft.sql

@@ -171,6 +171,21 @@ CREATE TABLE `eb_check_student`
 ) ENGINE = InnoDB
 ) ENGINE = InnoDB
   DEFAULT CHARSET = utf8mb4 COMMENT ='审核学生表';
   DEFAULT CHARSET = utf8mb4 COMMENT ='审核学生表';
 
 
+# Dump of table eb_collation_label
+# ------------------------------------------------------------
+
+DROP TABLE IF EXISTS `eb_collation_label`;
+CREATE TABLE `eb_collation_label`
+(
+    `exam_id`      int(11)      NOT NULL COMMENT '考试ID',
+    `code`         varchar(64)  NOT NULL COMMENT '代码',
+    `name`         varchar(255)     NOT NULL COMMENT '名称',
+    `update_time`  datetime     DEFAULT NULL COMMENT '修改时间',
+    PRIMARY KEY (`exam_id`, `code`)
+) ENGINE = InnoDB
+  DEFAULT CHARSET = utf8mb4 COMMENT ='回卷整理标识表';
+
+
 # Dump of table eb_data_sync
 # Dump of table eb_data_sync
 # ------------------------------------------------------------
 # ------------------------------------------------------------
 
 
@@ -342,6 +357,7 @@ CREATE TABLE `eb_exam_student`
     `score_verify_time`     datetime     DEFAULT NULL COMMENT '成绩校验时间',
     `score_verify_time`     datetime     DEFAULT NULL COMMENT '成绩校验时间',
     `score_verify_flagged`  tinyint(1)   DEFAULT NULL COMMENT '成绩校验标记结果',
     `score_verify_flagged`  tinyint(1)   DEFAULT NULL COMMENT '成绩校验标记结果',
     `inspected`             tinyint(1)  NOT NULL COMMENT '当前轮次是否已审核',
     `inspected`             tinyint(1)  NOT NULL COMMENT '当前轮次是否已审核',
+    `collation_label_code`  varchar(64) DEFAULT NULL COMMENT '回卷标识代码',
     PRIMARY KEY (`id`),
     PRIMARY KEY (`id`),
     UNIQUE KEY `index1` (`exam_id`, `exam_number`),
     UNIQUE KEY `index1` (`exam_id`, `exam_number`),
     UNIQUE KEY `index2` (`exam_id`, `secret_number`),
     UNIQUE KEY `index2` (`exam_id`, `secret_number`),

+ 12 - 0
install/mysql/upgrade/1.5.2.sql

@@ -1,3 +1,15 @@
 -- 1.5.2
 -- 1.5.2
 USE `stmms_ft`;
 USE `stmms_ft`;
 ALTER TABLE eb_exam_question ADD COLUMN `track_count` int(11) NOT NULL COMMENT '给分次数';
 ALTER TABLE eb_exam_question ADD COLUMN `track_count` int(11) NOT NULL COMMENT '给分次数';
+ALTER TABLE eb_exam_student ADD COLUMN `collation_label_code` varchar(64) DEFAULT NULL COMMENT '回卷标识代码';
+
+DROP TABLE IF EXISTS `eb_collation_label`;
+CREATE TABLE `eb_collation_label`
+(
+    `exam_id`      int(11)      NOT NULL COMMENT '考试ID',
+    `code`         varchar(64)  NOT NULL COMMENT '代码',
+    `name`         varchar(255)     NOT NULL COMMENT '名称',
+    `update_time`  datetime     DEFAULT NULL COMMENT '修改时间',
+    PRIMARY KEY (`exam_id`, `code`)
+) ENGINE = InnoDB
+  DEFAULT CHARSET = utf8mb4 COMMENT ='回卷整理标识表';

+ 25 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/dao/CollationLabelDao.java

@@ -0,0 +1,25 @@
+package cn.com.qmth.stmms.biz.exam.dao;
+
+import java.util.List;
+
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.data.jpa.repository.Modifying;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.repository.PagingAndSortingRepository;
+
+import cn.com.qmth.stmms.biz.exam.model.CollationLabel;
+import cn.com.qmth.stmms.biz.exam.model.CollationLabelPK;
+
+public interface CollationLabelDao
+        extends PagingAndSortingRepository<CollationLabel, CollationLabelPK>, JpaSpecificationExecutor<CollationLabel> {
+
+    @Query("select s from CollationLabel s where s.pk.examId=?1")
+    public List<CollationLabel> findByExamId(int examId);
+
+    @Query("select s from CollationLabel s where s.pk.examId=?1 and s.pk.code=?2")
+    public CollationLabel findByExamIdAndCode(int examId, String code);
+
+    @Modifying
+    @Query("delete CollationLabel s where s.pk.examId=?1")
+    void deleteByExamId(int examId);
+}

+ 7 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/dao/ExamStudentDao.java

@@ -325,4 +325,11 @@ public interface ExamStudentDao extends JpaRepository<ExamStudent, Integer>, Jpa
     @Query("select s from ExamStudent s where s.examId=?1 and s.examNumber in ?2")
     @Query("select s from ExamStudent s where s.examId=?1 and s.examNumber in ?2")
     List<ExamStudent> findByExamIdAndExamNumberIn(Integer examId, List<String> examNumberIn);
     List<ExamStudent> findByExamIdAndExamNumberIn(Integer examId, List<String> examNumberIn);
 
 
+    @Modifying
+    @Query("update ExamStudent s set s.collationLabelCode=null where s.examId=?1")
+    void clearCollationLabelCode(int examId);
+
+    @Modifying
+    @Query("update ExamStudent s set s.collationLabelCode=?3 where s.examId=?1 and s.examNumber=?2")
+    void updateCollationLabelCode(int examId, String examNumber, String collationLabelCode);
 }
 }

+ 62 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/model/CollationLabel.java

@@ -0,0 +1,62 @@
+package cn.com.qmth.stmms.biz.exam.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.persistence.*;
+
+/**
+ * 卡格式
+ */
+@Entity
+@Table(name = "eb_collation_label")
+public class CollationLabel implements Serializable {
+
+    private static final long serialVersionUID = -1069244956794990730L;
+
+    @EmbeddedId
+    private CollationLabelPK pk;
+
+    @Column(name = "name", nullable = false)
+    private String name;
+
+    @Temporal(TemporalType.TIMESTAMP)
+    @Column(name = "update_time")
+    private Date updateTime;
+
+    public CollationLabel() {
+        this.pk = new CollationLabelPK();
+    }
+
+    public Integer getExamId() {
+        return pk.getExamId();
+    }
+
+    public void setExamId(Integer examId) {
+        pk.setExamId(examId);
+    }
+
+    public String getCode() {
+        return pk.getCode();
+    }
+
+    public void setCode(String code) {
+        pk.setCode(code);
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+}

+ 75 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/model/CollationLabelPK.java

@@ -0,0 +1,75 @@
+package cn.com.qmth.stmms.biz.exam.model;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Embeddable;
+
+@Embeddable
+public class CollationLabelPK implements Serializable {
+
+    private static final long serialVersionUID = -5768575190691986287L;
+
+    @Column(name = "exam_id")
+    private Integer examId;
+
+    @Column(name = "code")
+    private String code;
+
+    public CollationLabelPK() {
+    }
+
+    @Override
+    public int hashCode() {
+        final int PRIME = 31;
+        int result = 1;
+        result = PRIME * result + ((examId == null) ? 0 : examId.hashCode());
+        result = PRIME * result + ((code == null) ? 0 : code.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        final CollationLabelPK other = (CollationLabelPK) obj;
+        if (examId == null) {
+            if (other.examId != null)
+                return false;
+        } else if (!examId.equals(other.examId))
+            return false;
+        if (code == null) {
+            if (other.code != null)
+                return false;
+        } else if (!code.equals(other.code))
+            return false;
+
+        return true;
+    }
+
+    public CollationLabelPK(int examId, String code) {
+        this.examId = examId;
+        this.code = code;
+    }
+
+    public Integer getExamId() {
+        return examId;
+    }
+
+    public void setExamId(Integer examId) {
+        this.examId = examId;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+}

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

@@ -260,6 +260,9 @@ public class ExamStudent implements Serializable {
     @Column(name = "subject_category")
     @Column(name = "subject_category")
     private String subjectCategory;
     private String subjectCategory;
 
 
+    @Column(name = "collation_label_code")
+    private String collationLabelCode;
+
     /**
     /**
      * 学院
      * 学院
      */
      */
@@ -992,4 +995,11 @@ public class ExamStudent implements Serializable {
 		this.objectivePageCount = objectivePageCount;
 		this.objectivePageCount = objectivePageCount;
 	}
 	}
 
 
+    public String getCollationLabelCode() {
+        return collationLabelCode;
+    }
+
+    public void setCollationLabelCode(String collationLabelCode) {
+        this.collationLabelCode = collationLabelCode;
+    }
 }
 }

+ 15 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/CollationLabelService.java

@@ -0,0 +1,15 @@
+package cn.com.qmth.stmms.biz.exam.service;
+
+import java.util.List;
+
+import cn.com.qmth.stmms.biz.exam.model.CollationLabel;
+
+public interface CollationLabelService {
+
+    CollationLabel save(CollationLabel collationLabel);
+
+    CollationLabel find(int examId, String code);
+
+    List<CollationLabel> list(int examId);
+
+}

+ 4 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/ExamStudentService.java

@@ -232,4 +232,8 @@ public interface ExamStudentService {
     List<ExamStudent> findByExamIdAndExamNumberIn(Integer examId, List<String> examNumberIn);
     List<ExamStudent> findByExamIdAndExamNumberIn(Integer examId, List<String> examNumberIn);
 
 
     void updateManualAbsent(List<Integer> studentIds, boolean manualAbsent);
     void updateManualAbsent(List<Integer> studentIds, boolean manualAbsent);
+
+    void clearCollationLabelCode(int examId);
+
+    void updateCollationLabelCode(int examId, String examNumber, String collationLabelCode);
 }
 }

+ 36 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/impl/CollationLabelServiceImpl.java

@@ -0,0 +1,36 @@
+package cn.com.qmth.stmms.biz.exam.service.impl;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import cn.com.qmth.stmms.biz.common.BaseQueryService;
+import cn.com.qmth.stmms.biz.exam.dao.CollationLabelDao;
+import cn.com.qmth.stmms.biz.exam.model.CollationLabel;
+import cn.com.qmth.stmms.biz.exam.service.CollationLabelService;
+
+@Service("collationLabelService")
+public class CollationLabelServiceImpl extends BaseQueryService<CollationLabel> implements CollationLabelService {
+
+    @Autowired
+    private CollationLabelDao collationLabelDao;
+
+    @Transactional
+    @Override
+    public CollationLabel save(CollationLabel c) {
+        return collationLabelDao.save(c);
+    }
+
+    @Override
+    public CollationLabel find(int examId, String code) {
+        return collationLabelDao.findByExamIdAndCode(examId, code);
+    }
+
+    @Override
+    public List<CollationLabel> list(int examId) {
+        return collationLabelDao.findByExamId(examId);
+    }
+
+}

+ 12 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/impl/ExamStudentServiceImpl.java

@@ -469,6 +469,18 @@ public class ExamStudentServiceImpl extends BaseQueryService<ExamStudent> implem
         studentDao.updateManualAbsent(ids, manualAbsent);
         studentDao.updateManualAbsent(ids, manualAbsent);
     }
     }
 
 
+    @Override
+    @Transactional
+    public void clearCollationLabelCode(int examId) {
+        studentDao.clearCollationLabelCode(examId);
+    }
+
+    @Override
+    @Transactional
+    public void updateCollationLabelCode(int examId, String examNumber, String collationLabelCode) {
+        studentDao.updateCollationLabelCode(examId,examNumber, collationLabelCode);
+    }
+
     @Override
     @Override
     @Transactional
     @Transactional
     public void clearManualAbsent(int examId) {
     public void clearManualAbsent(int examId) {

+ 0 - 4
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/impl/MarkerClassServiceImpl.java

@@ -12,7 +12,6 @@ import cn.com.qmth.stmms.biz.common.BaseQueryService;
 import cn.com.qmth.stmms.biz.exam.dao.MarkerClassDao;
 import cn.com.qmth.stmms.biz.exam.dao.MarkerClassDao;
 import cn.com.qmth.stmms.biz.exam.model.MarkerClass;
 import cn.com.qmth.stmms.biz.exam.model.MarkerClass;
 import cn.com.qmth.stmms.biz.exam.service.MarkerClassService;
 import cn.com.qmth.stmms.biz.exam.service.MarkerClassService;
-import cn.com.qmth.stmms.biz.exam.service.MarkerService;
 
 
 @Service("markerClassService")
 @Service("markerClassService")
 public class MarkerClassServiceImpl extends BaseQueryService<MarkerClass> implements MarkerClassService {
 public class MarkerClassServiceImpl extends BaseQueryService<MarkerClass> implements MarkerClassService {
@@ -20,9 +19,6 @@ public class MarkerClassServiceImpl extends BaseQueryService<MarkerClass> implem
     @Autowired
     @Autowired
     private MarkerClassDao markerClassDao;
     private MarkerClassDao markerClassDao;
 
 
-    @Autowired
-    private MarkerService markerService;
-
     @Transactional
     @Transactional
     @Override
     @Override
     public void save(int userId, int examId, String[] classes) {
     public void save(int userId, int examId, String[] classes) {

+ 2 - 6
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/impl/SubjectiveScoreServiceImpl.java

@@ -21,7 +21,6 @@ import cn.com.qmth.stmms.biz.common.BaseQueryService;
 import cn.com.qmth.stmms.biz.exam.dao.SubjectiveScoreDao;
 import cn.com.qmth.stmms.biz.exam.dao.SubjectiveScoreDao;
 import cn.com.qmth.stmms.biz.exam.model.SubjectiveScore;
 import cn.com.qmth.stmms.biz.exam.model.SubjectiveScore;
 import cn.com.qmth.stmms.biz.exam.query.SubjectiveScoreSearchQuery;
 import cn.com.qmth.stmms.biz.exam.query.SubjectiveScoreSearchQuery;
-import cn.com.qmth.stmms.biz.exam.service.MarkGroupService;
 import cn.com.qmth.stmms.biz.exam.service.SubjectiveScoreService;
 import cn.com.qmth.stmms.biz.exam.service.SubjectiveScoreService;
 import cn.com.qmth.stmms.biz.utils.QuestionNumberComparator;
 import cn.com.qmth.stmms.biz.utils.QuestionNumberComparator;
 
 
@@ -31,9 +30,6 @@ public class SubjectiveScoreServiceImpl extends BaseQueryService<SubjectiveScore
     @Autowired
     @Autowired
     private SubjectiveScoreDao scoreDao;
     private SubjectiveScoreDao scoreDao;
 
 
-    @Autowired
-    private MarkGroupService groupService;
-
     @Override
     @Override
     public List<Integer> findStudentIdByQuery(final SubjectiveScoreSearchQuery query) {
     public List<Integer> findStudentIdByQuery(final SubjectiveScoreSearchQuery query) {
         Page<SubjectiveScore> result = scoreDao.findAll(buildSpecification(query), query);
         Page<SubjectiveScore> result = scoreDao.findAll(buildSpecification(query), query);
@@ -98,8 +94,8 @@ public class SubjectiveScoreServiceImpl extends BaseQueryService<SubjectiveScore
                 if (query.getScore() != null) {
                 if (query.getScore() != null) {
                     predicates.add(cb.equal(root.get("score"), query.getScore()));
                     predicates.add(cb.equal(root.get("score"), query.getScore()));
                 }
                 }
-                return predicates.isEmpty() ? cb.conjunction() : cb.and(predicates.toArray(new Predicate[predicates
-                        .size()]));
+                return predicates.isEmpty() ? cb.conjunction()
+                        : cb.and(predicates.toArray(new Predicate[predicates.size()]));
             }
             }
         };
         };
     }
     }

+ 10 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/mark/model/Task.java

@@ -145,6 +145,8 @@ public class Task implements Serializable {
      */
      */
     private String arbitrateIndex;
     private String arbitrateIndex;
 
 
+    private String collationLabelCode;
+
     public Integer getLibraryId() {
     public Integer getLibraryId() {
         return libraryId;
         return libraryId;
     }
     }
@@ -360,4 +362,12 @@ public class Task implements Serializable {
     public void setArbitrateIndex(String arbitrateIndex) {
     public void setArbitrateIndex(String arbitrateIndex) {
         this.arbitrateIndex = arbitrateIndex;
         this.arbitrateIndex = arbitrateIndex;
     }
     }
+
+    public String getCollationLabelCode() {
+        return collationLabelCode;
+    }
+
+    public void setCollationLabelCode(String collationLabelCode) {
+        this.collationLabelCode = collationLabelCode;
+    }
 }
 }

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

@@ -175,6 +175,7 @@ public class TaskServiceImpl implements TaskService {
         task.setStudentCode(student.getStudentCode());
         task.setStudentCode(student.getStudentCode());
         task.setStudentName(student.getName());
         task.setStudentName(student.getName());
         task.setExamNumber(library.getExamNumber());
         task.setExamNumber(library.getExamNumber());
+        task.setCollationLabelCode(student.getCollationLabelCode());
         task.setSubject(subject);
         task.setSubject(subject);
         if (ExamType.MULTI_MEDIA.equals(exam.getType())) {
         if (ExamType.MULTI_MEDIA.equals(exam.getType())) {
             task.setJsonUrl(fileService.getJsonUri(library.getExamId(), library.getSecretNumber()));
             task.setJsonUrl(fileService.getJsonUri(library.getExamId(), library.getSecretNumber()));
@@ -221,6 +222,7 @@ public class TaskServiceImpl implements TaskService {
         task.setStudentCode(student.getStudentCode());
         task.setStudentCode(student.getStudentCode());
         task.setStudentName(student.getName());
         task.setStudentName(student.getName());
         task.setExamNumber(library.getExamNumber());
         task.setExamNumber(library.getExamNumber());
+        task.setCollationLabelCode(student.getCollationLabelCode());
         task.setSubject(subject);
         task.setSubject(subject);
         task.setQuestionList(buildTrialStep(group, library));
         task.setQuestionList(buildTrialStep(group, library));
         if (StringUtils.isNotBlank(student.getObjectiveScoreList())) {
         if (StringUtils.isNotBlank(student.getObjectiveScoreList())) {
@@ -410,6 +412,7 @@ public class TaskServiceImpl implements TaskService {
         task.setStudentCode(student.getStudentCode());
         task.setStudentCode(student.getStudentCode());
         task.setStudentName(student.getName());
         task.setStudentName(student.getName());
         task.setExamNumber(student.getExamNumber());
         task.setExamNumber(student.getExamNumber());
+        task.setCollationLabelCode(student.getCollationLabelCode());
         task.setSubject(subject);
         task.setSubject(subject);
         if (ExamType.MULTI_MEDIA.equals(exam.getType())) {
         if (ExamType.MULTI_MEDIA.equals(exam.getType())) {
             task.setJsonUrl(fileService.getJsonUri(student.getExamId(), student.getSecretNumber()));
             task.setJsonUrl(fileService.getJsonUri(student.getExamId(), student.getSecretNumber()));

+ 2 - 2
stmms-common/src/main/java/cn/com/qmth/stmms/common/utils/VersionInfo.java

@@ -5,7 +5,7 @@ package cn.com.qmth.stmms.common.utils;
  */
  */
 public class VersionInfo {
 public class VersionInfo {
 
 
-    public static final String NAME = "1.5.1";
+    public static final String NAME = "1.5.2";
 
 
-    public static final String DATE = "20241128";
+    public static final String DATE = "20241220";
 }
 }

+ 17 - 9
stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/ArbitrateController.java

@@ -10,6 +10,10 @@ import java.util.Set;
 
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
 
 
+import cn.com.qmth.stmms.biz.exam.model.*;
+import cn.com.qmth.stmms.biz.exam.service.*;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.LoggerFactory;
@@ -25,15 +29,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.ResponseBody;
 
 
-import cn.com.qmth.stmms.biz.exam.model.Exam;
-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.Marker;
-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.MarkerService;
 import cn.com.qmth.stmms.biz.file.service.FileService;
 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.ArbitrateHistory;
 import cn.com.qmth.stmms.biz.mark.model.ArbitrateHistory;
@@ -104,6 +99,9 @@ public class ArbitrateController extends BaseExamController {
     @Autowired
     @Autowired
     private MarkLibraryService libraryService;
     private MarkLibraryService libraryService;
 
 
+    @Autowired
+    private CollationLabelService collationLabelService;
+
     @Value("${slice.split.config}")
     @Value("${slice.split.config}")
     private String splitConfig;
     private String splitConfig;
 
 
@@ -188,9 +186,19 @@ public class ArbitrateController extends BaseExamController {
         setting.accumulate("enableSplit",
         setting.accumulate("enableSplit",
                 examSubject.getEnableSplit() == null ? exam.isEnableSplit() : examSubject.getEnableSplit());
                 examSubject.getEnableSplit() == null ? exam.isEnableSplit() : examSubject.getEnableSplit());
         setMode(setting, group, exam);
         setMode(setting, group, exam);
+        setCollationLabel(setting, exam.getId());
         return setting;
         return setting;
     }
     }
 
 
+    private void setCollationLabel(JSONObject setting, Integer examId) {
+        List<CollationLabel> list = collationLabelService.list(examId);
+        ObjectMapper mapper = new ObjectMapper();
+        try {
+            setting.accumulate("collationLabelList",mapper.writeValueAsString(list));
+        } catch (JsonProcessingException e) {
+            log.error("MarkController-整理异常获取出错", e);
+        }
+    }
     private void setMode(JSONObject setting, MarkGroup group, Exam exam) {
     private void setMode(JSONObject setting, MarkGroup group, Exam exam) {
         MarkMode mode = null;
         MarkMode mode = null;
         boolean forceMode = false;
         boolean forceMode = false;

+ 86 - 0
stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/CollationLabelController.java

@@ -0,0 +1,86 @@
+package cn.com.qmth.stmms.admin.exam;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+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.servlet.mvc.support.RedirectAttributes;
+
+import cn.com.qmth.stmms.biz.exam.model.CollationLabel;
+import cn.com.qmth.stmms.biz.exam.service.CollationLabelService;
+import cn.com.qmth.stmms.common.annotation.Logging;
+import cn.com.qmth.stmms.common.domain.WebUser;
+import cn.com.qmth.stmms.common.enums.LogType;
+import cn.com.qmth.stmms.common.utils.RequestUtils;
+
+@Controller
+@RequestMapping("/admin/exam/collationLabel")
+public class CollationLabelController extends BaseExamController {
+
+    protected static Logger log = LoggerFactory.getLogger(CollationLabelController.class);
+
+    @Autowired
+    private CollationLabelService collationLabelService;
+
+    @Logging(menu = "查看整理异常", type = LogType.QUERY)
+    @RequestMapping
+    public String list(HttpServletRequest request, Model model, @RequestParam Integer examId) {
+        List<CollationLabel> list = collationLabelService.list(examId);
+        model.addAttribute("list", list);
+        model.addAttribute("examId", examId);
+        return "modules/exam/collationLabelList";
+    }
+
+    @RequestMapping("/add")
+    public String add(CollationLabel collationLabel, Model model, @RequestParam Integer examId) {
+        model.addAttribute("collationLabel", collationLabel);
+        model.addAttribute("examId", examId);
+        return "modules/exam/collationLabelForm";
+    }
+
+    @Logging(menu = "新增整理异常", type = LogType.ADD)
+    @RequestMapping("/save")
+    public String save(HttpServletRequest request, CollationLabel collationLabel, RedirectAttributes redirectAttributes,
+            @RequestParam Integer examId) {
+        if (!StringUtils.isNotBlank(collationLabel.getName())) {
+            addMessage(redirectAttributes, "名称不能为空");
+            return "redirect:/admin/exam/collationLabel/add?examId=" + examId;
+        }
+        collationLabel.setExamId(examId);
+        collationLabel = collationLabelService.save(collationLabel);
+        addMessage(redirectAttributes, "创建'" + collationLabel.getCode() + "'成功");
+        return "redirect:/admin/exam/collationLabel?examId=" + examId;
+    }
+
+    @RequestMapping("/edit")
+    public String edit(@RequestParam Integer examId, @RequestParam String code, Model model) {
+        CollationLabel collationLabel = collationLabelService.find(examId, code);
+        model.addAttribute("collationLabel", collationLabel);
+        return "modules/exam/collationLabelEdit";
+    }
+
+    @Logging(menu = "编辑整理异常", type = LogType.UPDATE)
+    @RequestMapping(value = "/edit", method = RequestMethod.POST)
+    public String examEdit(HttpServletRequest request, CollationLabel collationLabel) {
+        WebUser user = RequestUtils.getWebUser(request);
+        CollationLabel old = collationLabelService.find(collationLabel.getExamId(), collationLabel.getCode());
+        if (user.isSchoolAdmin() && StringUtils.isNotBlank(collationLabel.getName())) {
+            String oldName = old.getName();
+            old.setName(collationLabel.getName());
+            collationLabelService.save(old);
+            RequestUtils.setLog(request, "编辑整理异常,考试ID:" + collationLabel.getExamId() + ",代码:" + collationLabel.getCode()
+                    + ",原名称:" + oldName + ",新名称:" + collationLabel.getName());
+        }
+        return "redirect:/admin/exam/collationLabel?examId=" + old.getExamId();
+    }
+
+}

+ 18 - 6
stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/InspectedController.java

@@ -11,6 +11,10 @@ import java.util.stream.Collectors;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponse;
 
 
+import cn.com.qmth.stmms.biz.exam.model.CollationLabel;
+import cn.com.qmth.stmms.biz.exam.service.*;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.LoggerFactory;
@@ -36,12 +40,6 @@ import cn.com.qmth.stmms.biz.exam.model.ExamStudent;
 import cn.com.qmth.stmms.biz.exam.model.ExamSubject;
 import cn.com.qmth.stmms.biz.exam.model.ExamSubject;
 import cn.com.qmth.stmms.biz.exam.query.ExamStudentSearchQuery;
 import cn.com.qmth.stmms.biz.exam.query.ExamStudentSearchQuery;
 import cn.com.qmth.stmms.biz.exam.query.InspectQuery;
 import cn.com.qmth.stmms.biz.exam.query.InspectQuery;
-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.ExamStudentService;
-import cn.com.qmth.stmms.biz.exam.service.ExamSubjectService;
-import cn.com.qmth.stmms.biz.exam.service.InspectHistoryService;
-import cn.com.qmth.stmms.biz.exam.service.InspectedService;
 import cn.com.qmth.stmms.biz.exam.service.query.ExamSubjectSearchQuery;
 import cn.com.qmth.stmms.biz.exam.service.query.ExamSubjectSearchQuery;
 import cn.com.qmth.stmms.biz.file.service.FileService;
 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;
@@ -105,6 +103,9 @@ public class InspectedController extends BaseExamController {
     @Autowired
     @Autowired
     private SchoolService schoolService;
     private SchoolService schoolService;
 
 
+    @Autowired
+    private CollationLabelService collationLabelService;
+
     @Value("${slice.split.config}")
     @Value("${slice.split.config}")
     private String splitConfig;
     private String splitConfig;
 
 
@@ -567,9 +568,20 @@ public class InspectedController extends BaseExamController {
         setting.accumulate("subject", subject);
         setting.accumulate("subject", subject);
         setting.accumulate("enableSplit",
         setting.accumulate("enableSplit",
                 examSubject.getEnableSplit() == null ? exam.isEnableSplit() : examSubject.getEnableSplit());
                 examSubject.getEnableSplit() == null ? exam.isEnableSplit() : examSubject.getEnableSplit());
+        setCollationLabel(setting, exam.getId());
         return setting;
         return setting;
     }
     }
 
 
+    private void setCollationLabel(JSONObject setting, Integer examId) {
+        List<CollationLabel> list = collationLabelService.list(examId);
+        ObjectMapper mapper = new ObjectMapper();
+        try {
+            setting.accumulate("collationLabelList",mapper.writeValueAsString(list));
+        } catch (JsonProcessingException e) {
+            log.error("MarkController-整理异常获取出错", e);
+        }
+    }
+
     private double[] getSplitConfig() {
     private double[] getSplitConfig() {
         String strs[] = splitConfig.split(",");
         String strs[] = splitConfig.split(",");
         double[] config = new double[strs.length];
         double[] config = new double[strs.length];

+ 61 - 0
stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/StudentController.java

@@ -4,10 +4,13 @@ import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
 
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponse;
 
 
+import cn.com.qmth.stmms.admin.vo.CollationLabelVO;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.LoggerFactory;
@@ -74,6 +77,9 @@ public class StudentController extends BaseExamController {
     @Autowired
     @Autowired
     private SystemCache authCache;
     private SystemCache authCache;
 
 
+    @Autowired
+    private CollationLabelService collationLabelService;
+
     private static final String NULL_PAPER_TYPE_PLACEHOLDER = "#";
     private static final String NULL_PAPER_TYPE_PLACEHOLDER = "#";
 
 
     private static final String PAPER_TYPES_REGEX = "[a-zA-Z#]";
     private static final String PAPER_TYPES_REGEX = "[a-zA-Z#]";
@@ -601,4 +607,59 @@ public class StudentController extends BaseExamController {
             }
             }
         }
         }
     }
     }
+
+    @RequestMapping(value = "/collationLabelTemplate")
+    public String collationLabelTemplate(HttpServletResponse response, RedirectAttributes redirectAttributes) {
+        try {
+            String fileName = "整理异常导入模板.xlsx";
+            List<ExamStudentVO> list = Lists.newArrayList();
+            list.add(new ExamStudentVO());
+            new ExportExcel("整理异常", CollationLabelVO.class, 2).setDataList(list).write(response, fileName).dispose();
+            return null;
+        } catch (Exception e) {
+            addMessage(redirectAttributes, "导入模板下载失败!失败信息:" + e.getMessage());
+        }
+        return "redirect:/admin/exam/student";
+    }
+
+    @Logging(menu = "导入整理异常", type = LogType.IMPORT_FILE)
+    @RequestMapping(value = "/collationLabelImport", method = RequestMethod.POST)
+    public String collationLabelImportFile(HttpServletRequest request, MultipartFile file,
+                                   RedirectAttributes redirectAttributes) {
+        int examId = getSessionExamId(request);
+        try {
+            int successNum = 0;
+            int failureNum = 0;
+            StringBuilder failureMsg = new StringBuilder();
+            ImportExcel ei = new ImportExcel(file, 1, 0);
+            List<CollationLabelVO> list = ei.getDataList(CollationLabelVO.class);
+            List<CollationLabel> collationLabel =collationLabelService.list(examId);
+            Map<String,CollationLabel> collationLabelMap =collationLabel.stream().collect(Collectors.toMap(CollationLabel::getCode, Function.identity()));
+            studentService.clearCollationLabelCode(examId);
+            for (CollationLabelVO studentVO : list) {
+                if (StringUtils.isBlank(studentVO.getExamNumber())) {
+                    continue;
+                }
+                ExamStudent student = studentService.findByExamIdAndExamNumber(examId, studentVO.getExamNumber());
+                if (student != null && collationLabelMap.get(studentVO.getCollationLabelCode())!=null) {
+                    studentService.updateCollationLabelCode(examId, student.getExamNumber(), studentVO.getCollationLabelCode());
+                    successNum++;
+                } else {
+                    failureMsg.append("<br/>准考证号 " + studentVO.getExamNumber() + " 不存在或异常代码 "+studentVO.getCollationLabelCode()+" 不存在; ");
+                    failureNum++;
+                }
+
+            }
+            if (failureNum > 0) {
+                failureMsg.insert(0, ",失败 " + failureNum + " 条用户");
+            }
+            String message = "已成功导入 " + successNum + " 条用户";
+            addMessage(redirectAttributes, message + failureMsg);
+            RequestUtils.setLog(request, message);
+        } catch (Exception e) {
+            log.error("Batch import CollationLabel error!", e);
+            addMessage(redirectAttributes, "导入整理异常失败!失败信息:" + e.getMessage());
+        }
+        return "redirect:/admin/exam/student";
+    }
 }
 }

+ 4 - 12
stmms-web/src/main/java/cn/com/qmth/stmms/admin/user/SubjectUserController.java

@@ -20,8 +20,6 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 
 import cn.com.qmth.stmms.admin.exam.BaseExamController;
 import cn.com.qmth.stmms.admin.exam.BaseExamController;
 import cn.com.qmth.stmms.biz.exam.model.SubjectUser;
 import cn.com.qmth.stmms.biz.exam.model.SubjectUser;
-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.SubjectUserService;
 import cn.com.qmth.stmms.biz.exam.service.SubjectUserService;
 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;
@@ -48,12 +46,6 @@ public class SubjectUserController extends BaseExamController {
     @Autowired
     @Autowired
     private SubjectUserService subjectUserService;
     private SubjectUserService subjectUserService;
 
 
-    @Autowired
-    private ExamSubjectService subjectService;
-
-    @Autowired
-    private ExamService examService;
-
     @RequestMapping(value = "/template")
     @RequestMapping(value = "/template")
     public String importFileTemplate(HttpServletResponse response, @RequestParam Boolean isHeader,
     public String importFileTemplate(HttpServletResponse response, @RequestParam Boolean isHeader,
             RedirectAttributes redirectAttributes) {
             RedirectAttributes redirectAttributes) {
@@ -102,14 +94,14 @@ public class SubjectUserController extends BaseExamController {
                         continue;
                         continue;
                     }
                     }
                     if (user != null && isHeader && !user.getRole().equals(Role.SUBJECT_HEADER)) {
                     if (user != null && isHeader && !user.getRole().equals(Role.SUBJECT_HEADER)) {
-                        failureMsg.append("<br/>用户名 " + subjectUser.getLoginName()
-                                + MarkerExcelError.NAMENOTHEADER.getName());
+                        failureMsg.append(
+                                "<br/>用户名 " + subjectUser.getLoginName() + MarkerExcelError.NAMENOTHEADER.getName());
                         failureNum++;
                         failureNum++;
                         continue;
                         continue;
                     }
                     }
                     if (user != null && !isHeader && !user.getRole().equals(Role.INSPECTOR)) {
                     if (user != null && !isHeader && !user.getRole().equals(Role.INSPECTOR)) {
-                        failureMsg.append("<br/>用户名 " + subjectUser.getLoginName()
-                                + MarkerExcelError.NAMENOTHEADER.getName());
+                        failureMsg.append(
+                                "<br/>用户名 " + subjectUser.getLoginName() + MarkerExcelError.NAMENOTHEADER.getName());
                         failureNum++;
                         failureNum++;
                         continue;
                         continue;
                     }
                     }

+ 26 - 0
stmms-web/src/main/java/cn/com/qmth/stmms/admin/vo/CollationLabelVO.java

@@ -0,0 +1,26 @@
+package cn.com.qmth.stmms.admin.vo;
+
+import cn.com.qmth.stmms.common.annotation.ExcelField;
+
+public class CollationLabelVO {
+
+    @ExcelField(title = "准考证号", align = 2, sort = 10)
+    private String examNumber;
+    @ExcelField(title = "整理异常代码", align = 2, sort = 10)
+    private String collationLabelCode;
+    public String getExamNumber() {
+        return examNumber;
+    }
+
+    public void setExamNumber(String examNumber) {
+        this.examNumber = examNumber;
+    }
+
+    public String getCollationLabelCode() {
+        return collationLabelCode;
+    }
+
+    public void setCollationLabelCode(String collationLabelCode) {
+        this.collationLabelCode = collationLabelCode;
+    }
+}

+ 1 - 4
stmms-web/src/main/java/cn/com/qmth/stmms/admin/vo/TrialMarkerVO.java

@@ -1,9 +1,6 @@
 package cn.com.qmth.stmms.admin.vo;
 package cn.com.qmth.stmms.admin.vo;
 
 
-import cn.com.qmth.stmms.biz.exam.model.ExamQuestion;
-
 import java.util.List;
 import java.util.List;
-import java.util.Map;
 
 
 public class TrialMarkerVO {
 public class TrialMarkerVO {
 
 
@@ -12,6 +9,7 @@ public class TrialMarkerVO {
     private String loginName;
     private String loginName;
 
 
     private Integer groupNumber;
     private Integer groupNumber;
+
     private String groupTitle;
     private String groupTitle;
 
 
     private Integer trialCount;
     private Integer trialCount;
@@ -20,7 +18,6 @@ public class TrialMarkerVO {
 
 
     private List<TrialQuestionVO> questionList;
     private List<TrialQuestionVO> questionList;
 
 
-
     public TrialMarkerVO() {
     public TrialMarkerVO() {
     }
     }
 
 

+ 16 - 10
stmms-web/src/main/java/cn/com/qmth/stmms/mark/MarkController.java

@@ -12,6 +12,8 @@ import java.util.stream.Collectors;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponse;
 
 
+import cn.com.qmth.stmms.biz.exam.model.*;
+import cn.com.qmth.stmms.biz.exam.service.*;
 import net.sf.json.JSONArray;
 import net.sf.json.JSONArray;
 import net.sf.json.JSONObject;
 import net.sf.json.JSONObject;
 
 
@@ -32,16 +34,6 @@ import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
 import org.springframework.web.servlet.ModelAndView;
 
 
 import cn.com.qmth.stmms.admin.utils.SessionExamUtils;
 import cn.com.qmth.stmms.admin.utils.SessionExamUtils;
-import cn.com.qmth.stmms.biz.exam.model.Exam;
-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.Marker;
-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.file.service.FileService;
 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.MarkLibrary;
 import cn.com.qmth.stmms.biz.mark.model.MarkLibrary;
@@ -129,6 +121,9 @@ public class MarkController extends BaseController {
     @Autowired
     @Autowired
     private ExamQuestionService questionService;
     private ExamQuestionService questionService;
 
 
+    @Autowired
+    private CollationLabelService collationLabelService;
+
     @Value("${slice.split.config}")
     @Value("${slice.split.config}")
     private String splitConfig;
     private String splitConfig;
 
 
@@ -346,6 +341,7 @@ public class MarkController extends BaseController {
         setting.accumulate("userName", RequestUtils.getWebUser(request).getName());
         setting.accumulate("userName", RequestUtils.getWebUser(request).getName());
         setProblemType(setting, marker);
         setProblemType(setting, marker);
         setting.accumulate("selective", group.isSelective());
         setting.accumulate("selective", group.isSelective());
+        setCollationLabel(setting, exam.getId());
         return setting;
         return setting;
     }
     }
 
 
@@ -762,6 +758,16 @@ public class MarkController extends BaseController {
         }
         }
     }
     }
 
 
+    private void setCollationLabel(JSONObject setting, Integer examId) {
+        List<CollationLabel> list = collationLabelService.list(examId);
+        ObjectMapper mapper = new ObjectMapper();
+        try {
+            setting.accumulate("collationLabelList",mapper.writeValueAsString(list));
+        } catch (JsonProcessingException e) {
+            log.error("MarkController-整理异常获取出错", e);
+        }
+    }
+
     private void setSubjectAndSheetConfig(JSONObject setting, Marker marker, Exam exam) {
     private void setSubjectAndSheetConfig(JSONObject setting, Marker marker, Exam exam) {
         ExamSubject examSubject = subjectService.find(marker.getExamId(), marker.getSubjectCode());
         ExamSubject examSubject = subjectService.find(marker.getExamId(), marker.getSubjectCode());
         String sheetConfig = "";
         String sheetConfig = "";

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

@@ -0,0 +1,56 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+	<title>考试管理</title>
+	<meta name="decorator" content="default"/>
+	<%@include file="/WEB-INF/views/include/head.jsp" %>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			$("#name").focus();
+			$("#inputForm").validate({
+				submitHandler: function(form){
+						loading('正在提交,请稍等...');
+						form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+		});
+	</script>
+</head>
+<body>
+	<ul class="nav nav-tabs">
+		<li><a href="${ctx}/admin/exam/collationLabel?examId=${problem.examId}">整理异常列表</a></li>
+		<li class="active"><a href="#">编辑整理异常</a></li>
+	</ul><br/>
+	<form:form id="inputForm" modelAttribute="collationLabel" action="${ctx}/admin/exam/collationLabel/edit" method="post" class="form-horizontal">
+		<form:hidden path="examId"/>
+		<form:hidden path="code"/>
+		<tags:message content="${message}"/>
+		<div class="control-group">
+			<label class="control-label">代码:</label>
+			<div class="controls">
+				<input disabled value="${collationLabel.code }" type="text" maxlength="32" class="required"/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">名称:</label>
+			<div class="controls">
+				<form:input path="name" htmlEscape="false" maxlength="50" class="required"/>*50字以内
+			</div>
+		</div>
+		<div class="form-actions">
+			<input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;
+			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
+		</div>
+	</form:form>
+</body>
+</html>

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

@@ -0,0 +1,55 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+	<title>整理异常管理</title>
+	<meta name="decorator" content="default"/>
+	<%@include file="/WEB-INF/views/include/head.jsp" %>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			$("#name").focus();
+			$("#inputForm").validate({
+				submitHandler: function(form){
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+		});
+	</script>
+</head>
+<body>
+	<ul class="nav nav-tabs">
+		<li><a href="${ctx}/admin/exam/collationLabel?examId=${examId}">整理异常列表</a></li>
+		<li class="active"><a href="#">添加整理异常</a></li>
+	</ul><br/>
+	<form:form id="inputForm" modelAttribute="collationLabel" action="${ctx}/admin/exam/collationLabel/save?examId=${examId}" method="post" class="form-horizontal">
+		<tags:message content="${message}"/>
+		<form:hidden path="examId"/>
+		<div class="control-group">
+			<label class="control-label">代码:</label>
+			<div class="controls">
+				<form:input path="code" htmlEscape="false" maxlength="20" class="required"/>*20字以内
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">名称:</label>
+			<div class="controls">
+				<form:input path="name" htmlEscape="false" maxlength="50" class="required"/>*50字以内
+			</div>
+		</div>
+		<div class="form-actions">
+			<input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;
+			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
+		</div>
+	</form:form>
+</body>
+</html>

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

@@ -0,0 +1,42 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+	<title>整理异常管理</title>
+	<meta name="decorator" content="default"/>
+	<%@include file="/WEB-INF/views/include/head.jsp" %>
+	<%@include file="/WEB-INF/views/include/dialog.jsp" %>
+	<style type="text/css">.sort{color:#0663A2;cursor:pointer;}</style>
+</head>
+<body>
+	<ul class="nav nav-tabs">
+		<li class="active"><a href="#">整理异常列表</a></li>
+		<c:if test="${web_user.schoolAdmin==true}">
+		<li><a href="${ctx}/admin/exam/collationLabel/add?examId=${examId}">添加整理异常</a></li>
+		</c:if>
+	</ul>
+	<tags:message content="${message}"/>
+	<table id="contentTable" class="table table-striped table-bordered table-condensed">
+		<thead>
+			<tr>
+				<th>代码</th>
+				<th>名称</th>
+				<th>操作</th>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${list}" var="collationLabel">
+			<tr>
+				<td>${collationLabel.code}</td>
+				<td>
+					${collationLabel.name}
+				</td>
+				<td>
+    				<a href="${ctx}/admin/exam/collationLabel/edit?examId=${collationLabel.examId}&code=${collationLabel.code}">编辑</a>
+				</td>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+</body>
+</html>

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

@@ -72,6 +72,7 @@
                 <c:if test="${web_user.schoolAdmin==true}">
                 <c:if test="${web_user.schoolAdmin==true}">
                     <a href="${ctx}/admin/exam/edit/${exam.id}?pageNumber=${query.pageNumber}&status=${query.status.value}&type=${query.type.value}">编辑</a>
                     <a href="${ctx}/admin/exam/edit/${exam.id}?pageNumber=${query.pageNumber}&status=${query.status.value}&type=${query.type.value}">编辑</a>
                     <a href="${ctx}/admin/exam/problem/type?examId=${exam.id}">问题卷分类</a>
                     <a href="${ctx}/admin/exam/problem/type?examId=${exam.id}">问题卷分类</a>
+                    <a href="${ctx}/admin/exam/collationLabel?examId=${exam.id}">整理异常</a>
                     <c:if test="${exam.type=='MULTI_MEDIA'}">
                     <c:if test="${exam.type=='MULTI_MEDIA'}">
                         <a href="${ctx}/admin/exam/data/sync?examId=${exam.id}">数据同步</a>
                         <a href="${ctx}/admin/exam/data/sync?examId=${exam.id}">数据同步</a>
                     </c:if>
                     </c:if>

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

@@ -50,6 +50,16 @@
         <a href="${ctx}/admin/exam/student/uploadTemplate">下载模板</a>
         <a href="${ctx}/admin/exam/student/uploadTemplate">下载模板</a>
     </form>
     </form>
 </div>
 </div>
+<div id="collationLabelImportBox" class="hide">
+    <form id="collationLabelImportForm" action="${ctx}/admin/exam/student/collationLabelImport" method="post"
+          enctype="multipart/form-data"
+          style="padding-left:20px;text-align:center;" class="form-search" onsubmit="loading('正在导入,请稍等...');">
+        <br/>
+        <input id="collationLabelUploadFile" name="file" type="file" style="width:330px"/><br/><br/>  
+        <input id="collationLabelBtnImportSubmit" class="btn btn-primary" type="submit" value="整理异常导入"/>
+        <a href="${ctx}/admin/exam/student/collationLabelTemplate">下载模板</a>
+    </form>
+</div>
 <form id="searchForm" action="${ctx}/admin/exam-param/student" method="post" class="breadcrumb form-search">
 <form id="searchForm" action="${ctx}/admin/exam-param/student" method="post" class="breadcrumb form-search">
     <input type="hidden" id="pageNumber" name="pageNumber" value="${query.pageNumber }"/>
     <input type="hidden" id="pageNumber" name="pageNumber" value="${query.pageNumber }"/>
     <input type="hidden" id="pageSize" name="pageSize" value="${query.pageSize}"/>
     <input type="hidden" id="pageSize" name="pageSize" value="${query.pageSize}"/>
@@ -157,6 +167,7 @@
                 <ul class="dropdown-menu">
                 <ul class="dropdown-menu">
                     <li><a href="##" id="breachBtnImport">违纪名单</a></li>
                     <li><a href="##" id="breachBtnImport">违纪名单</a></li>
                     <li><a href="##" id="absentBtnImport">缺考名单</a></li>
                     <li><a href="##" id="absentBtnImport">缺考名单</a></li>
+                    <li><a href="##" id="collationLabelBtnImport">整理异常</a></li>
                     <!--                             <li><a href="##" id="uploadBtnImport">多媒体上传名单</a></li> -->
                     <!--                             <li><a href="##" id="uploadBtnImport">多媒体上传名单</a></li> -->
                 </ul>
                 </ul>
                 </div>
                 </div>
@@ -379,6 +390,12 @@
             bottomText: "导入文件不能超过5M,仅允许导入“xls”或“xlsx”格式文件!"
             bottomText: "导入文件不能超过5M,仅允许导入“xls”或“xlsx”格式文件!"
         });
         });
     });
     });
+    $("#collationLabelBtnImport").click(function () {
+        $.jBox($("#collationLabelImportBox").html(), {
+            title: "导入数据", buttons: {"关闭": true},
+            bottomText: "导入文件不能超过5M,仅允许导入“xls”或“xlsx”格式文件!"
+        });
+    });
     $("#export-button").click(function () {
     $("#export-button").click(function () {
         $("#exportForm").attr("action", "${ctx}/admin/exam/student/export");
         $("#exportForm").attr("action", "${ctx}/admin/exam/student/export");
         $("#exportForm").submit();
         $("#exportForm").submit();