|
@@ -1,16 +1,20 @@
|
|
|
package com.qmth.distributed.print.api;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.google.gson.reflect.TypeToken;
|
|
|
import com.qmth.boot.api.constant.ApiConstant;
|
|
|
import com.qmth.boot.api.exception.ApiException;
|
|
|
+import com.qmth.distributed.print.business.bean.dto.report.ReportCourseEvaluationResultDto;
|
|
|
import com.qmth.distributed.print.business.bean.excel.ExcelField;
|
|
|
import com.qmth.distributed.print.business.bean.params.report.PaperStructParams;
|
|
|
+import com.qmth.distributed.print.business.bean.result.CourseWeightResult;
|
|
|
import com.qmth.distributed.print.business.bean.result.EditResult;
|
|
|
import com.qmth.distributed.print.business.bean.result.report.PaperStructResult;
|
|
|
import com.qmth.distributed.print.business.entity.TCFinalScore;
|
|
|
import com.qmth.distributed.print.business.entity.TCPaperStruct;
|
|
|
+import com.qmth.distributed.print.business.entity.TRBasicInfo;
|
|
|
import com.qmth.distributed.print.business.service.*;
|
|
|
import com.qmth.teachcloud.common.annotation.OperationLogDetail;
|
|
|
import com.qmth.teachcloud.common.contant.SystemConstant;
|
|
@@ -199,8 +203,7 @@ public class TCFinalScoreController {
|
|
|
tcFinalScoreDb.updateInfo(tcFinalScore, sysUser.getId());
|
|
|
|
|
|
if (!tcFinalScoreSource.equals(tcFinalScoreDb)) {
|
|
|
- trExamStudentService.remove(tcFinalScoreDb.getExamId(), tcFinalScoreDb.getCourseCode(), tcFinalScoreDb.getPaperNumber());
|
|
|
- trBasicInfoService.remove(tcFinalScoreDb.getExamId(), tcFinalScoreDb.getCourseCode(), tcFinalScoreDb.getPaperNumber());
|
|
|
+ trBasicInfoService.clearReportData(tcFinalScoreDb.getExamId(), tcFinalScoreDb.getCourseCode(), tcFinalScoreDb.getPaperNumber(), false);
|
|
|
tcFinalScoreService.updateById(tcFinalScoreDb);
|
|
|
}
|
|
|
return ResultUtil.ok(true);
|
|
@@ -222,8 +225,7 @@ public class TCFinalScoreController {
|
|
|
if (!tcFinalScoreSource.equals(tcFinalScoreDb)) {
|
|
|
SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
tcFinalScoreDb.updateInfo(sysUser.getId());
|
|
|
- trExamStudentService.remove(tcFinalScoreDb.getExamId(), tcFinalScoreDb.getCourseCode(), tcFinalScoreDb.getPaperNumber());
|
|
|
- trBasicInfoService.remove(tcFinalScoreDb.getExamId(), tcFinalScoreDb.getCourseCode(), tcFinalScoreDb.getPaperNumber());
|
|
|
+ trBasicInfoService.clearReportData(tcFinalScoreDb.getExamId(), tcFinalScoreDb.getCourseCode(), tcFinalScoreDb.getPaperNumber(), false);
|
|
|
tcFinalScoreService.updateById(tcFinalScoreDb);
|
|
|
}
|
|
|
return ResultUtil.ok(true);
|
|
@@ -262,8 +264,7 @@ public class TCFinalScoreController {
|
|
|
BeanUtils.copyProperties(tcPaperStructDb, tcPaperStructSource);
|
|
|
tcPaperStructDb.updateInfo(JacksonUtil.parseJson(paperStructParams.getPaperStruct()), sysUser.getId());
|
|
|
if (!tcPaperStructDb.equals(tcPaperStructSource)) {
|
|
|
- trExamStudentService.remove(paperStructParams.getExamId(), paperStructParams.getCourseCode(), paperStructParams.getPaperNumber());
|
|
|
- trBasicInfoService.remove(paperStructParams.getExamId(), paperStructParams.getCourseCode(), paperStructParams.getPaperNumber());
|
|
|
+ trBasicInfoService.clearReportData(paperStructParams.getExamId(), paperStructParams.getCourseCode(), paperStructParams.getPaperNumber(), false);
|
|
|
tcPaperStructService.updateById(tcPaperStructDb);
|
|
|
}
|
|
|
}
|
|
@@ -277,6 +278,15 @@ public class TCFinalScoreController {
|
|
|
public Object finalScorePaperStructQuery(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
|
|
|
@ApiParam(value = "科目编码", required = true) @RequestParam String courseCode,
|
|
|
@ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber) throws IOException {
|
|
|
+ TRBasicInfo trBasicInfo = trBasicInfoService.getOne(new QueryWrapper<TRBasicInfo>().lambda().eq(TRBasicInfo::getExamId, examId).eq(TRBasicInfo::getCourseCode, courseCode).eq(TRBasicInfo::getPaperNumber, paperNumber));
|
|
|
+ if (Objects.nonNull(trBasicInfo)) {
|
|
|
+ ReportCourseEvaluationResultDto reportCourseEvaluationResultDto = JSONObject.parseObject(trBasicInfo.getCourseEvaluationResult(), ReportCourseEvaluationResultDto.class);
|
|
|
+ CourseWeightResult courseWeightResult = trBasicInfoService.findCourseWeightResultRmi(examId, courseCode);
|
|
|
+ if (Objects.nonNull(reportCourseEvaluationResultDto.getDimensionSign()) && reportCourseEvaluationResultDto.getDimensionSign().longValue() != courseWeightResult.getDimensionSign().longValue()) {
|
|
|
+ trBasicInfoService.clearReportData(examId, courseCode, paperNumber, true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
List<PaperStructResult> paperStructResultList = null;
|
|
|
TCPaperStruct tcPaperStruct = tcPaperStructService.getOne(new QueryWrapper<TCPaperStruct>().lambda().eq(TCPaperStruct::getExamId, examId).eq(TCPaperStruct::getCourseCode, courseCode).eq(TCPaperStruct::getPaperNumber, paperNumber));
|
|
|
if (Objects.isNull(tcPaperStruct)) {
|