فهرست منبع

1.0.4 优化联调bug

xiaofei 1 سال پیش
والد
کامیت
e20cdcb9ab

+ 1 - 7
paper-library-business/src/main/resources/mapper/DocManageMapper.xml

@@ -9,7 +9,7 @@
             pst.course_code courseCode,
             pst.course_code courseCode,
             pst.course_name courseName,
             pst.course_name courseName,
             pst.student_count studentCount,
             pst.student_count studentCount,
-            pst.scan_count scanStudentCount
+            pst.scan_student_count scanStudentCount
         FROM
         FROM
             paper_scan_task pst
             paper_scan_task pst
                 LEFT JOIN
                 LEFT JOIN
@@ -23,12 +23,6 @@
             <if test="courseCode != null and courseCode != ''">
             <if test="courseCode != null and courseCode != ''">
                 and pst.course_code = #{courseCode}
                 and pst.course_code = #{courseCode}
             </if>
             </if>
-<!--            <if test="managerOrgId == null and orgIds != null and orgIds.size > 0">-->
-<!--                AND pa.manager_org_id IN-->
-<!--                <foreach collection="orgIds" item="item" index="index" open="(" separator="," close=")">-->
-<!--                    #{item}-->
-<!--                </foreach>-->
-<!--            </if>-->
         </where>
         </where>
     </select>
     </select>
     <select id="pageDetail" resultType="com.qmth.paper.library.business.bean.result.DocManageDetailResult">
     <select id="pageDetail" resultType="com.qmth.paper.library.business.bean.result.DocManageDetailResult">

+ 11 - 1
paper-library-common/src/main/java/com/qmth/paper/library/common/bean/dto/syssetting/SimpleObject.java

@@ -13,19 +13,21 @@ public class SimpleObject {
     private int sort;
     private int sort;
 
 
     private boolean enable;
     private boolean enable;
+    private String remark;
 
 
     private List<SimpleObjectOptions> options;
     private List<SimpleObjectOptions> options;
 
 
     public SimpleObject() {
     public SimpleObject() {
     }
     }
 
 
-    public SimpleObject(String code, String name, String value, int sort, boolean enable, List<SimpleObjectOptions> options) {
+    public SimpleObject(String code, String name, String value, int sort, boolean enable, List<SimpleObjectOptions> options, String remark) {
         this.code = code;
         this.code = code;
         this.name = name;
         this.name = name;
         this.value = value;
         this.value = value;
         this.sort = sort;
         this.sort = sort;
         this.enable = enable;
         this.enable = enable;
         this.options = options;
         this.options = options;
+        this.remark = remark;
     }
     }
 
 
     public String getCode() {
     public String getCode() {
@@ -75,4 +77,12 @@ public class SimpleObject {
     public void setOptions(List<SimpleObjectOptions> options) {
     public void setOptions(List<SimpleObjectOptions> options) {
         this.options = options;
         this.options = options;
     }
     }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
 }
 }

+ 8 - 0
paper-library-common/src/main/java/com/qmth/paper/library/common/bean/dto/syssetting/SimpleObjectOptions.java

@@ -6,6 +6,14 @@ public class SimpleObjectOptions {
 
 
     private Object value;
     private Object value;
 
 
+    public SimpleObjectOptions() {
+    }
+
+    public SimpleObjectOptions(String name, Object value) {
+        this.name = name;
+        this.value = value;
+    }
+
     public String getName() {
     public String getName() {
         return name;
         return name;
     }
     }

+ 8 - 8
paper-library-common/src/main/java/com/qmth/paper/library/common/entity/ExamStudent.java

@@ -58,35 +58,35 @@ public class ExamStudent extends BaseEntity implements Serializable {
     private String studentCode;
     private String studentCode;
 
 
     @ApiModelProperty(value = "学院名称")
     @ApiModelProperty(value = "学院名称")
-    @ExcelColumn(name = "学院", index = 4)
+    @ExcelColumn(name = "学院", index = 4, nullable = true)
     private String collegeName;
     private String collegeName;
 
 
     @ApiModelProperty(value = "专业名称")
     @ApiModelProperty(value = "专业名称")
-    @ExcelColumn(name = "专业", index = 5)
+    @ExcelColumn(name = "专业", index = 5, nullable = true)
     private String majorName;
     private String majorName;
 
 
     @ApiModelProperty(value = "班级名称")
     @ApiModelProperty(value = "班级名称")
-    @ExcelColumn(name = "班级", index = 6)
+    @ExcelColumn(name = "班级", index = 6, nullable = true)
     private String className;
     private String className;
 
 
     @ApiModelProperty(value = "任课老师")
     @ApiModelProperty(value = "任课老师")
-    @ExcelColumn(name = "任课老师", index = 7)
+    @ExcelColumn(name = "任课老师", index = 7, nullable = true)
     private String teacher;
     private String teacher;
 
 
     @ApiModelProperty(value = "教学班")
     @ApiModelProperty(value = "教学班")
-    @ExcelColumn(name = "教学班", index = 8)
+    @ExcelColumn(name = "教学班", index = 8, nullable = true)
     private String teachClass;
     private String teachClass;
 
 
     @ApiModelProperty(value = "考场")
     @ApiModelProperty(value = "考场")
-    @ExcelColumn(name = "考场", index = 9)
+    @ExcelColumn(name = "考场", index = 9, nullable = true)
     private String examRoom;
     private String examRoom;
 
 
     @ApiModelProperty(value = "成绩")
     @ApiModelProperty(value = "成绩")
-    @ExcelColumn(name = "成绩", index = 10)
+    @ExcelColumn(name = "成绩", index = 10, nullable = true)
     private Double score;
     private Double score;
 
 
     @ApiModelProperty(value = "备注")
     @ApiModelProperty(value = "备注")
-    @ExcelColumn(name = "备注", index = 11)
+    @ExcelColumn(name = "备注", index = 11, nullable = true)
     private String remark;
     private String remark;
 
 
     @ApiModelProperty(value = "是否绑定时自动创建:0-导入或者新建,1-绑定时自动创建")
     @ApiModelProperty(value = "是否绑定时自动创建:0-导入或者新建,1-绑定时自动创建")

+ 10 - 8
paper-library-common/src/main/java/com/qmth/paper/library/common/entity/SysSetting.java

@@ -17,10 +17,8 @@ import io.swagger.annotations.ApiModelProperty;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
 
 
 import java.io.Serializable;
 import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
+import java.util.stream.Collectors;
 
 
 /**
 /**
  * <p>
  * <p>
@@ -73,10 +71,14 @@ public class SysSetting extends BaseEntity implements Serializable {
 //        settingObjects.add(new SettingObject("系统设置", 1, simpleObjects1));
 //        settingObjects.add(new SettingObject("系统设置", 1, simpleObjects1));
 
 
         List<SimpleObject> simpleObjects2 = new ArrayList<>();
         List<SimpleObject> simpleObjects2 = new ArrayList<>();
-        List<SimpleObjectOptions> recognizeOptions = JSON.parseArray("[{\"name\":\""+RecognitionTypeEnum.BAR_CODE.getDesc()+"\",\"value\":\""+ RecognitionTypeEnum.BAR_CODE+"\"},{\"name\":\""+RecognitionTypeEnum.OCR.getDesc()+"\",\"value\":\""+RecognitionTypeEnum.OCR+"\"},{\"name\":\""+RecognitionTypeEnum.NONE.getDesc()+"\",\"value\":\""+RecognitionTypeEnum.NONE+"\"}]", SimpleObjectOptions.class);
-        simpleObjects2.add(new SimpleObject(SysSettingConstant.RECOGNITION_TYPE, "识别模式", "", 1, true, recognizeOptions));
-        List<SimpleObjectOptions> storeOptions = JSON.parseArray("[{\"name\":\""+ StoreTypeEnum.COURSE.getDesc() +"\",\"value\":\""+ StoreTypeEnum.COURSE+"\"},{\"name\":\""+StoreTypeEnum.ROOM.getDesc()+"\",\"value\":\""+StoreTypeEnum.ROOM+"\"},{\"name\":\""+StoreTypeEnum.CLASS.getDesc()+"\",\"value\":\""+StoreTypeEnum.CLASS+"\"}]", SimpleObjectOptions.class);
-        simpleObjects2.add(new SimpleObject(SysSettingConstant.STORE_TYPE, "文件存储设置", "", 1, true, storeOptions));
+        List<SimpleObjectOptions> recognizeOptions = Arrays.stream(RecognitionTypeEnum.values()).map(m-> new SimpleObjectOptions(m.getDesc(), m.name())).collect(Collectors.toList());
+        String recognizeRemark = "1、如果开启OCR识别或条码识别,必须导入考生信息;\n" +
+                "2、该设置修改后,仅对后续扫描结果生效。";
+        simpleObjects2.add(new SimpleObject(SysSettingConstant.RECOGNITION_TYPE, "识别模式", "", 1, true, recognizeOptions, recognizeRemark));
+        List<SimpleObjectOptions> storeOptions = Arrays.stream(StoreTypeEnum.values()).map(m-> new SimpleObjectOptions(m.getDesc(), m.name())).collect(Collectors.toList());
+        String storeRemark = "1、文件存储规则:学期/考试/课程/\n" +
+                "2、选择按考场/班级存储,则考生数据必须包含考场及学生信息;存储规则:学期/考试/课程/考场(班级)";
+        simpleObjects2.add(new SimpleObject(SysSettingConstant.STORE_TYPE, "文件存储设置", "", 1, true, storeOptions, storeRemark));
         settingObjects.add(new SettingObject("识别设置", 2, simpleObjects2));
         settingObjects.add(new SettingObject("识别设置", 2, simpleObjects2));
 
 
         SysSetting sysSetting = new SysSetting();
         SysSetting sysSetting = new SysSetting();

+ 8 - 8
paper-library-common/src/main/java/com/qmth/paper/library/common/entity/SysSettingGlobal.java

@@ -42,22 +42,22 @@ public class SysSettingGlobal extends BaseEntity implements Serializable {
     public static SysSettingGlobal init() {
     public static SysSettingGlobal init() {
         List<SettingObject> settingObjects = new ArrayList<>();
         List<SettingObject> settingObjects = new ArrayList<>();
         List<SimpleObject> simpleObjects1 = new ArrayList<>();
         List<SimpleObject> simpleObjects1 = new ArrayList<>();
-        simpleObjects1.add(new SimpleObject(SysSettingConstant.SYS_INIT_PASSWORD, "默认初始登录密码", "123456", 1, true, null));
-        simpleObjects1.add(new SimpleObject(SysSettingConstant.SYS_FILE_HOST_URL, "文件访问地址", "", 2, true, null));
-        simpleObjects1.add(new SimpleObject(SysSettingConstant.SYS_TXT_CHARSET, "异步任务txt日志文件编码", "gbk", 3, true, null));
+        simpleObjects1.add(new SimpleObject(SysSettingConstant.SYS_INIT_PASSWORD, "默认初始登录密码", "123456", 1, true, null, null));
+        simpleObjects1.add(new SimpleObject(SysSettingConstant.SYS_FILE_HOST_URL, "文件访问地址", "", 2, true, null, null));
+        simpleObjects1.add(new SimpleObject(SysSettingConstant.SYS_TXT_CHARSET, "异步任务txt日志文件编码", "gbk", 3, true, null, null));
 
 
         settingObjects.add(new SettingObject("系统设置", 1, simpleObjects1));
         settingObjects.add(new SettingObject("系统设置", 1, simpleObjects1));
 
 
         List<SimpleObject> simpleObjects2 = new ArrayList<>();
         List<SimpleObject> simpleObjects2 = new ArrayList<>();
-        simpleObjects2.add(new SimpleObject(SysSettingConstant.OCR_APP_ID, "OCR AppId", "", 1, true, null));
-        simpleObjects2.add(new SimpleObject(SysSettingConstant.OCR_APP_KEY, "OCR AppKey", "", 2, true, null));
-        simpleObjects2.add(new SimpleObject(SysSettingConstant.OCR_APP_SECRET, "OCR AppSecret", "", 3, true, null));
+        simpleObjects2.add(new SimpleObject(SysSettingConstant.OCR_APP_ID, "OCR AppId", "", 1, true, null, null));
+        simpleObjects2.add(new SimpleObject(SysSettingConstant.OCR_APP_KEY, "OCR AppKey", "", 2, true, null, null));
+        simpleObjects2.add(new SimpleObject(SysSettingConstant.OCR_APP_SECRET, "OCR AppSecret", "", 3, true, null, null));
 
 
         settingObjects.add(new SettingObject("OCR参数设置", 2, simpleObjects2));
         settingObjects.add(new SettingObject("OCR参数设置", 2, simpleObjects2));
 
 
         List<SimpleObject> simpleObjects3 = new ArrayList<>();
         List<SimpleObject> simpleObjects3 = new ArrayList<>();
-        simpleObjects3.add(new SimpleObject(SysSettingConstant.SYS_VERIFICATION_CODE_EXPIRED_TIME, "验证码有效时间(分钟)", "2", 1, true, null));
-        simpleObjects3.add(new SimpleObject(SysSettingConstant.SYS_VERIFICATION_CODE_SEND_INTERVAL, "验证码发送频率(秒)", "60", 2, true, null));
+        simpleObjects3.add(new SimpleObject(SysSettingConstant.SYS_VERIFICATION_CODE_EXPIRED_TIME, "验证码有效时间(分钟)", "2", 1, true, null, null));
+        simpleObjects3.add(new SimpleObject(SysSettingConstant.SYS_VERIFICATION_CODE_SEND_INTERVAL, "验证码发送频率(秒)", "60", 2, true, null, null));
 
 
         settingObjects.add(new SettingObject("短信参数设置", 3, simpleObjects3));
         settingObjects.add(new SettingObject("短信参数设置", 3, simpleObjects3));
 
 

+ 2 - 1
paper-library-common/src/main/java/com/qmth/paper/library/common/enums/RecognitionTypeEnum.java

@@ -12,7 +12,8 @@ public enum RecognitionTypeEnum {
     OCR("OCR识别"),
     OCR("OCR识别"),
 
 
     BAR_CODE("条码识别"),
     BAR_CODE("条码识别"),
-    NONE("不识别");
+//    NONE("不识别")
+    ;
 
 
     private String desc;
     private String desc;