|
@@ -117,6 +117,7 @@ public class CourseWeightServiceImpl extends ServiceImpl<CourseWeightMapper, Cou
|
|
|
detail.setEnable(enable);
|
|
|
detail.setWeight(weight);
|
|
|
detail.setTargetScore(targetScore);
|
|
|
+ detail.setEvaluationType(courseEvaluationResult.getType());
|
|
|
if (enable) {
|
|
|
totalScore = totalScore.add(targetScore);
|
|
|
}
|
|
@@ -185,31 +186,27 @@ public class CourseWeightServiceImpl extends ServiceImpl<CourseWeightMapper, Cou
|
|
|
String evaluationName = courseEvaluationResult.getEvaluation();
|
|
|
String key = targetId + SystemConstant.HYPHEN + evaluationId;
|
|
|
Boolean enable;
|
|
|
- BigDecimal weight = BigDecimal.ZERO;
|
|
|
+ BigDecimal weight;
|
|
|
BigDecimal targetScore = BigDecimal.ZERO;
|
|
|
if (courseWeightMap.containsKey(key)) {
|
|
|
// 权重表中包含该目标评价的设置 - 获取权重表的数据
|
|
|
CourseWeight courseWeight = courseWeightMap.get(key);
|
|
|
enable = courseWeight.getEnable();
|
|
|
- weight = courseWeight.getWeight();
|
|
|
- targetScore = courseWeight.getTargetScore();
|
|
|
- } else if (CourseEvaluationTypeEnum.DEFAULT.equals(courseEvaluationResult.getType())) {
|
|
|
- enable = true;
|
|
|
- weight = new BigDecimal(100);
|
|
|
- } else {
|
|
|
- continue;
|
|
|
- }
|
|
|
- CourseWeightDetailDto detail = new CourseWeightDetailDto();
|
|
|
- detail.setEvaluationId(evaluationId);
|
|
|
- detail.setEvaluationName(evaluationName);
|
|
|
- detail.setEvaluationDesc(courseEvaluationResult.getEvaluationDesc());
|
|
|
- detail.setEnable(enable);
|
|
|
- detail.setWeight(weight);
|
|
|
- detail.setTargetScore(targetScore);
|
|
|
- if (enable) {
|
|
|
- totalScore = totalScore.add(targetScore);
|
|
|
+ if (enable) {
|
|
|
+ weight = courseWeight.getWeight();
|
|
|
+ targetScore = courseWeight.getTargetScore();
|
|
|
+ CourseWeightDetailDto detail = new CourseWeightDetailDto();
|
|
|
+ detail.setEvaluationId(evaluationId);
|
|
|
+ detail.setEvaluationName(evaluationName);
|
|
|
+ detail.setEvaluationDesc(courseEvaluationResult.getEvaluationDesc());
|
|
|
+ detail.setEnable(true);
|
|
|
+ detail.setWeight(weight);
|
|
|
+ detail.setTargetScore(targetScore);
|
|
|
+ detail.setEvaluationType(courseEvaluationResult.getType());
|
|
|
+ totalScore = totalScore.add(targetScore);
|
|
|
+ courseWeightDetailDtoList.add(detail);
|
|
|
+ }
|
|
|
}
|
|
|
- courseWeightDetailDtoList.add(detail);
|
|
|
}
|
|
|
CourseWeightDto courseWeightDto = new CourseWeightDto();
|
|
|
courseWeightDto.setCourseTargetId(targetId);
|