Parcourir la source

Merge branch 'dev_v3.0.1' of http://git.qmth.com.cn/wangliang/distributed-print-service into dev_v3.0.1

xiaof il y a 3 ans
Parent
commit
7e6a386f9c

+ 17 - 6
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/marking/GroupInfo.java

@@ -16,10 +16,10 @@ public class GroupInfo {
     private Integer groupNumber;
 
     @ApiModelProperty(value = "是否开启双评 true:开启双评 false:关闭双评")
-    private Boolean doubleRate;
+    private Double doubleRate;
 
     @ApiModelProperty(value = "仲裁阈值")
-    private Integer arbitrateThreshold;
+    private Double arbitrateThreshold;
 
     @ApiModelProperty(value = "分组对应的题目集合")
     private List<Question> questions;
@@ -28,6 +28,9 @@ public class GroupInfo {
     @JsonSerialize(using = ToStringSerializer.class)
     private List<Marker> markerList;
 
+    @ApiModelProperty(value = "图片配置")
+    private List<PictureConfig> pictureConfigList;
+
     public Integer getGroupNumber() {
         return groupNumber;
     }
@@ -36,19 +39,19 @@ public class GroupInfo {
         this.groupNumber = groupNumber;
     }
 
-    public Boolean getDoubleRate() {
+    public Double getDoubleRate() {
         return doubleRate;
     }
 
-    public void setDoubleRate(Boolean doubleRate) {
+    public void setDoubleRate(Double doubleRate) {
         this.doubleRate = doubleRate;
     }
 
-    public Integer getArbitrateThreshold() {
+    public Double getArbitrateThreshold() {
         return arbitrateThreshold;
     }
 
-    public void setArbitrateThreshold(Integer arbitrateThreshold) {
+    public void setArbitrateThreshold(Double arbitrateThreshold) {
         this.arbitrateThreshold = arbitrateThreshold;
     }
 
@@ -67,4 +70,12 @@ public class GroupInfo {
     public void setMarkerList(List<Marker> markerList) {
         this.markerList = markerList;
     }
+
+    public List<PictureConfig> getPictureConfigList() {
+        return pictureConfigList;
+    }
+
+    public void setPictureConfigList(List<PictureConfig> pictureConfigList) {
+        this.pictureConfigList = pictureConfigList;
+    }
 }

+ 65 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/marking/PictureConfig.java

@@ -0,0 +1,65 @@
+package com.qmth.distributed.print.business.bean.marking;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * @Description: 分组图片设置
+ * @Author: CaoZixuan
+ * @Date: 2022-04-14
+ */
+public class PictureConfig {
+    @ApiModelProperty(value = "图片序号")
+    private Integer i;
+
+    @ApiModelProperty(value = "左上角X坐标")
+    private Integer x;
+
+    @ApiModelProperty(value = "左上角y坐标")
+    private Integer y;
+
+    @ApiModelProperty(value = "裁切区宽度")
+    private Integer w;
+
+    @ApiModelProperty(value = "裁切区高度")
+    private Integer h;
+
+    public Integer getI() {
+        return i;
+    }
+
+    public void setI(Integer i) {
+        this.i = i;
+    }
+
+    public Integer getX() {
+        return x;
+    }
+
+    public void setX(Integer x) {
+        this.x = x;
+    }
+
+    public Integer getY() {
+        return y;
+    }
+
+    public void setY(Integer y) {
+        this.y = y;
+    }
+
+    public Integer getW() {
+        return w;
+    }
+
+    public void setW(Integer w) {
+        this.w = w;
+    }
+
+    public Integer getH() {
+        return h;
+    }
+
+    public void setH(Integer h) {
+        this.h = h;
+    }
+}

+ 17 - 6
distributed-print-business/src/main/java/com/qmth/distributed/print/business/entity/ExamPaperGroup.java

@@ -27,10 +27,10 @@ public class ExamPaperGroup extends BaseEntity implements Serializable {
     private Integer groupNumber;
 
     @ApiModelProperty(value = "双评比例(0关闭,1开启) tip : 云阅卷0-1之间是按照百分比人数开启双评,因此这里限制只能0或1")
-    private Boolean doubleRate;
+    private Double doubleRate;
 
     @ApiModelProperty(value = "仲裁阈值(开启双评必填)'")
-    private Integer arbitrateThreshold;
+    private Double arbitrateThreshold;
 
     @ApiModelProperty(value = "合分策略 开启双评是必填 AVG(\"平均分\", 1), MAX(\"最高分\", 2), MIN(\"最低分\", 3)")
     private ScorePolicyEnum scorePolicy;
@@ -44,6 +44,9 @@ public class ExamPaperGroup extends BaseEntity implements Serializable {
     @ApiModelProperty(value = "题目信息")
     private String questionInfo;
 
+    @ApiModelProperty(value = "分组图片设置")
+    private String pictureConfig;
+
     public Long getExamPaperStructureId() {
         return examPaperStructureId;
     }
@@ -60,19 +63,19 @@ public class ExamPaperGroup extends BaseEntity implements Serializable {
         this.groupNumber = groupNumber;
     }
 
-    public Boolean getDoubleRate() {
+    public Double getDoubleRate() {
         return doubleRate;
     }
 
-    public void setDoubleRate(Boolean doubleRate) {
+    public void setDoubleRate(Double doubleRate) {
         this.doubleRate = doubleRate;
     }
 
-    public Integer getArbitrateThreshold() {
+    public Double getArbitrateThreshold() {
         return arbitrateThreshold;
     }
 
-    public void setArbitrateThreshold(Integer arbitrateThreshold) {
+    public void setArbitrateThreshold(Double arbitrateThreshold) {
         this.arbitrateThreshold = arbitrateThreshold;
     }
 
@@ -107,4 +110,12 @@ public class ExamPaperGroup extends BaseEntity implements Serializable {
     public void setQuestionInfo(String questionInfo) {
         this.questionInfo = questionInfo;
     }
+
+    public String getPictureConfig() {
+        return pictureConfig;
+    }
+
+    public void setPictureConfig(String pictureConfig) {
+        this.pictureConfig = pictureConfig;
+    }
 }

+ 11 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/entity/ExamPaperGroupMarker.java

@@ -25,6 +25,9 @@ public class ExamPaperGroupMarker extends BaseEntity implements Serializable {
     @JsonSerialize(using = ToStringSerializer.class)
     private Long markerId;
 
+    @ApiModelProperty(value = "评卷员登录名")
+    private String loginName;
+
     public Long getGroupId() {
         return groupId;
     }
@@ -40,4 +43,12 @@ public class ExamPaperGroupMarker extends BaseEntity implements Serializable {
     public void setMarkerId(Long markerId) {
         this.markerId = markerId;
     }
+
+    public String getLoginName() {
+        return loginName;
+    }
+
+    public void setLoginName(String loginName) {
+        this.loginName = loginName;
+    }
 }

+ 1 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamPaperGroupMarkerServiceImpl.java

@@ -29,6 +29,7 @@ public class ExamPaperGroupMarkerServiceImpl extends ServiceImpl<ExamPaperGroupM
             ExamPaperGroupMarker marker = new ExamPaperGroupMarker();
             marker.setGroupId(examPaperGroupId);
             marker.setMarkerId(e.getId());
+            marker.setLoginName(e.getLoginName());
             return Stream.of(marker);
         }).collect(Collectors.toSet());
         this.saveBatch(examPaperGroupMarkerSet);

+ 6 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamPaperGroupServiceImpl.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.qmth.distributed.print.business.bean.marking.GroupInfo;
 import com.qmth.distributed.print.business.bean.marking.Marker;
+import com.qmth.distributed.print.business.bean.marking.PictureConfig;
 import com.qmth.distributed.print.business.bean.marking.Question;
 import com.qmth.distributed.print.business.entity.ExamPaperGroup;
 import com.qmth.distributed.print.business.entity.ExamPaperGroupMarker;
@@ -44,9 +45,11 @@ public class ExamPaperGroupServiceImpl extends ServiceImpl<ExamPaperGroupMapper,
             // 评卷员信息
             List<Marker> markerList = group.getMarkerList();
             // 是否开启双评
-            Boolean doubleRate = group.getDoubleRate();
+            Double doubleRate = group.getDoubleRate();
             // 仲裁阈值
-            Integer arbitrateThreshold = group.getArbitrateThreshold();
+            Double arbitrateThreshold = group.getArbitrateThreshold();
+            // 图片配置
+            List<PictureConfig> pictureConfigList = group.getPictureConfigList();
 
             ExamPaperGroup examPaperGroup = new ExamPaperGroup();
             examPaperGroup.setExamPaperStructureId(examPaperStructureId);
@@ -57,6 +60,7 @@ public class ExamPaperGroupServiceImpl extends ServiceImpl<ExamPaperGroupMapper,
             examPaperGroup.setTrialCount(0);
             examPaperGroup.setMarkMode(null);
             examPaperGroup.setQuestionInfo(JSON.toJSONString(questionList));
+            examPaperGroup.setPictureConfig(JSON.toJSONString(pictureConfigList));
             this.save(examPaperGroup);
             // 新增后的分组id
             Long groupId = examPaperGroup.getId();