wangliang 1 rok temu
rodzic
commit
62f96d1b89
13 zmienionych plików z 342 dodań i 38 usunięć
  1. 35 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/report/CourseTargetDto.java
  2. 11 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/report/ReportCommonDto.java
  3. 20 3
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/report/ReportCourseBasicInfoDto.java
  4. 9 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/report/ReportCourseEvaluationResultDetailDto.java
  5. 17 16
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/report/ReportCourseEvaluationResultDto.java
  6. 16 5
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/report/ReportCourseEvaluationSpreadDto.java
  7. 0 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/report/ReportCourseTargetViewDto.java
  8. 11 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/report/ReportEvaluationDto.java
  9. 0 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/report/ReportExamStudentDto.java
  10. 10 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/report/ReportScoreViewDto.java
  11. 13 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/report/ReportResult.java
  12. 14 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/entity/TRBasicInfo.java
  13. 186 7
      distributed-print/src/main/java/com/qmth/distributed/print/api/TRBasicInfoController.java

+ 35 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/report/CourseTargetDto.java

@@ -41,9 +41,44 @@ public class CourseTargetDto implements Serializable {
     @ApiModelProperty(value = "知识点集合")
     private List<DimensionDto> dimensionList;
 
+    @ApiModelProperty(value = "目标达成评价值")
+    private Double evaluationValue;
+
     @ApiModelProperty(value = "评价方式集合")
     private List<ReportEvaluationDto> evaluationList;
 
+    public CourseTargetDto() {
+
+    }
+
+    public CourseTargetDto(Long targetId, String targetName, Long evaluationId, String evaluation, String evaluationDesc, List<ReportEvaluationDto> evaluationList
+            , Double evaluationValue) {
+        this.targetId = targetId;
+        this.targetName = targetName;
+        this.evaluationId = evaluationId;
+        this.evaluation = evaluation;
+        this.evaluationDesc = evaluationDesc;
+        this.evaluationList = evaluationList;
+        this.evaluationValue = evaluationValue;
+    }
+
+    public CourseTargetDto(Long targetId, String targetName, Long evaluationId, String evaluation, String evaluationDesc, Double evaluationValue) {
+        this.targetId = targetId;
+        this.targetName = targetName;
+        this.evaluationId = evaluationId;
+        this.evaluation = evaluation;
+        this.evaluationDesc = evaluationDesc;
+        this.evaluationValue = evaluationValue;
+    }
+
+    public Double getEvaluationValue() {
+        return evaluationValue;
+    }
+
+    public void setEvaluationValue(Double evaluationValue) {
+        this.evaluationValue = evaluationValue;
+    }
+
     public List<ReportEvaluationDto> getEvaluationList() {
         return evaluationList;
     }

+ 11 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/report/ReportCommonDto.java

@@ -14,7 +14,6 @@ import java.io.Serializable;
  * @Author: wangliang
  * @Date: 2024/2/26
  */
-@JsonInclude(JsonInclude.Include.NON_NULL)
 public class ReportCommonDto implements Serializable {
 
     @JsonSerialize(using = ToStringSerializer.class)
@@ -30,6 +29,17 @@ public class ReportCommonDto implements Serializable {
     @ApiModelProperty(value = "试卷编码")
     private String paperNumber;
 
+    public ReportCommonDto() {
+
+    }
+
+    public ReportCommonDto(Long examId, String courseCode, String couserName, String paperNumber) {
+        this.examId = examId;
+        this.courseCode = courseCode;
+        this.couserName = couserName;
+        this.paperNumber = paperNumber;
+    }
+
     public Long getExamId() {
         return examId;
     }

+ 20 - 3
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/report/ReportCourseBasicInfoDto.java

@@ -1,8 +1,7 @@
 package com.qmth.distributed.print.business.bean.dto.report;
 
 import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import com.qmth.distributed.print.business.entity.TRBasicInfo;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.io.Serializable;
@@ -14,7 +13,6 @@ import java.io.Serializable;
  * @Author: wangliang
  * @Date: 2024/2/26
  */
-@JsonInclude(JsonInclude.Include.NON_NULL)
 public class ReportCourseBasicInfoDto implements Serializable {
 
     @ApiModelProperty(value = "课程性质")
@@ -53,6 +51,25 @@ public class ReportCourseBasicInfoDto implements Serializable {
     @ApiModelProperty(value = "评价参与人")
     private String participant;
 
+    public ReportCourseBasicInfoDto() {
+
+    }
+
+    public ReportCourseBasicInfoDto(TRBasicInfo trBasicInfo) {
+        this.courseType = trBasicInfo.getCourseType();
+        this.credit = trBasicInfo.getCredit();
+        this.period = trBasicInfo.getPeriod();
+        this.evaluationMode = trBasicInfo.getEvaluationMode();
+        this.openTime = trBasicInfo.getOpenTime();
+        this.teachingObject = trBasicInfo.getTeachingObject();
+        this.selectionCount = trBasicInfo.getSelectionCount();
+        this.participantCount = trBasicInfo.getParticipantCount();
+        this.courseDegree = trBasicInfo.getCourseDegree();
+        this.teacher = trBasicInfo.getTeacher();
+        this.director = trBasicInfo.getDirector();
+        this.participant = trBasicInfo.getParticipant();
+    }
+
     public String getCredit() {
         return credit;
     }

+ 9 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/report/ReportCourseEvaluationResultDetailDto.java

@@ -13,7 +13,6 @@ import java.util.List;
  * @Author: wangliang
  * @Date: 2024/2/26
  */
-@JsonInclude(JsonInclude.Include.NON_NULL)
 public class ReportCourseEvaluationResultDetailDto implements Serializable {
 
     @ApiModelProperty(value = "考生集合")
@@ -22,6 +21,15 @@ public class ReportCourseEvaluationResultDetailDto implements Serializable {
     @ApiModelProperty(value = "课程目标达成评价值图")
     private List<ReportCourseTargetViewDto> courseTargetList;
 
+    public ReportCourseEvaluationResultDetailDto() {
+
+    }
+
+    public ReportCourseEvaluationResultDetailDto(List<ReportExamStudentDto> examStudentList, List<ReportCourseTargetViewDto> courseTargetList) {
+        this.examStudentList = examStudentList;
+        this.courseTargetList = courseTargetList;
+    }
+
     public List<ReportExamStudentDto> getExamStudentList() {
         return examStudentList;
     }

+ 17 - 16
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/report/ReportCourseEvaluationResultDto.java

@@ -1,6 +1,5 @@
 package com.qmth.distributed.print.business.bean.dto.report;
 
-import com.fasterxml.jackson.annotation.JsonInclude;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.io.Serializable;
@@ -13,21 +12,31 @@ import java.util.List;
  * @Author: wangliang
  * @Date: 2024/2/26
  */
-@JsonInclude(JsonInclude.Include.NON_NULL)
 public class ReportCourseEvaluationResultDto implements Serializable {
 
     @ApiModelProperty(value = "课程总目标")
     private String target;
 
     @ApiModelProperty(value = "课程目标达成评价值")
-    private String targetValue;
-
-    @ApiModelProperty(value = "目标达成评价值")
-    private String evaluationValue;
+    private Double targetValue;
 
     @ApiModelProperty(value = "课程目标集合")
     private List<CourseTargetDto> targetList;
 
+    public ReportCourseEvaluationResultDto() {
+
+    }
+
+    public ReportCourseEvaluationResultDto(String target, Double targetValue, List<CourseTargetDto> targetList) {
+        this.target = target;
+        this.targetValue = targetValue;
+        this.targetList = targetList;
+    }
+
+    public ReportCourseEvaluationResultDto(List<CourseTargetDto> targetList) {
+        this.targetList = targetList;
+    }
+
     public String getTarget() {
         return target;
     }
@@ -36,22 +45,14 @@ public class ReportCourseEvaluationResultDto implements Serializable {
         this.target = target;
     }
 
-    public String getTargetValue() {
+    public Double getTargetValue() {
         return targetValue;
     }
 
-    public void setTargetValue(String targetValue) {
+    public void setTargetValue(Double targetValue) {
         this.targetValue = targetValue;
     }
 
-    public String getEvaluationValue() {
-        return evaluationValue;
-    }
-
-    public void setEvaluationValue(String evaluationValue) {
-        this.evaluationValue = evaluationValue;
-    }
-
     public List<CourseTargetDto> getTargetList() {
         return targetList;
     }

+ 16 - 5
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/report/ReportCourseEvaluationSpreadDto.java

@@ -1,6 +1,5 @@
 package com.qmth.distributed.print.business.bean.dto.report;
 
-import com.fasterxml.jackson.annotation.JsonInclude;
 import com.qmth.distributed.print.business.bean.result.report.PaperStructResult;
 import io.swagger.annotations.ApiModelProperty;
 
@@ -14,14 +13,26 @@ import java.util.List;
  * @Author: wangliang
  * @Date: 2024/2/26
  */
-@JsonInclude(JsonInclude.Include.NON_NULL)
 public class ReportCourseEvaluationSpreadDto implements Serializable {
 
     @ApiModelProperty(value = "题目信息集合")
     private List<PaperStructResult> questionInfo;
 
     @ApiModelProperty(value = "分数图")
-    private List<ReportScoreViewDto> scoreList;
+    private ReportScoreViewDto scoreList;
+
+    public ReportCourseEvaluationSpreadDto() {
+
+    }
+
+    public ReportCourseEvaluationSpreadDto(List<PaperStructResult> questionInfo) {
+        this.questionInfo = questionInfo;
+    }
+
+    public ReportCourseEvaluationSpreadDto(List<PaperStructResult> questionInfo, ReportScoreViewDto scoreList) {
+        this.questionInfo = questionInfo;
+        this.scoreList = scoreList;
+    }
 
     public List<PaperStructResult> getQuestionInfo() {
         return questionInfo;
@@ -31,11 +42,11 @@ public class ReportCourseEvaluationSpreadDto implements Serializable {
         this.questionInfo = questionInfo;
     }
 
-    public List<ReportScoreViewDto> getScoreList() {
+    public ReportScoreViewDto getScoreList() {
         return scoreList;
     }
 
-    public void setScoreList(List<ReportScoreViewDto> scoreList) {
+    public void setScoreList(ReportScoreViewDto scoreList) {
         this.scoreList = scoreList;
     }
 }

+ 0 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/report/ReportCourseTargetViewDto.java

@@ -15,7 +15,6 @@ import java.util.List;
  * @Author: wangliang
  * @Date: 2024/2/26
  */
-@JsonInclude(JsonInclude.Include.NON_NULL)
 public class ReportCourseTargetViewDto implements Serializable {
 
     @JsonSerialize(using = ToStringSerializer.class)

+ 11 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/report/ReportEvaluationDto.java

@@ -28,6 +28,17 @@ public class ReportEvaluationDto implements Serializable {
     @ApiModelProperty(value = "实际平均分")
     private Double avg;
 
+    public ReportEvaluationDto() {
+
+    }
+
+    public ReportEvaluationDto(String name, String weight, Double score, Double avg) {
+        this.name = name;
+        this.weight = weight;
+        this.score = score;
+        this.avg = avg;
+    }
+
     public String getName() {
         return name;
     }

+ 0 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/report/ReportExamStudentDto.java

@@ -13,7 +13,6 @@ import java.util.List;
  * @Author: wangliang
  * @Date: 2024/2/26
  */
-@JsonInclude(JsonInclude.Include.NON_NULL)
 public class ReportExamStudentDto implements Serializable {
 
     @ApiModelProperty(value = "考生姓名")

+ 10 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/report/ReportScoreViewDto.java

@@ -1,6 +1,5 @@
 package com.qmth.distributed.print.business.bean.dto.report;
 
-import com.fasterxml.jackson.annotation.JsonInclude;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.io.Serializable;
@@ -13,7 +12,6 @@ import java.util.List;
  * @Author: wangliang
  * @Date: 2024/2/26
  */
-@JsonInclude(JsonInclude.Include.NON_NULL)
 public class ReportScoreViewDto implements Serializable {
 
     @ApiModelProperty(value = "不及格人数")
@@ -25,6 +23,16 @@ public class ReportScoreViewDto implements Serializable {
     @ApiModelProperty(value = "分数范围")
     private List<ReportScoreRangeViewDto> scoreRange;
 
+    public ReportScoreViewDto() {
+
+    }
+
+    public ReportScoreViewDto(Integer failCount, Double failRate, List<ReportScoreRangeViewDto> scoreRange) {
+        this.failCount = failCount;
+        this.failRate = failRate;
+        this.scoreRange = scoreRange;
+    }
+
     public Integer getFailCount() {
         return failCount;
     }

+ 13 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/report/ReportResult.java

@@ -35,6 +35,19 @@ public class ReportResult implements Serializable {
     @TableField(exist = false)
     private ReportCourseEvaluationResultDetailDto courseEvaluationResultDetailInfo;
 
+    public ReportResult() {
+
+    }
+
+    public ReportResult(ReportCommonDto commonInfo, ReportCourseBasicInfoDto courseBasicInfo, ReportCourseEvaluationSpreadDto courseEvaluationSpreadInfo
+            , ReportCourseEvaluationResultDto courseEvaluationResultInfo, ReportCourseEvaluationResultDetailDto courseEvaluationResultDetailInfo) {
+        this.commonInfo = commonInfo;
+        this.courseBasicInfo = courseBasicInfo;
+        this.courseEvaluationSpreadInfo = courseEvaluationSpreadInfo;
+        this.courseEvaluationResultInfo = courseEvaluationResultInfo;
+        this.courseEvaluationResultDetailInfo = courseEvaluationResultDetailInfo;
+    }
+
     public ReportCommonDto getCommonInfo() {
         return commonInfo;
     }

+ 14 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/entity/TRBasicInfo.java

@@ -1,5 +1,6 @@
 package com.qmth.distributed.print.business.entity;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import com.qmth.distributed.print.business.bean.result.report.ReportResult;
@@ -19,7 +20,7 @@ import java.io.Serializable;
  * @since 2024-02-18
  */
 @ApiModel(value = "TRBasicInfo对象", description = "报告基本情况表")
-public class TRBasicInfo extends ReportResult implements Serializable {
+public class TRBasicInfo implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
@@ -106,6 +107,10 @@ public class TRBasicInfo extends ReportResult implements Serializable {
     @ApiModelProperty(value = "课程考核成绩评价明细结果")
     private String courseEvaluationResultDetail;
 
+    @ApiModelProperty(value = "报告信息")
+    @TableField(exist = false)
+    private ReportResult reportResult;
+
     public TRBasicInfo() {
 
     }
@@ -166,6 +171,14 @@ public class TRBasicInfo extends ReportResult implements Serializable {
         this.courseEvaluationResultDetail = trBasicInfo.getCourseEvaluationResultDetail();
     }
 
+    public ReportResult getReportResult() {
+        return reportResult;
+    }
+
+    public void setReportResult(ReportResult reportResult) {
+        this.reportResult = reportResult;
+    }
+
     public String getCredit() {
         return credit;
     }

+ 186 - 7
distributed-print/src/main/java/com/qmth/distributed/print/api/TRBasicInfoController.java

@@ -1,15 +1,17 @@
 package com.qmth.distributed.print.api;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.google.gson.reflect.TypeToken;
 import com.qmth.boot.api.constant.ApiConstant;
+import com.qmth.distributed.print.business.bean.dto.report.*;
 import com.qmth.distributed.print.business.bean.result.ScoreResult;
+import com.qmth.distributed.print.business.bean.result.report.PaperStructResult;
 import com.qmth.distributed.print.business.bean.result.report.ReportResult;
+import com.qmth.distributed.print.business.entity.TCPaperStruct;
 import com.qmth.distributed.print.business.entity.TRBasicInfo;
-import com.qmth.distributed.print.business.service.BasicExamService;
-import com.qmth.distributed.print.business.service.ExamStudentService;
-import com.qmth.distributed.print.business.service.PrintCommonService;
-import com.qmth.distributed.print.business.service.TRBasicInfoService;
+import com.qmth.distributed.print.business.service.*;
 import com.qmth.teachcloud.common.annotation.OperationLogDetail;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.entity.BasicExam;
@@ -17,12 +19,22 @@ import com.qmth.teachcloud.common.entity.BasicSemester;
 import com.qmth.teachcloud.common.entity.SysUser;
 import com.qmth.teachcloud.common.enums.log.CustomizedOperationTypeEnum;
 import com.qmth.teachcloud.common.service.BasicSemesterService;
+import com.qmth.teachcloud.common.util.GsonUtil;
+import com.qmth.teachcloud.common.util.JacksonUtil;
 import com.qmth.teachcloud.common.util.ResultUtil;
 import com.qmth.teachcloud.common.util.ServletUtil;
+import com.qmth.teachcloud.mark.bean.archivescore.OverViewVo;
+import com.qmth.teachcloud.mark.bean.archivescore.ScoreRangeVo;
+import com.qmth.teachcloud.mark.bean.archivescore.ScoreReportVo;
 import com.qmth.teachcloud.mark.entity.MarkPaper;
+import com.qmth.teachcloud.mark.entity.MarkStudent;
+import com.qmth.teachcloud.mark.mapper.MarkStudentMapper;
 import com.qmth.teachcloud.mark.service.MarkPaperService;
+import com.qmth.teachcloud.mark.service.MarkStudentService;
+import com.qmth.teachcloud.mark.utils.Calculator;
 import io.swagger.annotations.*;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
 import org.springframework.validation.BindingResult;
 import org.springframework.web.bind.annotation.*;
 
@@ -31,7 +43,9 @@ import javax.validation.Valid;
 import javax.validation.constraints.Max;
 import javax.validation.constraints.Min;
 import java.io.IOException;
-import java.util.Objects;
+import java.util.*;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicReference;
 
 /**
  * <p>
@@ -64,6 +78,15 @@ public class TRBasicInfoController {
     @Resource
     BasicExamService basicExamService;
 
+    @Resource
+    TCPaperStructService tcPaperStructService;
+
+    @Resource
+    MarkStudentMapper markStudentMapper;
+
+    @Resource
+    MarkStudentService markStudentService;
+
     @ApiOperation(value = "报告管理列表")
     @RequestMapping(value = "/report/list", method = RequestMethod.POST)
     @OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.SEARCH)
@@ -97,9 +120,75 @@ public class TRBasicInfoController {
 
             //TODO 有测试数据,待肖飞补充授课对象和任课老师数据
             trBasicInfo = new TRBasicInfo(examId, courseCode, markPaper.getCourseName(), paperNumber, basicSemester.getName(), "测试班级1", "测试老师1", 40, sysUser.getId());
-            trBasicInfoService.save(trBasicInfo);
         }
-        return ResultUtil.ok(trBasicInfo);
+        //测试数据
+
+        //公共信息
+        ReportCommonDto reportCommonDto = new ReportCommonDto(examId, courseCode, markPaper.getCourseName(), paperNumber);
+        //课程基本情况
+        ReportCourseBasicInfoDto reportCourseBasicInfoDto = new ReportCourseBasicInfoDto(trBasicInfo);
+
+        //课程目标考核分布-题目信息
+        TCPaperStruct tcPaperStruct = tcPaperStructService.getOne(new QueryWrapper<TCPaperStruct>().lambda().eq(TCPaperStruct::getExamId, examId).eq(TCPaperStruct::getCourseCode, courseCode).eq(TCPaperStruct::getPaperNumber, paperNumber));
+        Objects.requireNonNull(tcPaperStruct, "未找到试卷蓝图信息");
+        List<PaperStructResult> paperStructResultList = GsonUtil.fromJson(tcPaperStruct.getPaperStruct(), new TypeToken<List<PaperStructResult>>() {
+        }.getType());
+
+        ReportCourseEvaluationSpreadDto reportCourseEvaluationSpreadDto = new ReportCourseEvaluationSpreadDto(paperStructResultList);
+
+        //课程目标考核分布-分数图
+        OverViewVo overViewVo = markStudentMapper.overview(examId, paperNumber);
+        Objects.requireNonNull(overViewVo, "未找到分数信息");
+
+        ScoreReportVo ret = new ScoreReportVo();
+        fillScoreRange(ret, examId, paperNumber, markPaper);
+        List<ScoreRangeVo> scoreRangeVoList = ret.getScoreRange();
+        if (!CollectionUtils.isEmpty(scoreRangeVoList)) {
+            Integer failCount = scoreRangeVoList.get(0).getStudentCount();//第一行数据默认为不及格
+            Double failRate = scoreRangeVoList.get(0).getRate();
+
+            scoreRangeVoList.remove(0);
+            List<ReportScoreRangeViewDto> scoreRangeViewDtoList = GsonUtil.fromJson(JacksonUtil.parseJson(scoreRangeVoList), new TypeToken<List<ReportScoreRangeViewDto>>() {
+            }.getType());
+            ReportScoreViewDto reportScoreViewDto = new ReportScoreViewDto(failCount, failRate, scoreRangeViewDtoList);
+            reportCourseEvaluationSpreadDto.setScoreList(reportScoreViewDto);
+        }
+        trBasicInfo.setCourseEvaluationSpread(JacksonUtil.parseJson(reportCourseEvaluationSpreadDto));
+
+        //TODO 课程考核成绩评价结果-待曹子轩补充目标/评价方式数据,有测试数据
+        ReportCourseEvaluationResultDto reportCourseEvaluationResultDto = null;
+        if (!CollectionUtils.isEmpty(paperStructResultList)) {
+            Map<Long, String> targetMap = new LinkedHashMap<>();
+            for (PaperStructResult paperStructResult : paperStructResultList) {
+                List<CourseTargetDto> courseTargetDtoList = paperStructResult.getTargetList();
+                for (CourseTargetDto courseTargetDto : courseTargetDtoList) {
+                    targetMap.put(courseTargetDto.getTargetId(), courseTargetDto.getTargetName());
+                }
+            }
+            List<CourseTargetDto> targetList = new ArrayList<>(targetMap.size());
+            AtomicInteger sequenceId = new AtomicInteger(1);//流程连接id
+            AtomicReference<Double> targetValue = new AtomicReference<>(0.0d);
+            targetMap.forEach((k, v) -> {
+                List<ReportEvaluationDto> reportEvaluationDtoList = new ArrayList<>();
+                reportEvaluationDtoList.add(new ReportEvaluationDto("平时作业" + sequenceId.get(), "30%", 40d, 25d));
+                reportEvaluationDtoList.add(new ReportEvaluationDto("期末考试", "70%", 60d, 40d));
+                CourseTargetDto courseTargetDto = new CourseTargetDto(k, v, Long.parseLong(String.valueOf(sequenceId.get())), "评价方式" + sequenceId.get(), "评价方式描述" + sequenceId.get(), reportEvaluationDtoList, 0.5d + sequenceId.get());
+                targetList.add(courseTargetDto);
+                targetValue.set(targetValue.get().doubleValue() + courseTargetDto.getEvaluationValue().doubleValue());
+                sequenceId.incrementAndGet();
+            });
+            reportCourseEvaluationResultDto = new ReportCourseEvaluationResultDto("测试课程总目标1", targetValue.get(), targetList);
+            trBasicInfo.setCourseEvaluationResult(JacksonUtil.parseJson(reportCourseEvaluationResultDto));
+        }
+
+        //课程目标达成评价明细结果-考生集合
+
+
+        //课程目标达成评价明细结果-课程目标达成评价值图
+        trBasicInfoService.saveOrUpdate(trBasicInfo);
+
+        trBasicInfo.setReportResult(new ReportResult(reportCommonDto, reportCourseBasicInfoDto, reportCourseEvaluationSpreadDto, reportCourseEvaluationResultDto, null));
+        return ResultUtil.ok(trBasicInfo.getReportResult());
     }
 
     @ApiOperation(value = "保存报告")
@@ -130,4 +219,94 @@ public class TRBasicInfoController {
         TRBasicInfo trBasicInfo = trBasicInfoService.getOne(new QueryWrapper<TRBasicInfo>().lambda().eq(TRBasicInfo::getExamId, examId).eq(TRBasicInfo::getCourseCode, courseCode).eq(TRBasicInfo::getPaperNumber, paperNumber));
         Objects.requireNonNull(trBasicInfo, "没有报告信息");
     }
+
+    /**
+     * 计算分数范围
+     *
+     * @param ret
+     * @param examId
+     * @param paperNumber
+     * @param markPaper
+     */
+    private void fillScoreRange(ScoreReportVo ret, Long examId, String paperNumber, MarkPaper markPaper) {
+        int toltal = getCountByPaperNumber(examId, paperNumber);
+        //分数区间
+        Double passScore = markPaper.getPassScore();//及格分
+        Objects.requireNonNull(passScore, "及格分为空");
+
+        Double totalScore = markPaper.getTotalScore();
+        Objects.requireNonNull(totalScore, "试卷满分为空");
+
+        List<ScoreRangeVo> scoreRange = new ArrayList<>();
+        ret.setScoreRange(scoreRange);
+
+        //开始、结束分数区间
+        Double startInterval = 0.5d, endInterval = 9.5d, increaseStartScore = passScore - startInterval,
+                increaseEndScore = increaseStartScore + startInterval + endInterval;
+        scoreRange.add(getScoreRangeVo(toltal, examId, paperNumber, 1.0d, increaseStartScore));
+        increaseStartScore = increaseStartScore + startInterval;
+        increaseEndScore = increaseStartScore + endInterval;
+        if (totalScore.doubleValue() - increaseEndScore.doubleValue() == startInterval || increaseEndScore.doubleValue() >= totalScore.doubleValue()) {
+            increaseEndScore = totalScore;
+            scoreRange.add(getScoreRangeVo(toltal, examId, paperNumber, increaseStartScore, increaseEndScore));
+        } else {
+            while (increaseEndScore.doubleValue() < totalScore.doubleValue()) {
+                scoreRange.add(getScoreRangeVo(toltal, examId, paperNumber, increaseStartScore, increaseEndScore));
+                increaseStartScore = increaseEndScore + startInterval;
+                increaseEndScore = increaseStartScore + endInterval;
+                if (totalScore.doubleValue() - increaseEndScore.doubleValue() == startInterval || increaseEndScore.doubleValue() >= totalScore.doubleValue()) {
+                    increaseEndScore = totalScore;
+                    scoreRange.add(getScoreRangeVo(toltal, examId, paperNumber, increaseStartScore, increaseEndScore));
+                }
+            }
+        }
+    }
+
+    /**
+     * 获取考生人数
+     *
+     * @param examId
+     * @param paperNumber
+     * @return
+     */
+    private int getCountByPaperNumber(Long examId, String paperNumber) {
+        QueryWrapper<MarkStudent> wrapper = new QueryWrapper<>();
+        LambdaQueryWrapper<MarkStudent> lw = wrapper.lambda();
+        lw.eq(MarkStudent::getExamId, examId);
+        lw.eq(MarkStudent::getPaperNumber, paperNumber);
+        return markStudentService.count(wrapper);
+    }
+
+    /**
+     * 计算分数比率
+     *
+     * @param toltal
+     * @param examId
+     * @param paperNumber
+     * @param start
+     * @param end
+     * @return
+     */
+    private ScoreRangeVo getScoreRangeVo(int toltal, Long examId, String paperNumber, Double start, Double end) {
+        int count = getCount(examId, paperNumber, start, end);
+        Double rate = null;
+        if (toltal != 0) {
+            rate = Calculator.multiply(count, toltal, 2);
+        }
+        ScoreRangeVo vo = new ScoreRangeVo(count, start, end, rate);
+        return vo;
+    }
+
+    /**
+     * 计算分数范围人数
+     *
+     * @param examId
+     * @param paperNumber
+     * @param start
+     * @param end
+     * @return
+     */
+    private int getCount(Long examId, String paperNumber, Double start, Double end) {
+        return markStudentMapper.getCountByScoreRange(examId, paperNumber, start, end);
+    }
 }