Ver Fonte

add: 导入

caozixuan há 10 meses atrás
pai
commit
e9d70752c3

+ 1 - 1
install/mysql/init/paper_struct_db.sql

@@ -133,7 +133,7 @@ CREATE TABLE `mps_paper_group` (
   `double_enable` tinyint(1) DEFAULT '0' COMMENT '是否开启双评',
   `double_enable` tinyint(1) DEFAULT '0' COMMENT '是否开启双评',
   `double_rate` double DEFAULT NULL COMMENT '双评比例',
   `double_rate` double DEFAULT NULL COMMENT '双评比例',
   `arbitrate_threshold` double DEFAULT NULL COMMENT '仲裁阈值',
   `arbitrate_threshold` double DEFAULT NULL COMMENT '仲裁阈值',
-  `arbitrate_method` varchar(16) COLLATE utf8_bin DEFAULT NULL COMMENT '仲裁方式(小题仲裁、分组仲裁)',
+  `arbitrate_method` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT '仲裁方式(小题仲裁、分组仲裁)',
   PRIMARY KEY (`id`),
   PRIMARY KEY (`id`),
   UNIQUE KEY `IDX_PAPER_GROUP_01` (`paper_id`,`number`)
   UNIQUE KEY `IDX_PAPER_GROUP_01` (`paper_id`,`number`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

+ 1 - 1
install/mysql/upgrade/1.0.2.sql

@@ -4,7 +4,7 @@ ALTER TABLE mps_paper_group
     ADD COLUMN double_enable TINYINT(1) NULL DEFAULT '0' COMMENT '是否开启双评' AFTER paper_id,
     ADD COLUMN double_enable TINYINT(1) NULL DEFAULT '0' COMMENT '是否开启双评' AFTER paper_id,
     ADD COLUMN double_rate DOUBLE NULL COMMENT '双评比例' AFTER double_enable,
     ADD COLUMN double_rate DOUBLE NULL COMMENT '双评比例' AFTER double_enable,
     ADD COLUMN arbitrate_threshold DOUBLE NULL COMMENT '仲裁阈值' AFTER double_rate,
     ADD COLUMN arbitrate_threshold DOUBLE NULL COMMENT '仲裁阈值' AFTER double_rate,
-    ADD COLUMN arbitrate_method VARCHAR(16) NULL COMMENT '仲裁方式(小题仲裁、分组仲裁)' AFTER arbitrate_threshold;
+    ADD COLUMN arbitrate_method VARCHAR(32) NULL COMMENT '仲裁方式(小题仲裁、分组仲裁)' AFTER arbitrate_threshold;
 
 
 ALTER TABLE mps_paper_group_unit
 ALTER TABLE mps_paper_group_unit
     ADD COLUMN arbitrate_threshold DOUBLE NULL COMMENT '仲裁阈值' AFTER detail_unit_number;
     ADD COLUMN arbitrate_threshold DOUBLE NULL COMMENT '仲裁阈值' AFTER detail_unit_number;

+ 54 - 0
src/main/java/cn/com/qmth/mps/bean/DoubleMarkImportParam.java

@@ -0,0 +1,54 @@
+package cn.com.qmth.mps.bean;
+
+import cn.com.qmth.mps.enums.ArbitrateMethod;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * @Description: 双评导入参数
+ * @Author: CaoZixuan
+ * @Date: 2024-08-15
+ */
+public class DoubleMarkImportParam {
+
+    @ApiModelProperty("仲裁方式")
+    private ArbitrateMethod arbitrateMethod;
+
+    @ApiModelProperty("双评比例")
+    private Double doubleRate;
+
+    @ApiModelProperty("仲裁值")
+    private Double arbitrateThreshold;
+
+    public DoubleMarkImportParam() {
+    }
+
+    public DoubleMarkImportParam(ArbitrateMethod arbitrateMethod, Double doubleRate, Double arbitrateThreshold) {
+        this.arbitrateMethod = arbitrateMethod;
+        this.doubleRate = doubleRate;
+        this.arbitrateThreshold = arbitrateThreshold;
+    }
+
+    public ArbitrateMethod getArbitrateMethod() {
+        return arbitrateMethod;
+    }
+
+    public void setArbitrateMethod(ArbitrateMethod arbitrateMethod) {
+        this.arbitrateMethod = arbitrateMethod;
+    }
+
+    public Double getDoubleRate() {
+        return doubleRate;
+    }
+
+    public void setDoubleRate(Double doubleRate) {
+        this.doubleRate = doubleRate;
+    }
+
+    public Double getArbitrateThreshold() {
+        return arbitrateThreshold;
+    }
+
+    public void setArbitrateThreshold(Double arbitrateThreshold) {
+        this.arbitrateThreshold = arbitrateThreshold;
+    }
+}

+ 2 - 2
src/main/java/cn/com/qmth/mps/service/impl/PaperGroupServiceImpl.java

@@ -224,7 +224,7 @@ public class PaperGroupServiceImpl extends ServiceImpl<PaperGroupDao, PaperGroup
 			if (Objects.isNull(arbitrateMethod)) {
 			if (Objects.isNull(arbitrateMethod)) {
 				throw new StatusException("仲裁方式未设置");
 				throw new StatusException("仲裁方式未设置");
 			}
 			}
-			if (ArbitrateMethod.GROUP_ARBITRATE.equals(arbitrateMethod) || 0 < arbitrateThreshold) {
+			if (ArbitrateMethod.GROUP_ARBITRATE.equals(arbitrateMethod) && (Objects.isNull(arbitrateThreshold) || (arbitrateThreshold < 0))) {
 				throw new StatusException("仲裁阈值未正确设置");
 				throw new StatusException("仲裁阈值未正确设置");
 			}
 			}
 		}
 		}
@@ -236,7 +236,7 @@ public class PaperGroupServiceImpl extends ServiceImpl<PaperGroupDao, PaperGroup
 				throw new StatusException("大题号、小题号不能为空");
 				throw new StatusException("大题号、小题号不能为空");
 			}
 			}
 			if (ArbitrateMethod.QUESTION_ARBITRATE.equals(arbitrateMethod)) {
 			if (ArbitrateMethod.QUESTION_ARBITRATE.equals(arbitrateMethod)) {
-				if (Objects.isNull(questionArbitrateThreshold) || 0 < questionArbitrateThreshold) {
+				if (Objects.isNull(questionArbitrateThreshold) || questionArbitrateThreshold < 0) {
 					throw new StatusException("仲裁阈值未正确设置");
 					throw new StatusException("仲裁阈值未正确设置");
 				}
 				}
 			}
 			}

+ 127 - 12
src/main/java/cn/com/qmth/mps/service/impl/PaperServiceImpl.java

@@ -5,6 +5,8 @@ import java.io.InputStream;
 import java.util.*;
 import java.util.*;
 import java.util.stream.Collectors;
 import java.util.stream.Collectors;
 
 
+import cn.com.qmth.mps.bean.*;
+import cn.com.qmth.mps.enums.ArbitrateMethod;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.BeanUtils;
@@ -26,10 +28,6 @@ import com.qmth.boot.tools.excel.ExcelReader;
 import com.qmth.boot.tools.excel.enums.ExcelType;
 import com.qmth.boot.tools.excel.enums.ExcelType;
 import com.qmth.boot.tools.excel.model.DataMap;
 import com.qmth.boot.tools.excel.model.DataMap;
 
 
-import cn.com.qmth.mps.bean.PaperDetail;
-import cn.com.qmth.mps.bean.PaperDetailUnit;
-import cn.com.qmth.mps.bean.PaperGroupUnit;
-import cn.com.qmth.mps.bean.User;
 import cn.com.qmth.mps.dao.PaperDao;
 import cn.com.qmth.mps.dao.PaperDao;
 import cn.com.qmth.mps.entity.CourseEntity;
 import cn.com.qmth.mps.entity.CourseEntity;
 import cn.com.qmth.mps.entity.ExamEntity;
 import cn.com.qmth.mps.entity.ExamEntity;
@@ -47,7 +45,7 @@ import cn.com.qmth.mps.vo.paper.*;
 public class PaperServiceImpl extends ServiceImpl<PaperDao, PaperEntity> implements PaperService {
 public class PaperServiceImpl extends ServiceImpl<PaperDao, PaperEntity> implements PaperService {
 	private static final String[] SUBJECT_EXCEL_HEADER = new String[] {"科目代码", "科目名称"};
 	private static final String[] SUBJECT_EXCEL_HEADER = new String[] {"科目代码", "科目名称"};
 
 
-	private static final String[] SUBJECT_STRUCT_EXCEL_HEADER = new String[] {"科目代码*","科目名称","大题名称*","题目昵称","大题号(只能用小写数字)*","小题号(只能用小写数字)*","小题满分*","间隔分*","评卷分组(只能用小写数字)*","图片序号(用英文逗号分割)","双评比例(0~1)","仲裁阀值","合分策略(1-平均,2-最高,3-最低)","评卷模式(common-普通,track-轨迹)","试评数量(0-跳过试评)","选做题数量"};
+	private static final String[] SUBJECT_STRUCT_EXCEL_HEADER = new String[] {"科目代码*","科目名称","大题名称*","题目昵称","大题号(只能用小写数字)*","小题号(只能用小写数字)*","小题满分*","间隔分*","评卷分组(只能用小写数字)*","图片序号(用英文逗号分割)","仲裁方式(0-分组,1-小题)","双评比例(0~1)","仲裁阀值","合分策略(1-平均,2-最高,3-最低)","评卷模式(common-普通,track-轨迹)","试评数量(0-跳过试评)","选做题数量"};
 
 
 	@Autowired
 	@Autowired
 	private ExamService examService;
 	private ExamService examService;
@@ -218,29 +216,32 @@ public class PaperServiceImpl extends ServiceImpl<PaperDao, PaperEntity> impleme
 		if (!user.getRole().equals(Role.SUPER_ADMIN) && !user.getSchoolId().equals(query.getSchoolId())) {
 		if (!user.getRole().equals(Role.SUPER_ADMIN) && !user.getSchoolId().equals(query.getSchoolId())) {
 			throw new StatusException("没有权限");
 			throw new StatusException("没有权限");
 		}
 		}
-		IPage<PaperVo> iPage = this.baseMapper.page(new Page<PaperVo>(query.getPageNumber(), query.getPageSize()),
+		IPage<PaperVo> iPage = this.baseMapper.page(new Page<>(query.getPageNumber(), query.getPageSize()),
 				query);
 				query);
 		if (CollectionUtils.isNotEmpty(iPage.getRecords())) {
 		if (CollectionUtils.isNotEmpty(iPage.getRecords())) {
 			new BatchSetDataUtil<PaperVo>() {
 			new BatchSetDataUtil<PaperVo>() {
 
 
 				@Override
 				@Override
 				protected void setData(List<PaperVo> dataList) {
 				protected void setData(List<PaperVo> dataList) {
-					List<Long> paperIds = dataList.stream().map(dto -> dto.getId()).distinct()
+					List<Long> paperIds = dataList.stream().map(PaperVo::getId).distinct()
 							.collect(Collectors.toList());
 							.collect(Collectors.toList());
 					List<GroupCountVo> ret = paperGroupService.findGroupCount(paperIds);
 					List<GroupCountVo> ret = paperGroupService.findGroupCount(paperIds);
 					if (ret != null && ret.size() > 0) {
 					if (ret != null && ret.size() > 0) {
 						Map<Long, Integer> countMap = new HashMap<>();
 						Map<Long, Integer> countMap = new HashMap<>();
+						Map<Long, Boolean> doubleEnableMap = new HashMap<>();
 						for (GroupCountVo item : ret) {
 						for (GroupCountVo item : ret) {
 							countMap.put(item.getPaperId(), item.getGroupCount());
 							countMap.put(item.getPaperId(), item.getGroupCount());
+							doubleEnableMap.put(item.getPaperId(), item.getDoubleEnable());
 						}
 						}
 						for (PaperVo vo : dataList) {
 						for (PaperVo vo : dataList) {
 							vo.setGroupCount(countMap.get(vo.getId()));
 							vo.setGroupCount(countMap.get(vo.getId()));
+							vo.setDoubleEnable(doubleEnableMap.get(vo.getId()));
 						}
 						}
 					}
 					}
 				}
 				}
 			}.setDataForBatch(iPage.getRecords(), 20);
 			}.setDataForBatch(iPage.getRecords(), 20);
 			for (PaperVo vo : iPage.getRecords()) {
 			for (PaperVo vo : iPage.getRecords()) {
-				if(vo.getGroupCount()==null) {
+				if (vo.getGroupCount() == null) {
 					vo.setGroupCount(0);
 					vo.setGroupCount(0);
 				}
 				}
 			}
 			}
@@ -329,6 +330,8 @@ public class PaperServiceImpl extends ServiceImpl<PaperDao, PaperEntity> impleme
 			}
 			}
 			List<String> failRecords = new ArrayList<>();
 			List<String> failRecords = new ArrayList<>();
 			List<PaperStructInfoVo> ret = new ArrayList<>();
 			List<PaperStructInfoVo> ret = new ArrayList<>();
+			// 双评设置
+			Map<String, DoubleMarkImportParam> doubleMarkSettingMap = new HashMap<>();
 			for (int i = 0; i < lineList.size(); i++) {
 			for (int i = 0; i < lineList.size(); i++) {
 				DataMap line = lineList.get(i);
 				DataMap line = lineList.get(i);
 
 
@@ -439,10 +442,10 @@ public class PaperServiceImpl extends ServiceImpl<PaperDao, PaperEntity> impleme
 
 
 				}
 				}
 
 
-				String groupNumber = trimAndNullIfBlank(line.get(SUBJECT_STRUCT_EXCEL_HEADER[8]));
-				if (StringUtils.isNotBlank(groupNumber)) {
+				String groupNumberStr = trimAndNullIfBlank(line.get(SUBJECT_STRUCT_EXCEL_HEADER[8]));
+				if (StringUtils.isNotBlank(groupNumberStr)) {
 					try {
 					try {
-						Integer n = Integer.valueOf(groupNumber);
+						Integer n = Integer.valueOf(groupNumberStr);
 						if (n <= 0) {
 						if (n <= 0) {
 							msg.append("  评卷分组不能小于0");
 							msg.append("  评卷分组不能小于0");
 						} else {
 						} else {
@@ -453,12 +456,109 @@ public class PaperServiceImpl extends ServiceImpl<PaperDao, PaperEntity> impleme
 					}
 					}
 				}
 				}
 
 
+				Long paperId = imp.getPaperId();
+				Integer groupNumber = imp.getGroupNumber();
+				if (Objects.nonNull(paperId) && Objects.nonNull(groupNumber)){
+					// 有分组信息才解析双评信息
+					String groupKey = paperId + "-" + groupNumber;
+					ArbitrateMethod arbitrateMethod = null;
+					Double doubleRate = null;
+					Double arbitrateThreshold = null;
+
+					if (doubleMarkSettingMap.containsKey(groupKey)){
+						DoubleMarkImportParam doubleMarkImportParam = doubleMarkSettingMap.get(groupKey);
+						arbitrateMethod = doubleMarkImportParam.getArbitrateMethod();
+						doubleRate = doubleMarkImportParam.getDoubleRate();
+						arbitrateThreshold = doubleMarkImportParam.getArbitrateThreshold();
+					}
+
+					String arbitrateMethodStr = trimAndNullIfBlank(line.get(SUBJECT_STRUCT_EXCEL_HEADER[10]));
+					String doubleRateStr = trimAndNullIfBlank(line.get(SUBJECT_STRUCT_EXCEL_HEADER[11]));
+					String arbitrateThresholdStr = trimAndNullIfBlank(line.get(SUBJECT_STRUCT_EXCEL_HEADER[12]));
+
+					// 双评比例
+					if (StringUtils.isNotBlank(doubleRateStr)) {
+						try {
+							double n = Double.parseDouble(doubleRateStr);
+
+							if (n < 0 || n > 1){
+								msg.append("  双评比例只能在(0~1)");
+							} else {
+								if (Objects.nonNull(doubleRate) && !doubleRate.equals(n)){
+									msg.append("  同分组的双评比例必须相同");
+								} else {
+									doubleRate = n;
+									imp.setDoubleRate(doubleRate);
+								}
+							}
+						} catch (Exception e) {
+							msg.append("  双评比例格式错误");
+						}
+					}
+
+					if (Objects.nonNull(doubleRate) && doubleRate > 0){
+						// 开启双评才继续解析 仲裁方式和仲裁值
+						// 仲裁方式(0-分组,1-小题)
+						if (StringUtils.isNotBlank(arbitrateMethodStr)) {
+							try {
+								int n = Integer.parseInt(arbitrateMethodStr);
+								List<ArbitrateMethod> arbitrateMethodList = Arrays.stream(ArbitrateMethod.values()).filter(e -> e.getValue().equals(n)).collect(
+										Collectors.toList());
+								if (arbitrateMethodList.size() != 1){
+									msg.append("  仲裁方式只能选择0或1");
+								} else {
+									if (Objects.nonNull(arbitrateMethod) && !arbitrateMethod.equals(arbitrateMethodList.get(0))){
+										msg.append("  同分组的仲裁方式必须相同");
+									} else {
+										arbitrateMethod = arbitrateMethodList.get(0);
+										imp.setArbitrateMethod(arbitrateMethod);
+									}
+								}
+							} catch (Exception e) {
+								msg.append("  仲裁方式格式错误");
+							}
+						} else {
+							msg.append("  仲裁方式不能为空");
+						}
+
+						if (Objects.nonNull(arbitrateMethod)){
+							// 仲裁方式不为空才解析
+							// 仲裁阀值
+							if (StringUtils.isNotBlank(arbitrateThresholdStr)) {
+								try {
+									double n = Double.parseDouble(arbitrateThresholdStr);
+									if (n < 0){
+										msg.append("  仲裁阀值不能小于0");
+									}
+									if (ArbitrateMethod.QUESTION_ARBITRATE.equals(arbitrateMethod)){
+										Double questionScore = imp.getScore();
+										if (Objects.nonNull(questionScore) && n > questionScore){
+											msg.append("  仲裁阀值不能超过小题满分");
+										}
+									} else if (ArbitrateMethod.GROUP_ARBITRATE.equals(arbitrateMethod)) {
+										if (Objects.nonNull(arbitrateThreshold) && !arbitrateThreshold.equals(n)) {
+											msg.append("  同分组的仲裁阀值必须相同");
+										}
+									}
+									arbitrateThreshold = n;
+									imp.setArbitrateThreshold(n);
+								} catch (Exception e) {
+									msg.append("  仲裁阀值格式错误");
+								}
+							} else {
+								msg.append("  仲裁阀值不能为空");
+							}
+						}
+					}
+					if (!doubleMarkSettingMap.containsKey(groupKey)){
+						doubleMarkSettingMap.put(groupKey, new DoubleMarkImportParam(arbitrateMethod, doubleRate, arbitrateThreshold));
+					}
+				}
 				if (msg.length() > 0) {
 				if (msg.length() > 0) {
 					failRecords.add(newError(i + 3, msg.toString()));
 					failRecords.add(newError(i + 3, msg.toString()));
 				} else {
 				} else {
 					ret.add(imp);
 					ret.add(imp);
 				}
 				}
-
 			}
 			}
 			if (CollectionUtils.isNotEmpty(failRecords)) {
 			if (CollectionUtils.isNotEmpty(failRecords)) {
 				TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
 				TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
@@ -524,11 +624,26 @@ public class PaperServiceImpl extends ServiceImpl<PaperDao, PaperEntity> impleme
 					curGroup = 	new PaperGroupDomain();
 					curGroup = 	new PaperGroupDomain();
 					curGroup.setPaperId(info.getPaperId());
 					curGroup.setPaperId(info.getPaperId());
 					curGroup.setNumber(info.getGroupNumber());
 					curGroup.setNumber(info.getGroupNumber());
+					if (Objects.nonNull(info.getDoubleRate()) && info.getDoubleRate()>0){
+						curGroup.setDoubleEnable(true);
+						curGroup.setDoubleRate(info.getDoubleRate());
+						if (Objects.nonNull(info.getArbitrateMethod())){
+							curGroup.setArbitrateMethod(info.getArbitrateMethod());
+						}
+						if (Objects.nonNull(info.getArbitrateThreshold())){
+							curGroup.setArbitrateThreshold(info.getArbitrateThreshold());
+						}
+					} else {
+						curGroup.setDoubleEnable(false);
+					}
 					curGroup.setGroupUnits(new ArrayList<>());
 					curGroup.setGroupUnits(new ArrayList<>());
 				}
 				}
 				PaperGroupUnit unit = new PaperGroupUnit();
 				PaperGroupUnit unit = new PaperGroupUnit();
 				unit.setDetailNumber(info.getDetailNumber());
 				unit.setDetailNumber(info.getDetailNumber());
 				unit.setDetailUnitNumber(info.getUnitNumber());
 				unit.setDetailUnitNumber(info.getUnitNumber());
+				if (Objects.equals(ArbitrateMethod.QUESTION_ARBITRATE, info.getArbitrateMethod()) && Objects.nonNull(info.getArbitrateThreshold())){
+					unit.setArbitrateThreshold(info.getArbitrateThreshold());
+				}
 				curGroup.getGroupUnits().add(unit);
 				curGroup.getGroupUnits().add(unit);
 				map.put(getKey(info),curGroup);
 				map.put(getKey(info),curGroup);
 			}
 			}

+ 22 - 5
src/main/java/cn/com/qmth/mps/vo/paper/GroupCountVo.java

@@ -1,26 +1,43 @@
 package cn.com.qmth.mps.vo.paper;
 package cn.com.qmth.mps.vo.paper;
 
 
 import cn.com.qmth.mps.entity.base.BaseEntity;
 import cn.com.qmth.mps.entity.base.BaseEntity;
-public class GroupCountVo extends BaseEntity{
+import io.swagger.annotations.ApiModelProperty;
+
+public class GroupCountVo extends BaseEntity {
+
 	/**
 	/**
-	 * 
+	 *
 	 */
 	 */
 	private static final long serialVersionUID = -2762342766185496673L;
 	private static final long serialVersionUID = -2762342766185496673L;
+
 	private Long paperId;
 	private Long paperId;
+
 	private Integer groupCount;
 	private Integer groupCount;
-	
-	
+
+	@ApiModelProperty(value = "是否开启双评")
+	private Boolean doubleEnable;
+
 	public Long getPaperId() {
 	public Long getPaperId() {
 		return paperId;
 		return paperId;
 	}
 	}
+
 	public void setPaperId(Long paperId) {
 	public void setPaperId(Long paperId) {
 		this.paperId = paperId;
 		this.paperId = paperId;
 	}
 	}
+
 	public Integer getGroupCount() {
 	public Integer getGroupCount() {
 		return groupCount;
 		return groupCount;
 	}
 	}
+
 	public void setGroupCount(Integer groupCount) {
 	public void setGroupCount(Integer groupCount) {
 		this.groupCount = groupCount;
 		this.groupCount = groupCount;
 	}
 	}
-	
+
+	public Boolean getDoubleEnable() {
+		return doubleEnable;
+	}
+
+	public void setDoubleEnable(Boolean doubleEnable) {
+		this.doubleEnable = doubleEnable;
+	}
 }
 }

+ 64 - 4
src/main/java/cn/com/qmth/mps/vo/paper/PaperStructInfoVo.java

@@ -1,79 +1,139 @@
 package cn.com.qmth.mps.vo.paper;
 package cn.com.qmth.mps.vo.paper;
 
 
+import cn.com.qmth.mps.enums.ArbitrateMethod;
 import com.qmth.boot.tools.excel.annotation.ExcelColumn;
 import com.qmth.boot.tools.excel.annotation.ExcelColumn;
+import io.swagger.annotations.ApiModelProperty;
 
 
 public class PaperStructInfoVo {
 public class PaperStructInfoVo {
+
 	private Long paperId;
 	private Long paperId;
+
 	@ExcelColumn(name = "科目代码", index = 0)
 	@ExcelColumn(name = "科目代码", index = 0)
 	private String courseCode;
 	private String courseCode;
+
 	@ExcelColumn(name = "科目名称", index = 1)
 	@ExcelColumn(name = "科目名称", index = 1)
-    private String courseName;
+	private String courseName;
+
 	@ExcelColumn(name = "大题名称", index = 2)
 	@ExcelColumn(name = "大题名称", index = 2)
 	private String detailName;
 	private String detailName;
-	@ExcelColumn(name = "大题号", index =3)
+
+	@ExcelColumn(name = "大题号", index = 3)
 	private Integer detailNumber;
 	private Integer detailNumber;
+
 	@ExcelColumn(name = "小题号", index = 4)
 	@ExcelColumn(name = "小题号", index = 4)
 	private Integer unitNumber;
 	private Integer unitNumber;
+
 	@ExcelColumn(name = "小题满分", index = 5)
 	@ExcelColumn(name = "小题满分", index = 5)
 	private Double score;
 	private Double score;
+
 	@ExcelColumn(name = "给分间隔", index = 6)
 	@ExcelColumn(name = "给分间隔", index = 6)
 	private Double scoreStep;
 	private Double scoreStep;
+
 	@ExcelColumn(name = "评卷分组", index = 7)
 	@ExcelColumn(name = "评卷分组", index = 7)
 	private Integer groupNumber;
 	private Integer groupNumber;
+
+	@ExcelColumn(name = "仲裁方式", index = 8)
+	private ArbitrateMethod arbitrateMethod;
+
+	@ExcelColumn(name = "双评比例", index = 9)
+	private Double doubleRate;
+
+	@ExcelColumn(name = "仲裁阈值", index = 10)
+	private Double arbitrateThreshold;
+
 	public String getCourseCode() {
 	public String getCourseCode() {
 		return courseCode;
 		return courseCode;
 	}
 	}
+
 	public void setCourseCode(String courseCode) {
 	public void setCourseCode(String courseCode) {
 		this.courseCode = courseCode;
 		this.courseCode = courseCode;
 	}
 	}
+
 	public String getCourseName() {
 	public String getCourseName() {
 		return courseName;
 		return courseName;
 	}
 	}
+
 	public void setCourseName(String courseName) {
 	public void setCourseName(String courseName) {
 		this.courseName = courseName;
 		this.courseName = courseName;
 	}
 	}
+
 	public String getDetailName() {
 	public String getDetailName() {
 		return detailName;
 		return detailName;
 	}
 	}
+
 	public void setDetailName(String detailName) {
 	public void setDetailName(String detailName) {
 		this.detailName = detailName;
 		this.detailName = detailName;
 	}
 	}
+
 	public Integer getDetailNumber() {
 	public Integer getDetailNumber() {
 		return detailNumber;
 		return detailNumber;
 	}
 	}
+
 	public void setDetailNumber(Integer detailNumber) {
 	public void setDetailNumber(Integer detailNumber) {
 		this.detailNumber = detailNumber;
 		this.detailNumber = detailNumber;
 	}
 	}
-	
+
 	public Integer getUnitNumber() {
 	public Integer getUnitNumber() {
 		return unitNumber;
 		return unitNumber;
 	}
 	}
+
 	public void setUnitNumber(Integer unitNumber) {
 	public void setUnitNumber(Integer unitNumber) {
 		this.unitNumber = unitNumber;
 		this.unitNumber = unitNumber;
 	}
 	}
+
 	public Double getScore() {
 	public Double getScore() {
 		return score;
 		return score;
 	}
 	}
+
 	public void setScore(Double score) {
 	public void setScore(Double score) {
 		this.score = score;
 		this.score = score;
 	}
 	}
+
 	public Double getScoreStep() {
 	public Double getScoreStep() {
 		return scoreStep;
 		return scoreStep;
 	}
 	}
+
 	public void setScoreStep(Double scoreStep) {
 	public void setScoreStep(Double scoreStep) {
 		this.scoreStep = scoreStep;
 		this.scoreStep = scoreStep;
 	}
 	}
+
 	public Long getPaperId() {
 	public Long getPaperId() {
 		return paperId;
 		return paperId;
 	}
 	}
+
 	public void setPaperId(Long paperId) {
 	public void setPaperId(Long paperId) {
 		this.paperId = paperId;
 		this.paperId = paperId;
 	}
 	}
+
 	public Integer getGroupNumber() {
 	public Integer getGroupNumber() {
 		return groupNumber;
 		return groupNumber;
 	}
 	}
+
 	public void setGroupNumber(Integer groupNumber) {
 	public void setGroupNumber(Integer groupNumber) {
 		this.groupNumber = groupNumber;
 		this.groupNumber = groupNumber;
 	}
 	}
-	
+
+	public ArbitrateMethod getArbitrateMethod() {
+		return arbitrateMethod;
+	}
+
+	public void setArbitrateMethod(ArbitrateMethod arbitrateMethod) {
+		this.arbitrateMethod = arbitrateMethod;
+	}
+
+	public Double getDoubleRate() {
+		return doubleRate;
+	}
+
+	public void setDoubleRate(Double doubleRate) {
+		this.doubleRate = doubleRate;
+	}
+
+	public Double getArbitrateThreshold() {
+		return arbitrateThreshold;
+	}
+
+	public void setArbitrateThreshold(Double arbitrateThreshold) {
+		this.arbitrateThreshold = arbitrateThreshold;
+	}
 }
 }

+ 50 - 6
src/main/java/cn/com/qmth/mps/vo/paper/PaperVo.java

@@ -3,109 +3,153 @@ package cn.com.qmth.mps.vo.paper;
 import cn.com.qmth.mps.entity.base.BaseEntity;
 import cn.com.qmth.mps.entity.base.BaseEntity;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiModelProperty;
 
 
-public class PaperVo extends BaseEntity{
+public class PaperVo extends BaseEntity {
+
 	/**
 	/**
-	 * 
+	 *
 	 */
 	 */
 	private static final long serialVersionUID = -2271590671135347709L;
 	private static final long serialVersionUID = -2271590671135347709L;
+
 	@ApiModelProperty("试卷结构id")
 	@ApiModelProperty("试卷结构id")
 	private Long id;
 	private Long id;
+
 	@ApiModelProperty("学校id")
 	@ApiModelProperty("学校id")
 	private Long schoolId;
 	private Long schoolId;
+
 	@ApiModelProperty("考试id")
 	@ApiModelProperty("考试id")
 	private Long examId;
 	private Long examId;
+
 	@ApiModelProperty("考试名称")
 	@ApiModelProperty("考试名称")
 	private String examName;
 	private String examName;
+
 	@ApiModelProperty("科目id")
 	@ApiModelProperty("科目id")
 	private Long courseId;
 	private Long courseId;
+
 	@ApiModelProperty("科目代码")
 	@ApiModelProperty("科目代码")
 	private String courseCode;
 	private String courseCode;
+
 	@ApiModelProperty("科目名称")
 	@ApiModelProperty("科目名称")
-    private String courseName;
+	private String courseName;
+
 	@ApiModelProperty("试卷总分")
 	@ApiModelProperty("试卷总分")
 	private Double totalScore;
 	private Double totalScore;
+
 	@ApiModelProperty("主观总分")
 	@ApiModelProperty("主观总分")
 	private Double subjectiveScore;
 	private Double subjectiveScore;
+
 	@ApiModelProperty("试卷结构是否提交")
 	@ApiModelProperty("试卷结构是否提交")
 	private Boolean structFinish;
 	private Boolean structFinish;
+
 	@ApiModelProperty("分组是否完成")
 	@ApiModelProperty("分组是否完成")
 	private Boolean groupFinish;
 	private Boolean groupFinish;
+
 	@ApiModelProperty("分组数")
 	@ApiModelProperty("分组数")
 	private Integer groupCount;
 	private Integer groupCount;
+
+	@ApiModelProperty("是否开启组卷")
+	private Boolean doubleEnable;
+
 	public Long getId() {
 	public Long getId() {
 		return id;
 		return id;
 	}
 	}
+
 	public void setId(Long id) {
 	public void setId(Long id) {
 		this.id = id;
 		this.id = id;
 	}
 	}
+
 	public Long getSchoolId() {
 	public Long getSchoolId() {
 		return schoolId;
 		return schoolId;
 	}
 	}
+
 	public void setSchoolId(Long schoolId) {
 	public void setSchoolId(Long schoolId) {
 		this.schoolId = schoolId;
 		this.schoolId = schoolId;
 	}
 	}
+
 	public Long getExamId() {
 	public Long getExamId() {
 		return examId;
 		return examId;
 	}
 	}
+
 	public void setExamId(Long examId) {
 	public void setExamId(Long examId) {
 		this.examId = examId;
 		this.examId = examId;
 	}
 	}
+
 	public Long getCourseId() {
 	public Long getCourseId() {
 		return courseId;
 		return courseId;
 	}
 	}
+
 	public void setCourseId(Long courseId) {
 	public void setCourseId(Long courseId) {
 		this.courseId = courseId;
 		this.courseId = courseId;
 	}
 	}
+
 	public String getCourseCode() {
 	public String getCourseCode() {
 		return courseCode;
 		return courseCode;
 	}
 	}
+
 	public void setCourseCode(String courseCode) {
 	public void setCourseCode(String courseCode) {
 		this.courseCode = courseCode;
 		this.courseCode = courseCode;
 	}
 	}
+
 	public String getCourseName() {
 	public String getCourseName() {
 		return courseName;
 		return courseName;
 	}
 	}
+
 	public void setCourseName(String courseName) {
 	public void setCourseName(String courseName) {
 		this.courseName = courseName;
 		this.courseName = courseName;
 	}
 	}
+
 	public Double getTotalScore() {
 	public Double getTotalScore() {
 		return totalScore;
 		return totalScore;
 	}
 	}
+
 	public void setTotalScore(Double totalScore) {
 	public void setTotalScore(Double totalScore) {
 		this.totalScore = totalScore;
 		this.totalScore = totalScore;
 	}
 	}
+
 	public Double getSubjectiveScore() {
 	public Double getSubjectiveScore() {
 		return subjectiveScore;
 		return subjectiveScore;
 	}
 	}
+
 	public void setSubjectiveScore(Double subjectiveScore) {
 	public void setSubjectiveScore(Double subjectiveScore) {
 		this.subjectiveScore = subjectiveScore;
 		this.subjectiveScore = subjectiveScore;
 	}
 	}
-	
+
 	public Boolean getGroupFinish() {
 	public Boolean getGroupFinish() {
 		return groupFinish;
 		return groupFinish;
 	}
 	}
+
 	public void setGroupFinish(Boolean groupFinish) {
 	public void setGroupFinish(Boolean groupFinish) {
 		this.groupFinish = groupFinish;
 		this.groupFinish = groupFinish;
 	}
 	}
+
 	public Integer getGroupCount() {
 	public Integer getGroupCount() {
 		return groupCount;
 		return groupCount;
 	}
 	}
+
 	public void setGroupCount(Integer groupCount) {
 	public void setGroupCount(Integer groupCount) {
 		this.groupCount = groupCount;
 		this.groupCount = groupCount;
 	}
 	}
+
 	public String getExamName() {
 	public String getExamName() {
 		return examName;
 		return examName;
 	}
 	}
+
 	public void setExamName(String examName) {
 	public void setExamName(String examName) {
 		this.examName = examName;
 		this.examName = examName;
 	}
 	}
+
 	public Boolean getStructFinish() {
 	public Boolean getStructFinish() {
 		return structFinish;
 		return structFinish;
 	}
 	}
+
 	public void setStructFinish(Boolean structFinish) {
 	public void setStructFinish(Boolean structFinish) {
 		this.structFinish = structFinish;
 		this.structFinish = structFinish;
 	}
 	}
 
 
-	
-	
+	public Boolean getDoubleEnable() {
+		return doubleEnable;
+	}
+
+	public void setDoubleEnable(Boolean doubleEnable) {
+		this.doubleEnable = doubleEnable;
+	}
 }
 }

BIN
src/main/resources/importtemplates/structImport.xlsx


+ 1 - 1
src/main/resources/mapper/PaperGroupMapper.xml

@@ -3,7 +3,7 @@
 <mapper namespace="cn.com.qmth.mps.dao.PaperGroupDao">
 <mapper namespace="cn.com.qmth.mps.dao.PaperGroupDao">
 
 
 	<select id="findGroupCount" resultType="cn.com.qmth.mps.vo.paper.GroupCountVo">
 	<select id="findGroupCount" resultType="cn.com.qmth.mps.vo.paper.GroupCountVo">
-		select t.paper_id,count(1) groupCount from mps_paper_group
+		select t.paper_id,count(1) groupCount,MAX(double_enable) AS doubleEnable from mps_paper_group
 		t
 		t
 		where 1=2
 		where 1=2
 		<foreach collection="paperIds" index="index" item="paperId">
 		<foreach collection="paperIds" index="index" item="paperId">