1
0
yin 1 mesiac pred
rodič
commit
f7fa895d67

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

@@ -251,6 +251,7 @@ CREATE TABLE `eb_exam`
     `remark_count`          int(11)      DEFAULT NULL COMMENT '回评卷数',
     `show_objective_score`  tinyint(1)  NOT NULL COMMENT '是否显示客观分',
     `inspect_round_limit`   tinyint(1)  NOT NULL COMMENT '全卷复核进度100%时才能再次复核',
+    `track_count_policy`    varchar(16) DEFAULT NULL COMMENT '轨迹次数规则',
     PRIMARY KEY (`id`),
     UNIQUE KEY `index1` (`school_id`, `code`)
 ) ENGINE = InnoDB

+ 2 - 1
install/mysql/upgrade/1.6.0.sql

@@ -1,5 +1,6 @@
--- 1.5.2
+-- 1.6.0
 USE `stmms_ft`;
+ALTER TABLE eb_exam ADD COLUMN `track_count_policy`   varchar(16) DEFAULT 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 '回卷标识代码';
 ALTER TABLE eb_exam_subject ADD COLUMN `enable_all_selective`  tinyint(1)  NOT NULL COMMENT '开启一键未选做';

+ 15 - 4
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/model/Exam.java

@@ -14,16 +14,13 @@ import javax.persistence.Table;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 
+import cn.com.qmth.stmms.common.enums.*;
 import net.sf.json.JSONObject;
 
 import org.apache.commons.lang3.StringUtils;
 
 import cn.com.qmth.stmms.biz.file.enums.FormatType;
 import cn.com.qmth.stmms.biz.mark.model.PictureConfigItem;
-import cn.com.qmth.stmms.common.enums.ExamStatus;
-import cn.com.qmth.stmms.common.enums.ExamType;
-import cn.com.qmth.stmms.common.enums.MarkMode;
-import cn.com.qmth.stmms.common.enums.ObjectiveStatus;
 
 /**
  * 
@@ -208,6 +205,13 @@ public class Exam implements Serializable {
     @Column(name = "inspect_round_limit", nullable = false)
     private boolean inspectRoundLimit;
 
+    /**
+     * 轨迹次数规则
+     */
+    @Column(name = "track_count_policy", nullable = true, length = 16)
+    @Enumerated(EnumType.STRING)
+    private TrackCountPolicy trackCountPolicy;
+
     
     public Integer getId() {
         return id;
@@ -493,4 +497,11 @@ public class Exam implements Serializable {
 		this.inspectRoundLimit = inspectRoundLimit;
 	}
 
+    public TrackCountPolicy getTrackCountPolicy() {
+        return trackCountPolicy;
+    }
+
+    public void setTrackCountPolicy(TrackCountPolicy trackCountPolicy) {
+        this.trackCountPolicy = trackCountPolicy;
+    }
 }

+ 2 - 2
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/mark/service/Impl/MarkServiceImpl.java

@@ -833,7 +833,7 @@ public class MarkServiceImpl implements MarkService {
         int unansweredCount = 0;
         List<MarkTrack> oldTracks = trackDao.findByPkLibraryId(library.getId());
         trackDao.delete(oldTracks);
-        if (result.getTrackList() != null) {
+        if (result.getTrackList() != null &&  result.getMarkerScore() != UN_SELECTIVE_SCORE) {
             List<MarkTrack> tracks = result.getTrackList(library, marker);
             for (MarkTrack markTrack : tracks) {
                 trackDao.saveAndFlush(markTrack);
@@ -845,7 +845,7 @@ public class MarkServiceImpl implements MarkService {
         }
         // 保存特殊标记
         specialTagDao.deleteByLibraryId(library.getId());
-        if (result.getSpecialTagList() != null) {
+        if (result.getSpecialTagList() != null &&  result.getMarkerScore() != UN_SELECTIVE_SCORE) {
             specialTagDao.save(result.getSpecialTagList(library, marker));
         }
         // 判断多评模式下是否需要仲裁

+ 50 - 0
stmms-common/src/main/java/cn/com/qmth/stmms/common/enums/TrackCountPolicy.java

@@ -0,0 +1,50 @@
+package cn.com.qmth.stmms.common.enums;
+
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * 轨迹次数判定策略
+ *
+ */
+public enum TrackCountPolicy {
+    LE("小于等于", 1), EQ("等于", 2);
+
+    private String name;
+
+    private int value;
+
+    private static List<TrackCountPolicy> options;
+
+    private TrackCountPolicy(String name, int value) {
+        this.name = name;
+        this.value = value;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public int getValue() {
+        return value;
+    }
+
+    public static TrackCountPolicy findByValue(int value) {
+        for (TrackCountPolicy c : TrackCountPolicy.values()) {
+            if (c.getValue() == value) {
+                return c;
+            }
+        }
+        return null;
+    }
+
+    public static List<TrackCountPolicy> getOptionList() {
+        if (options == null) {
+            options = new LinkedList<>();
+            for (TrackCountPolicy status : TrackCountPolicy.values()) {
+                options.add(status);
+            }
+        }
+        return options;
+    }
+}

+ 1 - 0
stmms-web/src/main/java/cn/com/qmth/stmms/mark/MarkController.java

@@ -822,6 +822,7 @@ public class MarkController extends BaseController {
         }
         setting.accumulate("mode", mode);
         setting.accumulate("forceMode", forceMode);
+        setting.accumulate("trackCountPolicy", exam.getTrackCountPolicy()==null?"":exam.getTrackCountPolicy());
     }
 
 }

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

@@ -93,7 +93,7 @@
 		<div class="control-group">
 			<label class="control-label">给分次数</label>
 			<div class="controls">
-				<input <c:if test="${!examQuestion.objective && !enableUpdate}">disabled</c:if> name="trackCount" value="<c:if test="${examQuestion.trackCount>0 }">${examQuestion.trackCount }</c:if>" type="number" htmlEscape="false" max="10000" min="1" />
+				<input name="trackCount" value="<c:if test="${examQuestion.trackCount>0 }">${examQuestion.trackCount }</c:if>" type="number" htmlEscape="false" max="10000" min="1" />
 			</div>
 		</div>
 		<div class="control-group">