|
@@ -12,9 +12,11 @@ import com.google.gson.reflect.TypeToken;
|
|
import com.qmth.distributed.print.business.bean.dto.*;
|
|
import com.qmth.distributed.print.business.bean.dto.*;
|
|
import com.qmth.distributed.print.business.bean.dto.report.*;
|
|
import com.qmth.distributed.print.business.bean.dto.report.*;
|
|
import com.qmth.distributed.print.business.bean.result.FinalScoreResult;
|
|
import com.qmth.distributed.print.business.bean.result.FinalScoreResult;
|
|
|
|
+import com.qmth.distributed.print.business.bean.result.ObeCourseOutlineResult;
|
|
import com.qmth.distributed.print.business.bean.result.ObeCourseWeightResult;
|
|
import com.qmth.distributed.print.business.bean.result.ObeCourseWeightResult;
|
|
import com.qmth.distributed.print.business.bean.result.report.PaperStructDimensionResult;
|
|
import com.qmth.distributed.print.business.bean.result.report.PaperStructDimensionResult;
|
|
import com.qmth.distributed.print.business.bean.result.report.word.CourseReportBean;
|
|
import com.qmth.distributed.print.business.bean.result.report.word.CourseReportBean;
|
|
|
|
+import com.qmth.distributed.print.business.entity.ObeCourseOutline;
|
|
import com.qmth.distributed.print.business.entity.TCPaperStruct;
|
|
import com.qmth.distributed.print.business.entity.TCPaperStruct;
|
|
import com.qmth.distributed.print.business.entity.TRBasicInfo;
|
|
import com.qmth.distributed.print.business.entity.TRBasicInfo;
|
|
import com.qmth.distributed.print.business.entity.TRExamStudent;
|
|
import com.qmth.distributed.print.business.entity.TRExamStudent;
|
|
@@ -106,7 +108,7 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public ReportScoreViewDto getScoreList(TRBasicInfo trBasicInfo, MarkPaper markPaper) {
|
|
public ReportScoreViewDto getScoreList(TRBasicInfo trBasicInfo, MarkPaper markPaper) {
|
|
- FinalScoreDto finalScoreDto = tcFinalScoreService.finalScoreScoreOverView(trBasicInfo.getExamId(), trBasicInfo.getCourseCode(), trBasicInfo.getPaperNumber(), trBasicInfo.getTeachCourseId());
|
|
|
|
|
|
+ FinalScoreDto finalScoreDto = tcFinalScoreService.finalScoreScoreOverView(trBasicInfo.getExamId(), trBasicInfo.getCourseCode(), trBasicInfo.getPaperNumber(), trBasicInfo.getCultureProgramId(), trBasicInfo.getCourseId());
|
|
Objects.requireNonNull(finalScoreDto, "未找到期末成绩分数信息");
|
|
Objects.requireNonNull(finalScoreDto, "未找到期末成绩分数信息");
|
|
|
|
|
|
ReportScoreViewDto reportScoreViewDto = null;
|
|
ReportScoreViewDto reportScoreViewDto = null;
|
|
@@ -115,7 +117,7 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
|
|
BasicCourse basicCourse = basicCourseService.getByCode(trBasicInfo.getCourseCode());
|
|
BasicCourse basicCourse = basicCourseService.getByCode(trBasicInfo.getCourseCode());
|
|
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.getTeachCourseId(), markPaper);
|
|
|
|
|
|
+ fillScoreRange(finalScoreDto, trBasicInfo.getExamId(), trBasicInfo.getPaperNumber(), trBasicInfo.getCultureProgramId(), trBasicInfo.getCourseId(), markPaper);
|
|
List<ScoreRangeVo> scoreRangeVoList = finalScoreDto.getScoreRange();
|
|
List<ScoreRangeVo> scoreRangeVoList = finalScoreDto.getScoreRange();
|
|
if (!CollectionUtils.isEmpty(scoreRangeVoList)) {
|
|
if (!CollectionUtils.isEmpty(scoreRangeVoList)) {
|
|
Integer failCount = scoreRangeVoList.get(0).getStudentCount();//第一行数据默认为不及格
|
|
Integer failCount = scoreRangeVoList.get(0).getStudentCount();//第一行数据默认为不及格
|
|
@@ -141,7 +143,7 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
|
|
public Map<String, Object> getReportCalculateParams(TRBasicInfo trBasicInfo, List<PaperStructDimensionResult> paperStructDimensionResultList, ObeCourseWeightResult obeCourseWeightResult) {
|
|
public Map<String, Object> getReportCalculateParams(TRBasicInfo trBasicInfo, List<PaperStructDimensionResult> paperStructDimensionResultList, ObeCourseWeightResult obeCourseWeightResult) {
|
|
Map<String, Object> paramsMap = new HashMap<>();
|
|
Map<String, Object> paramsMap = new HashMap<>();
|
|
//查询考生数据
|
|
//查询考生数据
|
|
- List<FinalScoreResult> finalScoreResultList = tcFinalScoreService.examStudentOverview(trBasicInfo.getExamId(), trBasicInfo.getCourseCode(), trBasicInfo.getPaperNumber(), trBasicInfo.getTeachCourseId());//考生成绩
|
|
|
|
|
|
+ List<FinalScoreResult> finalScoreResultList = tcFinalScoreService.examStudentOverview(trBasicInfo.getExamId(), trBasicInfo.getCourseCode(), trBasicInfo.getPaperNumber(), trBasicInfo.getCultureProgramId(), trBasicInfo.getCourseId());//考生成绩
|
|
if (CollectionUtils.isEmpty(finalScoreResultList)) {
|
|
if (CollectionUtils.isEmpty(finalScoreResultList)) {
|
|
throw ExceptionResultEnum.ERROR.exception("成绩数据异常,平时成绩与期末成绩里考生名单不一致,请检查");
|
|
throw ExceptionResultEnum.ERROR.exception("成绩数据异常,平时成绩与期末成绩里考生名单不一致,请检查");
|
|
}
|
|
}
|
|
@@ -415,7 +417,7 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
|
|
* @param markPaper
|
|
* @param markPaper
|
|
* @param userId
|
|
* @param userId
|
|
* @param obeCourseWeightResult
|
|
* @param obeCourseWeightResult
|
|
- * @param obeCourseOutlineId
|
|
|
|
|
|
+ * @param cultureProgramId
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
@@ -432,7 +434,7 @@ 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);
|
|
}
|
|
}
|
|
@@ -999,7 +1001,7 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
|
|
@Override
|
|
@Override
|
|
@Transactional
|
|
@Transactional
|
|
public void clearReportData(Long cultureProgramId, Long courseId, String paperNumber, boolean clearDimension) {
|
|
public void clearReportData(Long cultureProgramId, Long courseId, String paperNumber, boolean clearDimension) {
|
|
- trExamStudentService.remove(cultureProgramId,courseId, paperNumber);
|
|
|
|
|
|
+ trExamStudentService.remove(cultureProgramId, courseId, paperNumber);
|
|
trBasicInfoService.remove(cultureProgramId, courseId, paperNumber);
|
|
trBasicInfoService.remove(cultureProgramId, courseId, paperNumber);
|
|
if (clearDimension) {
|
|
if (clearDimension) {
|
|
TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(cultureProgramId, courseId, paperNumber);
|
|
TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(cultureProgramId, courseId, paperNumber);
|
|
@@ -1051,10 +1053,11 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
|
|
* @param finalScoreDto
|
|
* @param finalScoreDto
|
|
* @param examId
|
|
* @param examId
|
|
* @param paperNumber
|
|
* @param paperNumber
|
|
- * @param obeCourseOutlineId
|
|
|
|
|
|
+ * @param cultureProgramId
|
|
|
|
+ * @param courseId
|
|
* @param markPaper
|
|
* @param markPaper
|
|
*/
|
|
*/
|
|
- protected void fillScoreRange(FinalScoreDto finalScoreDto, Long examId, String paperNumber, Long obeCourseOutlineId, MarkPaper markPaper) {
|
|
|
|
|
|
+ protected void fillScoreRange(FinalScoreDto finalScoreDto, Long examId, String paperNumber, Long cultureProgramId, Long courseId, MarkPaper markPaper) {
|
|
//分数区间
|
|
//分数区间
|
|
Double passScore = markPaper.getPassScore();//及格分
|
|
Double passScore = markPaper.getPassScore();//及格分
|
|
Objects.requireNonNull(passScore, "及格分为空");
|
|
Objects.requireNonNull(passScore, "及格分为空");
|
|
@@ -1068,20 +1071,20 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
|
|
//开始、结束分数区间
|
|
//开始、结束分数区间
|
|
Double startInterval = 0.5d, endInterval = 9.5d, increaseStartScore = passScore - startInterval,
|
|
Double startInterval = 0.5d, endInterval = 9.5d, increaseStartScore = passScore - startInterval,
|
|
increaseEndScore = increaseStartScore + startInterval + endInterval;
|
|
increaseEndScore = increaseStartScore + startInterval + endInterval;
|
|
- scoreRange.add(getScoreRangeVo(finalScoreDto.getStudentCount(), examId, markPaper.getCourseCode(), paperNumber, obeCourseOutlineId, 1.0d, increaseStartScore));
|
|
|
|
|
|
+ scoreRange.add(getScoreRangeVo(finalScoreDto.getStudentCount(), examId, markPaper.getCourseCode(), paperNumber, cultureProgramId, courseId, 1.0d, increaseStartScore));
|
|
increaseStartScore = increaseStartScore + startInterval;
|
|
increaseStartScore = increaseStartScore + startInterval;
|
|
increaseEndScore = increaseStartScore + endInterval;
|
|
increaseEndScore = increaseStartScore + endInterval;
|
|
if (totalScore.doubleValue() - increaseEndScore.doubleValue() == startInterval || increaseEndScore.doubleValue() >= totalScore.doubleValue()) {
|
|
if (totalScore.doubleValue() - increaseEndScore.doubleValue() == startInterval || increaseEndScore.doubleValue() >= totalScore.doubleValue()) {
|
|
increaseEndScore = totalScore;
|
|
increaseEndScore = totalScore;
|
|
- scoreRange.add(getScoreRangeVo(finalScoreDto.getStudentCount(), examId, markPaper.getCourseCode(), paperNumber, obeCourseOutlineId, increaseStartScore, increaseEndScore));
|
|
|
|
|
|
+ scoreRange.add(getScoreRangeVo(finalScoreDto.getStudentCount(), examId, markPaper.getCourseCode(), paperNumber, cultureProgramId, courseId, increaseStartScore, increaseEndScore));
|
|
} else {
|
|
} else {
|
|
while (increaseEndScore.doubleValue() < totalScore.doubleValue()) {
|
|
while (increaseEndScore.doubleValue() < totalScore.doubleValue()) {
|
|
- scoreRange.add(getScoreRangeVo(finalScoreDto.getStudentCount(), examId, markPaper.getCourseCode(), paperNumber, obeCourseOutlineId, increaseStartScore, increaseEndScore));
|
|
|
|
|
|
+ scoreRange.add(getScoreRangeVo(finalScoreDto.getStudentCount(), examId, markPaper.getCourseCode(), paperNumber, cultureProgramId, courseId, increaseStartScore, increaseEndScore));
|
|
increaseStartScore = increaseEndScore + startInterval;
|
|
increaseStartScore = increaseEndScore + startInterval;
|
|
increaseEndScore = increaseStartScore + endInterval;
|
|
increaseEndScore = increaseStartScore + endInterval;
|
|
if (totalScore.doubleValue() - increaseEndScore.doubleValue() == startInterval || increaseEndScore.doubleValue() >= totalScore.doubleValue()) {
|
|
if (totalScore.doubleValue() - increaseEndScore.doubleValue() == startInterval || increaseEndScore.doubleValue() >= totalScore.doubleValue()) {
|
|
increaseEndScore = totalScore;
|
|
increaseEndScore = totalScore;
|
|
- scoreRange.add(getScoreRangeVo(finalScoreDto.getStudentCount(), examId, markPaper.getCourseCode(), paperNumber, obeCourseOutlineId, increaseStartScore, increaseEndScore));
|
|
|
|
|
|
+ scoreRange.add(getScoreRangeVo(finalScoreDto.getStudentCount(), examId, markPaper.getCourseCode(), paperNumber, cultureProgramId, courseId, increaseStartScore, increaseEndScore));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1198,13 +1201,14 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
|
|
* @param examId
|
|
* @param examId
|
|
* @param courseCode
|
|
* @param courseCode
|
|
* @param paperNumber
|
|
* @param paperNumber
|
|
- * @param obeCourseOutlineId
|
|
|
|
|
|
+ * @param cultureProgramId
|
|
|
|
+ * @param courseId
|
|
* @param start
|
|
* @param start
|
|
* @param end
|
|
* @param end
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- protected ScoreRangeVo getScoreRangeVo(int toltal, Long examId, String courseCode, String paperNumber, Long obeCourseOutlineId, Double start, Double end) {
|
|
|
|
- int count = tcFinalScoreService.getCountByScoreRange(examId, courseCode, paperNumber, obeCourseOutlineId, start, end);
|
|
|
|
|
|
+ protected ScoreRangeVo getScoreRangeVo(int toltal, Long examId, String courseCode, String paperNumber, Long cultureProgramId, Long courseId, Double start, Double end) {
|
|
|
|
+ int count = tcFinalScoreService.getCountByScoreRange(examId, courseCode, paperNumber, cultureProgramId, courseId, start, end);
|
|
Double rate = null;
|
|
Double rate = null;
|
|
if (toltal != 0) {
|
|
if (toltal != 0) {
|
|
rate = new BigDecimal(count).divide(new BigDecimal(toltal), 2, BigDecimal.ROUND_HALF_UP).setScale(2, BigDecimal.ROUND_HALF_UP).multiply(SystemConstant.PERCENT).doubleValue();
|
|
rate = new BigDecimal(count).divide(new BigDecimal(toltal), 2, BigDecimal.ROUND_HALF_UP).setScale(2, BigDecimal.ROUND_HALF_UP).multiply(SystemConstant.PERCENT).doubleValue();
|