Browse Source

add: 知学知考 本地接口更改

caozixuan 3 years ago
parent
commit
485ba6eb91
23 changed files with 245 additions and 50 deletions
  1. 16 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/params/analyze/GradeBatchParam.java
  2. 14 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/analyze/GradeBatchPaperResult.java
  3. 23 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/analyze/GradeBatchResult.java
  4. 16 7
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/enums/GradeAnalyzePaperStatusEnum.java
  5. 3 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/GradeBatchPaperMapper.java
  6. 4 4
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/GradeBatchPaperService.java
  7. 15 4
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/GradeBatchPaperServiceImpl.java
  8. 5 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/GradeBatchServiceImpl.java
  9. 11 4
      distributed-print-business/src/main/resources/mapper/GradeBatchMapper.xml
  10. 3 2
      distributed-print-business/src/main/resources/mapper/GradeBatchPaperMapper.xml
  11. 3 2
      distributed-print/src/main/java/com/qmth/distributed/print/api/GradeBatchController.java
  12. 15 7
      distributed-print/src/main/java/com/qmth/distributed/print/api/GradeBatchPaperController.java
  13. 3 2
      distributed-print/src/main/java/com/qmth/distributed/print/api/GradeModuleEvaluationController.java
  14. 5 3
      distributed-print/src/main/java/com/qmth/distributed/print/api/GradePaperController.java
  15. 3 2
      distributed-print/src/main/java/com/qmth/distributed/print/api/GradePaperDimensionController.java
  16. 3 2
      distributed-print/src/main/java/com/qmth/distributed/print/api/GradePaperStructController.java
  17. 61 6
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/domain/PrintOpenDomain.java
  18. 2 0
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/TeachcloudCommonServiceImpl.java
  19. 9 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/AnalyzeDataCheckService.java
  20. 13 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/AnalyzeDataGetService.java
  21. 12 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/CallPrintOpenApiService.java
  22. 1 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/templete/strategy/CourseCodeSyncTaskService.java
  23. 5 0
      teachcloud-report/src/main/resources/application-dev.properties

+ 16 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/params/analyze/GradeBatchParam.java

@@ -17,13 +17,19 @@ public class GradeBatchParam {
     @JsonSerialize(using = ToStringSerializer.class)
     private Long id;
 
+    @ApiModelProperty(value = "学期id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    @NotNull(message = "请选择学期")
+    @Range(min = 1L, message = "请选择学期")
+    private Long semesterId;
+
     @ApiModelProperty(value = "批次名称")
     @NotNull(message = "请输入批次名称")
     private String batchName;
 
     @ApiModelProperty(value = "批次时刻")
-    @NotNull(message = "请选择批次时刻")
-    @Range(min = 1L, message = "请选择批次时刻")
+//    @NotNull(message = "请选择批次时刻")
+//    @Range(min = 1L, message = "请选择批次时刻")
     private Long batchTime;
 
     public Long getId() {
@@ -34,6 +40,14 @@ public class GradeBatchParam {
         this.id = id;
     }
 
+    public Long getSemesterId() {
+        return semesterId;
+    }
+
+    public void setSemesterId(Long semesterId) {
+        this.semesterId = semesterId;
+    }
+
     public String getBatchName() {
         return batchName;
     }

+ 14 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/analyze/GradeBatchPaperResult.java

@@ -28,13 +28,14 @@ public class GradeBatchPaperResult {
     @ApiModelProperty(value = "课程名称")
     private String courseName;
 
+    @JsonSerialize(using = ToStringSerializer.class)
     @ApiModelProperty(value = "教研室id")
     private Long teachingRoomId;
 
+    @JsonSerialize(using = ToStringSerializer.class)
     @ApiModelProperty(value = "开课学院id")
     private Long teachCollegeId;
 
-    @JsonSerialize(using = ToStringSerializer.class)
     @ApiModelProperty(value = "开课学院名称")
     private String teachCollegeName;
 
@@ -47,9 +48,13 @@ public class GradeBatchPaperResult {
     @ApiModelProperty(value = "试卷类型")
     private String paperType;
 
+    @ApiModelProperty(value = "试卷名称")
+    private String paperName;
+
     @ApiModelProperty(value = "分析批次状态")
     private GradeAnalyzePaperStatusEnum status;
 
+
     public Long getId() {
         return id;
     }
@@ -138,6 +143,14 @@ public class GradeBatchPaperResult {
         this.paperType = paperType;
     }
 
+    public String getPaperName() {
+        return paperName;
+    }
+
+    public void setPaperName(String paperName) {
+        this.paperName = paperName;
+    }
+
     public GradeAnalyzePaperStatusEnum getStatus() {
         return status;
     }

+ 23 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/analyze/GradeBatchResult.java

@@ -22,6 +22,13 @@ public class GradeBatchResult {
     @JsonSerialize(using = ToStringSerializer.class)
     private Long batchTime;
 
+    @ApiModelProperty(value = "学期id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long semesterId;
+
+    @ApiModelProperty(value = "学期名称")
+    private String semesterName;
+
     @ApiModelProperty(value = "批次状态")
     private GradeAnalyzePaperStatusEnum status;
 
@@ -49,6 +56,22 @@ public class GradeBatchResult {
         this.batchTime = batchTime;
     }
 
+    public Long getSemesterId() {
+        return semesterId;
+    }
+
+    public void setSemesterId(Long semesterId) {
+        this.semesterId = semesterId;
+    }
+
+    public String getSemesterName() {
+        return semesterName;
+    }
+
+    public void setSemesterName(String semesterName) {
+        this.semesterName = semesterName;
+    }
+
     public GradeAnalyzePaperStatusEnum getStatus() {
         return status;
     }

+ 16 - 7
distributed-print-business/src/main/java/com/qmth/distributed/print/business/enums/GradeAnalyzePaperStatusEnum.java

@@ -6,20 +6,29 @@ package com.qmth.distributed.print.business.enums;
  * @Date: 2022-05-24
  */
 public enum GradeAnalyzePaperStatusEnum {
-    SETTING_GRADE_PAPER("设置分析试卷"),
-    PUSH_GRADE_BATCH("推送教研分析批次数据"),
-    SETTING_GRADE_PAPER_PARAM("设置分析试卷参数"),
-    READY_TO_CALCULATE("待计算"),
-    CALCULATING("计算中"),
-    FINISH_CALCULATE("完成计算"),
+    SETTING_GRADE_PAPER("数据准备中","创建批次数据且无分析课程时的状态。(无科目数据)"),
+    PUSH_GRADE_BATCH("提交分析数据","批次下每创建分析课程且还没有重新提交分析批次时的状态"),
+    SETTING_GRADE_PAPER_PARAM("蓝图数据准备中","推送分析数据给教研分析并且返回成功则设置此状态,并给命题老师发待办提醒。(如果推送失败则在推送任务管理里重新发起推送)"),
+    READY_TO_CALCULATE("待计算","批次下的所有科目都已上传蓝图数据则设置此状态"),
+    CALCULATING("计算中","发起分析则设置此状态。(发起分析后针对批次返回任务状态和进度,科目只显示计算中状态不显示进度。如果计算失败则在批次界面可以重新开始分析[断点续传]和错误原因.txt)"),
+    FINISH_CALCULATE("已完成","分析完毕后则设置此状态"),
     ;
     private final String desc;
+    private final String interpret;
 
-    GradeAnalyzePaperStatusEnum(String desc) {
+
+    GradeAnalyzePaperStatusEnum(String desc, String interpret) {
         this.desc = desc;
+        this.interpret = interpret;
     }
 
+
+
     public String getDesc() {
         return desc;
     }
+
+    public String getInterpret() {
+        return interpret;
+    }
 }

+ 3 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/GradeBatchPaperMapper.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.qmth.distributed.print.business.bean.result.analyze.GradeBatchPaperResult;
 import com.qmth.distributed.print.business.entity.GradeBatchPaper;
+import io.swagger.annotations.ApiModelProperty;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -24,14 +25,14 @@ public interface GradeBatchPaperMapper extends BaseMapper<GradeBatchPaper> {
      * 查找分析批次下的试卷分页数据
      *
      * @param iPage      分页参数
-     * @param semesterId 学期id
+     * @param batchId    批次id
      * @param examId     考试id
      * @param courseCode 课程编号
      * @param schoolId   学校id
      * @return 结果
      */
     IPage<GradeBatchPaperResult> findGradeBatchPaperPage(@Param("iPage") Page<GradeBatchPaperResult> iPage,
-                                                         @Param("semesterId") Long semesterId,
+                                                         @Param("batchId") Long batchId,
                                                          @Param("examId") Long examId,
                                                          @Param("courseCode") String courseCode,
                                                          @Param("schoolId") Long schoolId);

+ 4 - 4
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/GradeBatchPaperService.java

@@ -21,7 +21,7 @@ public interface GradeBatchPaperService extends IService<GradeBatchPaper> {
     /**
      * 查询批次试卷分页数据
      *
-     * @param semesterId  学期id
+     * @param batchId     批次id
      * @param examId      考试id
      * @param courseCode  课程编号
      * @param pageNumber  分页页数
@@ -29,12 +29,12 @@ public interface GradeBatchPaperService extends IService<GradeBatchPaper> {
      * @param requestUser 请求用户
      * @return 分页结果
      */
-    IPage<GradeBatchPaperResult> findGradeBatchPaperPage(Long semesterId, Long examId, String courseCode, int pageNumber, int pageSize, SysUser requestUser);
+    IPage<GradeBatchPaperResult> findGradeBatchPaperPage(Long batchId, Long examId, String courseCode, int pageNumber, int pageSize, SysUser requestUser);
 
     /**
      * 查询可以作为分析样本的试卷
      *
-     * @param semesterId  学期id
+     * @param batchId     批次id
      * @param examId      考试id
      * @param collegeId   学院id
      * @param courseCode  课程编号
@@ -42,7 +42,7 @@ public interface GradeBatchPaperService extends IService<GradeBatchPaper> {
      * @param requestUser 请求用户
      * @return 试卷结果
      */
-    List<GradeBatchPaperResult> findAbleAnalyzePaperList(Long semesterId, Long examId, Long collegeId, String courseCode, String teacherName, SysUser requestUser);
+    List<GradeBatchPaperResult> findAbleAnalyzePaperList(Long batchId, Long examId, Long collegeId, String courseCode, String teacherName, SysUser requestUser);
 
     /**
      * 保存分析批次试卷

+ 15 - 4
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/GradeBatchPaperServiceImpl.java

@@ -7,10 +7,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.qmth.distributed.print.business.bean.params.analyze.AbleAnalyzePaperParam;
 import com.qmth.distributed.print.business.bean.params.analyze.GradeBatchPaperParam;
 import com.qmth.distributed.print.business.bean.result.analyze.GradeBatchPaperResult;
+import com.qmth.distributed.print.business.entity.GradeBatch;
 import com.qmth.distributed.print.business.entity.GradeBatchPaper;
 import com.qmth.distributed.print.business.enums.GradeAnalyzePaperStatusEnum;
 import com.qmth.distributed.print.business.mapper.GradeBatchPaperMapper;
 import com.qmth.distributed.print.business.service.GradeBatchPaperService;
+import com.qmth.distributed.print.business.service.GradeBatchService;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.entity.SysOrg;
 import com.qmth.teachcloud.common.entity.SysUser;
@@ -41,11 +43,13 @@ public class GradeBatchPaperServiceImpl extends ServiceImpl<GradeBatchPaperMappe
     SysOrgService sysOrgService;
     @Resource
     TeachcloudCommonService teachcloudCommonService;
+    @Resource
+    GradeBatchService gradeBatchService;
 
     @Override
-    public IPage<GradeBatchPaperResult> findGradeBatchPaperPage(Long semesterId, Long examId, String courseCode, int pageNumber, int pageSize, SysUser requestUser) {
+    public IPage<GradeBatchPaperResult> findGradeBatchPaperPage(Long batchId, Long examId, String courseCode, int pageNumber, int pageSize, SysUser requestUser) {
         Long schoolId = requestUser.getSchoolId();
-        IPage<GradeBatchPaperResult> datasource = this.baseMapper.findGradeBatchPaperPage(new Page<>(pageNumber, pageSize), semesterId, examId, courseCode, schoolId);
+        IPage<GradeBatchPaperResult> datasource = this.baseMapper.findGradeBatchPaperPage(new Page<>(pageNumber, pageSize), batchId, examId, courseCode, schoolId);
         for (GradeBatchPaperResult record : datasource.getRecords()) {
             Long teachingRoomId = record.getTeachingRoomId();
             SysOrg teachCollege = this.findTeachCollegeByOrgId(teachingRoomId);
@@ -56,10 +60,14 @@ public class GradeBatchPaperServiceImpl extends ServiceImpl<GradeBatchPaperMappe
     }
 
     @Override
-    public List<GradeBatchPaperResult> findAbleAnalyzePaperList(Long semesterId, Long examId, Long collegeId, String courseCode, String teacherName, SysUser requestUser) {
+    public List<GradeBatchPaperResult> findAbleAnalyzePaperList(Long batchId, Long examId, Long collegeId, String courseCode, String teacherName, SysUser requestUser) {
         Long schoolId = requestUser.getSchoolId();
         Set<Long> orgIds = teachcloudCommonService.listSubOrgIds(null);
-        List<GradeBatchPaperResult> datasource = this.baseMapper.findAbleAnalyzePaper(semesterId, examId, collegeId, courseCode, teacherName, orgIds, schoolId);
+        GradeBatch gradeBatch = gradeBatchService.getById(batchId);
+        if (Objects.isNull(gradeBatch)) {
+            throw ExceptionResultEnum.ERROR.exception("教研分析批次不存在");
+        }
+        List<GradeBatchPaperResult> datasource = this.baseMapper.findAbleAnalyzePaper(gradeBatch.getSemesterId(), examId, collegeId, courseCode, teacherName, orgIds, schoolId);
         List<GradeBatchPaperResult> needAddList = new ArrayList<>();
         for (GradeBatchPaperResult gradeBatchPaperResult : datasource) {
             // 额外处理开课学院
@@ -77,6 +85,7 @@ public class GradeBatchPaperServiceImpl extends ServiceImpl<GradeBatchPaperMappe
                 GradeBatchPaperResult needAdd = new GradeBatchPaperResult();
                 BeanUtils.copyProperties(gradeBatchPaperResult, needAdd);
                 needAdd.setPaperType(paperTypeCell);
+                needAdd.setPaperName(needAdd.getCourseName() + "-" + paperType);
                 needAddList.add(needAdd);
             }
         }
@@ -129,6 +138,8 @@ public class GradeBatchPaperServiceImpl extends ServiceImpl<GradeBatchPaperMappe
                 if (!teachCollegeId.equals(dbBatchPaper.getTeachCollegeId()) || !teachCollegeName.equals(dbBatchPaper.getTeachCollegeName()) || !paperName.equals(dbBatchPaper.getPaperName())) {
                     gradeBatchPaper.setStatus(GradeAnalyzePaperStatusEnum.PUSH_GRADE_BATCH);
                 }
+                gradeBatchPaper.setId(dbBatchPaper.getId());
+                gradeBatchPaper.setStatus(dbBatchPaper.getStatus());
                 gradeBatchPaper.updateInfo(requestUser.getId());
             }
             return Stream.of(gradeBatchPaper);

+ 5 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/GradeBatchServiceImpl.java

@@ -72,9 +72,13 @@ public class GradeBatchServiceImpl extends ServiceImpl<GradeBatchMapper, GradeBa
     @Override
     public Long editGradeBatch(GradeBatchParam gradeBatchParam, SysUser requestUser) {
         Long schoolId = requestUser.getSchoolId();
+        Long semesterId = gradeBatchParam.getSemesterId();
         Long id = gradeBatchParam.getId();
         String batchName = gradeBatchParam.getBatchName();
         Long batchTime = gradeBatchParam.getBatchTime();
+        if (!SystemConstant.longNotNull(batchTime)){
+            batchTime = System.currentTimeMillis();
+        }
 
         // 教研分析批次名称学校唯一
         GradeBatch check = this.getOne(new QueryWrapper<GradeBatch>().lambda().eq(GradeBatch::getSchoolId, schoolId).eq(GradeBatch::getBatchName, batchName));
@@ -88,6 +92,7 @@ public class GradeBatchServiceImpl extends ServiceImpl<GradeBatchMapper, GradeBa
         gradeBatch.setBatchCode(DateFormatUtils.format(batchTime, "yyyyMMdd"));
         gradeBatch.setStatus(GradeAnalyzePaperStatusEnum.SETTING_GRADE_PAPER);
         gradeBatch.setSchoolId(schoolId);
+        gradeBatch.setSemesterId(semesterId);
         if (!SystemConstant.longNotNull(id)) {
             id = SystemConstant.getDbUuid();
         }

+ 11 - 4
distributed-print-business/src/main/resources/mapper/GradeBatchMapper.xml

@@ -5,15 +5,22 @@
     <select id="findGradeBatchPage"
             resultType="com.qmth.distributed.print.business.bean.result.analyze.GradeBatchResult">
         SELECT
-            id, batch_name AS batchName, batch_time AS batchTime, status
+            gb.id AS id,
+            gb.batch_name AS batchName,
+            gb.batch_time AS batchTime,
+            gb.status,
+            gb.semester_id AS semesterId,
+            bs.name AS semesterName
         FROM
-            grade_batch
+            grade_batch gb
+        LEFT JOIN
+            basic_semester bs ON gb.semester_id = bs.id
         <where>
             <if test="schoolId != null and schoolId != ''">
-                AND school_id = #{schoolId}
+                AND gb.school_id = #{schoolId}
             </if>
             <if test="batchName != null and batchName != ''">
-                AND batch_name LIKE CONCAT('%',#{batchName},'%')
+                AND gb.batch_name LIKE CONCAT('%',#{batchName},'%')
             </if>
         </where>
     </select>

+ 3 - 2
distributed-print-business/src/main/resources/mapper/GradeBatchPaperMapper.xml

@@ -32,6 +32,7 @@
         et.teaching_room_id AS teachingRoomId,
         gbp.paper_number AS paperNumber,
         gbp.paper_type AS paperType,
+        gbp.paper_name AS paperName,
         gbp.status AS status
         FROM
         grade_batch_paper gbp
@@ -48,8 +49,8 @@
             <if test="schoolId != null and schoolId != ''">
                 AND gbp.school_id = #{schoolId}
             </if>
-            <if test="semesterId != null and semesterId != ''">
-                AND bs.id = #{semesterId}
+            <if test="batchId != null and batchId != ''">
+                AND gbp.batch_id = #{batchId}
             </if>
             <if test="examId != null and examId != ''">
                 AND be.id = #{examId}

+ 3 - 2
distributed-print/src/main/java/com/qmth/distributed/print/api/GradeBatchController.java

@@ -5,6 +5,7 @@ import com.qmth.boot.api.annotation.BOOL;
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.distributed.print.business.bean.params.analyze.GradeBatchParam;
 import com.qmth.distributed.print.business.bean.result.EditResult;
+import com.qmth.distributed.print.business.bean.result.analyze.GradeBatchResult;
 import com.qmth.distributed.print.business.service.GradeBatchService;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.entity.SysUser;
@@ -37,14 +38,14 @@ import java.util.stream.Collectors;
 @RestController
 @RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/${prefix.url.grade}/batch")
 @Validated
-@Aac(strict = BOOL.FALSE, auth = BOOL.FALSE)
+//@Aac(strict = BOOL.FALSE, auth = BOOL.FALSE)
 public class GradeBatchController {
     @Resource
     private GradeBatchService gradeBatchService;
 
     @ApiOperation(value = "成绩分析批次-查询")
     @RequestMapping(value = "/page", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
+    @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = GradeBatchResult.class)})
     public Result findGradeBatchPage(@ApiParam(value = "分析批次名称") @RequestParam(required = false) String gradeBatchName,
                                      @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                                      @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {

+ 15 - 7
distributed-print/src/main/java/com/qmth/distributed/print/api/GradeBatchPaperController.java

@@ -5,9 +5,11 @@ import com.qmth.boot.api.annotation.BOOL;
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.distributed.print.business.bean.params.analyze.GradeBatchPaperParam;
 import com.qmth.distributed.print.business.bean.result.EditResult;
+import com.qmth.distributed.print.business.bean.result.analyze.GradeBatchPaperResult;
 import com.qmth.distributed.print.business.service.GradeBatchPaperService;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.entity.SysUser;
+import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
 import com.qmth.teachcloud.common.util.Result;
 import com.qmth.teachcloud.common.util.ResultUtil;
 import com.qmth.teachcloud.common.util.ServletUtil;
@@ -35,35 +37,41 @@ import java.util.stream.Collectors;
 @RestController
 @RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/${prefix.url.grade}/batch/paper")
 @Validated
-@Aac(strict = BOOL.FALSE, auth = BOOL.FALSE)
+//@Aac(strict = BOOL.FALSE, auth = BOOL.FALSE)
 public class GradeBatchPaperController {
     @Resource
     private GradeBatchPaperService gradeBatchPaperService;
 
     @ApiOperation(value = "成绩分析批次课程-查询")
     @RequestMapping(value = "/page", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
-    public Result findGradeBatchPaperPage(@ApiParam(value = "学期id") @RequestParam(required = false) String semesterId,
+    @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = GradeBatchPaperResult.class)})
+    public Result findGradeBatchPaperPage(@ApiParam(value = "批次id", required = true) @RequestParam String batchId,
                                           @ApiParam(value = "考试id") @RequestParam(required = false) String examId,
                                           @ApiParam(value = "课程编号") @RequestParam(required = false) String courseCode,
                                           @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                                           @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
 
+        if (SystemConstant.isOneNull(batchId)) {
+            throw ExceptionResultEnum.ERROR.exception("参数不完整");
+        }
         SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
-        return ResultUtil.ok(gradeBatchPaperService.findGradeBatchPaperPage(SystemConstant.convertIdToLong(semesterId), SystemConstant.convertIdToLong(examId), courseCode, pageNumber, pageSize, requestUser));
+        return ResultUtil.ok(gradeBatchPaperService.findGradeBatchPaperPage(SystemConstant.convertIdToLong(batchId), SystemConstant.convertIdToLong(examId), courseCode, pageNumber, pageSize, requestUser));
     }
 
     @ApiOperation(value = "成绩分析批次课程-查询可分析试卷")
     @RequestMapping(value = "/able", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
-    public Result findAbleAnalyzePaperList(@ApiParam(value = "学期id") @RequestParam(required = false) String semesterId,
+    @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = GradeBatchPaperResult.class)})
+    public Result findAbleAnalyzePaperList(@ApiParam(value = "批次id", required = true) @RequestParam String batchId,
                                            @ApiParam(value = "考试id") @RequestParam(required = false) String examId,
                                            @ApiParam(value = "学院id") @RequestParam(required = false) String collegeId,
                                            @ApiParam(value = "课程编号") @RequestParam(required = false) String courseCode,
                                            @ApiParam(value = "命题教师") @RequestParam(required = false) String teacherName) {
 
+        if (SystemConstant.isOneNull(batchId)) {
+            throw ExceptionResultEnum.ERROR.exception("参数不完整");
+        }
         SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
-        return ResultUtil.ok(gradeBatchPaperService.findAbleAnalyzePaperList(SystemConstant.convertIdToLong(semesterId), SystemConstant.convertIdToLong(examId), SystemConstant.convertIdToLong(collegeId), courseCode, teacherName, requestUser));
+        return ResultUtil.ok(gradeBatchPaperService.findAbleAnalyzePaperList(SystemConstant.convertIdToLong(batchId), SystemConstant.convertIdToLong(examId), SystemConstant.convertIdToLong(collegeId), courseCode, teacherName, requestUser));
     }
 
     @ApiOperation(value = "成绩分析批次课程-新建")

+ 3 - 2
distributed-print/src/main/java/com/qmth/distributed/print/api/GradeModuleEvaluationController.java

@@ -4,6 +4,7 @@ import com.qmth.boot.api.annotation.Aac;
 import com.qmth.boot.api.annotation.BOOL;
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.distributed.print.business.bean.params.analyze.GradeModuleEvaluationParam;
+import com.qmth.distributed.print.business.bean.result.analyze.GradeModuleEvaluationResult;
 import com.qmth.distributed.print.business.service.GradeModuleEvaluationService;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.entity.SysUser;
@@ -31,14 +32,14 @@ import javax.validation.Valid;
 @RestController
 @RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/${prefix.url.grade}/module/evaluation")
 @Validated
-@Aac(strict = BOOL.FALSE, auth = BOOL.FALSE)
+//@Aac(strict = BOOL.FALSE, auth = BOOL.FALSE)
 public class GradeModuleEvaluationController {
     @Resource
     private GradeModuleEvaluationService gradeModuleEvaluationService;
 
     @ApiOperation(value = "成绩分析模块评价-查询")
     @RequestMapping(value = "/list", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
+    @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = GradeModuleEvaluationResult.class)})
     public Result findGradeModuleEvaluationList(@ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber,
                                                 @ApiParam(value = "试卷类型", required = true) @RequestParam String paperType) {
 

+ 5 - 3
distributed-print/src/main/java/com/qmth/distributed/print/api/GradePaperController.java

@@ -4,6 +4,8 @@ import com.qmth.boot.api.annotation.Aac;
 import com.qmth.boot.api.annotation.BOOL;
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.distributed.print.business.bean.params.analyze.GradePaperDefineParam;
+import com.qmth.distributed.print.business.bean.result.analyze.GradeInitResult;
+import com.qmth.distributed.print.business.bean.result.analyze.GradePaperDefineResult;
 import com.qmth.distributed.print.business.service.GradeInitializeService;
 import com.qmth.distributed.print.business.service.GradePaperService;
 import com.qmth.teachcloud.common.contant.SystemConstant;
@@ -33,7 +35,7 @@ import javax.validation.constraints.Min;
 @RestController
 @RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/${prefix.url.grade}/paper")
 @Validated
-@Aac(strict = BOOL.FALSE, auth = BOOL.FALSE)
+//@Aac(strict = BOOL.FALSE, auth = BOOL.FALSE)
 public class GradePaperController {
     @Resource
     private GradePaperService gradePaperService;
@@ -42,7 +44,7 @@ public class GradePaperController {
 
     @ApiOperation(value = "成绩分析课程数据初始化")
     @RequestMapping(value = "/initialize", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
+    @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = GradeInitResult.class)})
     public Result findGradePaperInitialize(@ApiParam(value = "学期id") @RequestParam(required = false) String semesterId,
                                            @ApiParam(value = "考试id") @RequestParam(required = false) String examId,
                                            @ApiParam(value = "课程编号") @RequestParam(required = false) String courseCode,
@@ -55,7 +57,7 @@ public class GradePaperController {
 
     @ApiOperation(value = "成绩分析课程-查询定义")
     @RequestMapping(value = "/paper_define", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
+    @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = GradePaperDefineResult.class)})
     public Result findGradePaperDefine(@ApiParam(value = "课程编号", required = true) @RequestParam String paperNumber,
                                        @ApiParam(value = "课程编号", required = true) @RequestParam String paperType) {
         SysUser requestUser = (SysUser) ServletUtil.getRequestUser();

+ 3 - 2
distributed-print/src/main/java/com/qmth/distributed/print/api/GradePaperDimensionController.java

@@ -4,6 +4,7 @@ import com.qmth.boot.api.annotation.Aac;
 import com.qmth.boot.api.annotation.BOOL;
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.distributed.print.business.bean.params.analyze.GradePaperDimensionParam;
+import com.qmth.distributed.print.business.bean.result.analyze.GradePaperDimensionResult;
 import com.qmth.distributed.print.business.enums.DimensionEnum;
 import com.qmth.distributed.print.business.service.GradePaperDimensionService;
 import com.qmth.teachcloud.common.contant.SystemConstant;
@@ -36,14 +37,14 @@ import java.io.IOException;
 @RestController
 @RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/${prefix.url.grade}/paper/dimension")
 @Validated
-@Aac(strict = BOOL.FALSE, auth = BOOL.FALSE)
+//@Aac(strict = BOOL.FALSE, auth = BOOL.FALSE)
 public class GradePaperDimensionController {
     @Resource
     private GradePaperDimensionService gradePaperDimensionService;
 
     @ApiOperation(value = "成绩分析维度-查询")
     @RequestMapping(value = "/list", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
+    @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = GradePaperDimensionResult.class)})
     public Result findGradePaperDimensionList(@ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber,
                                               @ApiParam(value = "试卷类型", required = true) @RequestParam String paperType) {
 

+ 3 - 2
distributed-print/src/main/java/com/qmth/distributed/print/api/GradePaperStructController.java

@@ -4,6 +4,7 @@ import com.qmth.boot.api.annotation.Aac;
 import com.qmth.boot.api.annotation.BOOL;
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.distributed.print.business.bean.params.analyze.GradePaperStructParam;
+import com.qmth.distributed.print.business.bean.result.analyze.GradePaperStructResult;
 import com.qmth.distributed.print.business.service.GradePaperStructService;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.entity.SysUser;
@@ -33,14 +34,14 @@ import java.io.IOException;
 @RestController
 @RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/${prefix.url.grade}/paper/struct")
 @Validated
-@Aac(strict = BOOL.FALSE, auth = BOOL.FALSE)
+//@Aac(strict = BOOL.FALSE, auth = BOOL.FALSE)
 public class GradePaperStructController {
     @Resource
     private GradePaperStructService gradePaperStructService;
 
     @ApiOperation(value = "成绩分析试卷结构-查询")
     @RequestMapping(value = "/list", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
+    @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = GradePaperStructResult.class)})
     public Result findGradePaperStructList(@ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber,
                                            @ApiParam(value = "试卷类型", required = true) @RequestParam String paperType) {
 

+ 61 - 6
teachcloud-common/src/main/java/com/qmth/teachcloud/common/domain/PrintOpenDomain.java

@@ -1,11 +1,11 @@
 package com.qmth.teachcloud.common.domain;
 
+import io.swagger.annotations.ApiModelProperty;
+
 import java.io.Serializable;
 
 /**
  * @Description: 分布式印刷开放接口
- * @Param:
- * @return:
  * @Author: wangliang
  * @Date: 2020/4/10
  */
@@ -17,6 +17,21 @@ public class PrintOpenDomain implements Serializable {
 
     String callbackPwd;
 
+    @ApiModelProperty(value = "知学知考开放接口:试卷基础配置查询接口")
+    String paperConfig;
+
+    @ApiModelProperty(value = "知学知考开放接口:试卷考察点查询接口")
+    String paperDimension;
+
+    @ApiModelProperty(value = "知学知考开放接口:试卷蓝图查询接口")
+    String paperStructure;
+
+    @ApiModelProperty(value = "知学知考开放接口:试卷评价模型查询接口")
+    String paperEvaluation;
+
+    @ApiModelProperty(value = "知学知考开放接口:考生成绩查询接口")
+    String examStudentScore;
+
     public String getHostUrl() {
         return hostUrl;
     }
@@ -25,6 +40,14 @@ public class PrintOpenDomain implements Serializable {
         this.hostUrl = hostUrl;
     }
 
+    public String getCallbackUrlApi() {
+        return callbackUrlApi;
+    }
+
+    public void setCallbackUrlApi(String callbackUrlApi) {
+        this.callbackUrlApi = callbackUrlApi;
+    }
+
     public String getCallbackPwd() {
         return callbackPwd;
     }
@@ -33,11 +56,43 @@ public class PrintOpenDomain implements Serializable {
         this.callbackPwd = callbackPwd;
     }
 
-    public String getCallbackUrlApi() {
-        return callbackUrlApi;
+    public String getPaperConfig() {
+        return paperConfig;
     }
 
-    public void setCallbackUrlApi(String callbackUrlApi) {
-        this.callbackUrlApi = callbackUrlApi;
+    public void setPaperConfig(String paperConfig) {
+        this.paperConfig = paperConfig;
+    }
+
+    public String getPaperDimension() {
+        return paperDimension;
+    }
+
+    public void setPaperDimension(String paperDimension) {
+        this.paperDimension = paperDimension;
+    }
+
+    public String getPaperStructure() {
+        return paperStructure;
+    }
+
+    public void setPaperStructure(String paperStructure) {
+        this.paperStructure = paperStructure;
+    }
+
+    public String getPaperEvaluation() {
+        return paperEvaluation;
+    }
+
+    public void setPaperEvaluation(String paperEvaluation) {
+        this.paperEvaluation = paperEvaluation;
+    }
+
+    public String getExamStudentScore() {
+        return examStudentScore;
+    }
+
+    public void setExamStudentScore(String examStudentScore) {
+        this.examStudentScore = examStudentScore;
     }
 }

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

@@ -9,6 +9,8 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.google.common.reflect.TypeToken;
 import com.google.gson.Gson;
 import com.qmth.boot.core.enums.Platform;
+import com.qmth.boot.tools.signature.SignatureType;
+import com.qmth.teachcloud.common.SignatureEntityTest;
 import com.qmth.teachcloud.common.bean.auth.AuthBean;
 import com.qmth.teachcloud.common.bean.auth.ExpireTimeBean;
 import com.qmth.teachcloud.common.bean.dto.MenuDto;

+ 9 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/AnalyzeDataCheckService.java

@@ -0,0 +1,9 @@
+package com.qmth.teachcloud.report.business.service;
+
+/**
+ * @Description: 基础分析数据校验服务类
+ * @Author: CaoZixuan
+ * @Date: 2022-06-07
+ */
+public interface AnalyzeDataCheckService {
+}

+ 13 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/AnalyzeDataGetService.java

@@ -0,0 +1,13 @@
+package com.qmth.teachcloud.report.business.service;
+
+import org.springframework.stereotype.Service;
+
+/**
+ * @Description: 基础分析数据获取服务类
+ * @Author: CaoZixuan
+ * @Date: 2022-06-07
+ */
+@Service
+public interface AnalyzeDataGetService {
+
+}

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

@@ -0,0 +1,12 @@
+package com.qmth.teachcloud.report.business.service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 请求知学知考开放接口
+ * @Author: CaoZixuan
+ * @Date: 2022-06-07
+ */
+public interface CallPrintOpenApiService {
+}

+ 1 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/templete/strategy/CourseCodeSyncTaskService.java

@@ -34,6 +34,7 @@ public class CourseCodeSyncTaskService extends CalculateTaskTemplate {
         updateProgress(calculateParams);
 
         //TODO 此处加校验数据具体逻辑方法,推荐service方法然后加@Transactional注解
+
     }
 
     /**

+ 5 - 0
teachcloud-report/src/main/resources/application-dev.properties

@@ -140,6 +140,11 @@ yun.mark.studentScoreApi=/api/exam/student/score
 print.open.hostUrl=http://127.0.0.1:7001
 print.open.callbackUrlApi=/api/admin/print/notify/analysis/progress
 print.open.callbackPwd=123456
+print.open.paperConfig=/api/admin/open/paper_config
+print.open.paperDimension=/api/admin/open/paper_dimension
+print.open.paperStructure=/api/admin/open/paper_structure
+print.open.paperEvaluation=/api/admin/open/paper_evaluation
+print.open.examStudentScore=/api/admin/open/exam_student_score
 
 #============================================================================
 # \u914D\u7F6EJobStore