|
@@ -32,7 +32,6 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
-import java.io.IOException;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
@@ -148,11 +147,11 @@ public class TCPaperStructServiceImpl extends ServiceImpl<TCPaperStructMapper, T
|
|
|
}
|
|
|
if (!CollectionUtils.isEmpty(paperStructDtoNewList)) {
|
|
|
successData.add("共导入").add(paperStructDtoNewList.size() + "").add("条数据");
|
|
|
- TCPaperStruct tcPaperStruct = new TCPaperStruct(cultureProgramId, courseId,markPaper.getCourseCode(), markPaper.getCourseName(), paperNumber, JacksonUtil.parseJson(paperStructDtoNewList), totalScore, 60d, sysUser.getId());
|
|
|
+ TCPaperStruct tcPaperStruct = new TCPaperStruct(cultureProgramId, courseId, markPaper.getCourseCode(), markPaper.getCourseName(), paperNumber, JacksonUtil.parseJson(paperStructDtoNewList), totalScore, 60d, sysUser.getId());
|
|
|
TCPaperStruct tcPaperStructDb = tcPaperStructService.queryPaperStruct(cultureProgramId, courseId, paperNumber);
|
|
|
if (Objects.nonNull(tcPaperStructDb) && !tcPaperStructDb.equals(tcPaperStruct)) {
|
|
|
- tcFinalScoreService.remove(cultureProgramId,courseId,paperNumber);
|
|
|
- trBasicInfoService.clearReportData(cultureProgramId, courseId,paperNumber, true);
|
|
|
+ tcFinalScoreService.remove(cultureProgramId, courseId, paperNumber);
|
|
|
+ trBasicInfoService.clearReportData(cultureProgramId, courseId, paperNumber, true);
|
|
|
}
|
|
|
tcPaperStructService.remove(cultureProgramId, courseId, paperNumber);
|
|
|
tcPaperStructService.save(tcPaperStruct);
|
|
@@ -203,7 +202,7 @@ public class TCPaperStructServiceImpl extends ServiceImpl<TCPaperStructMapper, T
|
|
|
paperStructList.add(p.getMainNumber() + "_" + p.getSubNumber() + "_" + p.getScore());
|
|
|
}
|
|
|
successData.add("共同步").add(paperStructDimensionResultList.size() + "").add("条数据");
|
|
|
- TCPaperStruct tcPaperStructDb = tcPaperStructService.queryPaperStruct(cultureProgramId,courseId, paperNumber);
|
|
|
+ TCPaperStruct tcPaperStructDb = tcPaperStructService.queryPaperStruct(cultureProgramId, courseId, paperNumber);
|
|
|
TCPaperStruct tcPaperStruct = null;
|
|
|
if (Objects.nonNull(tcPaperStructDb) && Objects.nonNull(tcPaperStructDb.getPaperStructDimension())) {
|
|
|
tcPaperStruct = new TCPaperStruct();
|
|
@@ -231,10 +230,10 @@ public class TCPaperStructServiceImpl extends ServiceImpl<TCPaperStructMapper, T
|
|
|
}
|
|
|
tcPaperStruct.updateInfo(sysUser.getId());
|
|
|
} else {
|
|
|
- tcPaperStructService.remove(cultureProgramId,courseId, paperNumber);
|
|
|
+ tcPaperStructService.remove(cultureProgramId, courseId, paperNumber);
|
|
|
MarkPaper markPaper = printCommonService.getMarkPaper(examId, basicCourseService.getById(courseId).getCode(), paperNumber);
|
|
|
ObeCourseWeightResult obeCourseWeightResult = trBasicInfoService.findCourseWeightResultRmi(obeCourseOutline.getId());
|
|
|
- tcPaperStruct = new TCPaperStruct(cultureProgramId, courseId,markPaper.getCourseCode(), markPaper.getCourseName(), paperNumber, JacksonUtil.parseJson(paperStructDimensionResultList), sysUser.getId(), obeCourseWeightResult.getDimensionSign());
|
|
|
+ tcPaperStruct = new TCPaperStruct(cultureProgramId, courseId, markPaper.getCourseCode(), markPaper.getCourseName(), paperNumber, JacksonUtil.parseJson(paperStructDimensionResultList), sysUser.getId(), obeCourseWeightResult.getDimensionSign());
|
|
|
List<MarkQuestion> markQuestionList = markQuestionService.listQuestionByExamIdAndPaperNumberAndPaperType(examId, paperNumber, null);
|
|
|
if (CollectionUtils.isEmpty(markQuestionList)) {
|
|
|
throw ExceptionResultEnum.ERROR.exception("未找到试卷结构");
|
|
@@ -268,9 +267,10 @@ public class TCPaperStructServiceImpl extends ServiceImpl<TCPaperStructMapper, T
|
|
|
|
|
|
/**
|
|
|
* 根据考试id/科目编辑/试卷编码查询数据
|
|
|
+ *
|
|
|
* @param cultureProgramId cultureProgramId
|
|
|
- * @param courseId courseId
|
|
|
- * @param paperNumber paperNumber
|
|
|
+ * @param courseId courseId
|
|
|
+ * @param paperNumber paperNumber
|
|
|
* @return 结果
|
|
|
*/
|
|
|
@Override
|