wangliang 1 日 前
コミット
28a69ff09f

+ 6 - 5
distributed-print/src/main/java/com/qmth/distributed/print/api/obe/TRBasicInfoController.java

@@ -292,12 +292,13 @@ public class TRBasicInfoController {
             ObeCourseWeightResult obeCourseWeightResult = trBasicInfoService.findCourseWeightResultRmi(obeCourseOutline.getId(), true);
             MarkPaper markPaper = printCommonService.getMarkPaper(trBasicInfoDb.getExamId(), trBasicInfoDb.getPaperNumber(), trBasicInfoDb.getCourseId());
             List<TRBasicInfo> trBasicInfoList = trBasicInfoService.queryBasicInfoAll(trBasicInfoDb.getCultureProgramId(), trBasicInfoDb.getCourseId(), trBasicInfoDb.getPaperNumber(), trBasicInfoDb.getExamId());
-            for (TRBasicInfo t : trBasicInfoList) {
-                ReportCourseBasicInfoDto reportCourseBasicInfoDto = trBasicInfoService.setBasicInfo(trBasicInfo, obeCourseOutline, markPaper, obeCourseWeightResult);
-                t.setCourseSuggest(trBasicInfo.getCourseSuggest());
-                t.updateInfo(t, reportCourseBasicInfoDto, sysUser.getId());
+            List<TRBasicInfo> trBasicInfoFilterList = trBasicInfoList.stream().filter(s -> s.getId().longValue() == trBasicInfo.getId().longValue()).collect(Collectors.toList());
+            if (CollectionUtils.isEmpty(trBasicInfoFilterList)) {
+                throw ExceptionResultEnum.ERROR.exception("未过滤到报告信息");
             }
-            trBasicInfoService.saveOrUpdateBatch(trBasicInfoList);
+            ReportCourseBasicInfoDto reportCourseBasicInfoDto = trBasicInfoService.setBasicInfo(trBasicInfo, obeCourseOutline, markPaper, obeCourseWeightResult);
+            trBasicInfoFilterList.get(0).updateInfo(trBasicInfo, reportCourseBasicInfoDto, sysUser.getId());
+            trBasicInfoService.saveOrUpdate(trBasicInfoFilterList.get(0));
         } catch (Exception e) {
             log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof DuplicateKeyException) {