“djh”
2024-12-24 3dfef503c7f5151859839c3199e7f4b63ff50c0c
修改
已修改6个文件
39 ■■■■ 文件已修改
exam-system/src/main/java/com/gkhy/exam/institutionalaccess/service/serviceImpl/ThStudyRecordManagerServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/institutionalaccess/service/serviceImpl/TripartiteInterfaceServiceImpl.java 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/resources/mapper/institutionaccess/ThExamRecordMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserInstitutionMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/SysUserInstitutionMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/institutionalaccess/service/serviceImpl/ThStudyRecordManagerServiceImpl.java
@@ -79,6 +79,7 @@
            List<String> idcards = thStudyDetailVOS.stream().map(ThStudyDetailVO::getIdcard).collect(Collectors.toList());
            List<ThStudent> studentList = studentService.getNameByIdcards(idcards);
            for(ThStudyDetailVO thStudyDetailVO : thStudyDetailVOS){
                //计算自然时间差
                Duration between = Duration.between(thStudyDetailVO.getStartTime(), thStudyDetailVO.getFinishTime());
                thStudyDetailVO.setDifference(between.getSeconds());
                thStudyDetailVO.setDifferenceDesc(ConvertTimeUtils.convertTimeToString(thStudyDetailVO.getDifference()));
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);
        }
@@ -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);
        }
exam-system/src/main/resources/mapper/institutionaccess/ThExamRecordMapper.xml
@@ -49,7 +49,7 @@
    <select id="getStatistic" resultType="com.gkhy.exam.institutionalaccess.model.vo.ThTrainVO">
        SELECT
        e.institution_id,
        count( e.institution_id ) passCount
        count(DISTINCT e.idcard) passCount
        FROM
        th_exam_record e
        LEFT JOIN th_batch b ON e.batch_uuid = b.uuid
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserInstitutionMapper.java
@@ -22,7 +22,7 @@
     * @param userIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteUserInstitution(Long[] userIds);
    public int deleteUserInstitutions(Long[] userIds);
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
@@ -498,7 +498,7 @@
        // 删除用户与岗位关联
        //userPostMapper.deleteUserPost(userIds);
        //删除机构
        institutionMapper.deleteUserInstitution(userIds);
        institutionMapper.deleteUserInstitutions(userIds);
        return userMapper.deleteUserByIds(userIds);
    }
ruoyi-system/src/main/resources/mapper/system/SysUserInstitutionMapper.xml
@@ -13,7 +13,7 @@
        delete from sys_user_institution where user_id=#{userId}
    </delete>
    
    <delete id="deleteUserInstitution" parameterType="Long">
    <delete id="deleteUserInstitutions" parameterType="Long">
         delete from sys_user_institution where user_id in
         <foreach collection="array" item="userId" open="(" separator="," close=")">
             #{userId}