|
@@ -65,7 +65,6 @@ import java.io.FileInputStream;
|
|
|
import java.io.InputStream;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.*;
|
|
|
-import java.util.concurrent.ConcurrentMap;
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
import java.util.function.Function;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -199,36 +198,13 @@ public class TRBasicInfoController {
|
|
|
ReportCourseEvaluationSpreadDto reportCourseEvaluationSpreadDto = Objects.nonNull(trBasicInfo.getCourseEvaluationSpread()) ?
|
|
|
JSONObject.parseObject(trBasicInfo.getCourseEvaluationSpread(), ReportCourseEvaluationSpreadDto.class) :
|
|
|
null;
|
|
|
- ReportCourseEvaluationResultDetailDto reportCourseEvaluationResultDetailDto = null;
|
|
|
- List<TRExamStudent> trExamStudentList = trExamStudentService.list(
|
|
|
- new QueryWrapper<TRExamStudent>().lambda().eq(TRExamStudent::getrBasicInfoId, trBasicInfo.getId()));
|
|
|
- LinkedMultiValueMap<Long, Map<String, String>> finalScatterYMap = null;
|
|
|
- if (!CollectionUtils.isEmpty(trExamStudentList)) {
|
|
|
- Map<Long, ConcurrentMap<String, String>> scatterYMap = new LinkedHashMap<>();
|
|
|
- List<ReportExamStudentDto> examStudentList = new ArrayList<>(trExamStudentList.size());
|
|
|
- for (TRExamStudent trExamStudent : trExamStudentList) {
|
|
|
- if (!Objects.equals(trExamStudent.getName(), "各课程目标平均分")
|
|
|
- && !Objects.equals(trExamStudent.getName(), "平均分")
|
|
|
- && !Objects.equals(trExamStudent.getName(), "目标分")) {
|
|
|
- List<ReportExamStudentTargetDto> reportExamStudentTargetDtoList = JSONArray.parseArray(trExamStudent.getResultDetail(), ReportExamStudentTargetDto.class);
|
|
|
- for (ReportExamStudentTargetDto reportExamStudentTargetDto : reportExamStudentTargetDtoList) {
|
|
|
- if (Objects.nonNull(reportExamStudentTargetDto) && Objects.nonNull(reportExamStudentTargetDto.getMatrixDegree())) {
|
|
|
- trBasicInfoService.getScatterValue(scatterYMap, trExamStudent.getStudentCode(), reportExamStudentTargetDto);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- examStudentList.add(new ReportExamStudentDto(trExamStudent));
|
|
|
- }
|
|
|
- if (scatterYMap.size() > 0) {
|
|
|
- finalScatterYMap = trBasicInfoService.getFinalScatterValue(scatterYMap);
|
|
|
- }
|
|
|
- reportCourseEvaluationResultDetailDto = new ReportCourseEvaluationResultDetailDto(examStudentList);
|
|
|
- }
|
|
|
- trBasicInfo.setReportResult(new ReportResult(new ReportCommonDto(null, basicCourse.getCode(), markPaper.getCourseName(), paperNumber),
|
|
|
+ Map<String, Object> map = trBasicInfoService.queryScatterYMap(trBasicInfo);
|
|
|
+ LinkedMultiValueMap<Long, Map<String, String>> finalScatterYMap = (LinkedMultiValueMap<Long, Map<String, String>>) map.get("finalScatterYMap");
|
|
|
+ List<ReportExamStudentDto> examStudentList = (List<ReportExamStudentDto>) map.get("examStudentList");
|
|
|
+ ReportCourseEvaluationResultDetailDto reportCourseEvaluationResultDetailDto = new ReportCourseEvaluationResultDetailDto(examStudentList);
|
|
|
+ trBasicInfo.setReportResult(new ReportResult(new ReportCommonDto(examId, basicCourse.getCode(), markPaper.getCourseName(), paperNumber),
|
|
|
reportCourseBasicInfoDto, reportCourseEvaluationSpreadDto, reportCourseEvaluationResultDto,
|
|
|
reportCourseEvaluationResultDetailDto, trBasicInfo, finalScatterYMap));
|
|
|
- trBasicInfo.updateInfo(sysUser.getId());
|
|
|
- trBasicInfoService.saveOrUpdateBatch(trBasicInfoList);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -309,7 +285,7 @@ public class TRBasicInfoController {
|
|
|
ObeCourseOutline obeCourseOutline = obeCourseOutlineService.findByCultureProgramIdAndCourseId(trBasicInfoDb.getCultureProgramId(), trBasicInfoDb.getCourseId());
|
|
|
ObeCourseWeightResult obeCourseWeightResult = trBasicInfoService.findCourseWeightResultRmi(obeCourseOutline.getId(), true);
|
|
|
MarkPaper markPaper = printCommonService.getMarkPaper(trBasicInfoDb.getExamId(), trBasicInfoDb.getPaperNumber(), trBasicInfoDb.getCourseId());
|
|
|
- List<TRBasicInfo> trBasicInfoList = trBasicInfoService.queryBasicInfo(trBasicInfoDb.getCultureProgramId(), trBasicInfoDb.getCourseId(), trBasicInfoDb.getPaperNumber(), trBasicInfoDb.getExamId());
|
|
|
+ List<TRBasicInfo> trBasicInfoList = trBasicInfoService.queryBasicInfoAll(trBasicInfoDb.getCultureProgramId(), trBasicInfoDb.getCourseId(), trBasicInfoDb.getPaperNumber(), trBasicInfoDb.getExamId());
|
|
|
for (TRBasicInfo t : trBasicInfoList) {
|
|
|
ReportCourseBasicInfoDto reportCourseBasicInfoDto = trBasicInfoService.setBasicInfo(trBasicInfo, obeCourseOutline, markPaper, obeCourseWeightResult);
|
|
|
t.updateInfo(trBasicInfo, reportCourseBasicInfoDto, sysUser.getId());
|