wangliang пре 4 година
родитељ
комит
c18d1ce09f
18 измењених фајлова са 549 додато и 3 уклоњено
  1. 142 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/result/CourseDimensionResult.java
  2. 29 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/result/TAExamCourseCollegeInspectResult.java
  3. 63 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/result/TBPaperStructResult.java
  4. 12 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/mapper/TAExamCourseCollegeInspectMapper.java
  5. 13 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/mapper/TBDimensionMapper.java
  6. 12 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/mapper/TBPaperStructMapper.java
  7. 11 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TAExamCourseCollegeInspectService.java
  8. 11 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TAExamCourseService.java
  9. 12 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TBDimensionService.java
  10. 11 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TBPaperStructService.java
  11. 18 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TAExamCourseCollegeInspectServiceImpl.java
  12. 55 3
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TAExamCourseServiceImpl.java
  13. 19 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBDimensionServiceImpl.java
  14. 18 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBPaperStructServiceImpl.java
  15. 31 0
      teachcloud-report-business/src/main/resources/mapper/TAExamCourseCollegeInspectMapper.xml
  16. 55 0
      teachcloud-report-business/src/main/resources/mapper/TBDimensionMapper.xml
  17. 26 0
      teachcloud-report-business/src/main/resources/mapper/TBPaperStructMapper.xml
  18. 11 0
      teachcloud-report/src/main/java/com/qmth/teachcloud/report/api/CourseController.java

+ 142 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/result/CourseDimensionResult.java

@@ -0,0 +1,142 @@
+package com.qmth.teachcloud.report.business.bean.result;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @Description: 课程维度result
+ * @Param:
+ * @return:
+ * @Author: wangliang
+ * @Date: 2021/6/10
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class CourseDimensionResult implements Serializable {
+
+    @ApiModelProperty(value = "考试id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long examId;
+
+    @ApiModelProperty(value = "考试编码")
+    private String examCode;
+
+    @ApiModelProperty(value = "科目编码")
+    private String courseCode;
+
+    @ApiModelProperty(value = "模块")
+    private String module;
+
+    @ApiModelProperty(value = "维度编码")
+    private String dimensionCode;
+
+    @ApiModelProperty(value = "维度名称")
+    private String dimensionName;
+
+    @ApiModelProperty(value = "简介")
+    private String interpretation;
+
+    @ApiModelProperty(value = "共计")
+    private Integer totalCount;
+
+    @ApiModelProperty(value = "学校比率")
+    private BigDecimal schScoreRate;
+
+    @ApiModelProperty(value = "学院比率")
+    private BigDecimal colScoreRate;
+
+    @ApiModelProperty(value = "学院名称")
+    private String collegeName;
+
+    public Long getExamId() {
+        return examId;
+    }
+
+    public void setExamId(Long examId) {
+        this.examId = examId;
+    }
+
+    public String getExamCode() {
+        return examCode;
+    }
+
+    public void setExamCode(String examCode) {
+        this.examCode = examCode;
+    }
+
+    public String getCourseCode() {
+        return courseCode;
+    }
+
+    public void setCourseCode(String courseCode) {
+        this.courseCode = courseCode;
+    }
+
+    public String getModule() {
+        return module;
+    }
+
+    public void setModule(String module) {
+        this.module = module;
+    }
+
+    public String getDimensionCode() {
+        return dimensionCode;
+    }
+
+    public void setDimensionCode(String dimensionCode) {
+        this.dimensionCode = dimensionCode;
+    }
+
+    public String getDimensionName() {
+        return dimensionName;
+    }
+
+    public void setDimensionName(String dimensionName) {
+        this.dimensionName = dimensionName;
+    }
+
+    public String getInterpretation() {
+        return interpretation;
+    }
+
+    public void setInterpretation(String interpretation) {
+        this.interpretation = interpretation;
+    }
+
+    public Integer getTotalCount() {
+        return totalCount;
+    }
+
+    public void setTotalCount(Integer totalCount) {
+        this.totalCount = totalCount;
+    }
+
+    public BigDecimal getSchScoreRate() {
+        return schScoreRate;
+    }
+
+    public void setSchScoreRate(BigDecimal schScoreRate) {
+        this.schScoreRate = schScoreRate;
+    }
+
+    public BigDecimal getColScoreRate() {
+        return colScoreRate;
+    }
+
+    public void setColScoreRate(BigDecimal colScoreRate) {
+        this.colScoreRate = colScoreRate;
+    }
+
+    public String getCollegeName() {
+        return collegeName;
+    }
+
+    public void setCollegeName(String collegeName) {
+        this.collegeName = collegeName;
+    }
+}

+ 29 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/result/TAExamCourseCollegeInspectResult.java

@@ -0,0 +1,29 @@
+package com.qmth.teachcloud.report.business.bean.result;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.qmth.teachcloud.report.business.entity.TAExamCourseCollegeInspect;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+/**
+ * @Description: 参考课程考察学院维度分析 result
+ * @Param:
+ * @return:
+ * @Author: wangliang
+ * @Date: 2021/6/10
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class TAExamCourseCollegeInspectResult extends TAExamCourseCollegeInspect implements Serializable {
+
+    @ApiModelProperty(value = "学院名称")
+    private String collegeName;
+
+    public String getCollegeName() {
+        return collegeName;
+    }
+
+    public void setCollegeName(String collegeName) {
+        this.collegeName = collegeName;
+    }
+}

+ 63 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/result/TBPaperStructResult.java

@@ -0,0 +1,63 @@
+package com.qmth.teachcloud.report.business.bean.result;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.qmth.teachcloud.report.business.entity.TBPaperStruct;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @Description: 试卷结构result
+ * @Param:
+ * @return:
+ * @Author: wangliang
+ * @Date: 2021/6/10
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class TBPaperStructResult extends TBPaperStruct implements Serializable {
+
+    @ApiModelProperty(value = "试卷类型")
+    private String paperType;
+
+    @ApiModelProperty(value = "得分率")
+    private BigDecimal scoreRate;
+
+    @ApiModelProperty(value = "难度")
+    private String difficult;
+
+    @ApiModelProperty(value = "效度")
+    private BigDecimal validity;
+
+    public String getPaperType() {
+        return paperType;
+    }
+
+    public void setPaperType(String paperType) {
+        this.paperType = paperType;
+    }
+
+    public BigDecimal getScoreRate() {
+        return scoreRate;
+    }
+
+    public void setScoreRate(BigDecimal scoreRate) {
+        this.scoreRate = scoreRate;
+    }
+
+    public String getDifficult() {
+        return difficult;
+    }
+
+    public void setDifficult(String difficult) {
+        this.difficult = difficult;
+    }
+
+    public BigDecimal getValidity() {
+        return validity;
+    }
+
+    public void setValidity(BigDecimal validity) {
+        this.validity = validity;
+    }
+}

+ 12 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/mapper/TAExamCourseCollegeInspectMapper.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.result.TAExamCourseCollegeInspectResult;
 import com.qmth.teachcloud.report.business.entity.TAExamCourseCollegeInspect;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
  * <p>
@@ -13,4 +17,12 @@ import com.qmth.teachcloud.report.business.entity.TAExamCourseCollegeInspect;
  */
 public interface TAExamCourseCollegeInspectMapper extends BaseMapper<TAExamCourseCollegeInspect> {
 
+    /**
+     * 查找科目维度
+     *
+     * @param examId
+     * @param courseCode
+     * @return
+     */
+    List<TAExamCourseCollegeInspectResult> findCourseDescriptiveStatisticsForCollege(@Param("examId") Long examId, @Param("courseCode") String courseCode);
 }

+ 13 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/mapper/TBDimensionMapper.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.result.CourseDimensionResult;
 import com.qmth.teachcloud.report.business.entity.TBDimension;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
  * <p>
@@ -13,4 +17,13 @@ import com.qmth.teachcloud.report.business.entity.TBDimension;
  */
 public interface TBDimensionMapper extends BaseMapper<TBDimension> {
 
+    /**
+     * 查找维度信息
+     *
+     * @param examId
+     * @param courseCode
+     * @param collegeId
+     * @return
+     */
+    List<CourseDimensionResult> findDimensionInfo(@Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("collegeId") Long collegeId);
 }

+ 12 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/mapper/TBPaperStructMapper.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.result.TBPaperStructResult;
 import com.qmth.teachcloud.report.business.entity.TBPaperStruct;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
  * <p>
@@ -13,4 +17,12 @@ import com.qmth.teachcloud.report.business.entity.TBPaperStruct;
  */
 public interface TBPaperStructMapper extends BaseMapper<TBPaperStruct> {
 
+    /**
+     * 查找试卷结构
+     *
+     * @param examId
+     * @param courseCode
+     * @return
+     */
+    List<TBPaperStructResult> findQuestionInfo(@Param("examId") Long examId, @Param("courseCode") String courseCode);
 }

+ 11 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TAExamCourseCollegeInspectService.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.result.TAExamCourseCollegeInspectResult;
 import com.qmth.teachcloud.report.business.entity.TAExamCourseCollegeInspect;
 
+import java.util.List;
+
 /**
  * <p>
  * 参考课程考察学院维度分析表 服务类
@@ -13,4 +16,12 @@ import com.qmth.teachcloud.report.business.entity.TAExamCourseCollegeInspect;
  */
 public interface TAExamCourseCollegeInspectService extends IService<TAExamCourseCollegeInspect> {
 
+    /**
+     * 查找科目维度
+     *
+     * @param examId
+     * @param courseCode
+     * @return
+     */
+    List<TAExamCourseCollegeInspectResult> findCourseDescriptiveStatisticsForCollege(Long examId, String courseCode);
 }

+ 11 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TAExamCourseService.java

@@ -47,4 +47,15 @@ public interface TAExamCourseService extends IService<TAExamCourse> {
     IPage<TAExamCourseResult> surveyAspointsList(IPage<Map> iPage, Long schoolId, Long examId, String courseCode, PublishStatusEnum publishStatus);
 
     Map<String, Object> getGradeDistribute(String semester, Long examId, String courseCode);
+
+    /**
+     * 考查课程考试分析接口
+     *
+     * @param examId
+     * @param semester
+     * @param courseCode
+     * @param schoolId
+     * @return
+     */
+    List<Object> surveyInspectAnalyseView(Long examId, SemesterEnum semester, String courseCode, Long schoolId);
 }

+ 12 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TBDimensionService.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.result.CourseDimensionResult;
 import com.qmth.teachcloud.report.business.entity.TBDimension;
 
+import java.util.List;
+
 /**
  * <p>
  * 考察点维度基础表 服务类
@@ -13,4 +16,13 @@ import com.qmth.teachcloud.report.business.entity.TBDimension;
  */
 public interface TBDimensionService extends IService<TBDimension> {
 
+    /**
+     * 查找维度信息
+     *
+     * @param examId
+     * @param courseCode
+     * @param collegeId
+     * @return
+     */
+    List<CourseDimensionResult> findDimensionInfo(Long examId, String courseCode, Long collegeId);
 }

+ 11 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TBPaperStructService.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.result.TBPaperStructResult;
 import com.qmth.teachcloud.report.business.entity.TBPaperStruct;
 
+import java.util.List;
+
 /**
  * <p>
  * 试卷结构表 服务类
@@ -13,4 +16,12 @@ import com.qmth.teachcloud.report.business.entity.TBPaperStruct;
  */
 public interface TBPaperStructService extends IService<TBPaperStruct> {
 
+    /**
+     * 查找试卷结构
+     *
+     * @param examId
+     * @param courseCode
+     * @return
+     */
+    List<TBPaperStructResult> findQuestionInfo(Long examId, String courseCode);
 }

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

@@ -1,11 +1,15 @@
 package com.qmth.teachcloud.report.business.service.impl;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.teachcloud.report.business.bean.result.TAExamCourseCollegeInspectResult;
 import com.qmth.teachcloud.report.business.entity.TAExamCourseCollegeInspect;
 import com.qmth.teachcloud.report.business.mapper.TAExamCourseCollegeInspectMapper;
 import com.qmth.teachcloud.report.business.service.TAExamCourseCollegeInspectService;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
+import java.util.List;
+
 /**
  * <p>
  * 参考课程考察学院维度分析表 服务实现类
@@ -17,4 +21,18 @@ import org.springframework.stereotype.Service;
 @Service
 public class TAExamCourseCollegeInspectServiceImpl extends ServiceImpl<TAExamCourseCollegeInspectMapper, TAExamCourseCollegeInspect> implements TAExamCourseCollegeInspectService {
 
+    @Resource
+    TAExamCourseCollegeInspectMapper taExamCourseCollegeInspectMapper;
+
+    /**
+     * 查找科目维度
+     *
+     * @param examId
+     * @param courseCode
+     * @return
+     */
+    @Override
+    public List<TAExamCourseCollegeInspectResult> findCourseDescriptiveStatisticsForCollege(Long examId, String courseCode) {
+        return taExamCourseCollegeInspectMapper.findCourseDescriptiveStatisticsForCollege(examId, courseCode);
+    }
 }

+ 55 - 3
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TAExamCourseServiceImpl.java

@@ -1,16 +1,19 @@
 package com.qmth.teachcloud.report.business.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.qmth.teachcloud.common.util.ServletUtil;
+import com.qmth.teachcloud.report.business.bean.result.CourseDimensionResult;
+import com.qmth.teachcloud.report.business.bean.result.TAExamCourseCollegeInspectResult;
 import com.qmth.teachcloud.report.business.bean.result.TAExamCourseResult;
-import com.qmth.teachcloud.report.business.entity.TAExamCourse;
-import com.qmth.teachcloud.report.business.entity.TAExamCourseRecord;
+import com.qmth.teachcloud.report.business.bean.result.TBPaperStructResult;
+import com.qmth.teachcloud.report.business.entity.*;
 import com.qmth.teachcloud.report.business.enums.PublishStatusEnum;
 import com.qmth.teachcloud.report.business.enums.SemesterEnum;
 import com.qmth.teachcloud.report.business.mapper.TAExamCourseMapper;
 import com.qmth.teachcloud.report.business.mapper.TAExamCourseRecordMapper;
-import com.qmth.teachcloud.report.business.service.TAExamCourseService;
+import com.qmth.teachcloud.report.business.service.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -38,6 +41,21 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
     @Resource
     TAExamCourseRecordMapper taExamCourseRecordMapper;
 
+    @Resource
+    TBPaperService tbPaperService;
+
+    @Resource
+    TAExamCourseCollegeInspectService taExamCourseCollegeInspectService;
+
+    @Resource
+    TBDimensionService tbDimensionService;
+
+    @Resource
+    TBCommonLevelConfigService tbCommonLevelConfigService;
+
+    @Resource
+    TBPaperStructService tbPaperStructService;
+
     /**
      * 开课课程考试总览列表接口
      *
@@ -108,4 +126,38 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
         map.put("grades", mapList);
         return map;
     }
+
+    /**
+     * 考查课程考试分析接口
+     *
+     * @param examId
+     * @param semester
+     * @param courseCode
+     * @param schoolId
+     * @return
+     */
+    @Override
+    public List<Object> surveyInspectAnalyseView(Long examId, SemesterEnum semester, String courseCode, Long schoolId) {
+        //查找试卷
+        QueryWrapper<TBPaper> tbPaperQueryWrapper = new QueryWrapper<>();
+        tbPaperQueryWrapper.lambda().eq(TBPaper::getExamId, examId)
+                .eq(TBPaper::getCourseCode, courseCode);
+        List<TBPaper> tbPaperList = tbPaperService.list(tbPaperQueryWrapper);
+
+        //查找科目学院维度
+        List<TAExamCourseCollegeInspectResult> taExamCourseCollegeInspectResultList = taExamCourseCollegeInspectService.findCourseDescriptiveStatisticsForCollege(examId, courseCode);
+
+        //查找维度
+        List<CourseDimensionResult> courseDimensionResultList = tbDimensionService.findDimensionInfo(examId, courseCode, 1L);
+
+        //查找难易度
+        QueryWrapper<TBCommonLevelConfig> tbCommonLevelConfigQueryWrapper = new QueryWrapper<>();
+        tbCommonLevelConfigQueryWrapper.lambda().eq(TBCommonLevelConfig::getExamId, examId)
+                .eq(TBCommonLevelConfig::getCourseCode, courseCode)
+                .eq(TBCommonLevelConfig::getLevelType, "难度等级");
+        List<TBCommonLevelConfig> tbCommonLevelConfigList = tbCommonLevelConfigService.list(tbCommonLevelConfigQueryWrapper);
+
+        List<TBPaperStructResult> tbPaperStructList = tbPaperStructService.findQuestionInfo(examId, courseCode);
+        return null;
+    }
 }

+ 19 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBDimensionServiceImpl.java

@@ -1,11 +1,15 @@
 package com.qmth.teachcloud.report.business.service.impl;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.teachcloud.report.business.bean.result.CourseDimensionResult;
 import com.qmth.teachcloud.report.business.entity.TBDimension;
 import com.qmth.teachcloud.report.business.mapper.TBDimensionMapper;
 import com.qmth.teachcloud.report.business.service.TBDimensionService;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
+import java.util.List;
+
 /**
  * <p>
  * 考察点维度基础表 服务实现类
@@ -17,4 +21,19 @@ import org.springframework.stereotype.Service;
 @Service
 public class TBDimensionServiceImpl extends ServiceImpl<TBDimensionMapper, TBDimension> implements TBDimensionService {
 
+    @Resource
+    TBDimensionMapper tbDimensionMapper;
+
+    /**
+     * 查找维度信息
+     *
+     * @param examId
+     * @param courseCode
+     * @param collegeId
+     * @return
+     */
+    @Override
+    public List<CourseDimensionResult> findDimensionInfo(Long examId, String courseCode, Long collegeId) {
+        return tbDimensionMapper.findDimensionInfo(examId, courseCode, collegeId);
+    }
 }

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

@@ -1,11 +1,15 @@
 package com.qmth.teachcloud.report.business.service.impl;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.teachcloud.report.business.bean.result.TBPaperStructResult;
 import com.qmth.teachcloud.report.business.entity.TBPaperStruct;
 import com.qmth.teachcloud.report.business.mapper.TBPaperStructMapper;
 import com.qmth.teachcloud.report.business.service.TBPaperStructService;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
+import java.util.List;
+
 /**
  * <p>
  * 试卷结构表 服务实现类
@@ -17,4 +21,18 @@ import org.springframework.stereotype.Service;
 @Service
 public class TBPaperStructServiceImpl extends ServiceImpl<TBPaperStructMapper, TBPaperStruct> implements TBPaperStructService {
 
+    @Resource
+    TBPaperStructMapper tbPaperStructMapper;
+
+    /**
+     * 查找试卷结构
+     *
+     * @param examId
+     * @param courseCode
+     * @return
+     */
+    @Override
+    public List<TBPaperStructResult> findQuestionInfo(Long examId, String courseCode) {
+        return tbPaperStructMapper.findQuestionInfo(examId, courseCode);
+    }
 }

+ 31 - 0
teachcloud-report-business/src/main/resources/mapper/TAExamCourseCollegeInspectMapper.xml

@@ -2,4 +2,35 @@
 <!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.TAExamCourseCollegeInspectMapper">
 
+    <select id="findCourseDescriptiveStatisticsForCollege" resultType="com.qmth.teachcloud.report.business.bean.result.TAExamCourseCollegeInspectResult">
+        select
+            so.name as collegeName,
+            round(convert(taecci.max_score, decimal(10, 4)), 2) as maxScore,
+            round(convert(taecci.min_score, decimal(10, 4)), 2) as minScore,
+            round(convert(taecci.avg_score, decimal(10, 4)), 2) as avgScore,
+            taecci.reality_count as realityCount,
+            taecci.absent_count as absentCount,
+            taecci.total_count as totalCount,
+            round(convert(taecci.upper_quartile, decimal(10, 4)), 2) as upperQuartile,
+            round(convert(taecci.median, decimal(10, 4)), 2) as median,
+            round(convert(taecci.lower_quartile, decimal(10, 4)), 2) as lowerQuartile,
+            taecci.mode,
+            round(convert(taecci.standard_deviation, decimal(10, 4)), 2) as standardDeviation,
+            round(convert(taecci.relative_position, decimal(10, 4)), 2) as relativePosition
+        from
+            t_a_exam_course_college_inspect taecci
+        join sys_org so on
+            so.id = taecci.college_id
+        <where>
+            <if test="courseCode != null and courseCode != ''">
+                and taecci.course_code = #{courseCode}
+            </if>
+            <if test="examId != null and examId != ''">
+                and taecci.exam_id = #{examId}
+            </if>
+            <if test="schoolId != null and schoolId != ''">
+                and taecci.school_id = #{schoolId}
+            </if>
+        </where>
+    </select>
 </mapper>

+ 55 - 0
teachcloud-report-business/src/main/resources/mapper/TBDimensionMapper.xml

@@ -2,4 +2,59 @@
 <!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.TBDimensionMapper">
 
+    <select id="findDimensionInfo" resultType="com.qmth.teachcloud.report.business.bean.result.CourseDimensionResult">
+        SELECT
+            tmp.exam_id AS examId,
+            (select tbe.exam_code from t_b_exam tbe where tbe.id = tmp.exam_id) as examCode,
+            tmp.course_code AS courseCode,
+            tmp.dimension_type AS module,
+            code_primary AS dimensionCode,
+            name_primary AS dimensionName,
+            interpretation,
+            total_count AS totalCount,
+            round(CONVERT( papDio.score_rate * 100 , DECIMAL (10 , 4 )),2) AS schScoreRate,
+            round(CONVERT( colDio.score_rate * 100 , DECIMAL (10 , 4 )),2) AS colScoreRate,
+            colDio.inspect_college_name AS collegeName
+        FROM
+            (SELECT
+                 exam_id,
+                 course_code,
+                 dimension_type,
+                 code_primary,
+                 name_primary,
+                 interpretation
+             FROM
+                 t_b_dimension
+             GROUP BY exam_id, course_code , dimension_type , code_primary , name_primary , interpretation) tmp
+                INNER JOIN
+            (SELECT
+                 exam_id,
+                 course_code,
+                 dimension_type,
+                 dimension_code,
+                 AVG(score_rate) AS score_rate,
+                 AVG(total_count) AS total_count
+             FROM
+                  t_a_exam_course_dio
+             GROUP BY exam_id , course_code , dimension_type , dimension_code) papDio ON tmp.code_primary = papDio.dimension_code
+                AND tmp.dimension_type = papDio.dimension_type
+                AND tmp.exam_id = papDio.exam_id
+                AND tmp.course_code = papDio.course_code
+                INNER JOIN
+            t_a_exam_course_college_inspect_dio colDio ON tmp.code_primary = colDio.dimension_code
+                AND tmp.dimension_type = colDio.dimension_type
+                AND papDio.exam_id = colDio.exam_id
+                AND papDio.course_code = colDio.course_code
+                <where>
+                    <if test="examId != null and examId != ''">
+                        and papDio.exam_id = #{examId}
+                    </if>
+                    <if test="courseCode != null and courseCode != ''">
+                        and papDio.course_code = #{courseCode}
+                    </if>
+                    <if test="collegeId != null and collegeId != ''">
+                        and inspect_college_id = #{collegeId}
+                    </if>
+                </where>
+    </select>
 </mapper>

+ 26 - 0
teachcloud-report-business/src/main/resources/mapper/TBPaperStructMapper.xml

@@ -2,4 +2,30 @@
 <!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.TBPaperStructMapper">
 
+    <select id="findQuestionInfo" resultType="com.qmth.teachcloud.report.business.bean.result.TBPaperStructResult">
+        SELECT
+            tbp.paper_type AS paperType,
+            tbps.big_question_number AS mainNumber,
+            tbps.small_question_number AS subNumber,
+            tbps.full_score AS fullScore,
+            tbps.knowledge_dimension AS knowledgeDimension,
+            tbps.ability_dimension AS abilityDimension,
+            round(convert(taps.score_rate * 100,decimal(10,4)),2) AS scoreRate,
+            taps.difficult,
+            convert(taps.validity,decimal(10,4)) AS validity
+        FROM
+            t_b_paper_struct tbps
+            join t_a_paper_struct taps
+            on taps.paper_struct_id = tbps.id
+            join t_b_paper tbp
+            on tbp.id = paper_id
+        <where>
+            <if test="examId != null and examId != ''">
+                and tbp.exam_id = #{examId}
+            </if>
+            <if test="courseCode != null and courseCode != ''">
+                and tbp.course_code = #{courseCode}
+            </if>
+        </where>
+    </select>
 </mapper>

+ 11 - 0
teachcloud-report/src/main/java/com/qmth/teachcloud/report/api/CourseController.java

@@ -36,6 +36,17 @@ public class CourseController {
         return ResultUtil.ok(taExamCourseService.surveyTeacherList(new Page<>(pageNumber, pageSize), SystemConstant.convertIdToLong(examId), semester, SystemConstant.convertIdToLong(schoolId)));
     }
 
+    @ApiOperation(value = "考查课程考试分析接口")
+    @RequestMapping(value = "/survey_inspect_analyse/view", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "考试科目信息", response = TAExamCourseResult.class)})
+    public Result surveyInspectAnalyseView(@ApiParam(value = "考试id", required = true) @RequestParam String examId,
+                                           @ApiParam(value = "学期", required = true) @RequestParam SemesterEnum semester,
+                                           @ApiParam(value = "科目编码", required = true) @RequestParam String courseCode,
+                                           @ApiParam(value = "学校id", required = true) @RequestParam String schoolId) {
+
+        return ResultUtil.ok();
+    }
+
     @ApiOperation(value = "赋分管理列表接口")
     @RequestMapping(value = "/survey_aspoints/list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "考试科目信息", response = TAExamCourseResult.class)})