|
@@ -122,7 +122,7 @@ public class TRBasicInfoController {
|
|
}.getType());
|
|
}.getType());
|
|
for (CourseWeightDto c : courseWeightResult.getSubmitForm()) {
|
|
for (CourseWeightDto c : courseWeightResult.getSubmitForm()) {
|
|
Double score = paperStructDimensionResultList.stream().filter(s -> Objects.equals(s.getCourseTargetName(), c.getCourseTargetName())).mapToDouble(PaperStructDimensionResult::getScore).sum();
|
|
Double score = paperStructDimensionResultList.stream().filter(s -> Objects.equals(s.getCourseTargetName(), c.getCourseTargetName())).mapToDouble(PaperStructDimensionResult::getScore).sum();
|
|
- if (new BigDecimal(score).compareTo(c.getTotalWeight()) != 0) {
|
|
|
|
|
|
+ if (new BigDecimal(score).compareTo(c.getTotalWeight()) == 1) {
|
|
trBasicInfoService.clearReportData(examId, courseCode, paperNumber, false);
|
|
trBasicInfoService.clearReportData(examId, courseCode, paperNumber, false);
|
|
throw ExceptionResultEnum.ERROR.exception("[" + c.getCourseTargetName() + "]知识点小题总分大于该课程目标分,请重新设置");
|
|
throw ExceptionResultEnum.ERROR.exception("[" + c.getCourseTargetName() + "]知识点小题总分大于该课程目标分,请重新设置");
|
|
}
|
|
}
|
|
@@ -203,7 +203,7 @@ public class TRBasicInfoController {
|
|
}.getType());
|
|
}.getType());
|
|
for (CourseWeightDto c : courseWeightResult.getSubmitForm()) {
|
|
for (CourseWeightDto c : courseWeightResult.getSubmitForm()) {
|
|
Double score = paperStructDimensionResultList.stream().filter(s -> Objects.equals(s.getCourseTargetName(), c.getCourseTargetName())).mapToDouble(PaperStructDimensionResult::getScore).sum();
|
|
Double score = paperStructDimensionResultList.stream().filter(s -> Objects.equals(s.getCourseTargetName(), c.getCourseTargetName())).mapToDouble(PaperStructDimensionResult::getScore).sum();
|
|
- if (new BigDecimal(score).compareTo(c.getTotalWeight()) != 0) {
|
|
|
|
|
|
+ if (new BigDecimal(score).compareTo(c.getTotalWeight()) == 1) {
|
|
trBasicInfoService.clearReportData(examId, courseCode, paperNumber, false);
|
|
trBasicInfoService.clearReportData(examId, courseCode, paperNumber, false);
|
|
throw ExceptionResultEnum.ERROR.exception("[" + c.getCourseTargetName() + "]知识点小题总分大于该课程目标分,请重新设置");
|
|
throw ExceptionResultEnum.ERROR.exception("[" + c.getCourseTargetName() + "]知识点小题总分大于该课程目标分,请重新设置");
|
|
}
|
|
}
|
|
@@ -347,7 +347,7 @@ public class TRBasicInfoController {
|
|
StringJoiner stringJoiner = new StringJoiner("");
|
|
StringJoiner stringJoiner = new StringJoiner("");
|
|
for (CourseWeightDto c : courseWeightDtoList) {
|
|
for (CourseWeightDto c : courseWeightDtoList) {
|
|
Double score = paperStructDimensionResultList.stream().filter(s -> Objects.equals(s.getCourseTargetName(), c.getCourseTargetName())).mapToDouble(PaperStructDimensionResult::getScore).sum();
|
|
Double score = paperStructDimensionResultList.stream().filter(s -> Objects.equals(s.getCourseTargetName(), c.getCourseTargetName())).mapToDouble(PaperStructDimensionResult::getScore).sum();
|
|
- if (new BigDecimal(score).compareTo(c.getTotalWeight()) != 0) {
|
|
|
|
|
|
+ if (new BigDecimal(score).compareTo(c.getTotalWeight()) == 1) {
|
|
reportChangeResult.setTargetScoreChange(true);
|
|
reportChangeResult.setTargetScoreChange(true);
|
|
stringJoiner.add("[").add(c.getCourseTargetName()).add("]").add("知识点小题总分大于该课程目标分,请重新设置").add("\r\n");
|
|
stringJoiner.add("[").add(c.getCourseTargetName()).add("]").add("知识点小题总分大于该课程目标分,请重新设置").add("\r\n");
|
|
}
|
|
}
|