|
@@ -24,6 +24,7 @@ import com.qmth.distributed.print.business.entity.TRBasicInfo;
|
|
|
import com.qmth.distributed.print.business.entity.TRExamStudent;
|
|
|
import com.qmth.distributed.print.business.mapper.TRBasicInfoMapper;
|
|
|
import com.qmth.distributed.print.business.service.*;
|
|
|
+import com.qmth.teachcloud.common.contant.SystemConstant;
|
|
|
import com.qmth.teachcloud.common.entity.BasicSemester;
|
|
|
import com.qmth.teachcloud.common.entity.SysUser;
|
|
|
import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
|
|
@@ -140,29 +141,29 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
|
|
|
//TODO 获取曹子轩课程目标信息
|
|
|
List<CourseWeightDto> courseWeightDtoList = courseWeightService.findCourseWeight(trBasicInfo.getExamId(), trBasicInfo.getCourseCode(), sysUser.getId()).getSubmitForm();
|
|
|
if (CollectionUtils.isEmpty(courseWeightDtoList)) {
|
|
|
- throw ExceptionResultEnum.ERROR.exception("未设置课程目标平时作业1");
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("未设置课程目标评价方式");
|
|
|
}
|
|
|
|
|
|
- courseWeightDtoList.clear();
|
|
|
- //测试数据,默认平时作业30%权重,期末考试70%权重
|
|
|
- int f = 5, s = 6;
|
|
|
- for (int i = 0; i < 2; i++) {
|
|
|
- int y = i == 0 ? f : s;
|
|
|
- List<CourseWeightDetailDto> courseWeightDetailDtoList = new ArrayList<>();
|
|
|
- for (int k = 0; k < y; k++) {
|
|
|
- if (y == 5) {
|
|
|
- courseWeightDetailDtoList.add(new CourseWeightDetailDto("作业" + (i + 1) + "-" + (k + 1), new BigDecimal(20), new BigDecimal(2.4).setScale(2, BigDecimal.ROUND_HALF_UP)));
|
|
|
- } else {
|
|
|
- courseWeightDetailDtoList.add(new CourseWeightDetailDto("作业" + (i + 1) + "-" + (k + 1), new BigDecimal(16.66).setScale(2, BigDecimal.ROUND_HALF_UP), new BigDecimal(3)));
|
|
|
- }
|
|
|
- }
|
|
|
- if (y == 5) {
|
|
|
- courseWeightDetailDtoList.add(new CourseWeightDetailDto("期末考试", new BigDecimal(70), new BigDecimal(28)));
|
|
|
- } else {
|
|
|
- courseWeightDetailDtoList.add(new CourseWeightDetailDto("期末考试", new BigDecimal(70), new BigDecimal(42)));
|
|
|
- }
|
|
|
- courseWeightDtoList.add(new CourseWeightDto(Long.parseLong((i + 1) + ""), "课程目标" + (i + 1), "测试毕业要求" + (i + 1), new BigDecimal(50), new BigDecimal(50), courseWeightDetailDtoList));
|
|
|
- }
|
|
|
+// courseWeightDtoList.clear();
|
|
|
+// //测试数据,默认平时作业30%权重,期末考试70%权重
|
|
|
+// int f = 5, s = 6;
|
|
|
+// for (int i = 0; i < 2; i++) {
|
|
|
+// int y = i == 0 ? f : s;
|
|
|
+// List<CourseWeightDetailDto> courseWeightDetailDtoList = new ArrayList<>();
|
|
|
+// for (int k = 0; k < y; k++) {
|
|
|
+// if (y == 5) {
|
|
|
+// courseWeightDetailDtoList.add(new CourseWeightDetailDto("作业" + (i + 1) + "-" + (k + 1), new BigDecimal(20), new BigDecimal(2.4).setScale(2, BigDecimal.ROUND_HALF_UP)));
|
|
|
+// } else {
|
|
|
+// courseWeightDetailDtoList.add(new CourseWeightDetailDto("作业" + (i + 1) + "-" + (k + 1), new BigDecimal(16.66).setScale(2, BigDecimal.ROUND_HALF_UP), new BigDecimal(3)));
|
|
|
+// }
|
|
|
+// }
|
|
|
+// if (y == 5) {
|
|
|
+// courseWeightDetailDtoList.add(new CourseWeightDetailDto("期末考试", new BigDecimal(70), new BigDecimal(28)));
|
|
|
+// } else {
|
|
|
+// courseWeightDetailDtoList.add(new CourseWeightDetailDto("期末考试", new BigDecimal(70), new BigDecimal(42)));
|
|
|
+// }
|
|
|
+// courseWeightDtoList.add(new CourseWeightDto(Long.parseLong((i + 1) + ""), "课程目标" + (i + 1), "测试毕业要求" + (i + 1), new BigDecimal(50), new BigDecimal(50), courseWeightDetailDtoList));
|
|
|
+// }
|
|
|
|
|
|
for (CourseWeightDto courseWeightDto : courseWeightDtoList) {
|
|
|
List<CourseWeightDetailDto> courseWeightDetailDtoList = courseWeightDto.getEvaluationList();
|
|
@@ -180,13 +181,13 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
|
|
|
BigDecimal usualScoreTargetSumScore = new BigDecimal(0);//平常作业目标总分
|
|
|
for (CourseWeightDetailDto courseWeightDetailDto : courseWeightDetailDtoList) {
|
|
|
//期末考试
|
|
|
- if (courseWeightDetailDto.getEnable() && courseWeightDetailDto.getEvaluationName().startsWith("期末考试")) {
|
|
|
+ if (courseWeightDetailDto.getEnable() && Objects.equals(courseWeightDetailDto.getEvaluationName(), SystemConstant.FINAL_SCORE_STR)) {
|
|
|
FinalScoreWordDto finalScoreWordDto = new FinalScoreWordDto(courseWeightDto.getCourseTargetId(), courseWeightDetailDto);
|
|
|
courseTargetWordDto.setFinalScoreDto(finalScoreWordDto);
|
|
|
ReportEvaluationDto reportEvaluationDto = new ReportEvaluationDto(courseWeightDto.getCourseTargetId(), courseWeightDetailDto);
|
|
|
reportEvaluationDtoList.add(reportEvaluationDto);
|
|
|
}//非期末考试
|
|
|
- else if (courseWeightDetailDto.getEnable() && !courseWeightDetailDto.getEvaluationName().startsWith("期末考试")) {
|
|
|
+ else if (courseWeightDetailDto.getEnable() && !Objects.equals(courseWeightDetailDto.getEvaluationName(), SystemConstant.FINAL_SCORE_STR)) {
|
|
|
ReportEvaluationDto reportEvaluationDto = new ReportEvaluationDto(courseWeightDto.getCourseTargetId(), courseWeightDetailDto);
|
|
|
usualScoreTargetSumScore = usualScoreTargetSumScore.add(reportEvaluationDto.getTargetScore());
|
|
|
usualScoreDetailList.add(reportEvaluationDto);
|
|
@@ -442,7 +443,7 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
|
|
|
tableBuilder1.addRow(row);
|
|
|
}
|
|
|
header2_1List.add("目标分值统计");
|
|
|
- header2_2List.add("期末考试");
|
|
|
+ header2_2List.add(SystemConstant.FINAL_SCORE_STR);
|
|
|
header2_2List.add("目标分值统计");
|
|
|
return tableBuilder1.left().create();
|
|
|
}
|
|
@@ -673,7 +674,7 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
|
|
|
//期末考试
|
|
|
ReportExamStudentFinalScoreDto reportExamStudentFinalScoreDto = reportExamStudentTargetDto.getFinalScore();
|
|
|
if (Objects.nonNull(reportExamStudentFinalScoreDto) && !CollectionUtils.isEmpty(reportExamStudentFinalScoreDto.getDimensionList())) {
|
|
|
- examStudent_cells_2.add(Cells.of("期末考试").center().create());
|
|
|
+ examStudent_cells_2.add(Cells.of(SystemConstant.FINAL_SCORE_STR).center().create());
|
|
|
}
|
|
|
}
|
|
|
examStudent_cells_1.add(Cells.of("综合成绩").center().create());
|
|
@@ -819,6 +820,22 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
|
|
|
return tableRenderDataExamStudent;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 根据考试id/课程编码/试卷编码删除数据
|
|
|
+ *
|
|
|
+ * @param examId
|
|
|
+ * @param courseCode
|
|
|
+ * @param paperNumber
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ @Transactional
|
|
|
+ public Boolean remove(Long examId, String courseCode, String paperNumber) {
|
|
|
+ return trBasicInfoService.remove(new QueryWrapper<TRBasicInfo>().lambda().eq(TRBasicInfo::getExamId, examId)
|
|
|
+ .eq(TRBasicInfo::getCourseCode, courseCode)
|
|
|
+ .eq(TRBasicInfo::getPaperNumber, paperNumber));
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 获取行样式
|
|
|
*
|