From 3aae8ddd5b9624626921abdcc33122dccdcd5c61 Mon Sep 17 00:00:00 2001 From: “djh” <“3298565835@qq.com”> Date: 星期五, 27 十二月 2024 13:24:46 +0800 Subject: [PATCH] 修改学时证书接收接口 --- exam-system/src/main/java/com/gkhy/exam/institutionalaccess/service/serviceImpl/TripartiteInterfaceServiceImpl.java | 35 +++++++++++++++++++---------------- 1 files changed, 19 insertions(+), 16 deletions(-) diff --git a/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/service/serviceImpl/TripartiteInterfaceServiceImpl.java b/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/service/serviceImpl/TripartiteInterfaceServiceImpl.java index b2fd30d..2a3bfcf 100644 --- a/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/service/serviceImpl/TripartiteInterfaceServiceImpl.java +++ b/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/service/serviceImpl/TripartiteInterfaceServiceImpl.java @@ -437,22 +437,22 @@ } //数据插入 //课程插入 - List<List<ThCourse>> splitSaveCourseList = ListUtil.split(saveCourseList, 500); + List<List<ThCourse>> splitSaveCourseList = ListUtil.split(saveCourseList, 200); for(List<ThCourse> courseList : splitSaveCourseList){ courseService.insertBatch(courseList); } //修改课程 - List<List<ThCourse>> splitUpdateCourseList = ListUtil.split(updateCourseList, 500); + List<List<ThCourse>> splitUpdateCourseList = ListUtil.split(updateCourseList, 200); for(List<ThCourse> courseList : splitUpdateCourseList){ courseService.updateBatch(courseList); } //插入章节 - List<List<ThCourseChapter>> splitSaveChapterList = ListUtil.split(saveCourseChapterList, 500); + List<List<ThCourseChapter>> splitSaveChapterList = ListUtil.split(saveCourseChapterList, 200); for(List<ThCourseChapter> chapterList : splitSaveChapterList){ courseChapterService.insertBatch(chapterList); } //修改章节 - List<List<ThCourseChapter>> splitUpdateChapterList = ListUtil.split(updateCourseChapterList, 500); + List<List<ThCourseChapter>> splitUpdateChapterList = ListUtil.split(updateCourseChapterList, 200); for(List<ThCourseChapter> chapterList : splitUpdateChapterList){ courseChapterService.updateBatch(chapterList); } @@ -556,7 +556,7 @@ List<ThStudentBatch> updateThStudentBatchList = new ArrayList<>(); for (ThStudentReqDTO studentReqDTO : saveStudentReqDTOList) { //学生表中过滤 - List<ThStudent> collect = students.stream().filter(s -> s.getIdcard().equals(studentReqDTO.getIdcard())).collect(Collectors.toList()); + List<ThStudent> collect = students.stream().filter(s -> s.getIdcard().equals(studentReqDTO.getIdcard()) && s.getInstitutionId().equals(institutionUser.getId()) ).collect(Collectors.toList()); if(collect.size() > 0){ ThStudent student = collect.get(0); //修改 @@ -618,23 +618,23 @@ } } //学生表新增 - List<List<ThStudent>> splitSaveStudentList = ListUtil.split(saveSudentList, 500); + List<List<ThStudent>> splitSaveStudentList = ListUtil.split(saveSudentList, 200); for (List<ThStudent> studentList : splitSaveStudentList) { studentService.insertBatch(studentList); } //学生表更新 - List<List<ThStudent>> splitUpdateStudentList = ListUtil.split(updateStudentList, 500); + List<List<ThStudent>> splitUpdateStudentList = ListUtil.split(updateStudentList, 200); for (List<ThStudent> studentList : splitUpdateStudentList) { studentService.updateBatch(studentList); } //学生关联班级表 - List<List<ThStudentBatch>> splitSaveThStudentBatchList = ListUtil.split(saveThStudentBatchList, 500); + List<List<ThStudentBatch>> splitSaveThStudentBatchList = ListUtil.split(saveThStudentBatchList, 200); for (List<ThStudentBatch> studentBatcheList : splitSaveThStudentBatchList) { studentBatchService.insertBatch(studentBatcheList); } //学生关联班级表修改 - List<List<ThStudentBatch>> splitUpdateThStudentBatchList = ListUtil.split(updateThStudentBatchList, 500); + List<List<ThStudentBatch>> splitUpdateThStudentBatchList = ListUtil.split(updateThStudentBatchList, 200); for (List<ThStudentBatch> studentBatcheList : splitUpdateThStudentBatchList) { studentBatchService.updateBatch(studentBatcheList); } @@ -1241,12 +1241,12 @@ } //插入章节 - List<List<ThBatchCourseChapter>> splitSaveBatchCourseChapterList = ListUtil.split(saveBatchCourseChapterList, 500); + List<List<ThBatchCourseChapter>> splitSaveBatchCourseChapterList = ListUtil.split(saveBatchCourseChapterList, 200); for (List<ThBatchCourseChapter> chapterList : splitSaveBatchCourseChapterList) { batchCourseChapterService.insertBatch(chapterList); } //修改章节 - List<List<ThBatchCourseChapter>> splitUpdateBatchCourseChapterList = ListUtil.split(updateBatchCourseChapterList, 500); + List<List<ThBatchCourseChapter>> splitUpdateBatchCourseChapterList = ListUtil.split(updateBatchCourseChapterList, 200); for (List<ThBatchCourseChapter> chapterList : splitUpdateBatchCourseChapterList) { batchCourseChapterService.updateBatch(chapterList); } @@ -1531,27 +1531,27 @@ } } //插入学习记录 - List<List<ThStudyDetail>> splitSaveDetailList = ListUtil.split(saveStudyDetailList, 500); + List<List<ThStudyDetail>> splitSaveDetailList = ListUtil.split(saveStudyDetailList, 200); for (List<ThStudyDetail> thStudyDetails : splitSaveDetailList) { studyDetailService.insertBatch(thStudyDetails); } //修改学习记录 - List<List<ThStudyDetail>> splitUpdateDetailList = ListUtil.split(updateStudyDetailList, 500); + List<List<ThStudyDetail>> splitUpdateDetailList = ListUtil.split(updateStudyDetailList, 200); for (List<ThStudyDetail> thStudyDetails : splitUpdateDetailList) { studyDetailService.updateBatch(thStudyDetails); } //插入认证记录 - List<List<ThStudyAuth>> splitSaveAuthList = ListUtil.split(saveStudyAuthList, 500); + List<List<ThStudyAuth>> splitSaveAuthList = ListUtil.split(saveStudyAuthList, 200); for (List<ThStudyAuth> thStudyAuths : splitSaveAuthList) { studyAuthService.insetBatch(thStudyAuths); } //插入学习轨迹 - List<List<ThStudyTrack>> splitSaveTrackList = ListUtil.split(saveStudyTrackList, 500); + List<List<ThStudyTrack>> splitSaveTrackList = ListUtil.split(saveStudyTrackList, 200); for (List<ThStudyTrack> thStudyTracks : splitSaveTrackList) { studyTrackService.insertBatch(thStudyTracks); } //修改学生完成状态 - List<List<ThStudentBatch>> splitUpdateThStudentBatchList = ListUtil.split(updateStudentBatchList, 500); + List<List<ThStudentBatch>> splitUpdateThStudentBatchList = ListUtil.split(updateStudentBatchList, 200); for (List<ThStudentBatch> studentBatcheList : splitUpdateThStudentBatchList) { studentBatchService.updateBatch(studentBatcheList); } @@ -1821,6 +1821,9 @@ cert.setUpdateTime(LocalDateTime.now()); cert.setInstitutionId(institutionUser.getId()); cert.setInstitutionName(institutionUser.getInstitutionalName()); + if (cert.getDelFlag()==null) { + cert.setDelFlag(DeleteStatusEnum.NO.getStatus()); + } updateCertList.add(cert); } else { //新增 -- Gitblit v1.9.2