|
@@ -116,7 +116,7 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
|
|
ReportScoreViewDto reportScoreViewDto = null;
|
|
ReportScoreViewDto reportScoreViewDto = null;
|
|
TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(trBasicInfo.getCultureProgramId(), trBasicInfo.getCourseId(), trBasicInfo.getPaperNumber());
|
|
TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(trBasicInfo.getCultureProgramId(), trBasicInfo.getCourseId(), trBasicInfo.getPaperNumber());
|
|
if (Objects.nonNull(tcPaperStruct) && Objects.nonNull(tcPaperStruct.getPaperStruct()) && Objects.nonNull(tcPaperStruct.getTotalScore())) {
|
|
if (Objects.nonNull(tcPaperStruct) && Objects.nonNull(tcPaperStruct.getPaperStruct()) && Objects.nonNull(tcPaperStruct.getTotalScore())) {
|
|
- BasicCourse basicCourse = basicCourseService.getByCode(trBasicInfo.getCourseCode());
|
|
|
|
|
|
+ BasicCourse basicCourse = basicCourseService.getById(trBasicInfo.getCourseId());
|
|
markPaper = new MarkPaper(markPaper.getExamId(), markPaper.getCourseCode(), basicCourse.getName(), markPaper.getPaperNumber(), tcPaperStruct.getTotalScore(), tcPaperStruct.getPassScore());
|
|
markPaper = new MarkPaper(markPaper.getExamId(), markPaper.getCourseCode(), basicCourse.getName(), markPaper.getPaperNumber(), tcPaperStruct.getTotalScore(), tcPaperStruct.getPassScore());
|
|
}
|
|
}
|
|
fillScoreRange(finalScoreDto, trBasicInfo.getExamId(), trBasicInfo.getPaperNumber(), trBasicInfo.getCultureProgramId(), trBasicInfo.getCourseId(), markPaper);
|
|
fillScoreRange(finalScoreDto, trBasicInfo.getExamId(), trBasicInfo.getPaperNumber(), trBasicInfo.getCultureProgramId(), trBasicInfo.getCourseId(), markPaper);
|
|
@@ -441,14 +441,14 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
|
|
if (Objects.isNull(trBasicInfo)) {
|
|
if (Objects.isNull(trBasicInfo)) {
|
|
trBasicInfo = new TRBasicInfo(cultureProgramId, basicCourseService.findByCourseCode(markPaper.getCourseCode(), basicSemester.getSchoolId()).getId(), markPaper.getCourseCode(), markPaper.getCourseName(), markPaper.getPaperNumber(), basicSemester.getName(), teachingObject, teacher, null, userId);
|
|
trBasicInfo = new TRBasicInfo(cultureProgramId, basicCourseService.findByCourseCode(markPaper.getCourseCode(), basicSemester.getSchoolId()).getId(), markPaper.getCourseCode(), markPaper.getCourseName(), markPaper.getPaperNumber(), basicSemester.getName(), teachingObject, teacher, null, userId);
|
|
} else {
|
|
} else {
|
|
- trBasicInfo.setBasicInfo(markPaper.getExamId(), markPaper.getCourseCode(), markPaper.getCourseName(), markPaper.getPaperNumber(), basicSemester.getName(), teachingObject, teacher, null);
|
|
|
|
|
|
+ trBasicInfo.setBasicInfo(markPaper.getExamId(), markPaper.getCourseCode(), markPaper.getCourseName(), markPaper.getPaperNumber(), basicSemester.getName(), teachingObject, teacher, null, cultureProgramId, courseId);
|
|
}
|
|
}
|
|
//课程基本情况
|
|
//课程基本情况
|
|
ReportCourseBasicInfoDto reportCourseBasicInfoDto = new ReportCourseBasicInfoDto(trBasicInfo);
|
|
ReportCourseBasicInfoDto reportCourseBasicInfoDto = new ReportCourseBasicInfoDto(trBasicInfo);
|
|
trBasicInfo.getReportResult().setCourseBasicInfo(reportCourseBasicInfoDto);
|
|
trBasicInfo.getReportResult().setCourseBasicInfo(reportCourseBasicInfoDto);
|
|
|
|
|
|
//课程目标考核分布-题目信息
|
|
//课程目标考核分布-题目信息
|
|
- TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(cultureProgramId, basicCourseService.findByCourseCode(markPaper.getCourseCode(), basicSemester.getSchoolId()).getId(), markPaper.getPaperNumber());
|
|
|
|
|
|
+ TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(cultureProgramId, courseId, markPaper.getPaperNumber());
|
|
if (Objects.isNull(tcPaperStruct) || Objects.isNull(tcPaperStruct.getPaperStructDimension())) {
|
|
if (Objects.isNull(tcPaperStruct) || Objects.isNull(tcPaperStruct.getPaperStructDimension())) {
|
|
throw ExceptionResultEnum.ERROR.exception("未找到试卷蓝图信息");
|
|
throw ExceptionResultEnum.ERROR.exception("未找到试卷蓝图信息");
|
|
}
|
|
}
|
|
@@ -640,7 +640,7 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
|
|
// 表格合并,根据坐标
|
|
// 表格合并,根据坐标
|
|
MergeCellRule mergeCellRule2 = MergeCellRule.builder().map(MergeCellRule.Grid.of(0, 0), MergeCellRule.Grid.of(1, 0)).
|
|
MergeCellRule mergeCellRule2 = MergeCellRule.builder().map(MergeCellRule.Grid.of(0, 0), MergeCellRule.Grid.of(1, 0)).
|
|
map(MergeCellRule.Grid.of(0, 1), MergeCellRule.Grid.of(0, list.size())).
|
|
map(MergeCellRule.Grid.of(0, 1), MergeCellRule.Grid.of(0, list.size())).
|
|
- map(MergeCellRule.Grid.of(rowRenderData2.length - 1, 0), MergeCellRule.Grid.of(rowRenderData2.length - 1, 1)).
|
|
|
|
|
|
+ map(MergeCellRule.Grid.of(0, rowRenderData2.length - 1), MergeCellRule.Grid.of(1, rowRenderData2.length - 1)).
|
|
build();
|
|
build();
|
|
|
|
|
|
Tables.TableBuilder tableBuilder2 = Tables.ofPercentWidth(tbPercentWidth);
|
|
Tables.TableBuilder tableBuilder2 = Tables.ofPercentWidth(tbPercentWidth);
|
|
@@ -984,6 +984,30 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
|
|
if (CollectionUtils.isEmpty(courseWeightDtoList)) {
|
|
if (CollectionUtils.isEmpty(courseWeightDtoList)) {
|
|
throw ExceptionResultEnum.ERROR.exception("未设置课程目标评价方式");
|
|
throw ExceptionResultEnum.ERROR.exception("未设置课程目标评价方式");
|
|
}
|
|
}
|
|
|
|
+ ObeCourseOutline obeCourseOutline = obeCourseOutlineService.getById(obeCourseOutlineId);
|
|
|
|
+ TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(obeCourseOutline.getCultureProgramId(), obeCourseOutline.getCourseId(), null);
|
|
|
|
+ if (Objects.nonNull(tcPaperStruct) && Objects.nonNull(tcPaperStruct.getPaperStructDimension())) {
|
|
|
|
+ List<PaperStructDimensionResult> paperStructDimensionResultList = GsonUtil.fromJson(tcPaperStruct.getPaperStructDimension(), new TypeToken<List<PaperStructDimensionResult>>() {
|
|
|
|
+
|
|
|
|
+ }.getType());
|
|
|
|
+ for (CourseWeightDto c : obeCourseWeightResult.getSubmitForm()) {
|
|
|
|
+ Double score = paperStructDimensionResultList.stream().filter(s -> Objects.equals(s.getCourseTargetName(), c.getCourseTargetName()))
|
|
|
|
+ .mapToDouble(PaperStructDimensionResult::getScore).sum();
|
|
|
|
+ Objects.requireNonNull(c.getTotalWeight(), "[" + c.getCourseTargetName() + "]未设置权重");
|
|
|
|
+ //// Objects.requireNonNull(c.getTotalScore(), "[" + c.getCourseTargetName() + "]未设置目标分值");
|
|
|
|
+ // if (new BigDecimal(score).compareTo(c.getTotalWeight()) == 1) {
|
|
|
|
+ // trBasicInfoService.clearReportData(examId, courseCode, paperNumber, teachCourseId, false);
|
|
|
|
+ // throw ExceptionResultEnum.ERROR.exception("[" + c.getCourseTargetName() + "]包含的小题总分与权重设置不一致,请到期末成绩--试卷蓝图设置里调整");
|
|
|
|
+ // }
|
|
|
|
+ List<CourseWeightDetailDto> courseWeightDetailDtoList = c.getEvaluationList();
|
|
|
|
+ for (CourseWeightDetailDto courseWeightDetailDto : courseWeightDetailDtoList) {
|
|
|
|
+ if (Objects.equals(courseWeightDetailDto.getEvaluationName(), SystemConstant.FINAL_SCORE_STR)) {
|
|
|
|
+ courseWeightDetailDto.setTargetScore(new BigDecimal(score));
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return obeCourseWeightResult;
|
|
return obeCourseWeightResult;
|
|
}
|
|
}
|
|
|
|
|