|
@@ -126,7 +126,6 @@ public class TCFinalScoreServiceImpl extends ServiceImpl<TCFinalScoreMapper, TCF
|
|
|
|
|
|
ExcelReader excelReader = ExcelReader.create(ExcelType.XLSX, file.getInputStream(), 1);
|
|
|
List<String[]> arrayList = excelReader.getDataArrayList();
|
|
|
- log.info("arrayList:{}", JacksonUtil.parseJson(arrayList));
|
|
|
|
|
|
if (!CollectionUtils.isEmpty(arrayList)) {
|
|
|
SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
@@ -391,13 +390,13 @@ public class TCFinalScoreServiceImpl extends ServiceImpl<TCFinalScoreMapper, TCF
|
|
|
}
|
|
|
}
|
|
|
if (!CollectionUtils.isEmpty(paperStructDimensionResultList)) {
|
|
|
- TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(cultureProgramId, courseId, paperNumber, examId);
|
|
|
- if (Objects.nonNull(tcPaperStruct)) {
|
|
|
- tcPaperStructService.removeById(tcPaperStruct.getId());
|
|
|
+ TCPaperStruct tcPaperStructDb = tcPaperStructService.queryPaperStruct(cultureProgramId, courseId, paperNumber, examId);
|
|
|
+ if (Objects.nonNull(tcPaperStructDb)) {
|
|
|
+ tcPaperStructService.removeById(tcPaperStructDb.getId());
|
|
|
}
|
|
|
paperStructDimensionResultList = SDFrame.read(paperStructDimensionResultList).sortDesc(Sorter.sortDescBy(PaperStructDimensionResult::getMainNumber).sortDesc(PaperStructDimensionResult::getMainNumber)).toLists();
|
|
|
- tcPaperStruct = new TCPaperStruct(cultureProgramId, courseId, basicCourse.getCode(), basicCourse.getName(), paperNumber, JacksonUtil.parseJson(paperStructDimensionResultList),
|
|
|
- sysUser.getId(), examId);
|
|
|
+ TCPaperStruct tcPaperStruct = new TCPaperStruct(cultureProgramId, courseId, basicCourse.getCode(), basicCourse.getName(), paperNumber, JacksonUtil.parseJson(paperStructDimensionResultList),
|
|
|
+ sysUser.getId(), examId, tcPaperStructDb.getPaperStructDimension());
|
|
|
tcPaperStructService.saveOrUpdate(tcPaperStruct);
|
|
|
}
|
|
|
} else {
|
|
@@ -414,10 +413,10 @@ public class TCFinalScoreServiceImpl extends ServiceImpl<TCFinalScoreMapper, TCF
|
|
|
SourceEnum.SYNC, sysUser.getId(), cultureProgramId, courseId));
|
|
|
}
|
|
|
}
|
|
|
- TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(cultureProgramId, courseId, paperNumber, examId);
|
|
|
- if (Objects.nonNull(tcPaperStruct)) {
|
|
|
- tcPaperStructService.removeById(tcPaperStruct.getId());
|
|
|
- }
|
|
|
+// TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(cultureProgramId, courseId, paperNumber, examId);
|
|
|
+// if (Objects.nonNull(tcPaperStruct)) {
|
|
|
+// tcPaperStructService.removeById(tcPaperStruct.getId());
|
|
|
+// }
|
|
|
}
|
|
|
if (!CollectionUtils.isEmpty(tcFinalScoreList) && !CollectionUtils.isEmpty(tcUsualScoreList)) {
|
|
|
successData.add("共同步").add(tcFinalScoreList.size() + "").add("条数据");
|