wangliang 7 tháng trước cách đây
mục cha
commit
6f1b365ac2

+ 4 - 2
teachcloud-obe/src/main/java/com/qmth/teachcloud/obe/service/impl/TCFinalScoreServiceImpl.java

@@ -417,7 +417,9 @@ public class TCFinalScoreServiceImpl extends ServiceImpl<TCFinalScoreMapper, TCF
                 }
             }
             if (!CollectionUtils.isEmpty(tcFinalScoreList) && !CollectionUtils.isEmpty(tcUsualScoreList)) {
-                successData.add("共同步").add(tcFinalScoreList.size() + "").add("条数据");
+                Long teachId = Objects.nonNull(tcFinalScoreList.get(0).getCreateId()) ? tcFinalScoreList.get(0).getCreateId() : sysUser.getId();
+                List<TCFinalScore> tcFinalScoreActualList = tcFinalScoreList.stream().filter(s -> s.getCreateId().longValue() == teachId.longValue()).collect(Collectors.toList());
+                successData.add("共同步").add(tcFinalScoreActualList.size() + "").add("条数据");
                 List<TCFinalScore> tcFinalScoreDbSourceList = tcFinalScoreService.queryFinalScore(cultureProgramId,
                         courseId, paperNumber, examId);
                 List<TCUsualScore> tcUsualScoreDbSourceList = tcUsualScoreService.queryUsualScore(cultureProgramId,
@@ -439,7 +441,7 @@ public class TCFinalScoreServiceImpl extends ServiceImpl<TCFinalScoreMapper, TCF
                     trBasicInfoService.clearReportData(cultureProgramId, courseId, paperNumber, examId, true);
                 }
                 List<TCFinalScore> tcFinalScoreNotEqList = tcFinalScoreService.queryFinalScoreNotEq(cultureProgramId, courseId, paperNumber, examId, tcFinalScoreList.get(0).getCreateId());
-                if (!CollectionUtils.isEmpty(tcFinalScoreNotEqList) && !CollectionUtils.isEmpty(tcFinalScoreList)) {
+                if (!CollectionUtils.isEmpty(tcFinalScoreNotEqList)) {
                     for (TCFinalScore t : tcFinalScoreNotEqList) {
                         tcUsualScoreService.remove(t.getCultureProgramId(), t.getCourseId(), t.getPaperNumber(), t.getExamId(), tcFinalScoreList.get(0).getCreateId());
                         tcFinalScoreService.remove(t.getCultureProgramId(), t.getCourseId(), t.getPaperNumber(), t.getExamId(), tcFinalScoreList.get(0).getCreateId());