xiaof 4 年 前
コミット
438cd5c772
57 ファイル変更3267 行追加95 行削除
  1. 20 0
      distributed-print/src/main/resources/application-dev.properties
  2. 20 0
      distributed-print/src/main/resources/application-master.properties
  3. 20 0
      distributed-print/src/main/resources/application-release.properties
  4. 1 21
      distributed-print/src/main/resources/application.properties
  5. 11 0
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/config/DictionaryConfig.java
  6. 2 0
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/contant/SystemConstant.java
  7. 39 0
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/domain/YunMarkDomain.java
  8. 2 0
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/BasicCourseService.java
  9. 9 0
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/SysOrgService.java
  10. 9 0
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/SysUserService.java
  11. 5 0
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/BasicCourseServiceImpl.java
  12. 12 0
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysOrgServiceImpl.java
  13. 14 0
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysUserServiceImpl.java
  14. 58 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/excel/AssignDto.java
  15. 104 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/excel/DimensionDto.java
  16. 116 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/excel/MatchDto.java
  17. 125 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/excel/ModuleConfigDto.java
  18. 109 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/excel/ModuleProficiencyDto.java
  19. 92 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/excel/PaperConfigDto.java
  20. 149 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/excel/PaperStructDto.java
  21. 155 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/query/BasicAnswerDto.java
  22. 200 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/query/BasicExamRecordDto.java
  23. 36 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/query/TBSchoolClazzDto.java
  24. 36 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/query/TBSchoolCollegeDto.java
  25. 36 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/query/TBSchoolMajorDto.java
  26. 36 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/query/TBSchoolTeacherDto.java
  27. 110 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/query/ValidAnswerDetailDto.java
  28. 171 15
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/entity/TAExamCourseRecord.java
  29. 16 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/entity/TBCommonLevelConfig.java
  30. 15 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/entity/TBCommonRankLevelConfig.java
  31. 4 3
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/entity/TBPaper.java
  32. 44 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/enums/AssignEnum.java
  33. 41 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/enums/ExamCloudDataEnum.java
  34. 24 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/enums/NumberTypeEnum.java
  35. 11 1
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/mapper/TBExamRecordMapper.java
  36. 24 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/NewCallApiService.java
  37. 1 1
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TBCommonLevelConfigService.java
  38. 1 1
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TBCommonRankLevelConfigService.java
  39. 12 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TBExamCourseService.java
  40. 10 1
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TBExamRecordService.java
  41. 6 1
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TBExamService.java
  42. 9 1
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TBPaperService.java
  43. 8 1
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TBSchoolClazzService.java
  44. 87 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/NewCallApiServiceImpl.java
  45. 31 1
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBCommonLevelConfigServiceImpl.java
  46. 22 1
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBCommonRankLevelConfigServiceImpl.java
  47. 62 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBExamCourseServiceImpl.java
  48. 14 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBExamRecordServiceImpl.java
  49. 18 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBExamServiceImpl.java
  50. 16 1
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBPaperServiceImpl.java
  51. 15 1
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBSchoolClazzServiceImpl.java
  52. 40 0
      teachcloud-report-business/src/main/resources/mapper/TBExamRecordMapper.xml
  53. 941 0
      teachcloud-report/src/main/java/com/qmth/teachcloud/report/api/BasicDatasourceController.java
  54. 27 2
      teachcloud-report/src/main/resources/application-dev.properties
  55. 35 10
      teachcloud-report/src/main/resources/application-master.properties
  56. 35 10
      teachcloud-report/src/main/resources/application-release.properties
  57. 1 23
      teachcloud-report/src/main/resources/application.properties

+ 20 - 0
distributed-print/src/main/resources/application-dev.properties

@@ -6,6 +6,9 @@ server.tomcat.max-connections=2500
 #tomcat\u7684URI\u7F16\u7801
 server.tomcat.uri-encoding=UTF-8
 
+#\u9879\u76EE\u540D\u79F0
+spring.application.name=distributed-print
+
 #\u6570\u636E\u6E90\u914D\u7F6E
 db.host=localhost
 db.port=3306
@@ -72,6 +75,23 @@ com.qmth.api.auth.time-max-delay=30
 #\u7F13\u5B58\u65F6\u95F4
 com.qmth.cache.expire-after-write=8h
 
+#api\u524D\u7F00
+prefix.url.common=admin/common
+prefix.url.sys=admin/sys
+prefix.url.basic=admin/basic
+prefix.url.exam=admin/exam
+prefix.url.data=admin/data
+prefix.url.work=admin/work
+prefix.url.client=admin/client
+
+#\u65E5\u671F\u683C\u5F0F\u5316
+spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
+spring.jackson.time-zone=GMT+8
+
+#\u65E5\u5FD7\u914D\u7F6E
+com.qmth.logging.root-level=info
+com.qmth.logging.file-path=/Users/king/Downloads/distributed-print.log
+
 #\u5F15\u5165task\u914D\u7F6E\u6587\u4EF6
 spring.profiles.include=task
 

+ 20 - 0
distributed-print/src/main/resources/application-master.properties

@@ -6,6 +6,9 @@ server.tomcat.max-connections=2500
 #tomcat\u7684URI\u7F16\u7801
 server.tomcat.uri-encoding=UTF-8
 
+#\u9879\u76EE\u540D\u79F0
+spring.application.name=distributed-print
+
 #\u6570\u636E\u6E90\u914D\u7F6E
 db.host=localhost
 db.port=3306
@@ -72,6 +75,23 @@ com.qmth.api.auth.time-max-delay=30
 #\u7F13\u5B58\u65F6\u95F4
 com.qmth.cache.expire-after-write=8h
 
+#api\u524D\u7F00
+prefix.url.common=admin/common
+prefix.url.sys=admin/sys
+prefix.url.basic=admin/basic
+prefix.url.exam=admin/exam
+prefix.url.data=admin/data
+prefix.url.work=admin/work
+prefix.url.client=admin/client
+
+#\u65E5\u671F\u683C\u5F0F\u5316
+spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
+spring.jackson.time-zone=GMT+8
+
+#\u65E5\u5FD7\u914D\u7F6E
+com.qmth.logging.root-level=info
+com.qmth.logging.file-path=/Users/king/Downloads/distributed-print.log
+
 #\u5F15\u5165task\u914D\u7F6E\u6587\u4EF6
 spring.profiles.include=task
 

+ 20 - 0
distributed-print/src/main/resources/application-release.properties

@@ -6,6 +6,9 @@ server.tomcat.max-connections=2500
 #tomcat\u7684URI\u7F16\u7801
 server.tomcat.uri-encoding=UTF-8
 
+#\u9879\u76EE\u540D\u79F0
+spring.application.name=distributed-print
+
 #\u6570\u636E\u6E90\u914D\u7F6E
 db.host=localhost
 db.port=3306
@@ -72,6 +75,23 @@ com.qmth.api.auth.time-max-delay=30
 #\u7F13\u5B58\u65F6\u95F4
 com.qmth.cache.expire-after-write=8h
 
+#api\u524D\u7F00
+prefix.url.common=admin/common
+prefix.url.sys=admin/sys
+prefix.url.basic=admin/basic
+prefix.url.exam=admin/exam
+prefix.url.data=admin/data
+prefix.url.work=admin/work
+prefix.url.client=admin/client
+
+#\u65E5\u671F\u683C\u5F0F\u5316
+spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
+spring.jackson.time-zone=GMT+8
+
+#\u65E5\u5FD7\u914D\u7F6E
+com.qmth.logging.root-level=info
+com.qmth.logging.file-path=/Users/king/Downloads/distributed-print.log
+
 #\u5F15\u5165task\u914D\u7F6E\u6587\u4EF6
 spring.profiles.include=task
 

+ 1 - 21
distributed-print/src/main/resources/application.properties

@@ -1,22 +1,2 @@
 #\u5207\u6362\u914D\u7F6E\u6587\u4EF6
-spring.profiles.active=dev
-
-#\u9879\u76EE\u540D\u79F0
-spring.application.name=distributed-print
-
-#\u65E5\u671F\u683C\u5F0F\u5316
-spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
-spring.jackson.time-zone=GMT+8
-
-#api\u524D\u7F00
-prefix.url.common=admin/common
-prefix.url.sys=admin/sys
-prefix.url.basic=admin/basic
-prefix.url.exam=admin/exam
-prefix.url.data=admin/data
-prefix.url.work=admin/work
-prefix.url.client=admin/client
-
-#\u65E5\u5FD7\u914D\u7F6E
-com.qmth.logging.root-level=info
-com.qmth.logging.file-path=/Users/king/Downloads/distributed-print.log
+spring.profiles.active=dev

+ 11 - 0
teachcloud-common/src/main/java/com/qmth/teachcloud/common/config/DictionaryConfig.java

@@ -81,4 +81,15 @@ public class DictionaryConfig {
     public SyncDataDomain syncDataDomain() {
         return new SyncDataDomain();
     }
+
+    /**
+     * 云阅卷配置
+     *
+     * @return
+     */
+    @Bean
+    @ConfigurationProperties(prefix = "yun.mark", ignoreUnknownFields = false)
+    public YunMarkDomain yunMarkDomain() {
+        return new YunMarkDomain();
+    }
 }

+ 2 - 0
teachcloud-common/src/main/java/com/qmth/teachcloud/common/contant/SystemConstant.java

@@ -64,6 +64,8 @@ public class SystemConstant {
     public static final String DELIMITER = ":";
     public static final int FINAL_SCALE = 1;
     public static final int OPER_SCALE = 8;
+    public static final String HYPHEN = "-";
+    public static final String DEFAULT_SIGN = "#";
 //    public static final int MAX_RETRY_CREATE_PDF_COUNT = 5;
 
     /**

+ 39 - 0
teachcloud-common/src/main/java/com/qmth/teachcloud/common/domain/YunMarkDomain.java

@@ -0,0 +1,39 @@
+package com.qmth.teachcloud.common.domain;
+
+import java.io.Serializable;
+
+/**
+ * @Description: 系统配置
+ * @Param:
+ * @return:
+ * @Author: wangliang
+ * @Date: 2020/4/10
+ */
+public class YunMarkDomain implements Serializable {
+
+    private static final long serialVersionUID = 7510626406622200443L;
+
+    private String url;
+
+    private String studentScoreApi;
+
+    public static long getSerialVersionUID() {
+        return serialVersionUID;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public String getStudentScoreApi() {
+        return studentScoreApi;
+    }
+
+    public void setStudentScoreApi(String studentScoreApi) {
+        this.studentScoreApi = studentScoreApi;
+    }
+}

+ 2 - 0
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/BasicCourseService.java

@@ -35,4 +35,6 @@ public interface BasicCourseService extends IService<BasicCourse> {
      * @return 课程集合
      */
     List<CourseInfoDto> findByUserLoginNameAndRealName(String loginName, String realName);
+
+    BasicCourse findByCourseCode(String courseCode);
 }

+ 9 - 0
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/SysOrgService.java

@@ -19,4 +19,13 @@ public interface SysOrgService extends IService<SysOrg> {
     List<OrgDto> listOrgTree();
 
     boolean saveOrg(SysOrg org);
+
+    /**
+     * 根据外键查找学院信息
+     * @param schoolId 学校id
+     * @param collegeCode 学院编号
+     * @param collegeName 学院名称
+     * @return 学院数据
+     */
+    SysOrg findByForeignKey(Long schoolId,String collegeCode,String collegeName);
 }

+ 9 - 0
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/SysUserService.java

@@ -42,4 +42,13 @@ public interface SysUserService extends IService<SysUser> {
     boolean saveCustomer(UserSaveParams userSaveParams);
 
     IPage<UserDto> listCustomer(String realName, Boolean enable, Integer pageNumber, Integer pageSize);
+
+    /**
+     * 根据外键查找教师信息
+     * @param schoolId 学校id
+     * @param teacherCode 教师编号
+     * @param teacherName 教师名称
+     * @return 学院数据
+     */
+    SysUser findByForeignKey(Long schoolId, String teacherCode, String teacherName);
 }

+ 5 - 0
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/BasicCourseServiceImpl.java

@@ -76,4 +76,9 @@ public class BasicCourseServiceImpl extends ServiceImpl<BasicCourseMapper, Basic
         }
         return basicCourseMapper.findByUserLoginNameAndRealName(loginName, realName);
     }
+
+    @Override
+    public BasicCourse findByCourseCode(String courseCode) {
+        return this.getOne(new QueryWrapper<BasicCourse>().lambda().eq(BasicCourse::getCode,courseCode));
+    }
 }

+ 12 - 0
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysOrgServiceImpl.java

@@ -96,4 +96,16 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
         }
 
     }
+
+    @Override
+    public SysOrg findByForeignKey(Long schoolId, String collegeCode, String collegeName) {
+        List<SysOrg> tbSchoolCollegeList = this.list(new QueryWrapper<SysOrg>().lambda()
+                .eq(SysOrg::getSchoolId,schoolId)
+                .eq(SysOrg::getCode,collegeCode)
+                .eq(SysOrg::getName,collegeName));
+        if (tbSchoolCollegeList.size() != 1){
+            throw ExceptionResultEnum.ERROR.exception("学院基础数据信息异常");
+        }
+        return tbSchoolCollegeList.get(0);
+    }
 }

+ 14 - 0
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysUserServiceImpl.java

@@ -240,6 +240,20 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
         return userDtoIPage;
     }
 
+    @Override
+    public SysUser findByForeignKey(Long schoolId, String teacherCode, String teacherName) {
+        List<SysUser> tbSchoolTeacherList = this.list(new QueryWrapper<SysUser>().lambda()
+                .eq(SysUser::getSchoolId,schoolId)
+                .eq(SysUser::getLoginName,teacherCode)
+                .eq(SysUser::getRealName,teacherName));
+        SysRole sysRole = sysRoleService.getOne(new QueryWrapper<SysRole>().lambda().eq(SysRole::getType,RoleTypeEnum.TEACHER));
+        tbSchoolTeacherList = tbSchoolTeacherList.stream().filter(e -> Arrays.asList(e.getRoleIds()).contains(sysRole.getId())).collect(Collectors.toList());
+        if (tbSchoolTeacherList.size() != 1){
+            throw ExceptionResultEnum.ERROR.exception("教师基础数据信息异常");
+        }
+        return tbSchoolTeacherList.get(0);
+    }
+
     /**
      * 保存用户公用
      *

+ 58 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/excel/AssignDto.java

@@ -0,0 +1,58 @@
+package com.qmth.teachcloud.report.business.bean.dto.excel;
+
+
+import com.qmth.teachcloud.common.annotation.ExcelNote;
+
+import javax.validation.constraints.NotNull;
+
+
+public class AssignDto {
+
+    @ExcelNote(value = "考试编号")
+    @NotNull
+    private String examId;
+
+    @ExcelNote(value = "科目编号")
+    @NotNull
+    private String paperCodeS;
+
+    @ExcelNote(value = "学号")
+    @NotNull
+    private String studentCode;
+
+    @ExcelNote(value = "赋分")
+    @NotNull
+    private String assignScore;
+
+    public String getExamId() {
+        return examId;
+    }
+
+    public void setExamId(String examId) {
+        this.examId = examId;
+    }
+
+    public String getPaperCodeS() {
+        return paperCodeS;
+    }
+
+    public void setPaperCodeS(String paperCodeS) {
+        this.paperCodeS = paperCodeS;
+    }
+
+    public String getStudentCode() {
+        return studentCode;
+    }
+
+    public void setStudentCode(String studentCode) {
+        this.studentCode = studentCode;
+    }
+
+    public String getAssignScore() {
+        return assignScore;
+    }
+
+    public void setAssignScore(String assignScore) {
+        this.assignScore = assignScore;
+    }
+}

+ 104 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/excel/DimensionDto.java

@@ -0,0 +1,104 @@
+package com.qmth.teachcloud.report.business.bean.dto.excel;
+
+
+
+import com.qmth.teachcloud.common.annotation.ExcelNote;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+public class DimensionDto implements Serializable {
+
+    @ExcelNote(value = "科目代码")
+    @NotNull
+    private String courseCode;
+
+    @ExcelNote(value = "科目名称")
+    @NotNull
+    private String paperName;
+
+    @ExcelNote(value = "一级知识维度")
+    @NotNull
+    private String nameOne;
+
+    @ExcelNote(value = "一级维度编号")
+    @NotNull
+    private String codeOne;
+
+    @ExcelNote(value = "二级知识维度")
+    private String nameTwo;
+
+    @ExcelNote(value = "二级维度编号")
+    private String codeTwo;
+
+    @ExcelNote(value = "一级维度术语解释")
+    private String interpretation;
+
+    @ExcelNote(value = "模块")
+    @NotNull
+    private String module;
+
+    public String getCourseCode() {
+        return courseCode;
+    }
+
+    public void setCourseCode(String courseCode) {
+        this.courseCode = courseCode;
+    }
+
+    public String getPaperName() {
+        return paperName;
+    }
+
+    public void setPaperName(String paperName) {
+        this.paperName = paperName;
+    }
+
+    public String getNameOne() {
+        return nameOne;
+    }
+
+    public void setNameOne(String nameOne) {
+        this.nameOne = nameOne;
+    }
+
+    public String getCodeOne() {
+        return codeOne;
+    }
+
+    public void setCodeOne(String codeOne) {
+        this.codeOne = codeOne;
+    }
+
+    public String getNameTwo() {
+        return nameTwo;
+    }
+
+    public void setNameTwo(String nameTwo) {
+        this.nameTwo = nameTwo;
+    }
+
+    public String getCodeTwo() {
+        return codeTwo;
+    }
+
+    public void setCodeTwo(String codeTwo) {
+        this.codeTwo = codeTwo;
+    }
+
+    public String getInterpretation() {
+        return interpretation;
+    }
+
+    public void setInterpretation(String interpretation) {
+        this.interpretation = interpretation;
+    }
+
+    public String getModule() {
+        return module;
+    }
+
+    public void setModule(String module) {
+        this.module = module;
+    }
+}

+ 116 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/excel/MatchDto.java

@@ -0,0 +1,116 @@
+package com.qmth.teachcloud.report.business.bean.dto.excel;
+
+
+import com.qmth.teachcloud.common.annotation.ExcelNote;
+
+import javax.validation.constraints.NotNull;
+
+public class MatchDto {
+
+    @ExcelNote(value = "考试编号")
+    @NotNull
+    private String examCode;
+
+    @ExcelNote(value = "科目编号")
+    @NotNull
+    private String paperCode;
+
+    @ExcelNote(value = "试卷类型")
+    @NotNull
+    private String paperType;
+
+    @ExcelNote(value = "题号类型")
+    @NotNull
+    private String numberType;
+
+    @ExcelNote(value = "云阅卷大题号")
+    @NotNull
+    private String cloudMainNumber;
+
+    @ExcelNote(value = "云阅卷小题号")
+    @NotNull
+    private String cloudSubNumber;
+
+    @ExcelNote(value = "教研分析大题号")
+    @NotNull
+    private String analyzeMainNumber;
+
+    @ExcelNote(value = "教研分析小题号")
+    @NotNull
+    private String analyzeSubNumber;
+
+    @ExcelNote(value = "描述")
+    private String describe;
+
+    public String getExamCode() {
+        return examCode;
+    }
+
+    public void setExamCode(String examCode) {
+        this.examCode = examCode;
+    }
+
+    public String getPaperCode() {
+        return paperCode;
+    }
+
+    public void setPaperCode(String paperCode) {
+        this.paperCode = paperCode;
+    }
+
+    public String getPaperType() {
+        return paperType;
+    }
+
+    public void setPaperType(String paperType) {
+        this.paperType = paperType;
+    }
+
+    public String getNumberType() {
+        return numberType;
+    }
+
+    public void setNumberType(String numberType) {
+        this.numberType = numberType;
+    }
+
+    public String getCloudMainNumber() {
+        return cloudMainNumber;
+    }
+
+    public void setCloudMainNumber(String cloudMainNumber) {
+        this.cloudMainNumber = cloudMainNumber;
+    }
+
+    public String getCloudSubNumber() {
+        return cloudSubNumber;
+    }
+
+    public void setCloudSubNumber(String cloudSubNumber) {
+        this.cloudSubNumber = cloudSubNumber;
+    }
+
+    public String getAnalyzeMainNumber() {
+        return analyzeMainNumber;
+    }
+
+    public void setAnalyzeMainNumber(String analyzeMainNumber) {
+        this.analyzeMainNumber = analyzeMainNumber;
+    }
+
+    public String getAnalyzeSubNumber() {
+        return analyzeSubNumber;
+    }
+
+    public void setAnalyzeSubNumber(String analyzeSubNumber) {
+        this.analyzeSubNumber = analyzeSubNumber;
+    }
+
+    public String getDescribe() {
+        return describe;
+    }
+
+    public void setDescribe(String describe) {
+        this.describe = describe;
+    }
+}

+ 125 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/excel/ModuleConfigDto.java

@@ -0,0 +1,125 @@
+package com.qmth.teachcloud.report.business.bean.dto.excel;
+
+
+
+
+import com.qmth.teachcloud.common.annotation.ExcelNote;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+/**
+ * @Description: 等级导入dto
+ * @Param:
+ * @return:
+ * @Author: wangliang
+ * @Date: 2020/12/10
+ */
+public class ModuleConfigDto implements Serializable {
+
+    @ExcelNote(value = "等级")
+    @NotNull
+    private String code;
+
+    @ExcelNote(value = "换算公式")
+    @NotNull
+    private String formula;
+
+    @ExcelNote(value = "分数范围")
+    @NotNull
+    private String levelDegree;
+
+    @ExcelNote(value = "水平层次")
+    @NotNull
+    private String level;
+
+    @ExcelNote(value = "诊断结果")
+    private String diagnoseResult;
+
+    @ExcelNote(value = "学习建议")
+    private String learnAdvice;
+
+    @NotNull
+    @ExcelNote(value = "模块")
+    private String moduleName;
+
+    @NotNull
+    @ExcelNote(value = "科目代码")
+    private String courseCode;
+
+    @NotNull
+    @ExcelNote(value = "试卷编号")
+    private String paperCode;
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getFormula() {
+        return formula;
+    }
+
+    public void setFormula(String formula) {
+        this.formula = formula;
+    }
+
+    public String getLevelDegree() {
+        return levelDegree;
+    }
+
+    public void setLevelDegree(String levelDegree) {
+        this.levelDegree = levelDegree;
+    }
+
+    public String getLevel() {
+        return level;
+    }
+
+    public void setLevel(String level) {
+        this.level = level;
+    }
+
+    public String getDiagnoseResult() {
+        return diagnoseResult;
+    }
+
+    public void setDiagnoseResult(String diagnoseResult) {
+        this.diagnoseResult = diagnoseResult;
+    }
+
+    public String getLearnAdvice() {
+        return learnAdvice;
+    }
+
+    public void setLearnAdvice(String learnAdvice) {
+        this.learnAdvice = learnAdvice;
+    }
+
+    public String getModuleName() {
+        return moduleName;
+    }
+
+    public void setModuleName(String moduleName) {
+        this.moduleName = moduleName;
+    }
+
+    public String getCourseCode() {
+        return courseCode;
+    }
+
+    public void setCourseCode(String courseCode) {
+        this.courseCode = courseCode;
+    }
+
+    public String getPaperCode() {
+        return paperCode;
+    }
+
+    public void setPaperCode(String paperCode) {
+        this.paperCode = paperCode;
+    }
+}

+ 109 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/excel/ModuleProficiencyDto.java

@@ -0,0 +1,109 @@
+package com.qmth.teachcloud.report.business.bean.dto.excel;
+
+
+import com.qmth.teachcloud.common.annotation.ExcelNote;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+/**
+ * @Description: 模块导入dto
+ * @Param:
+ * @return:
+ * @Author: wangliang
+ * @Date: 2020/12/10
+ */
+public class ModuleProficiencyDto implements Serializable {
+
+    @ExcelNote(value = "名称")
+    @NotNull
+    private String name;
+
+    @ExcelNote(value = "描述")
+    private String description;
+
+    @ExcelNote(value = "备注")
+    private String remark;
+
+    @ExcelNote(value = "二级维度的精熟度定义")
+    private String proficiency;
+
+    @ExcelNote(value = "熟练度范围")
+    private String proficiencyDegree;
+
+    @ExcelNote(value = "科目名称")
+    @NotNull
+    private String courseName;
+
+    @ExcelNote(value = "科目代码")
+    @NotNull
+    private String courseCode;
+
+    @ExcelNote(value = "试卷编号")
+    @NotNull
+    private String paperCode;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getProficiency() {
+        return proficiency;
+    }
+
+    public void setProficiency(String proficiency) {
+        this.proficiency = proficiency;
+    }
+
+    public String getProficiencyDegree() {
+        return proficiencyDegree;
+    }
+
+    public void setProficiencyDegree(String proficiencyDegree) {
+        this.proficiencyDegree = proficiencyDegree;
+    }
+
+    public String getCourseName() {
+        return courseName;
+    }
+
+    public void setCourseName(String courseName) {
+        this.courseName = courseName;
+    }
+
+    public String getCourseCode() {
+        return courseCode;
+    }
+
+    public void setCourseCode(String courseCode) {
+        this.courseCode = courseCode;
+    }
+
+    public String getPaperCode() {
+        return paperCode;
+    }
+
+    public void setPaperCode(String paperCode) {
+        this.paperCode = paperCode;
+    }
+}

+ 92 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/excel/PaperConfigDto.java

@@ -0,0 +1,92 @@
+package com.qmth.teachcloud.report.business.bean.dto.excel;
+
+import com.qmth.teachcloud.common.annotation.ExcelNote;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+public class PaperConfigDto implements Serializable {
+
+    @ExcelNote(value = "试卷编号")
+    @NotNull
+    private String paperType;
+
+    @ExcelNote(value = "是否赋分")
+    @NotNull
+    private String isAssigned;
+
+    @ExcelNote(value = "赋分系数")
+    private Object coefficient;
+
+    @ExcelNote(value = "及格分")
+    @NotNull
+    private String passScore;
+
+    @ExcelNote(value = "满分")
+    @NotNull
+    private String fullScore;
+
+    @ExcelNote(value = "科目名称")
+    @NotNull
+    private String courseName;
+
+    @ExcelNote(value = "科目代码")
+    @NotNull
+    private String courseCode;
+
+    public String getPaperType() {
+        return paperType;
+    }
+
+    public void setPaperType(String paperType) {
+        this.paperType = paperType;
+    }
+
+    public String getIsAssigned() {
+        return isAssigned;
+    }
+
+    public void setIsAssigned(String isAssigned) {
+        this.isAssigned = isAssigned;
+    }
+
+    public Object getCoefficient() {
+        return coefficient;
+    }
+
+    public void setCoefficient(Object coefficient) {
+        this.coefficient = coefficient;
+    }
+
+    public String getPassScore() {
+        return passScore;
+    }
+
+    public void setPassScore(String passScore) {
+        this.passScore = passScore;
+    }
+
+    public String getFullScore() {
+        return fullScore;
+    }
+
+    public void setFullScore(String fullScore) {
+        this.fullScore = fullScore;
+    }
+
+    public String getCourseName() {
+        return courseName;
+    }
+
+    public void setCourseName(String courseName) {
+        this.courseName = courseName;
+    }
+
+    public String getCourseCode() {
+        return courseCode;
+    }
+
+    public void setCourseCode(String courseCode) {
+        this.courseCode = courseCode;
+    }
+}

+ 149 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/excel/PaperStructDto.java

@@ -0,0 +1,149 @@
+package com.qmth.teachcloud.report.business.bean.dto.excel;
+
+
+import com.qmth.teachcloud.common.annotation.ExcelNote;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+public class PaperStructDto implements Serializable {
+
+    @ExcelNote(value = "试卷编号")
+    @NotNull
+    private String paperCode; //试卷类型
+
+    @ExcelNote(value = "题号类型")
+    @NotNull
+    private String numberType;
+
+    @ExcelNote(value = "大题号")
+    @NotNull
+    private String mainNumber; //大题号
+
+    @ExcelNote(value = "小题号")
+    @NotNull
+    private String subNumber; //小题号
+
+    @ExcelNote(value = "反应类型")
+    private String questionType; //题目类型
+
+    @ExcelNote(value = "题目满分")
+    @NotNull
+    private String fullScore; //题目满分
+
+    @ExcelNote(value = "计分规则")
+    private String scoreRules; //计分规则
+
+    @ExcelNote(value = "规则说明")
+    private String rulesDesc; //规则说明
+
+    @ExcelNote(value = "科目名称")
+    @NotNull
+    private String courseName; //试卷名称
+
+    @ExcelNote(value = "课程代码")
+    @NotNull
+    private String courseCode; //课程代码
+
+    @ExcelNote(value = "知识模块")
+    private String knowledgeDimension; //知识维度
+
+    @ExcelNote(value = "能力模块")
+    private String abilityDimension; //能力维度
+
+    public String getPaperCode() {
+        return paperCode;
+    }
+
+    public void setPaperCode(String paperCode) {
+        this.paperCode = paperCode;
+    }
+
+    public String getNumberType() {
+        return numberType;
+    }
+
+    public void setNumberType(String numberType) {
+        this.numberType = numberType;
+    }
+
+    public String getMainNumber() {
+        return mainNumber;
+    }
+
+    public void setMainNumber(String mainNumber) {
+        this.mainNumber = mainNumber;
+    }
+
+    public String getSubNumber() {
+        return subNumber;
+    }
+
+    public void setSubNumber(String subNumber) {
+        this.subNumber = subNumber;
+    }
+
+    public String getQuestionType() {
+        return questionType;
+    }
+
+    public void setQuestionType(String questionType) {
+        this.questionType = questionType;
+    }
+
+    public String getFullScore() {
+        return fullScore;
+    }
+
+    public void setFullScore(String fullScore) {
+        this.fullScore = fullScore;
+    }
+
+    public String getScoreRules() {
+        return scoreRules;
+    }
+
+    public void setScoreRules(String scoreRules) {
+        this.scoreRules = scoreRules;
+    }
+
+    public String getRulesDesc() {
+        return rulesDesc;
+    }
+
+    public void setRulesDesc(String rulesDesc) {
+        this.rulesDesc = rulesDesc;
+    }
+
+    public String getCourseName() {
+        return courseName;
+    }
+
+    public void setCourseName(String courseName) {
+        this.courseName = courseName;
+    }
+
+    public String getCourseCode() {
+        return courseCode;
+    }
+
+    public void setCourseCode(String courseCode) {
+        this.courseCode = courseCode;
+    }
+
+    public String getKnowledgeDimension() {
+        return knowledgeDimension;
+    }
+
+    public void setKnowledgeDimension(String knowledgeDimension) {
+        this.knowledgeDimension = knowledgeDimension;
+    }
+
+    public String getAbilityDimension() {
+        return abilityDimension;
+    }
+
+    public void setAbilityDimension(String abilityDimension) {
+        this.abilityDimension = abilityDimension;
+    }
+}

+ 155 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/query/BasicAnswerDto.java

@@ -0,0 +1,155 @@
+package com.qmth.teachcloud.report.business.bean.dto.query;
+
+import java.math.BigDecimal;
+
+/**
+ * @Description:
+ * @Author: CaoZixuan
+ * @Date:
+ */
+public class BasicAnswerDto {
+    private Long answerId;
+    private Long examRecordId;
+    private String numberType;
+    private String mainNumber;
+    private String subNumber;
+    private String answer;
+    private BigDecimal score;
+    private String path;
+    private Long time;
+    private Long examId;
+    private Long paperId;
+    private String paperType;
+    private Long examStudentId;
+    private BigDecimal subjectiveScore;
+    private BigDecimal objectiveScore;
+    private BigDecimal totalScore;
+
+    public Long getAnswerId() {
+        return answerId;
+    }
+
+    public void setAnswerId(Long answerId) {
+        this.answerId = answerId;
+    }
+
+    public Long getExamRecordId() {
+        return examRecordId;
+    }
+
+    public void setExamRecordId(Long examRecordId) {
+        this.examRecordId = examRecordId;
+    }
+
+    public String getNumberType() {
+        return numberType;
+    }
+
+    public void setNumberType(String numberType) {
+        this.numberType = numberType;
+    }
+
+    public String getMainNumber() {
+        return mainNumber;
+    }
+
+    public void setMainNumber(String mainNumber) {
+        this.mainNumber = mainNumber;
+    }
+
+    public String getSubNumber() {
+        return subNumber;
+    }
+
+    public void setSubNumber(String subNumber) {
+        this.subNumber = subNumber;
+    }
+
+    public String getAnswer() {
+        return answer;
+    }
+
+    public void setAnswer(String answer) {
+        this.answer = answer;
+    }
+
+    public BigDecimal getScore() {
+        return score;
+    }
+
+    public void setScore(BigDecimal score) {
+        this.score = score;
+    }
+
+    public String getPath() {
+        return path;
+    }
+
+    public void setPath(String path) {
+        this.path = path;
+    }
+
+    public Long getTime() {
+        return time;
+    }
+
+    public void setTime(Long time) {
+        this.time = time;
+    }
+
+    public Long getExamId() {
+        return examId;
+    }
+
+    public void setExamId(Long examId) {
+        this.examId = examId;
+    }
+
+    public Long getPaperId() {
+        return paperId;
+    }
+
+    public void setPaperId(Long paperId) {
+        this.paperId = paperId;
+    }
+
+    public String getPaperType() {
+        return paperType;
+    }
+
+    public void setPaperType(String paperType) {
+        this.paperType = paperType;
+    }
+
+    public Long getExamStudentId() {
+        return examStudentId;
+    }
+
+    public void setExamStudentId(Long examStudentId) {
+        this.examStudentId = examStudentId;
+    }
+
+    public BigDecimal getSubjectiveScore() {
+        return subjectiveScore;
+    }
+
+    public void setSubjectiveScore(BigDecimal subjectiveScore) {
+        this.subjectiveScore = subjectiveScore;
+    }
+
+    public BigDecimal getObjectiveScore() {
+        return objectiveScore;
+    }
+
+    public void setObjectiveScore(BigDecimal objectiveScore) {
+        this.objectiveScore = objectiveScore;
+    }
+
+    public BigDecimal getTotalScore() {
+        return totalScore;
+    }
+
+    public void setTotalScore(BigDecimal totalScore) {
+        this.totalScore = totalScore;
+    }
+}

+ 200 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/query/BasicExamRecordDto.java

@@ -0,0 +1,200 @@
+package com.qmth.teachcloud.report.business.bean.dto.query;
+
+import java.math.BigDecimal;
+
+/**
+ * @Description: 基础考试记录
+ * @Author: CaoZixuan
+ * @Date: 2021-06-04
+ */
+public class BasicExamRecordDto {
+    private Long examStudentId;
+    private Long examId;
+    private String studentName;
+    private Long studentId;
+    private String courseCode;
+    private String courseName;
+    private Long teachCollegeId;
+    private Long inspectCollegeId;
+    private Long clazzId;
+    private Long majorId;
+    private Long teacherId;
+    private String ticketNumber;
+    private String studentCode;
+    private Boolean absent;
+    private Boolean current;
+    private Long tbExamRecordId;
+    private Long paperId;
+    private String paperType;
+    private BigDecimal subjectiveScore;
+    private BigDecimal objectiveScore;
+    private BigDecimal totalScore;
+
+    public Long getExamStudentId() {
+        return examStudentId;
+    }
+
+    public void setExamStudentId(Long examStudentId) {
+        this.examStudentId = examStudentId;
+    }
+
+    public Long getExamId() {
+        return examId;
+    }
+
+    public void setExamId(Long examId) {
+        this.examId = examId;
+    }
+
+    public String getStudentName() {
+        return studentName;
+    }
+
+    public void setStudentName(String studentName) {
+        this.studentName = studentName;
+    }
+
+    public Long getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Long studentId) {
+        this.studentId = studentId;
+    }
+
+    public String getCourseCode() {
+        return courseCode;
+    }
+
+    public void setCourseCode(String courseCode) {
+        this.courseCode = courseCode;
+    }
+
+    public String getCourseName() {
+        return courseName;
+    }
+
+    public void setCourseName(String courseName) {
+        this.courseName = courseName;
+    }
+
+    public Long getTeachCollegeId() {
+        return teachCollegeId;
+    }
+
+    public void setTeachCollegeId(Long teachCollegeId) {
+        this.teachCollegeId = teachCollegeId;
+    }
+
+    public Long getInspectCollegeId() {
+        return inspectCollegeId;
+    }
+
+    public void setInspectCollegeId(Long inspectCollegeId) {
+        this.inspectCollegeId = inspectCollegeId;
+    }
+
+    public Long getClazzId() {
+        return clazzId;
+    }
+
+    public void setClazzId(Long clazzId) {
+        this.clazzId = clazzId;
+    }
+
+    public Long getMajorId() {
+        return majorId;
+    }
+
+    public void setMajorId(Long majorId) {
+        this.majorId = majorId;
+    }
+
+    public Long getTeacherId() {
+        return teacherId;
+    }
+
+    public void setTeacherId(Long teacherId) {
+        this.teacherId = teacherId;
+    }
+
+    public String getTicketNumber() {
+        return ticketNumber;
+    }
+
+    public void setTicketNumber(String ticketNumber) {
+        this.ticketNumber = ticketNumber;
+    }
+
+    public String getStudentCode() {
+        return studentCode;
+    }
+
+    public void setStudentCode(String studentCode) {
+        this.studentCode = studentCode;
+    }
+
+    public Boolean getAbsent() {
+        return absent;
+    }
+
+    public void setAbsent(Boolean absent) {
+        this.absent = absent;
+    }
+
+    public Boolean getCurrent() {
+        return current;
+    }
+
+    public void setCurrent(Boolean current) {
+        this.current = current;
+    }
+
+    public Long getTbExamRecordId() {
+        return tbExamRecordId;
+    }
+
+    public void setTbExamRecordId(Long tbExamRecordId) {
+        this.tbExamRecordId = tbExamRecordId;
+    }
+
+    public Long getPaperId() {
+        return paperId;
+    }
+
+    public void setPaperId(Long paperId) {
+        this.paperId = paperId;
+    }
+
+    public String getPaperType() {
+        return paperType;
+    }
+
+    public void setPaperType(String paperType) {
+        this.paperType = paperType;
+    }
+
+    public BigDecimal getSubjectiveScore() {
+        return subjectiveScore;
+    }
+
+    public void setSubjectiveScore(BigDecimal subjectiveScore) {
+        this.subjectiveScore = subjectiveScore;
+    }
+
+    public BigDecimal getObjectiveScore() {
+        return objectiveScore;
+    }
+
+    public void setObjectiveScore(BigDecimal objectiveScore) {
+        this.objectiveScore = objectiveScore;
+    }
+
+    public BigDecimal getTotalScore() {
+        return totalScore;
+    }
+
+    public void setTotalScore(BigDecimal totalScore) {
+        this.totalScore = totalScore;
+    }
+}

+ 36 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/query/TBSchoolClazzDto.java

@@ -0,0 +1,36 @@
+package com.qmth.teachcloud.report.business.bean.dto.query;
+
+/**
+ * @Description:
+ * @Author: CaoZixuan
+ * @Date:
+ */
+public class TBSchoolClazzDto {
+    private Long schoolId;
+    private String clazzName;
+    private String clazzCode;
+
+    public Long getSchoolId() {
+        return schoolId;
+    }
+
+    public void setSchoolId(Long schoolId) {
+        this.schoolId = schoolId;
+    }
+
+    public String getClazzName() {
+        return clazzName;
+    }
+
+    public void setClazzName(String clazzName) {
+        this.clazzName = clazzName;
+    }
+
+    public String getClazzCode() {
+        return clazzCode;
+    }
+
+    public void setClazzCode(String clazzCode) {
+        this.clazzCode = clazzCode;
+    }
+}

+ 36 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/query/TBSchoolCollegeDto.java

@@ -0,0 +1,36 @@
+package com.qmth.teachcloud.report.business.bean.dto.query;
+
+/**
+ * @Description:
+ * @Author: CaoZixuan
+ * @Date:
+ */
+public class TBSchoolCollegeDto {
+    private Long schoolId;
+    private String collegeName;
+    private String collegeCode;
+
+    public Long getSchoolId() {
+        return schoolId;
+    }
+
+    public void setSchoolId(Long schoolId) {
+        this.schoolId = schoolId;
+    }
+
+    public String getCollegeName() {
+        return collegeName;
+    }
+
+    public void setCollegeName(String collegeName) {
+        this.collegeName = collegeName;
+    }
+
+    public String getCollegeCode() {
+        return collegeCode;
+    }
+
+    public void setCollegeCode(String collegeCode) {
+        this.collegeCode = collegeCode;
+    }
+}

+ 36 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/query/TBSchoolMajorDto.java

@@ -0,0 +1,36 @@
+package com.qmth.teachcloud.report.business.bean.dto.query;
+
+/**
+ * @Description:
+ * @Author: CaoZixuan
+ * @Date:
+ */
+public class TBSchoolMajorDto {
+    private Long schoolId;
+    private String majorName;
+    private String majorCode;
+
+    public Long getSchoolId() {
+        return schoolId;
+    }
+
+    public void setSchoolId(Long schoolId) {
+        this.schoolId = schoolId;
+    }
+
+    public String getMajorName() {
+        return majorName;
+    }
+
+    public void setMajorName(String majorName) {
+        this.majorName = majorName;
+    }
+
+    public String getMajorCode() {
+        return majorCode;
+    }
+
+    public void setMajorCode(String majorCode) {
+        this.majorCode = majorCode;
+    }
+}

+ 36 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/query/TBSchoolTeacherDto.java

@@ -0,0 +1,36 @@
+package com.qmth.teachcloud.report.business.bean.dto.query;
+
+/**
+ * @Description:
+ * @Author: CaoZixuan
+ * @Date:
+ */
+public class TBSchoolTeacherDto {
+    private Long schoolId;
+    private String teacherCode;
+    private String teacherName;
+
+    public Long getSchoolId() {
+        return schoolId;
+    }
+
+    public void setSchoolId(Long schoolId) {
+        this.schoolId = schoolId;
+    }
+
+    public String getTeacherCode() {
+        return teacherCode;
+    }
+
+    public void setTeacherCode(String teacherCode) {
+        this.teacherCode = teacherCode;
+    }
+
+    public String getTeacherName() {
+        return teacherName;
+    }
+
+    public void setTeacherName(String teacherName) {
+        this.teacherName = teacherName;
+    }
+}

+ 110 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/query/ValidAnswerDetailDto.java

@@ -0,0 +1,110 @@
+package com.qmth.teachcloud.report.business.bean.dto.query;
+
+import java.math.BigDecimal;
+
+/**
+ * @Description:
+ * @Author: CaoZixuan
+ * @Date:
+ */
+public class ValidAnswerDetailDto {
+    private Long answerId;
+    private Long examRecordId;
+    private String numberType;
+    private String mainNumber;
+    private String subNumber;
+    private BigDecimal score;
+    private Long taExamRecordId;
+    private int percentGrade;
+    private Long paperId;
+    private String paperType;
+    private int rank;
+
+    public Long getAnswerId() {
+        return answerId;
+    }
+
+    public void setAnswerId(Long answerId) {
+        this.answerId = answerId;
+    }
+
+    public Long getExamRecordId() {
+        return examRecordId;
+    }
+
+    public void setExamRecordId(Long examRecordId) {
+        this.examRecordId = examRecordId;
+    }
+
+    public String getNumberType() {
+        return numberType;
+    }
+
+    public void setNumberType(String numberType) {
+        this.numberType = numberType;
+    }
+
+    public String getMainNumber() {
+        return mainNumber;
+    }
+
+    public void setMainNumber(String mainNumber) {
+        this.mainNumber = mainNumber;
+    }
+
+    public String getSubNumber() {
+        return subNumber;
+    }
+
+    public void setSubNumber(String subNumber) {
+        this.subNumber = subNumber;
+    }
+
+    public BigDecimal getScore() {
+        return score;
+    }
+
+    public void setScore(BigDecimal score) {
+        this.score = score;
+    }
+
+    public Long getTaExamRecordId() {
+        return taExamRecordId;
+    }
+
+    public void setTaExamRecordId(Long taExamRecordId) {
+        this.taExamRecordId = taExamRecordId;
+    }
+
+    public int getPercentGrade() {
+        return percentGrade;
+    }
+
+    public void setPercentGrade(int percentGrade) {
+        this.percentGrade = percentGrade;
+    }
+
+    public Long getPaperId() {
+        return paperId;
+    }
+
+    public void setPaperId(Long paperId) {
+        this.paperId = paperId;
+    }
+
+    public String getPaperType() {
+        return paperType;
+    }
+
+    public void setPaperType(String paperType) {
+        this.paperType = paperType;
+    }
+
+    public int getRank() {
+        return rank;
+    }
+
+    public void setRank(int rank) {
+        this.rank = rank;
+    }
+}

+ 171 - 15
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/entity/TAExamCourseRecord.java

@@ -28,7 +28,7 @@ public class TAExamCourseRecord implements Serializable {
     @TableId(value = "id")
     private Long id;
 
-    @ApiModelProperty(value = "学校id(冗余)")
+    @ApiModelProperty(value = "学校id")
     @JsonSerialize(using = ToStringSerializer.class)
     @TableField(value = "school_id")
     private Long schoolId;
@@ -44,7 +44,7 @@ public class TAExamCourseRecord implements Serializable {
 
     @ApiModelProperty(value = "百分位等级")
     @TableField(value = "percent_grade")
-    private String percentGrade;
+    private Integer percentGrade;
 
     @ApiModelProperty(value = "得分水平 ABCDE")
     @TableField(value = "score_level")
@@ -66,17 +66,61 @@ public class TAExamCourseRecord implements Serializable {
     @TableField(value = "standardized_coefficients")
     private BigDecimal standardizedCoefficients;
 
-    @ApiModelProperty(value = "是否应届")
-    @TableField(value = "current")
-    private Integer current;
+    @ApiModelProperty(value = "考试id")
+    @TableField(value = "exam_id")
+    private Long examId;
 
-    public Long getSchoolId() {
-        return schoolId;
-    }
+    @ApiModelProperty(value = "课程编号")
+    @TableField(value = "course_code")
+    private String courseCode;
 
-    public void setSchoolId(Long schoolId) {
-        this.schoolId = schoolId;
-    }
+    @ApiModelProperty(value = "试卷id")
+    @TableField(value = "paper_id")
+    private Long paperId;
+
+    @ApiModelProperty(value = "试卷类型")
+    @TableField(value = "paper_type")
+    private String paperType;
+
+    @ApiModelProperty(value = "学生id")
+    @TableField(value = "student_id")
+    private Long studentId;
+
+    @ApiModelProperty(value = "学生编号")
+    @TableField(value = "student_code")
+    private String studentCode;
+
+    @ApiModelProperty(value = "教师id")
+    @TableField(value = "teacher_id")
+    private Long teacherId;
+
+    @ApiModelProperty(value = "班级id")
+    @TableField(value = "clazz_id")
+    private Long clazzId;
+
+    @ApiModelProperty(value = "开课学院id")
+    @TableField(value = "teach_college_id")
+    private Long teachCollegeId;
+
+    @ApiModelProperty(value = "考察学院id")
+    @TableField(value = "inspect_college_id")
+    private Long inspectCollegeId;
+
+    @ApiModelProperty(value = "专业id")
+    @TableField(value = "major_id")
+    private Long majorId;
+
+    @ApiModelProperty(value = "卷面成绩")
+    @TableField(value = "total_score")
+    private BigDecimal totalScore;
+
+    @ApiModelProperty(value = "是否缺考")
+    @TableField(value = "absent")
+    private Boolean absent;
+
+    @ApiModelProperty(value = "是否应届")
+    @TableField(value = "current")
+    private Boolean current;
 
     public static long getSerialVersionUID() {
         return serialVersionUID;
@@ -106,11 +150,11 @@ public class TAExamCourseRecord implements Serializable {
         this.assignedScore = assignedScore;
     }
 
-    public String getPercentGrade() {
+    public Integer getPercentGrade() {
         return percentGrade;
     }
 
-    public void setPercentGrade(String percentGrade) {
+    public void setPercentGrade(Integer percentGrade) {
         this.percentGrade = percentGrade;
     }
 
@@ -154,11 +198,123 @@ public class TAExamCourseRecord implements Serializable {
         this.standardizedCoefficients = standardizedCoefficients;
     }
 
-    public Integer getCurrent() {
+    public Long getExamId() {
+        return examId;
+    }
+
+    public void setExamId(Long examId) {
+        this.examId = examId;
+    }
+
+    public String getCourseCode() {
+        return courseCode;
+    }
+
+    public void setCourseCode(String courseCode) {
+        this.courseCode = courseCode;
+    }
+
+    public Long getPaperId() {
+        return paperId;
+    }
+
+    public void setPaperId(Long paperId) {
+        this.paperId = paperId;
+    }
+
+    public String getPaperType() {
+        return paperType;
+    }
+
+    public void setPaperType(String paperType) {
+        this.paperType = paperType;
+    }
+
+    public Long getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Long studentId) {
+        this.studentId = studentId;
+    }
+
+    public String getStudentCode() {
+        return studentCode;
+    }
+
+    public void setStudentCode(String studentCode) {
+        this.studentCode = studentCode;
+    }
+
+    public Long getTeacherId() {
+        return teacherId;
+    }
+
+    public void setTeacherId(Long teacherId) {
+        this.teacherId = teacherId;
+    }
+
+    public Long getClazzId() {
+        return clazzId;
+    }
+
+    public void setClazzId(Long clazzId) {
+        this.clazzId = clazzId;
+    }
+
+    public Long getTeachCollegeId() {
+        return teachCollegeId;
+    }
+
+    public void setTeachCollegeId(Long teachCollegeId) {
+        this.teachCollegeId = teachCollegeId;
+    }
+
+    public Long getInspectCollegeId() {
+        return inspectCollegeId;
+    }
+
+    public void setInspectCollegeId(Long inspectCollegeId) {
+        this.inspectCollegeId = inspectCollegeId;
+    }
+
+    public Long getMajorId() {
+        return majorId;
+    }
+
+    public void setMajorId(Long majorId) {
+        this.majorId = majorId;
+    }
+
+    public BigDecimal getTotalScore() {
+        return totalScore;
+    }
+
+    public void setTotalScore(BigDecimal totalScore) {
+        this.totalScore = totalScore;
+    }
+
+    public Boolean getAbsent() {
+        return absent;
+    }
+
+    public void setAbsent(Boolean absent) {
+        this.absent = absent;
+    }
+
+    public Boolean getCurrent() {
         return current;
     }
 
-    public void setCurrent(Integer current) {
+    public void setCurrent(Boolean current) {
         this.current = current;
     }
+
+    public Long getSchoolId() {
+        return schoolId;
+    }
+
+    public void setSchoolId(Long schoolId) {
+        this.schoolId = schoolId;
+    }
 }

+ 16 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/entity/TBCommonLevelConfig.java

@@ -64,6 +64,22 @@ public class TBCommonLevelConfig implements Serializable {
     @TableField(value = "max")
     private BigDecimal max;
 
+    public TBCommonLevelConfig(Long id, Long examId, String courseCode, String courseName, String levelType, String level, String scope, String interpret, BigDecimal min, BigDecimal max) {
+        this.id = id;
+        this.examId = examId;
+        this.courseCode = courseCode;
+        this.courseName = courseName;
+        this.levelType = levelType;
+        this.level = level;
+        this.scope = scope;
+        this.interpret = interpret;
+        this.min = min;
+        this.max = max;
+    }
+
+    public TBCommonLevelConfig() {
+    }
+
     public static long getSerialVersionUID() {
         return serialVersionUID;
     }

+ 15 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/entity/TBCommonRankLevelConfig.java

@@ -61,6 +61,21 @@ public class TBCommonRankLevelConfig implements Serializable {
     @TableField(value = "interpret")
     private String interpret;
 
+    public TBCommonRankLevelConfig(Long id, Long examId, String courseCode, String courseName, String level, BigDecimal min, BigDecimal max, String scope, String interpret) {
+        this.id = id;
+        this.examId = examId;
+        this.courseCode = courseCode;
+        this.courseName = courseName;
+        this.level = level;
+        this.min = min;
+        this.max = max;
+        this.scope = scope;
+        this.interpret = interpret;
+    }
+
+    public TBCommonRankLevelConfig() {
+    }
+
     public static long getSerialVersionUID() {
         return serialVersionUID;
     }

+ 4 - 3
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/entity/TBPaper.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import com.qmth.teachcloud.report.business.enums.AssignEnum;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
@@ -67,7 +68,7 @@ public class TBPaper implements Serializable {
 
     @ApiModelProperty(value = "赋分类型\n1.NEED_ASSIGN_SCORE('是','需要且按照公式赋分')\n2.NO_NEED_ASSIGN_SCORE('否','不需要赋分,标准分即为赋分')\n3.SPECIAL_ASSIGN_SCORE('特殊赋分','特殊赋分,按照excel表进行赋分')")
     @TableField(value = "score_type")
-    private String scoreType;
+    private AssignEnum scoreType;
 
     public static long getSerialVersionUID() {
         return serialVersionUID;
@@ -153,11 +154,11 @@ public class TBPaper implements Serializable {
         this.passScore = passScore;
     }
 
-    public String getScoreType() {
+    public AssignEnum getScoreType() {
         return scoreType;
     }
 
-    public void setScoreType(String scoreType) {
+    public void setScoreType(AssignEnum scoreType) {
         this.scoreType = scoreType;
     }
 }

+ 44 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/enums/AssignEnum.java

@@ -0,0 +1,44 @@
+package com.qmth.teachcloud.report.business.enums;
+
+
+import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public enum AssignEnum {
+    NEED_ASSIGN_SCORE("是","需要且按照公式赋分"),
+    NO_NEED_ASSIGN_SCORE("否","不需要赋分,标准分即为赋分"),
+    SPECIAL_ASSIGN_SCORE("特殊赋分","特殊赋分,按照excel表进行赋分"),
+    ;
+    private final String type;
+    private final String desc;
+
+    AssignEnum(String type, String desc) {
+        this.type = type;
+        this.desc = desc;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public String getDesc() {
+        return desc;
+    }
+
+    /**
+     * 根据枚举类属性type查找枚举类
+     * @param type 赋分类型
+     * @return 枚举类
+     */
+    public static AssignEnum convertToEnum(String type){
+        List<AssignEnum> assignEnumList = Arrays.stream(AssignEnum.values())
+                .filter(e -> type.equals(e.getType())).distinct().collect(Collectors.toList());
+        if (assignEnumList.size() != 1){
+            throw ExceptionResultEnum.ERROR.exception("赋分类型不属于现有类型" + "[" + type + "]");
+        }
+        return assignEnumList.get(0);
+    }
+}

+ 41 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/enums/ExamCloudDataEnum.java

@@ -0,0 +1,41 @@
+package com.qmth.teachcloud.report.business.enums;
+
+public enum ExamCloudDataEnum {
+    EXAM_ID("examId","考试id"),
+    EXAM_CODE("examCode","考试标识"),
+    EXAM_NUMBER("examNumber","准考证号"),
+    STUDENT_CODE("studentCode","学号"),
+    NAME("name","名称"),
+    SUBJECT_CODE("subjectCode","科目代码"),
+    SUBJECT_NAME("subjectName","科目名称"),
+    PAPER_TYPE("paperType","试卷类型"),
+    COLLEGE("college","学院"),
+    CLASS_NAME("className","班级名称"),
+    TEACHER("teacher","教师"),
+    STATUS("status","学生考试状态(1-正常,2-缺考(包含未上传),3-违纪)"),
+    SHEET_URLS("sheetUrls","(status!=1时数组为空)"),
+    TOTAL_SCORE("totalScore","考生总分"),
+    OBJECTIVE_SCORE("objectiveScore","客观题总分"),
+    SUBJECTIVE_SCORE("subjectiveScore","主观题总分"),
+    OBJECTIVE_SCORE_DETAIL("objectiveScoreDetail","客观题答题明细"),
+    SUBJECTIVE_SCORE_DETAIL("subjectiveScoreDetail","主观题答题明细"),
+    SCORE("score","分数"),
+    MAIN_NUMBER("mainNumber","大题号"),
+    SUB_NUMBER("subNumber","小题号"),
+    ANSWER("answer","考生作答答案(客观题才记录)"),
+    ;
+    ExamCloudDataEnum(String name, String desc){
+        this.name = name;
+        this.desc = desc;
+    }
+    private final String name;
+    private final String desc;
+
+    public String getName() {
+        return name;
+    }
+
+    public String getDesc() {
+        return desc;
+    }
+}

+ 24 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/enums/NumberTypeEnum.java

@@ -0,0 +1,24 @@
+package com.qmth.teachcloud.report.business.enums;
+
+
+public enum NumberTypeEnum {
+    OBJECTIVE("客观题","选择判断,客观题内大题号 + 小题号唯一"),
+    SUBJECTIVE("主观题","非选择判断,主观题内大题号 + 小题号唯一"),
+    ;
+
+    NumberTypeEnum(String value, String desc) {
+        this.value = value;
+        this.desc = desc;
+    }
+
+    private final String value;
+    private final String desc;
+
+    public String getValue() {
+        return value;
+    }
+
+    public String getDesc() {
+        return desc;
+    }
+}

+ 11 - 1
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/mapper/TBExamRecordMapper.java

@@ -1,7 +1,11 @@
 package com.qmth.teachcloud.report.business.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.qmth.teachcloud.report.business.bean.dto.query.BasicExamRecordDto;
 import com.qmth.teachcloud.report.business.entity.TBExamRecord;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
  * <p>
@@ -12,5 +16,11 @@ import com.qmth.teachcloud.report.business.entity.TBExamRecord;
  * @since 2021-06-01
  */
 public interface TBExamRecordMapper extends BaseMapper<TBExamRecord> {
-
+    /**
+     * 根据考试id和课程编号集合查询考试作答记录
+     * @param examId 考试id
+     * @param courseCodeS 课程代码
+     * @return 考试记录集合
+     */
+    List<BasicExamRecordDto> findByExamIdAndCourseCodeS(@Param("examId") Long examId, @Param("courseCodes") List<String> courseCodeS);
 }

+ 24 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/NewCallApiService.java

@@ -0,0 +1,24 @@
+package com.qmth.teachcloud.report.business.service;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 云阅卷调用服务
+ * @Param:
+ * @return:
+ * @Author: wangliang
+ * @Date: 2020/12/15
+ */
+public interface NewCallApiService {
+
+    /**
+     * 根据考试id或考试编码调用云阅卷学生成绩接口
+     *
+     * @param examId
+     * @param examCode
+     * @return
+     */
+    List<Map> callStudentScore(Long examId, String examCode) throws IOException;
+}

+ 1 - 1
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TBCommonLevelConfigService.java

@@ -12,5 +12,5 @@ import com.qmth.teachcloud.report.business.entity.TBCommonLevelConfig;
  * @since 2021-06-01
  */
 public interface TBCommonLevelConfigService extends IService<TBCommonLevelConfig> {
-
+    void importLevelConfig(Long examId,String courseCode,String courseName);
 }

+ 1 - 1
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TBCommonRankLevelConfigService.java

@@ -12,5 +12,5 @@ import com.qmth.teachcloud.report.business.entity.TBCommonRankLevelConfig;
  * @since 2021-06-01
  */
 public interface TBCommonRankLevelConfigService extends IService<TBCommonRankLevelConfig> {
-
+    void importRankLevelConfig(Long examId,String courseCode,String courseName);
 }

+ 12 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TBExamCourseService.java

@@ -3,6 +3,8 @@ package com.qmth.teachcloud.report.business.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.qmth.teachcloud.report.business.entity.TBExamCourse;
 
+import java.util.List;
+
 /**
  * <p>
  * 考试科目表 服务类
@@ -12,5 +14,15 @@ import com.qmth.teachcloud.report.business.entity.TBExamCourse;
  * @since 2021-06-02
  */
 public interface TBExamCourseService extends IService<TBExamCourse> {
+    /**
+     * 校验该考试科目是否不能继续进行教研分析流程
+     * @param examId 考试id
+     * @param schoolId 学校id
+     * @param courseCode 课程编号
+     * @param courseName 课程名称
+     * @return 是
+     */
+    boolean verifyExamCourseCantRun(Long examId, Long schoolId, String courseCode, String courseName);
 
+    List<String> findEffectiveByExamId(Long examId, String courseCode);
 }

+ 10 - 1
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TBExamRecordService.java

@@ -1,8 +1,11 @@
 package com.qmth.teachcloud.report.business.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.qmth.teachcloud.report.business.bean.dto.query.BasicExamRecordDto;
 import com.qmth.teachcloud.report.business.entity.TBExamRecord;
 
+import java.util.List;
+
 /**
  * <p>
  * 考生考试记录 服务类
@@ -12,5 +15,11 @@ import com.qmth.teachcloud.report.business.entity.TBExamRecord;
  * @since 2021-06-01
  */
 public interface TBExamRecordService extends IService<TBExamRecord> {
-
+    /**
+     * 根据考试id和课程编号查找基础考试记录信息
+     * @param examId 考试id
+     * @param courseCodeS 课程编号
+     * @return 考试作答记录
+     */
+    List<BasicExamRecordDto> findByExamIdAndCourseCodeS(Long examId, List<String> courseCodeS);
 }

+ 6 - 1
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TBExamService.java

@@ -12,5 +12,10 @@ import com.qmth.teachcloud.report.business.entity.TBExam;
  * @since 2021-06-01
  */
 public interface TBExamService extends IService<TBExam> {
-
+    /**
+     * 根据云阅卷考试id查找教研分析考试信息
+     * @param cloudExamId 云阅卷考试id
+     * @return 教研分析考试信息
+     */
+    TBExam findByCloudExamId(Long cloudExamId);
 }

+ 9 - 1
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TBPaperService.java

@@ -12,5 +12,13 @@ import com.qmth.teachcloud.report.business.entity.TBPaper;
  * @since 2021-06-01
  */
 public interface TBPaperService extends IService<TBPaper> {
-
+    /**
+     * 根据外键查询基础试卷信息
+     * @param examId 考试id
+     * @param courseCode 课程编码
+     * @param courseName 课程名称
+     * @param paperType 试卷类型
+     * @return 试卷信息
+     */
+    TBPaper findByForeignKey(Long examId,String courseCode,String courseName,String paperType);
 }

+ 8 - 1
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TBSchoolClazzService.java

@@ -12,5 +12,12 @@ import com.qmth.teachcloud.report.business.entity.TBSchoolClazz;
  * @since 2021-06-01
  */
 public interface TBSchoolClazzService extends IService<TBSchoolClazz> {
-
+    /**
+     * 根据学校id,班级编号和名称查询课程基础数据
+     * @param schoolId 学校id
+     * @param clazzCode 班级编号
+     * @param clazzName 班级名称
+     * @return 基础班级数据
+     */
+    TBSchoolClazz findByForeignKey(Long schoolId,String clazzCode,String clazzName);
 }

+ 87 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/NewCallApiServiceImpl.java

@@ -0,0 +1,87 @@
+package com.qmth.teachcloud.report.business.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.qmth.boot.tools.signature.SignatureEntity;
+import com.qmth.boot.tools.signature.SignatureType;
+import com.qmth.teachcloud.common.config.DictionaryConfig;
+import com.qmth.teachcloud.common.contant.SystemConstant;
+import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
+import com.qmth.teachcloud.common.util.HttpUtil;
+import com.qmth.teachcloud.report.business.entity.TBCloudExam;
+import com.qmth.teachcloud.report.business.service.NewCallApiService;
+import com.qmth.teachcloud.report.business.service.TBCloudExamService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.io.IOException;
+import java.util.*;
+
+/**
+ * @Description: 云阅卷调用服务api
+ * @Param:
+ * @return:
+ * @Author: wangliang
+ * @Date: 2020/12/15
+ */
+@Service
+public class NewCallApiServiceImpl implements NewCallApiService {
+    private final static Logger log = LoggerFactory.getLogger(NewCallApiServiceImpl.class);
+
+    @Resource
+    DictionaryConfig dictionaryConfig;
+
+    @Resource
+    TBCloudExamService tbCloudExamService;
+
+    /**
+     * 根据考试id或考试编码调用云阅卷学生成绩接口
+     *
+     * @param examId
+     * @param examCode
+     * @return
+     */
+    @Override
+    public List<Map> callStudentScore(Long examId, String examCode) throws IOException {
+        String url = dictionaryConfig.yunMarkDomain().getUrl() + dictionaryConfig.yunMarkDomain().getStudentScoreApi();
+        Map<String, Object> params = new HashMap<>();
+        if (Objects.nonNull(examId)) {
+            params.put("examId", examId);
+        } else if (Objects.nonNull(examCode)) {
+            params.put("examCode", examCode);
+        }
+        TBCloudExam tbCloudExam = tbCloudExamService.getById(examId);
+        if (Objects.isNull(tbCloudExam)) {
+            throw ExceptionResultEnum.ERROR.exception("找不到该考试");
+        }
+        int pageNumber = 1;
+        int pageSize = 100;
+        List<Map> students = null;
+        for (; ; ) {
+            params.put("pageNumber", pageNumber);
+            params.put("pageSize", pageSize);
+            Long timestamp = System.currentTimeMillis();
+            String accessToken = SignatureEntity.build(SignatureType.SECRET, SystemConstant.METHOD, dictionaryConfig.yunMarkDomain().getStudentScoreApi(), timestamp, tbCloudExam.getAccessKey(), tbCloudExam.getAccessSecret());
+            String result = HttpUtil.post(url, params, accessToken, timestamp);
+            if (Objects.nonNull(result)) {
+                if (result.contains("HTTP")) {
+                    throw ExceptionResultEnum.ERROR.exception("云阅卷鉴权失败");
+                }
+                List<Map> tempList = JSONObject.parseArray(JSONObject.toJSON(result).toString(), Map.class);
+                if (Objects.nonNull(tempList) && tempList.size() > 0) {
+                    if (Objects.isNull(students)) {
+                        students = new ArrayList<>();
+                    }
+                    students.addAll(tempList);
+                    pageNumber++;
+                } else {
+                    break;
+                }
+            } else {
+                break;
+            }
+        }
+        return students;
+    }
+}

+ 31 - 1
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBCommonLevelConfigServiceImpl.java

@@ -1,11 +1,17 @@
 package com.qmth.teachcloud.report.business.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.report.business.entity.TBCommonLevelConfig;
 import com.qmth.teachcloud.report.business.mapper.TBCommonLevelConfigMapper;
 import com.qmth.teachcloud.report.business.service.TBCommonLevelConfigService;
 import org.springframework.stereotype.Service;
 
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * <p>
  * 等级配置表(试卷难易度、成绩在学院排名百分比) 服务实现类
@@ -16,5 +22,29 @@ import org.springframework.stereotype.Service;
  */
 @Service
 public class TBCommonLevelConfigServiceImpl extends ServiceImpl<TBCommonLevelConfigMapper, TBCommonLevelConfig> implements TBCommonLevelConfigService {
-
+    @Override
+    public void importLevelConfig(Long examId, String courseCode, String courseName) {
+        List<TBCommonLevelConfig> list = new ArrayList<>();
+        TBCommonLevelConfig config0 = new TBCommonLevelConfig(SystemConstant.getDbUuid(),examId,courseCode,courseName,"难度等级","A","[0,0.3)","难",new BigDecimal("0"),new BigDecimal("0.3"));
+        TBCommonLevelConfig config1 = new TBCommonLevelConfig(SystemConstant.getDbUuid(),examId,courseCode,courseName,"难度等级","B","[0.3,0.7]","中等难度",new BigDecimal("0.3"),new BigDecimal("0.7"));
+        TBCommonLevelConfig config2 = new TBCommonLevelConfig(SystemConstant.getDbUuid(),examId,courseCode,courseName,"难度等级","C","(0.7,1]","容易",new BigDecimal("0.7"),new BigDecimal("1"));
+        TBCommonLevelConfig config3 = new TBCommonLevelConfig(SystemConstant.getDbUuid(),examId,courseCode,courseName,"百分等级","A","[80,100)","A",new BigDecimal("80"),new BigDecimal("100"));
+        TBCommonLevelConfig config4 = new TBCommonLevelConfig(SystemConstant.getDbUuid(),examId,courseCode,courseName,"百分等级","B","[60,80)","B",new BigDecimal("60"),new BigDecimal("80"));
+        TBCommonLevelConfig config5 = new TBCommonLevelConfig(SystemConstant.getDbUuid(),examId,courseCode,courseName,"百分等级","C","[40,60)","C",new BigDecimal("40"),new BigDecimal("60"));
+        TBCommonLevelConfig config6 = new TBCommonLevelConfig(SystemConstant.getDbUuid(),examId,courseCode,courseName,"百分等级","D","[20,40)","D",new BigDecimal("20"),new BigDecimal("40"));
+        TBCommonLevelConfig config7 = new TBCommonLevelConfig(SystemConstant.getDbUuid(),examId,courseCode,courseName,"百分等级","E","[0,20)","E",new BigDecimal("0"),new BigDecimal("20"));
+        list.add(config0);
+        list.add(config1);
+        list.add(config2);
+        list.add(config3);
+        list.add(config4);
+        list.add(config5);
+        list.add(config6);
+        list.add(config7);
+        this.remove(new QueryWrapper<TBCommonLevelConfig>().lambda()
+                .eq(TBCommonLevelConfig::getExamId,examId)
+                .eq(TBCommonLevelConfig::getCourseCode,courseCode)
+                .eq(TBCommonLevelConfig::getCourseName,courseName));
+        this.saveBatch(list);
+    }
 }

+ 22 - 1
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBCommonRankLevelConfigServiceImpl.java

@@ -1,10 +1,17 @@
 package com.qmth.teachcloud.report.business.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.report.business.entity.TBCommonRankLevelConfig;
 import com.qmth.teachcloud.report.business.mapper.TBCommonRankLevelConfigMapper;
 import com.qmth.teachcloud.report.business.service.TBCommonRankLevelConfigService;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * <p>
@@ -16,5 +23,19 @@ import org.springframework.stereotype.Service;
  */
 @Service
 public class TBCommonRankLevelConfigServiceImpl extends ServiceImpl<TBCommonRankLevelConfigMapper, TBCommonRankLevelConfig> implements TBCommonRankLevelConfigService {
-
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public void importRankLevelConfig(Long examId, String courseCode, String courseName) {
+        List<TBCommonRankLevelConfig> list = new ArrayList<>();
+        list.add(new TBCommonRankLevelConfig(SystemConstant.getDbUuid(),examId,courseCode,courseName,"A",new BigDecimal(80),new BigDecimal(100),"(0,0.20]","赋分在学院的排名在该范围"));
+        list.add(new TBCommonRankLevelConfig(SystemConstant.getDbUuid(),examId,courseCode,courseName,"B",new BigDecimal(60),new BigDecimal(80),"(0.20,0.40]","赋分在学院的排名在该范围"));
+        list.add(new TBCommonRankLevelConfig(SystemConstant.getDbUuid(),examId,courseCode,courseName,"C",new BigDecimal(40),new BigDecimal(60),"(0.40,0.60]","赋分在学院的排名在该范围"));
+        list.add(new TBCommonRankLevelConfig(SystemConstant.getDbUuid(),examId,courseCode,courseName,"D",new BigDecimal(20),new BigDecimal(40),"(0.60,0.80]","赋分在学院的排名在该范围"));
+        list.add(new TBCommonRankLevelConfig(SystemConstant.getDbUuid(),examId,courseCode,courseName,"E",new BigDecimal(0),new BigDecimal(20),"(0.80,1]","赋分在学院的排名在该范围"));
+        this.remove(new QueryWrapper<TBCommonRankLevelConfig>().lambda()
+                .eq(TBCommonRankLevelConfig::getExamId,examId)
+                .eq(TBCommonRankLevelConfig::getCourseCode,courseCode)
+                .eq(TBCommonRankLevelConfig::getCourseName,courseName));
+        this.saveBatch(list);
+    }
 }

+ 62 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBExamCourseServiceImpl.java

@@ -1,11 +1,22 @@
 package com.qmth.teachcloud.report.business.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.teachcloud.common.entity.BasicCourse;
+import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
+import com.qmth.teachcloud.common.service.BasicCourseService;
 import com.qmth.teachcloud.report.business.entity.TBExamCourse;
+import com.qmth.teachcloud.report.business.enums.PublishStatusEnum;
+import com.qmth.teachcloud.report.business.enums.TestStatusEnum;
 import com.qmth.teachcloud.report.business.mapper.TBExamCourseMapper;
 import com.qmth.teachcloud.report.business.service.TBExamCourseService;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
 /**
  * <p>
  * 考试科目表 服务实现类
@@ -16,5 +27,56 @@ import org.springframework.stereotype.Service;
  */
 @Service
 public class TBExamCourseServiceImpl extends ServiceImpl<TBExamCourseMapper, TBExamCourse> implements TBExamCourseService {
+    @Resource
+    private BasicCourseService basicCourseService;
+
+    @Override
+    public boolean verifyExamCourseCantRun(Long examId,Long schoolId, String courseCode, String courseName) {
+        QueryWrapper<BasicCourse> schoolCourseQuery = new QueryWrapper<>();
+        schoolCourseQuery.lambda()
+                .eq(BasicCourse::getSchoolId,schoolId)
+                .eq(BasicCourse::getCode,courseCode)
+                .eq(BasicCourse::getName,courseName);
+        List<BasicCourse> tbSchoolCourseList = basicCourseService.list(schoolCourseQuery);
+        if (tbSchoolCourseList.size() != 1){
+            throw ExceptionResultEnum.ERROR.exception("学校课程基础数据异常");
+        }
+
+        QueryWrapper<TBExamCourse> examCourseQuery = new QueryWrapper<>();
+        examCourseQuery.lambda()
+                .eq(TBExamCourse::getExamId,examId)
+                .eq(TBExamCourse::getCourseCode,courseCode)
+                .eq(TBExamCourse::getCourseName,courseName);
+        List<TBExamCourse> tbExamCourseList = this.list(examCourseQuery);
+        if (tbExamCourseList.size() != 1){
+            throw ExceptionResultEnum.ERROR.exception("考试课程基础数据异常");
+        }
+        TBExamCourse tbExamCourse = tbExamCourseList.get(0);
+        TestStatusEnum testStatusEnum = tbExamCourse.getTestStatus();
+        PublishStatusEnum publishStatusEnum = tbExamCourse.getPublishStatus();
+        return testStatusEnum.equals(TestStatusEnum.TEST) || testStatusEnum.equals(TestStatusEnum.CHECKED) || publishStatusEnum.equals(PublishStatusEnum.PUBLISH);
+    }
+
+    @Override
+    public List<String> findEffectiveByExamId(Long examId,String courseCode) {
+
+        List<TBExamCourse> effectiveCourseList = this.list(new QueryWrapper<TBExamCourse>().lambda()
+                .eq(TBExamCourse::getExamId,examId)
+                .eq(TBExamCourse::getTestStatus,TestStatusEnum.UN_TEST)
+                .eq(TBExamCourse::getPublishStatus,PublishStatusEnum.UN_COMPUTE));
 
+        if (effectiveCourseList.size() == 0){
+            throw ExceptionResultEnum.ERROR.exception("该考试目前没有任何课程可以分析");
+        }
+        List<String> effectCourseCodeList = new ArrayList<>();
+        if (courseCode != null && courseCode.length() > 0){
+            if (!effectiveCourseList.stream().map(TBExamCourse::getCourseCode).collect(Collectors.toList()).contains(courseCode)){
+                throw ExceptionResultEnum.ERROR.exception("课程【" + courseCode + "】无法进行分析");
+            }
+            effectCourseCodeList.add(courseCode);
+        }else {
+            effectCourseCodeList = effectiveCourseList.stream().map(TBExamCourse::getCourseCode).collect(Collectors.toList());
+        }
+        return effectCourseCodeList;
+    }
 }

+ 14 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBExamRecordServiceImpl.java

@@ -1,11 +1,16 @@
 package com.qmth.teachcloud.report.business.service.impl;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
+import com.qmth.teachcloud.report.business.bean.dto.query.BasicExamRecordDto;
 import com.qmth.teachcloud.report.business.entity.TBExamRecord;
 import com.qmth.teachcloud.report.business.mapper.TBExamRecordMapper;
 import com.qmth.teachcloud.report.business.service.TBExamRecordService;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
+import java.util.List;
+
 /**
  * <p>
  * 考生考试记录 服务实现类
@@ -16,5 +21,14 @@ import org.springframework.stereotype.Service;
  */
 @Service
 public class TBExamRecordServiceImpl extends ServiceImpl<TBExamRecordMapper, TBExamRecord> implements TBExamRecordService {
+    @Resource
+    private TBExamRecordMapper tbExamRecordMapper;
 
+    @Override
+    public List<BasicExamRecordDto> findByExamIdAndCourseCodeS(Long examId, List<String> courseCodeS) {
+        if (courseCodeS.size() == 0){
+            throw ExceptionResultEnum.ERROR.exception("缺少课程编号");
+        }
+        return tbExamRecordMapper.findByExamIdAndCourseCodeS(examId,courseCodeS);
+    }
 }

+ 18 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBExamServiceImpl.java

@@ -1,11 +1,17 @@
 package com.qmth.teachcloud.report.business.service.impl;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
+import com.qmth.teachcloud.report.business.entity.TBCloudExam;
 import com.qmth.teachcloud.report.business.entity.TBExam;
 import com.qmth.teachcloud.report.business.mapper.TBExamMapper;
+import com.qmth.teachcloud.report.business.service.TBCloudExamService;
 import com.qmth.teachcloud.report.business.service.TBExamService;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
+import java.util.Objects;
+
 /**
  * <p>
  * 教研分析基础考试信息表 服务实现类
@@ -16,5 +22,17 @@ import org.springframework.stereotype.Service;
  */
 @Service
 public class TBExamServiceImpl extends ServiceImpl<TBExamMapper, TBExam> implements TBExamService {
+    @Resource
+    private TBCloudExamService tbCloudExamService;
 
+    @Override
+    public TBExam findByCloudExamId(Long cloudExamId) {
+        TBCloudExam tbCloudExam = tbCloudExamService.getById(cloudExamId);
+        Long examId = tbCloudExam.getExamId();
+        TBExam tbExam = this.getById(examId);
+        if (Objects.isNull(tbExam)){
+            throw ExceptionResultEnum.ERROR.exception("未找到教研分析基础考试信息");
+        }
+        return tbExam;
+    }
 }

+ 16 - 1
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBPaperServiceImpl.java

@@ -1,11 +1,15 @@
 package com.qmth.teachcloud.report.business.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
 import com.qmth.teachcloud.report.business.entity.TBPaper;
 import com.qmth.teachcloud.report.business.mapper.TBPaperMapper;
 import com.qmth.teachcloud.report.business.service.TBPaperService;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 /**
  * <p>
  * 试卷基础信息表(赋分系数、试卷类型、满分、及格分等) 服务实现类
@@ -16,5 +20,16 @@ import org.springframework.stereotype.Service;
  */
 @Service
 public class TBPaperServiceImpl extends ServiceImpl<TBPaperMapper, TBPaper> implements TBPaperService {
-
+    @Override
+    public TBPaper findByForeignKey(Long examId, String courseCode, String courseName, String paperType) {
+        List<TBPaper> tbPaperList = this.list(new QueryWrapper<TBPaper>().lambda()
+                .eq(TBPaper::getExamId,examId)
+                .eq(TBPaper::getCourseCode,courseCode)
+                .eq(TBPaper::getCourseName,courseName)
+                .eq(TBPaper::getPaperType,paperType));
+        if (tbPaperList.size() != 1){
+            throw ExceptionResultEnum.ERROR.exception("基础试卷信息异常");
+        }
+        return tbPaperList.get(0);
+    }
 }

+ 15 - 1
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBSchoolClazzServiceImpl.java

@@ -1,11 +1,15 @@
 package com.qmth.teachcloud.report.business.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
 import com.qmth.teachcloud.report.business.entity.TBSchoolClazz;
 import com.qmth.teachcloud.report.business.mapper.TBSchoolClazzMapper;
 import com.qmth.teachcloud.report.business.service.TBSchoolClazzService;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 /**
  * <p>
  * 学校班级表 服务实现类
@@ -16,5 +20,15 @@ import org.springframework.stereotype.Service;
  */
 @Service
 public class TBSchoolClazzServiceImpl extends ServiceImpl<TBSchoolClazzMapper, TBSchoolClazz> implements TBSchoolClazzService {
-
+    @Override
+    public TBSchoolClazz findByForeignKey(Long schoolId, String clazzCode, String clazzName) {
+        List<TBSchoolClazz> tbSchoolClazzList = this.list(new QueryWrapper<TBSchoolClazz>().lambda()
+                .eq(TBSchoolClazz::getSchoolId,schoolId)
+                .eq(TBSchoolClazz::getClazzCode,clazzCode)
+                .eq(TBSchoolClazz::getClazzName,clazzName));
+        if (tbSchoolClazzList.size() != 1){
+            throw ExceptionResultEnum.ERROR.exception("班级基础数据异常");
+        }
+        return tbSchoolClazzList.get(0);
+    }
 }

+ 40 - 0
teachcloud-report-business/src/main/resources/mapper/TBExamRecordMapper.xml

@@ -2,4 +2,44 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.qmth.teachcloud.report.business.mapper.TBExamRecordMapper">
 
+    <select id="findByExamIdAndCourseCodeS"
+            resultType="com.qmth.teachcloud.report.business.bean.dto.query.BasicExamRecordDto">
+        SELECT
+            bs.id AS examStudentId,
+            bs.exam_id AS examId,
+            bs.name AS studentName,
+            student_id AS studentId,
+            course_code AS courseCode,
+            course_name AS courseName,
+            teach_college_id AS teachCollegeId,
+            inspect_college_id AS inspectCollegeId,
+            clazz_id AS clazzId,
+            major_id AS majorId,
+            teacher_id AS teacherId,
+            ticket_number AS ticketNumber,
+            student_code AS studentCode,
+            absent AS absent,
+            current,
+            br.id AS tbExamRecordId,
+            paper_id AS paperId,
+            paper_type AS paperType,
+            subjective_score AS subjectiveScore,
+            objective_score AS objectiveScore,
+            total_score AS totalScore
+        FROM
+            t_b_exam_student bs
+                LEFT JOIN
+            t_b_exam_record br ON bs.exam_id = br.exam_id
+                AND bs.id = br.exam_student_id
+        WHERE
+        <if test="examId > 0">
+            bs.exam_id = #{examId}
+        </if>
+        <if test="courseCodes != null and courseCodes.size() > 0">
+            and bs.course_code IN
+            <foreach collection="courseCodes" item="courseCode" index="index" open="(" close=")" separator=",">
+                #{courseCode}
+            </foreach>
+        </if>
+    </select>
 </mapper>

+ 941 - 0
teachcloud-report/src/main/java/com/qmth/teachcloud/report/api/BasicDatasourceController.java

@@ -0,0 +1,941 @@
+package com.qmth.teachcloud.report.api;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.google.common.collect.Lists;
+import com.qmth.teachcloud.common.bean.params.UserSaveParams;
+import com.qmth.teachcloud.common.contant.SystemConstant;
+import com.qmth.teachcloud.common.entity.BasicCourse;
+import com.qmth.teachcloud.common.entity.SysOrg;
+import com.qmth.teachcloud.common.entity.SysRole;
+import com.qmth.teachcloud.common.entity.SysUser;
+import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
+import com.qmth.teachcloud.common.enums.RoleTypeEnum;
+import com.qmth.teachcloud.common.service.BasicCourseService;
+import com.qmth.teachcloud.common.service.SysOrgService;
+import com.qmth.teachcloud.common.service.SysRoleService;
+import com.qmth.teachcloud.common.service.SysUserService;
+import com.qmth.teachcloud.common.util.ExcelUtil;
+import com.qmth.teachcloud.common.util.ResultUtil;
+import com.qmth.teachcloud.report.business.bean.dto.excel.*;
+import com.qmth.teachcloud.report.business.bean.dto.query.*;
+import com.qmth.teachcloud.report.business.entity.*;
+import com.qmth.teachcloud.report.business.enums.AssignEnum;
+import com.qmth.teachcloud.report.business.enums.ExamCloudDataEnum;
+import com.qmth.teachcloud.report.business.enums.NumberTypeEnum;
+import com.qmth.teachcloud.report.business.service.*;
+import com.qmth.teachcloud.common.util.Result;
+import io.swagger.annotations.*;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.LinkedMultiValueMap;
+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.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * @Description: 基础数据导入系统基础表控制类
+ * @Author: CaoZixuan
+ * @Date: 2021-06-01
+ */
+@Api(tags = "数据源处理controller")
+@RestController
+@RequestMapping("/${prefix.url.wuda}/datasource")
+public class BasicDatasourceController {
+    @Resource
+    private TBPaperService tbPaperService;
+    @Resource
+    private TBPaperStructService tbPaperStructService;
+    @Resource
+    private TBExamCourseService tbExamCourseService;
+    @Resource
+    private BasicCourseService basicCourseService;
+    @Resource
+    private TBModuleProficiencyService tbModuleProficiencyService;
+    @Resource
+    private TBModuleConfigService tbModuleConfigService;
+    @Resource
+    private TBDimensionService tbDimensionService;
+    @Resource
+    private TBExamService tbExamService;
+    @Resource
+    private NewCallApiService newCallApiService;
+    @Resource
+    private TBSchoolClazzService tbSchoolClazzService;
+    @Resource
+    private SysOrgService sysOrgService;
+    @Resource
+    private TBSchoolMajorService tbSchoolMajorService;
+    @Resource
+    private SysUserService sysUserService;
+    @Resource
+    private TBStudentService tbStudentService;
+    @Resource
+    private TBAnswerService tbAnswerService;
+    @Resource
+    private TBExamRecordService tbExamRecordService;
+    @Resource
+    private TBExamStudentService tbExamStudentService;
+    @Resource
+    private TAExamCourseRecordService taExamCourseRecordService;
+    @Resource
+    private TBCommonLevelConfigService tbCommonLevelConfigService;
+    @Resource
+    private TBCommonRankLevelConfigService tbCommonRankLevelConfigService;
+    @Resource
+    private SysRoleService sysRoleService;
+
+    @ApiOperation(value = "试卷数据导入")
+    @RequestMapping(value = "/paper/import", method = RequestMethod.POST)
+    @Transactional(rollbackFor = Exception.class)
+    @ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
+    public Result paperImport(@ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file, @RequestParam long examId, @RequestParam Long schoolId) throws IOException, NoSuchFieldException {
+        if (Objects.isNull(file)) {
+            throw ExceptionResultEnum.ERROR.exception("找不到附件");
+        }
+        if (examId == 0){
+            throw ExceptionResultEnum.ERROR.exception("考试id为空");
+        }
+
+        List<LinkedMultiValueMap<Integer, Object>> finalList = ExcelUtil.excelReader(file.getInputStream(), Lists.newArrayList(PaperConfigDto.class, PaperStructDto.class), (finalExcelList, finalColumnNameList, finalExcelErrorList) -> {
+            if (finalExcelErrorList.size() > 0) {
+                throw ExceptionResultEnum.ERROR.exception(JSONObject.toJSONString(finalExcelErrorList));
+            }
+            return finalExcelList;
+        });
+
+        //保存到数据库
+        Map<String,Long> paperMap = new HashMap<>();
+        List<TBPaper> tbPaperList = new ArrayList<>();
+        List<TBPaperStruct> tbPaperStructList = new ArrayList<>();
+        if (Objects.nonNull(finalList) && finalList.size() > 0) {
+            for (int i = 0; i < finalList.size(); i++) {
+                LinkedMultiValueMap<Integer, Object> map = finalList.get(i);
+                List<Object> importList = map.get(i);
+
+                for (int y = 0; y < Objects.requireNonNull(importList).size(); y++) {
+                    if (importList.get(y) instanceof PaperConfigDto) {
+                        PaperConfigDto paperConfigDto = (PaperConfigDto) importList.get(y);
+
+                        String courseCode = paperConfigDto.getCourseCode();
+                        String courseName = paperConfigDto.getCourseName();
+                        if (tbExamCourseService.verifyExamCourseCantRun(examId,schoolId,courseCode,courseName)){
+                            continue;
+                        }
+                        BigDecimal coefficient = BigDecimal.ZERO;
+                        if (Objects.nonNull(paperConfigDto.getCoefficient()) && paperConfigDto.getCoefficient() instanceof Double){
+                            coefficient = BigDecimal.valueOf((Double) paperConfigDto.getCoefficient());
+                        }
+                        String paperType = paperConfigDto.getPaperType();
+                        List<TBPaper> oldList = tbPaperService.list(new QueryWrapper<TBPaper>().lambda()
+                                .eq(TBPaper::getExamId,examId).eq(TBPaper::getCourseCode,courseCode).eq(TBPaper::getPaperType,paperType));
+                        Long id;
+                        if (oldList.size() == 1){
+                            id = oldList.get(0).getId();
+                        }else if (oldList.size() < 1){
+                            id = SystemConstant.getDbUuid();
+                        }else {
+                            throw ExceptionResultEnum.ERROR.exception("表数据异常[t_b_paper]");
+                        }
+
+                        paperMap.put(paperType,id);
+                        TBPaper tbPaper = new TBPaper();
+                        tbPaper.setId(id);
+                        tbPaper.setExamId(examId);
+                        tbPaper.setCourseCode(courseCode);
+                        tbPaper.setCourseName(courseName);
+                        tbPaper.setPaperType(paperType);
+                        tbPaper.setCoefficient(coefficient);
+                        tbPaper.setTotalScore(BigDecimal.valueOf(Double.parseDouble(paperConfigDto.getFullScore())));
+                        tbPaper.setPassScore(BigDecimal.valueOf(Double.parseDouble(paperConfigDto.getPassScore())));
+                        String scoreType = paperConfigDto.getIsAssigned();
+                        tbPaper.setScoreType(AssignEnum.convertToEnum(scoreType));
+                        tbPaperList.add(tbPaper);
+                    } else if (importList.get(y) instanceof PaperStructDto) {
+                        PaperStructDto paperStructDto = (PaperStructDto) importList.get(y);
+
+                        String courseCode = paperStructDto.getCourseCode();
+                        String courseName = paperStructDto.getCourseName();
+                        if (tbExamCourseService.verifyExamCourseCantRun(examId,schoolId,courseCode,courseName)){
+                            continue;
+                        }
+
+                        String paperType = paperStructDto.getPaperCode();
+                        Long paperId = paperMap.get(paperType);
+                        String mainNumber = paperStructDto.getMainNumber();
+                        String subNumber = paperStructDto.getSubNumber();
+                        String questionType = paperStructDto.getQuestionType();
+                        if (questionType == null){
+                            questionType = "";
+                        }
+                        String questionName = questionType + " " + mainNumber + SystemConstant.HYPHEN + subNumber;
+                        questionName = questionName.trim(); // 去前后空格
+
+                        TBPaperStruct tbPaperStruct = new TBPaperStruct();
+                        tbPaperStruct.setId(SystemConstant.getDbUuid());
+                        tbPaperStruct.setPaperId(paperId);
+                        tbPaperStruct.setQuestionName(questionName);
+                        tbPaperStruct.setNumberType(paperStructDto.getNumberType());
+                        tbPaperStruct.setBigQuestionNumber(mainNumber);
+                        tbPaperStruct.setSmallQuestionNumber(subNumber);
+                        tbPaperStruct.setQuestionType(questionType);
+                        tbPaperStruct.setFullScore(BigDecimal.valueOf(Double.parseDouble(paperStructDto.getFullScore())));
+                        tbPaperStruct.setScoreRules(paperStructDto.getScoreRules());
+                        tbPaperStruct.setRulesDesc(paperStructDto.getRulesDesc());
+                        tbPaperStruct.setKnowledgeDimension(paperStructDto.getKnowledgeDimension());
+                        tbPaperStruct.setAbilityDimension(paperStructDto.getAbilityDimension());
+                        tbPaperStructList.add(tbPaperStruct);
+                    }
+                }
+            }
+        }
+
+        List<Long> paperIdList = tbPaperStructList.stream().map(TBPaperStruct::getPaperId).collect(Collectors.toList());
+        // 删除已有的试卷结构数据
+        if (paperIdList.size() > 0){
+            tbPaperStructService.remove(new QueryWrapper<TBPaperStruct>().lambda().in(TBPaperStruct::getPaperId,paperIdList));
+        }
+
+        // 批量新增或更新试卷表
+        tbPaperService.saveOrUpdateBatch(tbPaperList);
+        // 批量新增试卷结构表
+        tbPaperStructService.saveBatch(tbPaperStructList);
+        return ResultUtil.ok(Collections.singletonMap(SystemConstant.SUCCESS, true));
+    }
+
+    @ApiOperation(value = "模块和等级导入接口")
+    @RequestMapping(value = "/moduleLevel/import", method = RequestMethod.POST)
+    @Transactional(rollbackFor = Exception.class)
+    @ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
+    public Result moduleLevelImport(@ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file, @RequestParam Long schoolId, @RequestParam Long examId) throws IOException, NoSuchFieldException {
+        if (Objects.isNull(file)) {
+            throw ExceptionResultEnum.ERROR.exception("附件不存在");
+        }
+        if (schoolId == null || schoolId == 0){
+            throw ExceptionResultEnum.ERROR.exception("参数缺失");
+        }
+        List<LinkedMultiValueMap<Integer, Object>> finalList = ExcelUtil.excelReader(file.getInputStream(),
+                Lists.newArrayList(ModuleProficiencyDto.class, ModuleConfigDto.class), (finalExcelList, finalColumnNameList, finalExcelErrorList) -> {
+                    if (finalExcelErrorList.size() > 0) {
+                        throw ExceptionResultEnum.ERROR.exception(JSONObject.toJSONString(finalExcelErrorList));
+                    }
+                    return finalExcelList;
+                });
+        //保存到数据库
+
+        // 模块二级考察点维度熟练度配置,及模块简要描述表
+        List<TBModuleProficiency> tbModuleProficiencyList = new ArrayList<>();
+        // 考察点模块配置表
+        List<TBModuleConfig> tbModuleConfigList = new ArrayList<>();
+
+        if (Objects.nonNull(finalList) && finalList.size() > 0) {
+            for (int i = 0; i < finalList.size(); i++) {
+                LinkedMultiValueMap<Integer, Object> map = finalList.get(i);
+                List<Object> importList = map.get(i);
+                for (int y = 0; y < Objects.requireNonNull(importList).size(); y++) {
+                    if (importList.get(y) instanceof ModuleProficiencyDto) {
+
+                        ModuleProficiencyDto moduleProficiencyDto = (ModuleProficiencyDto) importList.get(y);
+                        String proficiencyDegree = moduleProficiencyDto.getProficiencyDegree(); // 精熟度范围
+                        String define = moduleProficiencyDto.getProficiency(); // define
+                        String courseCode = moduleProficiencyDto.getCourseCode();
+                        String courseName = moduleProficiencyDto.getCourseName();
+                        if (tbExamCourseService.verifyExamCourseCantRun(examId,schoolId,courseCode,courseName)){
+                            continue;
+                        }
+                        if (proficiencyDegree != null && proficiencyDegree.length() > 0 && define != null && define.length() > 0) {
+                            // - 解析精熟度范围
+                            String[] itemCell = proficiencyDegree.split(";"); // 每一项熟练度定义
+                            String[] defineCell = define.split(";"); // 每个定义
+                            if (itemCell.length > 0 && defineCell.length > 0) {
+                                if (defineCell.length != itemCell.length) {
+                                    throw ExceptionResultEnum.ERROR.exception("数据异常");
+                                }
+
+                                for (int tmp = 0; tmp < itemCell.length; tmp++) {
+
+                                    String[] levelWithScopeCell = itemCell[tmp].split(":"); // 每一项中等级和对应分为标准的定义
+                                    if (levelWithScopeCell.length != 2) {
+                                        throw ExceptionResultEnum.ERROR.exception("应该有2条数据,实际 :" + itemCell[tmp]);
+                                    }
+                                    String level = levelWithScopeCell[0];
+                                    String scope = levelWithScopeCell[1];
+                                    String limitTmp = scope.substring(1, scope.length() - 1);
+
+                                    String[] limitCell = limitTmp.split(","); // 每个范围中极值的数组
+                                    if (limitCell.length != 2) {
+                                        throw ExceptionResultEnum.ERROR.exception("数据异常");
+                                    }
+                                    String min = limitCell[0];
+                                    String max = limitCell[1];
+                                    TBModuleProficiency tbModuleProficiency = new TBModuleProficiency();
+                                    tbModuleProficiency.setId(SystemConstant.getDbUuid());
+                                    tbModuleProficiency.setExamId(examId);
+                                    tbModuleProficiency.setCourseCode(courseCode);
+                                    tbModuleProficiency.setCourseName(courseName);
+                                    tbModuleProficiency.setModuleType(moduleProficiencyDto.getName());
+                                    tbModuleProficiency.setInterpret(moduleProficiencyDto.getDescription());
+                                    tbModuleProficiency.setRemark(moduleProficiencyDto.getRemark());
+                                    tbModuleProficiency.setDefine(defineCell[tmp].trim());
+                                    tbModuleProficiency.setLevel(level);
+                                    tbModuleProficiency.setMin(min);
+                                    tbModuleProficiency.setMax(max);
+                                    tbModuleProficiency.setScope(scope);
+
+                                    tbModuleProficiencyList.add(tbModuleProficiency);
+                                }
+                            }
+                        } else {
+                            TBModuleProficiency tbModuleProficiency = new TBModuleProficiency();
+                            tbModuleProficiency.setId(SystemConstant.getDbUuid());
+                            tbModuleProficiency.setExamId(examId);
+                            tbModuleProficiency.setCourseCode(courseCode);
+                            tbModuleProficiency.setCourseName(courseName);
+                            tbModuleProficiency.setModuleType(moduleProficiencyDto.getName());
+                            tbModuleProficiency.setInterpret(moduleProficiencyDto.getDescription());
+
+                            tbModuleProficiencyList.add(tbModuleProficiency);
+                        }
+                    } else if (importList.get(y) instanceof ModuleConfigDto) {
+                        /*
+                            构建config_module
+                         */
+                        ModuleConfigDto moduleConfigDto = (ModuleConfigDto) importList.get(y);
+
+                        String courseCode = moduleConfigDto.getCourseCode();
+                        String courseName = basicCourseService.getOne(new QueryWrapper<BasicCourse>().lambda()
+                                .eq(BasicCourse::getSchoolId,schoolId).eq(BasicCourse::getCode,courseCode))
+                                .getName();
+
+
+                        if (tbExamCourseService.verifyExamCourseCantRun(examId,schoolId,courseCode,courseName)){
+                            continue;
+                        }
+                        TBModuleConfig tbModuleConfig = new TBModuleConfig();
+                        tbModuleConfig.setId(SystemConstant.getDbUuid());
+                        tbModuleConfig.setExamId(examId);
+                        tbModuleConfig.setCourseCode(courseCode);
+                        tbModuleConfig.setCourseName(courseName);
+                        tbModuleConfig.setModuleType(moduleConfigDto.getModuleName());
+                        tbModuleConfig.setFormula(moduleConfigDto.getFormula());
+                        tbModuleConfig.setScope(moduleConfigDto.getLevelDegree());
+                        tbModuleConfig.setLevelCode(moduleConfigDto.getCode());
+                        tbModuleConfig.setLevelName(moduleConfigDto.getLevel());
+                        tbModuleConfig.setResult(moduleConfigDto.getDiagnoseResult());
+                        tbModuleConfig.setAdvice(moduleConfigDto.getLearnAdvice());
+                        if (moduleConfigDto.getModuleName().equals("知识")) {
+                            tbModuleConfig.setAttribute("knowledgeDimension");
+                        } else if (moduleConfigDto.getModuleName().equals("能力")) {
+                            tbModuleConfig.setAttribute("abilityDimension");
+                        }
+                        tbModuleConfigList.add(tbModuleConfig);
+                    }
+                }
+            }
+        }
+        Set<String> moduleProficiencyRemove = tbModuleProficiencyList.stream().map(e -> e.getExamId() + SystemConstant.HYPHEN
+                + e.getCourseCode() + SystemConstant.HYPHEN
+                + e.getCourseName() + SystemConstant.HYPHEN
+                + e.getModuleType()).collect(Collectors.toSet());
+
+        Set<String> moduleConfigRemove = tbModuleConfigList.stream().map(e -> e.getExamId() + SystemConstant.HYPHEN
+                + e.getCourseCode() + SystemConstant.HYPHEN
+                + e.getCourseName() + SystemConstant.HYPHEN
+                + e.getModuleType()).collect(Collectors.toSet());
+
+        for (String s : moduleProficiencyRemove) {
+            String[] arr = s.split(SystemConstant.HYPHEN);
+            tbModuleProficiencyService.remove(new QueryWrapper<TBModuleProficiency>().lambda()
+                    .eq(TBModuleProficiency::getExamId,arr[0])
+                    .eq(TBModuleProficiency::getCourseCode,arr[1])
+                    .eq(TBModuleProficiency::getCourseName,arr[2])
+                    .eq(TBModuleProficiency::getModuleType,arr[3]));
+        }
+        for (String s : moduleConfigRemove) {
+            String[] arr = s.split(SystemConstant.HYPHEN);
+            tbModuleConfigService.remove(new QueryWrapper<TBModuleConfig>().lambda()
+                    .eq(TBModuleConfig::getExamId,arr[0])
+                    .eq(TBModuleConfig::getCourseCode,arr[1])
+                    .eq(TBModuleConfig::getCourseName,arr[2])
+                    .eq(TBModuleConfig::getModuleType,arr[3]));
+        }
+        tbModuleProficiencyService.saveBatch(tbModuleProficiencyList);
+        tbModuleConfigService.saveBatch(tbModuleConfigList);
+        return ResultUtil.ok(Collections.singletonMap(SystemConstant.SUCCESS, true));
+    }
+
+    @ApiOperation(value = "知识点导入模板")
+    @RequestMapping(value = "/dimension/import", method = RequestMethod.POST)
+    @Transactional(rollbackFor = Exception.class)
+    @ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
+    public Result dimensionImport(@ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file, @RequestParam Long schoolId,@RequestParam Long examId) throws IOException, NoSuchFieldException {
+        if (Objects.isNull(file)) {
+            throw ExceptionResultEnum.ERROR.exception("附件不存在");
+        }
+        if (Objects.isNull(schoolId) || schoolId == 0){
+            throw ExceptionResultEnum.ERROR.exception("参数缺失");
+        }
+        List<LinkedMultiValueMap<Integer, Object>> finalList = ExcelUtil.excelReader(file.getInputStream(), Lists.newArrayList(DimensionDto.class), (finalExcelList, finalColumnNameList, finalExcelErrorList) -> {
+            if (finalExcelErrorList.size() > 0) {
+                throw ExceptionResultEnum.ERROR.exception(JSONObject.toJSONString(finalExcelErrorList));
+            }
+            return finalExcelList;
+        });
+        //保存到数据库
+        List<TBDimension> tbDimensionList = new ArrayList<>();
+        if (Objects.nonNull(finalList) && finalList.size() > 0) {
+            for (int i = 0; i < finalList.size(); i++) {
+                LinkedMultiValueMap<Integer, Object> map = finalList.get(i);
+                List<Object> moduleLevelImportList = map.get(i);
+                for (int y = 0; y < Objects.requireNonNull(moduleLevelImportList).size(); y++) {
+                    if (moduleLevelImportList.get(y) instanceof DimensionDto) {
+                        DimensionDto dimensionDto = (DimensionDto) moduleLevelImportList.get(y);
+
+                        String courseCode = dimensionDto.getCourseCode();
+                        String courseName = basicCourseService.getOne(new QueryWrapper<BasicCourse>().lambda()
+                                .eq(BasicCourse::getSchoolId,schoolId).eq(BasicCourse::getCode,courseCode))
+                                .getName();
+
+                        if (tbExamCourseService.verifyExamCourseCantRun(examId,schoolId,courseCode,courseName)){
+                            continue;
+                        }
+                        TBDimension tbDimension = new TBDimension();
+                        tbDimension.setId(SystemConstant.getDbUuid());
+                        tbDimension.setExamId(examId);
+                        tbDimension.setCourseCode(courseCode);
+                        tbDimension.setCourseName(courseName);
+                        tbDimension.setDimensionType(dimensionDto.getModule());
+                        tbDimension.setCodePrimary(dimensionDto.getCodeOne());
+                        tbDimension.setNamePrimary(dimensionDto.getNameOne());
+                        tbDimension.setCodeSecond(dimensionDto.getCodeTwo());
+                        tbDimension.setNameSecond(dimensionDto.getNameTwo());
+                        tbDimension.setInterpretation(dimensionDto.getInterpretation());
+
+                        tbDimensionList.add(tbDimension);
+                    }
+                }
+            }
+        }
+        Set<String> tbDimensionRemove = tbDimensionList.stream().map(e -> e.getExamId() + SystemConstant.HYPHEN + e.getCourseCode()).collect(Collectors.toSet());
+        for (String s : tbDimensionRemove) {
+            String[] arr = s.split(SystemConstant.HYPHEN);
+            tbDimensionService.remove(new QueryWrapper<TBDimension>().lambda()
+                    .eq(TBDimension::getExamId,arr[0])
+                    .eq(TBDimension::getCourseCode,arr[1]));
+        }
+        tbDimensionService.saveBatch(tbDimensionList);
+        return ResultUtil.ok(Collections.singletonMap(SystemConstant.SUCCESS, true));
+    }
+
+    @ApiOperation(value = "考试作答信息导入模板")
+    @RequestMapping(value = "/examAnswer/import", method = RequestMethod.POST)
+    @Transactional(rollbackFor = Exception.class)
+    @ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
+    public Result examAnswerImport(@ApiParam(value = "云阅卷考试id", required = true) @RequestParam Long id, @ApiParam(value = "云阅卷考试编号", required = false)
+    @RequestParam(required = false) String cloudExamCode,
+                                   @ApiParam(value = "教研分析将AB卷分开分析时自定义科目和卷形的连接符(连接符必须和’t_e_course‘表中的科目名称中连接符对应)")
+                                   @RequestParam(required = false) String linkSign ,@RequestParam Long schoolId) throws IOException {
+        if (schoolId == null || schoolId == 0){
+            throw ExceptionResultEnum.ERROR.exception("参数缺失");
+        }
+        TBExam tbExam = tbExamService.findByCloudExamId(id);
+        Long examId = tbExam.getId();
+
+        // 该考试要考察的所有课程
+        List<TBExamCourse> tbExamCourseList = tbExamCourseService.list(new QueryWrapper<TBExamCourse>().lambda().eq(TBExamCourse::getExamId,examId));
+
+        List<Map> finalList = newCallApiService.callStudentScore(id, cloudExamCode);
+//        System.out.println("------------------map : --------------------- \n" + JacksonUtil.parseJson(finalList));
+
+        // 根据云阅卷数据源筛选并保存班级、学院、教师数据源
+        // TODO: 2021/6/2 筛选并创建学校班级表
+        List<TBSchoolClazzDto> tbSchoolClazzDtoList = new ArrayList<>();
+        List<String> clazzList = finalList.stream()
+                .map(e -> String.valueOf(e.get(ExamCloudDataEnum.CLASS_NAME.getName())))
+                .distinct().collect(Collectors.toList());
+        for (String clazzInfo : clazzList) {
+            TBSchoolClazzDto tbSchoolClazzDto = new TBSchoolClazzDto();
+            tbSchoolClazzDto.setSchoolId(schoolId);
+            tbSchoolClazzDto.setClazzCode(clazzInfo);
+            tbSchoolClazzDto.setClazzName(clazzInfo);
+            tbSchoolClazzDtoList.add(tbSchoolClazzDto);
+        }
+        this.saveClazzInfo(tbSchoolClazzDtoList);
+        // TODO: 2021/6/2 筛选并创建学校学院表
+        List<TBSchoolCollegeDto> tbSchoolCollegeDtoList = new ArrayList<>();
+        List<String> collegeList = finalList.stream()
+                .map(e -> String.valueOf(e.get(ExamCloudDataEnum.COLLEGE.getName())))
+                .distinct().collect(Collectors.toList());
+        for (String collegeInfo : collegeList) {
+            TBSchoolCollegeDto tbSchoolCollegeDto = new TBSchoolCollegeDto();
+            tbSchoolCollegeDto.setSchoolId(schoolId);
+            tbSchoolCollegeDto.setCollegeCode(collegeInfo);
+            tbSchoolCollegeDto.setCollegeName(collegeInfo);
+            tbSchoolCollegeDtoList.add(tbSchoolCollegeDto);
+        }
+        this.saveCollegeInfo(tbSchoolCollegeDtoList);
+        // TODO: 2021/6/2 筛选并创建学校教师表
+        List<TBSchoolTeacherDto> tbSchoolTeacherDtoList = new ArrayList<>();
+        List<String> teacherList = finalList.stream()
+                .map(e -> String.valueOf(e.get(ExamCloudDataEnum.TEACHER.getName())))
+                .distinct().collect(Collectors.toList());
+        for (String teacherInfo : teacherList) {
+            TBSchoolTeacherDto tbSchoolTeacherDto = new TBSchoolTeacherDto();
+            tbSchoolTeacherDto.setSchoolId(schoolId);
+            tbSchoolTeacherDto.setTeacherCode(teacherInfo);
+            tbSchoolTeacherDto.setTeacherName(teacherInfo);
+            tbSchoolTeacherDtoList.add(tbSchoolTeacherDto);
+        }
+        this.saveTeacherInfo(tbSchoolTeacherDtoList);
+
+
+        List<TBStudent> tbStudentList = new ArrayList<>();
+        List<TBExamStudent> tbExamStudentList = new ArrayList<>();
+        List<TBExamRecord> tbExamRecordList = new ArrayList<>();
+        List<TBAnswer> tbAnswerList = new ArrayList<>();
+
+        List<String> paperTypeList = finalList.stream().map(e -> String.valueOf(e.get("paperType"))).distinct().collect(Collectors.toList());
+        final String specialPaperType = "#";
+        paperTypeList.remove(specialPaperType);
+        int count = paperTypeList.size();
+        int i = 0;
+
+        for (Map map : finalList) {
+            String subjectCode = (String) map.get(ExamCloudDataEnum.SUBJECT_CODE.getName()); //科目代码
+            String subjectName = (String) map.get(ExamCloudDataEnum.SUBJECT_NAME.getName()); //科目名称
+            String examNumber = (String) map.get(ExamCloudDataEnum.EXAM_NUMBER.getName()); //准考证号
+            String studentCode = (String) map.get(ExamCloudDataEnum.STUDENT_CODE.getName()); //学号
+            String name = (String) map.get(ExamCloudDataEnum.NAME.getName()); //名称
+            String paperType = (String) map.get(ExamCloudDataEnum.PAPER_TYPE.getName()); //试卷类型
+            if (count > 0 && paperType.equals(specialPaperType)) {
+                paperType = paperTypeList.get(i);
+                i++;
+                if (i == count) {
+                    i = 0;
+                }
+            }
+
+            String college = (String) map.get(ExamCloudDataEnum.COLLEGE.getName()); //学院
+            String className = (String) map.get(ExamCloudDataEnum.CLASS_NAME.getName()); //班级名称
+            String teacher = (String) map.get(ExamCloudDataEnum.TEACHER.getName()); //教师
+            int status = (int) map.get(ExamCloudDataEnum.STATUS.getName()); //学生考试状态
+            String totalScore = (String) map.get(ExamCloudDataEnum.TOTAL_SCORE.getName()); //考生总分
+            String objectiveScore = (String) map.get(ExamCloudDataEnum.OBJECTIVE_SCORE.getName()); //客观题总分
+            String subjectiveScore = (String) map.get(ExamCloudDataEnum.SUBJECTIVE_SCORE.getName()); //主观题总分
+            List<Map<Object, Object>> objectiveScoreDetailList = (List<Map<Object, Object>>) map.get(ExamCloudDataEnum.OBJECTIVE_SCORE_DETAIL.getName()); //客观题明细
+            List<Map<Object, Object>> subjectiveScoreDetailList = (List<Map<Object, Object>>) map.get(ExamCloudDataEnum.SUBJECTIVE_SCORE_DETAIL.getName()); //主观题答题明细
+
+
+
+            /*
+                组建学生基础信息 student
+             */
+            TBStudent studentTemp = tbStudentService.getOne(new QueryWrapper<TBStudent>().lambda()
+                    .eq(TBStudent::getSchoolId,schoolId)
+                    .eq(TBStudent::getName,name)
+                    .eq(TBStudent::getStudentCode,studentCode));
+            Long studentId;
+            if (Objects.nonNull(studentTemp)){
+                studentId = studentTemp.getId();
+            }else {
+                studentId = SystemConstant.getDbUuid();
+            }
+            TBStudent tbStudent = new TBStudent();
+            tbStudent.setId(studentId);
+            tbStudent.setSchoolId(schoolId);
+            tbStudent.setName(name);
+            tbStudent.setStudentCode(studentCode);
+            tbStudentList.add(tbStudent);
+
+            /*
+                组建考生考试信息 exm_pap_tik
+             */
+            List<TBExamCourse> needDisposeList;
+            if (linkSign != null && linkSign.length() > 0) { // 云阅卷在同一个考试下 科目名称相同分AB卷 但在教研分析时分科处理的科目
+                String finalPaperType = paperType;
+                needDisposeList = tbExamCourseList.stream().filter(e -> e.getCourseName().equals(subjectName + linkSign + finalPaperType)).collect(Collectors.toList());
+            } else {
+                needDisposeList = tbExamCourseList.stream().filter(e -> e.getCourseName().equals(subjectName)).collect(Collectors.toList());
+            }
+            if (needDisposeList.size() == 1) {
+
+                TBExamCourse tbExamCourse = needDisposeList.get(0);
+                String courseCode = tbExamCourse.getCourseCode();
+                String courseName = tbExamCourse.getCourseName();
+                if (tbExamCourseService.verifyExamCourseCantRun(examId,schoolId,courseCode,courseName)){
+                    continue;
+                }
+
+                // TODO: 2021/6/2 创建学生-考试关系表(全批次删除并新增)
+                // 获取关联的基础表主键
+                SysOrg tbSchoolCollege = sysOrgService.findByForeignKey(schoolId,college,college);
+                TBSchoolClazz tbSchoolClazz = tbSchoolClazzService.findByForeignKey(schoolId,className,className);
+                SysUser tbSchoolTeacher = sysUserService.findByForeignKey(schoolId,teacher,teacher);
+
+                TBExamStudent tbExamStudent = new TBExamStudent();
+                Long examStudentId = SystemConstant.getDbUuid();
+                tbExamStudent.setId(examStudentId);
+                tbExamStudent.setExamId(examId);
+                tbExamStudent.setName(name);
+                tbExamStudent.setStudentId(studentId);
+                tbExamStudent.setStudentCode(studentCode);
+                tbExamStudent.setCourseCode(courseCode);
+                tbExamStudent.setCourseName(courseName);
+                tbExamStudent.setTeachCollegeId(0L);
+                tbExamStudent.setInspectCollegeId(tbSchoolCollege.getId());
+                tbExamStudent.setClazzId(tbSchoolClazz.getId());
+                tbExamStudent.setMajorId(0L);
+                tbExamStudent.setTeacherId(tbSchoolTeacher.getId());
+                tbExamStudent.setTicketNumber(examNumber);
+                tbExamStudent.setAbsent(status == 2);
+                // 全部设置为本届
+                tbExamStudent.setCurrent(true);
+                tbExamStudentList.add(tbExamStudent);
+
+                // TODO: 2021/6/2 创建考生-考试记录关系表(全批次删除并新增)
+                // 构建考生作答记录表(t_b_exam_record)
+                Long examRecordId = SystemConstant.getDbUuid();
+                TBExamRecord tbExamRecord = new TBExamRecord();
+                tbExamRecord.setId(examRecordId);
+                tbExamRecord.setExamId(examId);
+                tbExamRecord.setPaperId(tbPaperService.findByForeignKey(examId,courseCode,courseName,paperType).getId());
+                tbExamRecord.setPaperType(paperType);
+                tbExamRecord.setExamStudentId(examStudentId);
+                tbExamRecord.setSubjectiveScore(BigDecimal.valueOf(Double.parseDouble(subjectiveScore)));
+                tbExamRecord.setObjectiveScore(BigDecimal.valueOf(Double.parseDouble(objectiveScore)));
+                tbExamRecord.setTotalScore(BigDecimal.valueOf(Double.parseDouble(totalScore)));
+                tbExamRecordList.add(tbExamRecord);
+
+                // TODO: 2021/6/4 构建考生-详细作答记录表(全批次删除并新增)
+                // 构建考生作答明细表(t_b_answer)
+                // 客观题(选择)
+                for (Map<Object, Object> objectObjectMap : objectiveScoreDetailList) {
+                    Long answerId = SystemConstant.getDbUuid();
+                    TBAnswer tbAnswer = new TBAnswer();
+                    tbAnswer.setId(answerId);
+                    tbAnswer.setExamRecordId(examRecordId);
+                    tbAnswer.setNumberType(NumberTypeEnum.OBJECTIVE.getValue());
+                    String cloudMainNumber = String.valueOf(objectObjectMap.get(ExamCloudDataEnum.MAIN_NUMBER.getName()));
+                    String cloudSubNumber = String.valueOf(objectObjectMap.get(ExamCloudDataEnum.SUB_NUMBER.getName()));
+                    tbAnswer.setMainNumber(cloudMainNumber);
+                    tbAnswer.setSubNumber(cloudSubNumber);
+                    tbAnswer.setScore(BigDecimal.valueOf(Double.parseDouble(String.valueOf(objectObjectMap.get(ExamCloudDataEnum.SCORE.getName())))));
+                    tbAnswer.setAnswer(String.valueOf(objectObjectMap.get(ExamCloudDataEnum.ANSWER.getName())));
+                    tbAnswerList.add(tbAnswer);
+                }
+                // 主观题
+                for (Map<Object, Object> objectObjectMap : subjectiveScoreDetailList) {
+                    Long answerId = SystemConstant.getDbUuid();
+                    TBAnswer tbAnswer = new TBAnswer();
+                    tbAnswer.setId(answerId);
+                    tbAnswer.setExamRecordId(examRecordId);
+                    tbAnswer.setNumberType(NumberTypeEnum.SUBJECTIVE.getValue());
+                    String cloudMainNumber = String.valueOf(objectObjectMap.get(ExamCloudDataEnum.MAIN_NUMBER.getName()));
+                    String cloudSubNumber = String.valueOf(objectObjectMap.get(ExamCloudDataEnum.SUB_NUMBER.getName()));
+                    tbAnswer.setMainNumber(cloudMainNumber);
+                    tbAnswer.setSubNumber(cloudSubNumber);
+                    tbAnswer.setScore(BigDecimal.valueOf(Double.parseDouble(String.valueOf(objectObjectMap.get(ExamCloudDataEnum.SCORE.getName())))));
+                    tbAnswer.setAnswer(String.valueOf(objectObjectMap.get(ExamCloudDataEnum.ANSWER.getName())));
+                    tbAnswerList.add(tbAnswer);
+                }
+            }
+        }
+
+        // 处理并向数据库插入学生信息
+        tbStudentService.saveOrUpdateBatch(tbStudentList);
+
+        // 删除原t_b_answer、t_b_exam_record、t_b_exam_student表数据
+        List<String> courseInfoList = tbExamStudentList.stream().map(e -> e.getCourseCode() + SystemConstant.HYPHEN + e.getCourseName()).collect(Collectors.toList());
+        Set<Long> examStudentRemoveIdSet = new HashSet<>();
+        for (String s : courseInfoList) {
+            String[] arr = s.split(SystemConstant.HYPHEN);
+            Set<Long> ids = tbExamStudentService.list(new QueryWrapper<TBExamStudent>().lambda()
+                    .eq(TBExamStudent::getCourseCode,arr[0])
+                    .eq(TBExamStudent::getCourseName,arr[1]))
+                    .stream().map(TBExamStudent::getId).collect(Collectors.toSet());
+            examStudentRemoveIdSet.addAll(ids);
+        }
+
+        if (examStudentRemoveIdSet.size() > 0){
+            // 删除考生表
+            tbExamStudentService.removeByIds(examStudentRemoveIdSet);
+            List<TBExamRecord> willRemoveRecord = tbExamRecordService.list(new QueryWrapper<TBExamRecord>()
+                    .lambda().in(TBExamRecord::getExamStudentId,examStudentRemoveIdSet));
+            if (willRemoveRecord.size() > 0){
+                List<Long> willRemoveRecordIdList = willRemoveRecord.stream().map(TBExamRecord::getId).collect(Collectors.toList());
+                // 删除考生作答
+                tbExamRecordService.removeByIds(willRemoveRecordIdList);
+                // 删除考生作答
+                tbAnswerService.remove(new QueryWrapper<TBAnswer>().lambda().in(TBAnswer::getExamRecordId,willRemoveRecordIdList));
+            }
+        }
+
+        // 保存数据
+        tbExamStudentService.saveBatch(tbExamStudentList);
+        tbExamRecordService.saveBatch(tbExamRecordList);
+        tbAnswerService.saveBatch(tbAnswerList);
+        return ResultUtil.ok(Collections.singletonMap(SystemConstant.SUCCESS, true));
+    }
+
+    @ApiOperation(value = "特殊科目赋分操作")
+    @RequestMapping(value = "/special/assignScore", method = RequestMethod.POST)
+    @Transactional(rollbackFor = Exception.class)
+    @ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
+    public Result specialAssignScore(@ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file, @RequestParam Long examId,@RequestParam Long schoolId,
+                                     @ApiParam(value = "该Excel中包含多科目赋分时,各科目编号用','隔开", required = true) @RequestParam String courseCodeS) throws IOException, NoSuchFieldException {
+
+        List<String> courseCodeList = Arrays.asList(courseCodeS.split(","));
+        // 数据同步操作
+        // 获取当前课程下所有学生考试成绩记录
+        List<BasicExamRecordDto> basicExamRecordDtoDatasource = tbExamRecordService.findByExamIdAndCourseCodeS(examId,courseCodeList);
+        Set<TAExamCourseRecord> taExamCourseRecordDatasource = new HashSet<>();
+        for (String s : courseCodeList) {
+            if (tbExamCourseService.verifyExamCourseCantRun(examId,schoolId,s,basicCourseService.findByCourseCode(s).getName())){
+                throw ExceptionResultEnum.ERROR.exception("课程编号[" + s + "]的课程分析数据已测试或发布,不能变更基础数据");
+            }
+            List<BasicExamRecordDto> basicExamRecordDtoList = basicExamRecordDtoDatasource.stream()
+                    .filter(e -> s.equals(e.getCourseCode())).collect(Collectors.toList());
+            if (basicExamRecordDtoList.size() > 0){
+                // 删除源数据
+                taExamCourseRecordService.remove(new QueryWrapper<TAExamCourseRecord>()
+                        .lambda().eq(TAExamCourseRecord::getExamId,examId).eq(TAExamCourseRecord::getCourseCode,s));
+                // 迁移数据至't_a_exam_course_record'
+                List<TAExamCourseRecord> taExamCourseRecordList = new ArrayList<>();
+                for (BasicExamRecordDto basicExamRecordDto : basicExamRecordDtoList) {
+                    // 正常公式赋分操作
+                    Long paperId = basicExamRecordDto.getPaperId();
+                    TBPaper tbPaper = tbPaperService.getById(paperId);
+                    if (Objects.isNull(tbPaper)){
+                        throw ExceptionResultEnum.ERROR.exception("试卷信息数据异常");
+                    }
+                    BigDecimal fullScore = tbPaper.getTotalScore();
+                    BigDecimal myScore = basicExamRecordDto.getTotalScore();
+                    BigDecimal coefficient = tbPaper.getCoefficient();
+                    BigDecimal assignScore;
+                    if (coefficient != null && coefficient.compareTo(BigDecimal.ZERO) > 0){
+                        assignScore = myScore.add(fullScore.subtract(myScore).divide(coefficient,0,BigDecimal.ROUND_HALF_DOWN));
+                    }else {
+                        assignScore = myScore;
+                    }
+
+                    TAExamCourseRecord taExamCourseRecord = new TAExamCourseRecord();
+                    taExamCourseRecord.setId(SystemConstant.getDbUuid());
+                    taExamCourseRecord.setExamRecordId(basicExamRecordDto.getTbExamRecordId());
+                    // 数据同步默认赋分成绩为卷面成绩
+                    taExamCourseRecord.setAssignedScore(assignScore);
+                    taExamCourseRecord.setExamId(basicExamRecordDto.getExamId());
+                    taExamCourseRecord.setCourseCode(basicExamRecordDto.getCourseCode());
+                    taExamCourseRecord.setPaperId(basicExamRecordDto.getPaperId());
+                    taExamCourseRecord.setPaperType(basicExamRecordDto.getPaperType());
+                    taExamCourseRecord.setStudentId(basicExamRecordDto.getStudentId());
+                    taExamCourseRecord.setStudentCode(basicExamRecordDto.getStudentCode());
+                    taExamCourseRecord.setTeacherId(basicExamRecordDto.getTeacherId());
+                    taExamCourseRecord.setClazzId(basicExamRecordDto.getClazzId());
+                    taExamCourseRecord.setTeachCollegeId(basicExamRecordDto.getTeachCollegeId());
+                    taExamCourseRecord.setInspectCollegeId(basicExamRecordDto.getInspectCollegeId());
+                    taExamCourseRecord.setMajorId(basicExamRecordDto.getMajorId());
+                    taExamCourseRecord.setTotalScore(myScore);
+                    taExamCourseRecord.setAbsent(basicExamRecordDto.getAbsent());
+                    taExamCourseRecord.setCurrent(basicExamRecordDto.getCurrent());
+                    taExamCourseRecordList.add(taExamCourseRecord);
+                }
+                taExamCourseRecordDatasource.addAll(taExamCourseRecordList);
+                taExamCourseRecordService.saveBatch(taExamCourseRecordList);
+            }
+        }
+
+        List<LinkedMultiValueMap<Integer, Object>> finalList = ExcelUtil.excelReader(file.getInputStream(), Lists.newArrayList(AssignDto.class), (finalExcelList, finalColumnNameList, finalExcelErrorList) -> {
+            if (finalExcelErrorList.size() > 0) {
+                throw ExceptionResultEnum.ERROR.exception(JSONObject.toJSONString(finalExcelErrorList));
+            }
+            return finalExcelList;
+        });
+
+        //保存到数据库
+        List<TAExamCourseRecord> willUpdate = new ArrayList<>();
+        if (Objects.nonNull(finalList) && finalList.size() > 0) {
+            for (int i = 0; i < finalList.size(); i++) {
+                LinkedMultiValueMap<Integer, Object> map = finalList.get(i);
+                List<Object> assignList = map.get(i);
+                for (int y = 0; y < Objects.requireNonNull(assignList).size(); y++) {
+                    if (assignList.get(y) instanceof AssignDto) {
+                        AssignDto assignDto = (AssignDto) assignList.get(y);
+                        Long assExamId = Long.parseLong(assignDto.getExamId());
+                        if (!examId.equals(assExamId)){
+                            throw ExceptionResultEnum.ERROR.exception("excel考试数据异常");
+                        }
+                        String assCourseCodeS = assignDto.getPaperCodeS();
+                        String assStudentCode = assignDto.getStudentCode();
+                        String assAssignScore = assignDto.getAssignScore();
+                        String[] courseCodeArr = assCourseCodeS.split(",");
+                        for (String s : courseCodeArr) {
+                            List<TAExamCourseRecord> taExamCourseRecordList = taExamCourseRecordDatasource.stream()
+                                    .filter(e -> assExamId.equals(e.getExamId()) && s.equals(e.getCourseCode()) && assStudentCode.equals(e.getStudentCode()))
+                                    .collect(Collectors.toList());
+                            if (taExamCourseRecordList.size() != 1){
+                                System.out.println("-----------------------");
+                                System.out.println(JSON.toJSONString(taExamCourseRecordList));
+                                throw ExceptionResultEnum.ERROR.exception("赋分异常,考生记录分析表数据异常");
+                            }
+                            TAExamCourseRecord taExamCourseRecord = taExamCourseRecordList.get(0);
+                            taExamCourseRecord.setAssignedScore(BigDecimal.valueOf(Double.parseDouble(assAssignScore)));
+                            willUpdate.add(taExamCourseRecord);
+                        }
+                    }
+                }
+            }
+        }
+        taExamCourseRecordService.saveOrUpdateBatch(willUpdate);
+        return ResultUtil.ok(Collections.singletonMap(SystemConstant.SUCCESS, true));
+    }
+
+    @ApiOperation(value = "常规配置信息导入:试卷难易度和学院排名百分等级档位")
+    @RequestMapping(value = "/config/import", method = RequestMethod.POST)
+    @Transactional(rollbackFor = Exception.class)
+    @ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
+    public Result configImport(@RequestParam Long schoolId, @RequestParam Long examId, @RequestParam String courseCode) {
+        String courseName = basicCourseService.findByCourseCode(courseCode).getName();
+        if (tbExamCourseService.verifyExamCourseCantRun(examId,schoolId,courseCode,courseName)){
+            throw ExceptionResultEnum.ERROR.exception("课程编号[" + courseCode + "]的课程分析数据已测试或发布,不能变更基础数据");
+        }
+        tbCommonLevelConfigService.importLevelConfig(examId,courseCode,courseName);
+        tbCommonRankLevelConfigService.importRankLevelConfig(examId,courseCode,courseName);
+        return ResultUtil.ok(Collections.singletonMap(SystemConstant.SUCCESS, true));
+    }
+
+    /**
+     * 更新或新增专业信息
+     * @param tbSchoolMajorDtoList 基础专业数据源
+     */
+    private void saveMajorInfo(List<TBSchoolMajorDto> tbSchoolMajorDtoList){
+        List<TBSchoolMajor> tbSchoolMajorList = new ArrayList<>();
+        for (TBSchoolMajorDto tbSchoolMajorDto : tbSchoolMajorDtoList) {
+            TBSchoolMajor old = tbSchoolMajorService.getOne(new QueryWrapper<TBSchoolMajor>().lambda()
+                    .eq(TBSchoolMajor::getSchoolId,tbSchoolMajorDto.getSchoolId())
+                    .eq(TBSchoolMajor::getMajorCode,tbSchoolMajorDto.getMajorCode())
+                    .eq(TBSchoolMajor::getMajorName,tbSchoolMajorDto.getMajorName()));
+            Long id;
+            if (Objects.nonNull(old)){
+                id = old.getId();
+            }else {
+                id = SystemConstant.getDbUuid();
+            }
+
+            TBSchoolMajor tbSchoolMajor = new TBSchoolMajor();
+            tbSchoolMajor.setId(id);
+            tbSchoolMajor.setSchoolId(tbSchoolMajorDto.getSchoolId());
+            tbSchoolMajor.setMajorCode(tbSchoolMajorDto.getMajorCode());
+            tbSchoolMajor.setMajorName(tbSchoolMajorDto.getMajorName());
+            tbSchoolMajor.setEnable(true);
+            tbSchoolMajor.setCreateTime(System.currentTimeMillis());
+            tbSchoolMajor.setUpdateTime(System.currentTimeMillis());
+            tbSchoolMajorList.add(tbSchoolMajor);
+        }
+        tbSchoolMajorService.saveOrUpdateBatch(tbSchoolMajorList);
+    }
+
+    /**
+     * 更新或新增班级信息
+     * @param tbSchoolClazzDtoList 基础班级数据源
+     */
+    private void saveClazzInfo(List<TBSchoolClazzDto> tbSchoolClazzDtoList){
+        List<TBSchoolClazz> tbSchoolClazzList = new ArrayList<>();
+        for (TBSchoolClazzDto tbSchoolClazzDto : tbSchoolClazzDtoList) {
+            TBSchoolClazz old = tbSchoolClazzService.getOne(new QueryWrapper<TBSchoolClazz>().lambda()
+                    .eq(TBSchoolClazz::getSchoolId,tbSchoolClazzDto.getSchoolId())
+                    .eq(TBSchoolClazz::getClazzCode,tbSchoolClazzDto.getClazzCode())
+                    .eq(TBSchoolClazz::getClazzName,tbSchoolClazzDto.getClazzName()));
+            Long id;
+            if (Objects.nonNull(old)){
+                id = old.getId();
+            }else {
+                id = SystemConstant.getDbUuid();
+            }
+
+            TBSchoolClazz tbSchoolClazz = new TBSchoolClazz();
+            tbSchoolClazz.setId(id);
+            tbSchoolClazz.setSchoolId(tbSchoolClazzDto.getSchoolId());
+            tbSchoolClazz.setClazzCode(tbSchoolClazzDto.getClazzCode());
+            tbSchoolClazz.setClazzName(tbSchoolClazzDto.getClazzName());
+            tbSchoolClazz.setEnable(true);
+            tbSchoolClazz.setCreateTime(System.currentTimeMillis());
+            tbSchoolClazz.setUpdateTime(System.currentTimeMillis());
+            tbSchoolClazzList.add(tbSchoolClazz);
+        }
+        tbSchoolClazzService.saveOrUpdateBatch(tbSchoolClazzList);
+    }
+
+    /**
+     * 更新或新增学院信息
+     * @param tbSchoolCollegeDtoList 基础学院数据源
+     */
+    private void saveCollegeInfo(List<TBSchoolCollegeDto> tbSchoolCollegeDtoList){
+        List<SysOrg> sysOrgList = new ArrayList<>();
+        for (TBSchoolCollegeDto tbSchoolCollegeDto : tbSchoolCollegeDtoList) {
+            SysOrg old = sysOrgService.getOne(new QueryWrapper<SysOrg>().lambda()
+                    .eq(SysOrg::getSchoolId,tbSchoolCollegeDto.getSchoolId())
+                    .eq(SysOrg::getCode,tbSchoolCollegeDto.getCollegeCode())
+                    .eq(SysOrg::getName,tbSchoolCollegeDto.getCollegeName()));
+            Long id;
+            if (Objects.nonNull(old)){
+                id = old.getId();
+            }else {
+                id = SystemConstant.getDbUuid();
+            }
+
+            SysOrg sysOrg = new SysOrg();
+            sysOrg.setId(id);
+            sysOrg.setSchoolId(tbSchoolCollegeDto.getSchoolId());
+            sysOrg.setCode(tbSchoolCollegeDto.getCollegeCode());
+            sysOrg.setName(tbSchoolCollegeDto.getCollegeName());
+            sysOrg.setEnable(true);
+            sysOrgList.add(sysOrg);
+        }
+        sysOrgService.saveOrUpdateBatch(sysOrgList);
+    }
+
+    /**
+     * 更新或新增教师信息
+     * @param tbSchoolTeacherDtoList 基础教师数据源
+     */
+    private void saveTeacherInfo(List<TBSchoolTeacherDto> tbSchoolTeacherDtoList){
+        List<SysUser> tbSchoolTeacherList = new ArrayList<>();
+        for (TBSchoolTeacherDto tbSchoolTeacherDto : tbSchoolTeacherDtoList) {
+            SysUser old = sysUserService.getOne(new QueryWrapper<SysUser>().lambda()
+                    .eq(SysUser::getSchoolId,tbSchoolTeacherDto.getSchoolId())
+                    .eq(SysUser::getLoginName,tbSchoolTeacherDto.getTeacherCode())
+                    .eq(SysUser::getRealName,tbSchoolTeacherDto.getTeacherName()));
+            Long id = 0L;
+            if (Objects.nonNull(old)){
+                id = old.getId();
+            }
+            SysRole teacherRole = sysRoleService.list(new QueryWrapper<SysRole>().lambda().eq(SysRole::getType, RoleTypeEnum.TEACHER)).get(0);
+            List<Long> roleIds = new ArrayList<>();
+            roleIds.add(teacherRole.getId());
+
+            UserSaveParams userSaveParams = new UserSaveParams();
+            if (id > 0){
+                userSaveParams.setId(id);
+            }
+
+
+            userSaveParams.setSchoolId(tbSchoolTeacherDto.getSchoolId());
+            userSaveParams.setLoginName(tbSchoolTeacherDto.getTeacherCode());
+            userSaveParams.setRealName(tbSchoolTeacherDto.getTeacherName());
+            userSaveParams.setPassword(SystemConstant.DEFAULT_PASSWORD);
+            userSaveParams.setMobileNumber("11111111111");
+            userSaveParams.setEnable(true);
+            userSaveParams.setRoleIds(roleIds.toArray(new Long[0]));
+            sysUserService.save(userSaveParams);
+        }
+    }
+
+}

+ 27 - 2
teachcloud-report/src/main/resources/application-dev.properties

@@ -6,8 +6,11 @@ server.tomcat.max-connections=2500
 #tomcat\u7684URI\u7F16\u7801
 server.tomcat.uri-encoding=UTF-8
 
+#\u9879\u76EE\u540D\u79F0
+spring.application.name=teachcloud-report
+
 #\u6570\u636E\u6E90\u914D\u7F6E
-db.host=192.168.10.36
+db.host=192.168.10.136
 db.port=3306
 db.name=teachcloud-report
 db.username=root
@@ -73,6 +76,25 @@ com.qmth.api.auth.time-max-delay=5m
 #\u7F13\u5B58\u65F6\u95F4
 com.qmth.cache.expire-after-write=8h
 
+#\u65E5\u671F\u683C\u5F0F\u5316
+spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
+spring.jackson.time-zone=GMT+8
+
+#api\u524D\u7F00
+prefix.url.common=admin/common
+prefix.url.sys=admin/sys
+prefix.url.basic=admin/basic
+prefix.url.exam=admin/exam
+prefix.url.data=admin/data
+prefix.url.reportWuda=report/wuda/open
+prefix.url.reportSchool=report/school
+prefix.url.reportCourse=report/course
+prefix.url.reportExamStudent=report/exam_student
+
+#\u65E5\u5FD7\u914D\u7F6E
+com.qmth.logging.root-level=info
+com.qmth.logging.file-path=/ONLINE_EXAM/teachcloud-report/tomcat/logs/teachcloud-report.log
+
 #\u5F15\u5165task\u914D\u7F6E\u6587\u4EF6
 spring.profiles.include=task
 
@@ -104,4 +126,7 @@ sms.config.aliyunSMSAuditReviewCode=SMS_217416269
 #\uFFFD\uFFFD\u02F4\uFFFD\uFFFD\uCD7D\uFFFD\uFFFD\u0524\uFFFD\uFFFD\u0368\u05AA
 sms.config.aliyunSMSAuditWillExpireCode=SMS_217436302
 #\uFFFD\uFFFD\u02F4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0368\u05AA
-sms.config.aliyunSMSAuditOverdueCode=SMS_217416271
+sms.config.aliyunSMSAuditOverdueCode=SMS_217416271
+
+yun.mark.url=https://www.markingcloud.com
+yun.mark.studentScoreApi=/api/exam/student/score

+ 35 - 10
teachcloud-report/src/main/resources/application-master.properties

@@ -6,18 +6,21 @@ server.tomcat.max-connections=2500
 #tomcat\u7684URI\u7F16\u7801
 server.tomcat.uri-encoding=UTF-8
 
+#\u9879\u76EE\u540D\u79F0
+spring.application.name=teachcloud-report
+
 #\u6570\u636E\u6E90\u914D\u7F6E
-db.host=localhost
+db.host=192.168.10.136
 db.port=3306
 db.name=teachcloud-report
 db.username=root
-db.password=123456789
+db.password=Qmth87863577!
 
 #redis\u6570\u636E\u6E90\u914D\u7F6E
 com.qmth.redis.host=${db.host}
 com.qmth.redis.port=6379
-com.qmth.redis.db=0
-#com.qmth.redis.password
+com.qmth.redis.db=1
+com.qmth.redis.password=123456
 
 #mysql\u914D\u7F6E
 com.qmth.mysql.url=jdbc:mysql://${db.host}:${db.port}/${db.name}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8
@@ -41,8 +44,8 @@ sys.config.attachmentType=.xlsx,.xls,.doc,.docx,.pdf,.jpg,.jpeg,.png,.html,.zip,
 sys.config.attachmentLength=100
 sys.config.attachmentSize=200
 sys.config.serverUpload=
-sys.config.fileHost=localhost:7001
-sys.config.serverHost=localhost:7001
+sys.config.fileHost=localhost:7004
+sys.config.serverHost=localhost:7004
 #sys.config.accessKey=0bce69d94a7b4aef8bc0badf150351a9
 #sys.config.accessSecret=LdUwb5X4etmjW7fDn0KAdoXG0Yt7AkDu
 sys.config.accessKey=274f823e5f59410f8b3bb6edcd8e2b6e
@@ -53,7 +56,7 @@ sys.config.adminLogoUrl=http://qmth-test.oss-cn-shenzhen.aliyuncs.com/frontend/w
 #sys.config.autoCreatePdfResetMaxCount=5
 sys.config.threadPoolCoreSize=1
 sys.config.customThreadPoolCoreSize=true
-sys.config.reportUrl=http://localhost:8082/report/#/student-report/
+sys.config.reportUrl=http://localhost:7004/#/student-report/
 spring.resources.static-locations=file:${sys.config.serverUpload},classpath:/META-INF/resources/,classpath:/resources/
 
 org.center.url=https://solar.qmth.com.cn
@@ -67,12 +70,31 @@ com.qmth.api.global-auth=false
 #com.qmth.api.global-rate-limit=1/5s
 
 #token\u8D85\u65F6\u914D\u7F6E
-com.qmth.api.auth.time-max-ahead=-10000
-com.qmth.api.auth.time-max-delay=10000
+com.qmth.api.auth.time-max-ahead=1m
+com.qmth.api.auth.time-max-delay=5m
 
 #\u7F13\u5B58\u65F6\u95F4
 com.qmth.cache.expire-after-write=8h
 
+#\u65E5\u671F\u683C\u5F0F\u5316
+spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
+spring.jackson.time-zone=GMT+8
+
+#api\u524D\u7F00
+prefix.url.common=admin/common
+prefix.url.sys=admin/sys
+prefix.url.basic=admin/basic
+prefix.url.exam=admin/exam
+prefix.url.data=admin/data
+prefix.url.reportWuda=report/wuda/open
+prefix.url.reportSchool=report/school
+prefix.url.reportCourse=report/course
+prefix.url.reportExamStudent=report/exam_student
+
+#\u65E5\u5FD7\u914D\u7F6E
+com.qmth.logging.root-level=info
+com.qmth.logging.file-path=/Users/king/Downloads/teachcloud-report.log
+
 #\u5F15\u5165task\u914D\u7F6E\u6587\u4EF6
 spring.profiles.include=task
 
@@ -104,4 +126,7 @@ sms.config.aliyunSMSAuditReviewCode=SMS_217416269
 #\uFFFD\uFFFD\u02F4\uFFFD\uFFFD\uCD7D\uFFFD\uFFFD\u0524\uFFFD\uFFFD\u0368\u05AA
 sms.config.aliyunSMSAuditWillExpireCode=SMS_217436302
 #\uFFFD\uFFFD\u02F4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0368\u05AA
-sms.config.aliyunSMSAuditOverdueCode=SMS_217416271
+sms.config.aliyunSMSAuditOverdueCode=SMS_217416271
+
+yun.mark.url=https://www.markingcloud.com
+yun.mark.studentScoreApi=/api/exam/student/score

+ 35 - 10
teachcloud-report/src/main/resources/application-release.properties

@@ -6,18 +6,21 @@ server.tomcat.max-connections=2500
 #tomcat\u7684URI\u7F16\u7801
 server.tomcat.uri-encoding=UTF-8
 
+#\u9879\u76EE\u540D\u79F0
+spring.application.name=teachcloud-report
+
 #\u6570\u636E\u6E90\u914D\u7F6E
-db.host=localhost
+db.host=192.168.10.136
 db.port=3306
 db.name=teachcloud-report
 db.username=root
-db.password=123456789
+db.password=Qmth87863577!
 
 #redis\u6570\u636E\u6E90\u914D\u7F6E
 com.qmth.redis.host=${db.host}
 com.qmth.redis.port=6379
-com.qmth.redis.db=0
-#com.qmth.redis.password
+com.qmth.redis.db=1
+com.qmth.redis.password=123456
 
 #mysql\u914D\u7F6E
 com.qmth.mysql.url=jdbc:mysql://${db.host}:${db.port}/${db.name}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8
@@ -41,8 +44,8 @@ sys.config.attachmentType=.xlsx,.xls,.doc,.docx,.pdf,.jpg,.jpeg,.png,.html,.zip,
 sys.config.attachmentLength=100
 sys.config.attachmentSize=200
 sys.config.serverUpload=
-sys.config.fileHost=localhost:7001
-sys.config.serverHost=localhost:7001
+sys.config.fileHost=localhost:7004
+sys.config.serverHost=localhost:7004
 #sys.config.accessKey=0bce69d94a7b4aef8bc0badf150351a9
 #sys.config.accessSecret=LdUwb5X4etmjW7fDn0KAdoXG0Yt7AkDu
 sys.config.accessKey=274f823e5f59410f8b3bb6edcd8e2b6e
@@ -53,7 +56,7 @@ sys.config.adminLogoUrl=http://qmth-test.oss-cn-shenzhen.aliyuncs.com/frontend/w
 #sys.config.autoCreatePdfResetMaxCount=5
 sys.config.threadPoolCoreSize=1
 sys.config.customThreadPoolCoreSize=true
-sys.config.reportUrl=http://localhost:8082/report/#/student-report/
+sys.config.reportUrl=http://localhost:7004/#/student-report/
 spring.resources.static-locations=file:${sys.config.serverUpload},classpath:/META-INF/resources/,classpath:/resources/
 
 org.center.url=https://solar.qmth.com.cn
@@ -67,12 +70,31 @@ com.qmth.api.global-auth=false
 #com.qmth.api.global-rate-limit=1/5s
 
 #token\u8D85\u65F6\u914D\u7F6E
-com.qmth.api.auth.time-max-ahead=-10000
-com.qmth.api.auth.time-max-delay=10000
+com.qmth.api.auth.time-max-ahead=1m
+com.qmth.api.auth.time-max-delay=5m
 
 #\u7F13\u5B58\u65F6\u95F4
 com.qmth.cache.expire-after-write=8h
 
+#\u65E5\u671F\u683C\u5F0F\u5316
+spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
+spring.jackson.time-zone=GMT+8
+
+#api\u524D\u7F00
+prefix.url.common=admin/common
+prefix.url.sys=admin/sys
+prefix.url.basic=admin/basic
+prefix.url.exam=admin/exam
+prefix.url.data=admin/data
+prefix.url.reportWuda=report/wuda/open
+prefix.url.reportSchool=report/school
+prefix.url.reportCourse=report/course
+prefix.url.reportExamStudent=report/exam_student
+
+#\u65E5\u5FD7\u914D\u7F6E
+com.qmth.logging.root-level=info
+com.qmth.logging.file-path=/Users/king/Downloads/teachcloud-report.log
+
 #\u5F15\u5165task\u914D\u7F6E\u6587\u4EF6
 spring.profiles.include=task
 
@@ -104,4 +126,7 @@ sms.config.aliyunSMSAuditReviewCode=SMS_217416269
 #\uFFFD\uFFFD\u02F4\uFFFD\uFFFD\uCD7D\uFFFD\uFFFD\u0524\uFFFD\uFFFD\u0368\u05AA
 sms.config.aliyunSMSAuditWillExpireCode=SMS_217436302
 #\uFFFD\uFFFD\u02F4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0368\u05AA
-sms.config.aliyunSMSAuditOverdueCode=SMS_217416271
+sms.config.aliyunSMSAuditOverdueCode=SMS_217416271
+
+yun.mark.url=https://www.markingcloud.com
+yun.mark.studentScoreApi=/api/exam/student/score

+ 1 - 23
teachcloud-report/src/main/resources/application.properties

@@ -1,24 +1,2 @@
 #\u5207\u6362\u914D\u7F6E\u6587\u4EF6
-spring.profiles.active=dev
-
-#\u9879\u76EE\u540D\u79F0
-spring.application.name=teachcloud-report
-
-#\u65E5\u671F\u683C\u5F0F\u5316
-spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
-spring.jackson.time-zone=GMT+8
-
-#api\u524D\u7F00
-prefix.url.common=admin/common
-prefix.url.sys=admin/sys
-prefix.url.basic=admin/basic
-prefix.url.exam=admin/exam
-prefix.url.data=admin/data
-prefix.url.reportWuda=report/wuda/open
-prefix.url.reportSchool=report/school
-prefix.url.reportCourse=report/course
-prefix.url.reportExamStudent=report/exam_student
-
-#\u65E5\u5FD7\u914D\u7F6E
-com.qmth.logging.root-level=info
-com.qmth.logging.file-path=/Users/king/Downloads/teachcloud-report.log
+spring.profiles.active=dev