caozixuan 3 роки тому
батько
коміт
6447fc09a0

+ 7 - 2
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/BasicCourseService.java

@@ -1,6 +1,5 @@
 package com.qmth.teachcloud.common.service;
 
-import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.qmth.teachcloud.common.bean.dto.CourseInfoDto;
 import com.qmth.teachcloud.common.entity.BasicCourse;
@@ -36,7 +35,13 @@ public interface BasicCourseService extends IService<BasicCourse> {
      */
     List<CourseInfoDto> findByUserLoginNameAndRealName(String loginName, String realName);
 
-    BasicCourse findByCourseCode(String courseCode);
+    /**
+     * 根据
+     * @param courseCode 课程编号
+     * @param schoolId 学校id
+     * @return 课程
+     */
+    BasicCourse findByCourseCode(String courseCode,Long schoolId);
 
     /**
      * 创建课程

+ 1 - 2
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/BasicCourseServiceImpl.java

@@ -74,8 +74,7 @@ public class BasicCourseServiceImpl extends ServiceImpl<BasicCourseMapper, Basic
     }
 
     @Override
-    public BasicCourse findByCourseCode(String courseCode) {
-        Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
+    public BasicCourse findByCourseCode(String courseCode,Long schoolId) {
         return this.getOne(new QueryWrapper<BasicCourse>().lambda()
                 .eq(BasicCourse::getCode,courseCode)
                 .eq(BasicCourse::getSchoolId,schoolId));

+ 7 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TBExamService.java

@@ -18,4 +18,11 @@ public interface TBExamService extends IService<TBExam> {
      * @return 教研分析考试信息
      */
     TBExam findByCloudExamId(Long cloudExamId);
+
+    /**
+     * 根据考试id查询学校id
+     * @param examId 考试id
+     * @return 学校id
+     */
+    Long findSchoolIdByExamId(Long examId);
 }

+ 30 - 16
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/AnalyzeForReportServiceImpl.java

@@ -113,6 +113,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
     @Transactional(rollbackFor = Exception.class)
     @Override
     public String buildAnalyzeExamCourse(Long examId, String courseCode) {
+        Long schoolId = tbExamService.findSchoolIdByExamId(examId);
         List<String> effectiveCourseCodeList = tbExamCourseService.findEffectiveByExamId(examId, courseCode);
         // 考试下考生作答数据源
         List<TAExamCourseRecord> dataSource = taExamCourseRecordService.list(new QueryWrapper<TAExamCourseRecord>().lambda()
@@ -287,7 +288,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
             taExamCourse.setExamId(examId);
             taExamCourse.setExamName(tbExam.getExamName());
             taExamCourse.setCourseCode(effectiveCourseCode);
-            taExamCourse.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode).getName());
+            taExamCourse.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode,schoolId).getName());
             taExamCourse.setSchoolId(tbExam.getSchoolId());
             taExamCourse.setTeachCollegeId(teachCollegeId);
             taExamCourse.setTeachCollegeName(teachCollegeName);
@@ -383,6 +384,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
     @Transactional(rollbackFor = Exception.class)
     @Override
     public String buildAnalyzeExamCourseCollegeInspect(Long examId, String courseCode) {
+        Long schoolId = tbExamService.findSchoolIdByExamId(examId);
         List<TAExamCourseRecord> recordDatasource = taExamCourseRecordService.list(new QueryWrapper<TAExamCourseRecord>().lambda()
                 .eq(TAExamCourseRecord::getExamId, examId));
         // 可分析有效课程信息
@@ -447,7 +449,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
                 taExamCourseCollegeInspect.setExamId(examId);
                 taExamCourseCollegeInspect.setSchoolId(tbExamService.getById(examId).getSchoolId());
                 taExamCourseCollegeInspect.setCourseCode(effectiveCourseCode);
-                taExamCourseCollegeInspect.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode).getName());
+                taExamCourseCollegeInspect.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode,schoolId).getName());
                 taExamCourseCollegeInspect.setCollegeId(collegeId);
                 taExamCourseCollegeInspect.setMaxScore(BigDecimal.valueOf(maxScore));
                 taExamCourseCollegeInspect.setMinScore(BigDecimal.valueOf(minScore));
@@ -471,6 +473,8 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
     @Transactional(rollbackFor = Exception.class)
     @Override
     public String buildAnalyzeExamCourseClazz(Long examId, String courseCode) {
+        Long schoolId = tbExamService.findSchoolIdByExamId(examId);
+
         List<TAExamCourseRecord> recordDatasource = taExamCourseRecordService.list(new QueryWrapper<TAExamCourseRecord>().lambda()
                 .eq(TAExamCourseRecord::getExamId, examId));
         // 可分析有效课程信息
@@ -526,7 +530,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
                 taExamCourseClazz.setExamId(examId);
                 taExamCourseClazz.setSchoolId(tbExamService.getById(examId).getSchoolId());
                 taExamCourseClazz.setCourseCode(effectiveCourseCode);
-                taExamCourseClazz.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode).getName());
+                taExamCourseClazz.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode,schoolId).getName());
                 taExamCourseClazz.setClazzId(clazzId);
                 taExamCourseClazz.setMaxScore(BigDecimal.valueOf(maxScore));
                 taExamCourseClazz.setMinScore(BigDecimal.valueOf(minScore));
@@ -545,6 +549,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
     @Transactional(rollbackFor = Exception.class)
     @Override
     public String AnalyzePointScoreRate(Long examId, String courseCode) throws Exception {
+        Long schoolId = tbExamService.findSchoolIdByExamId(examId);
         // 可分析有效课程信息
         List<String> effectiveCourseCodeList = tbExamCourseService.findEffectiveByExamId(examId, courseCode);
 
@@ -664,7 +669,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
                         taExamCourseRecordDio.setStudentId(taExamCourseRecord.getStudentId());
                         taExamCourseRecordDio.setStudentCode(taExamCourseRecord.getStudentCode());
                         taExamCourseRecordDio.setCourseCode(effectiveCourseCode);
-                        taExamCourseRecordDio.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode).getName());
+                        taExamCourseRecordDio.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode,schoolId).getName());
                         String[] dimCodeArr = s.split("-");
                         if (dimCodeArr.length != 2) {
                             throw ExceptionResultEnum.ERROR.exception("获得的考查点标识不符合标准,标准为 type-dimensionCode,结果为:  " + s);
@@ -717,7 +722,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
                         taExamCourseRecordMod.setExamId(taExamCourseRecord.getExamId());
                         taExamCourseRecordMod.setSchoolId(tbExamService.getById(examId).getSchoolId());
                         taExamCourseRecordMod.setCourseCode(effectiveCourseCode);
-                        taExamCourseRecordMod.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode).getName());
+                        taExamCourseRecordMod.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode,schoolId).getName());
                         taExamCourseRecordMod.setModuleType(s);
                         taExamCourseRecordMod.setTotalScore(BigDecimal.valueOf(studentScore));
                         taExamCourseRecordMod.setScoreRate(BigDecimal.valueOf(rate));
@@ -761,7 +766,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
                     taExamCourseDio.setExamId(examId);
                     taExamCourseDio.setSchoolId(tbExamService.getById(examId).getSchoolId());
                     taExamCourseDio.setCourseCode(effectiveCourseCode);
-                    taExamCourseDio.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode).getName());
+                    taExamCourseDio.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode,schoolId).getName());
                     taExamCourseDio.setPaperId(paperId);
                     taExamCourseDio.setDimensionType(dimensionType);
                     taExamCourseDio.setDimensionCode(dimensionCode);
@@ -878,6 +883,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
     @Transactional(rollbackFor = Exception.class)
     @Override
     public String buildAnalyzePaperStruct(Long examId, String courseCode) {
+        Long schoolId = tbExamService.findSchoolIdByExamId(examId);
         // 可分析有效课程信息
         List<String> effectiveCourseCodeList = tbExamCourseService.findEffectiveByExamId(examId, courseCode);
         for (String effectiveCourseCode : effectiveCourseCodeList) {
@@ -938,7 +944,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
                     taPaperStruct.setExamId(examId);
                     taPaperStruct.setSchoolId(tbExamService.getById(examId).getSchoolId());
                     taPaperStruct.setCourseCode(effectiveCourseCode);
-                    taPaperStruct.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode).getName());
+                    taPaperStruct.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode,schoolId).getName());
                     taPaperStruct.setPaperId(paperId);
                     taPaperStruct.setPaperType(paperType);
                     taPaperStruct.setQuestionName(paperStruct.getQuestionName());
@@ -968,6 +974,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
     @Transactional(rollbackFor = Exception.class)
     @Override
     public String buildAnalyzeCollegePaperStruct(Long examId, String courseCode) {
+        Long schoolId = tbExamService.findSchoolIdByExamId(examId);
         // 可分析有效课程信息
         List<String> effectiveCourseCodeList = tbExamCourseService.findEffectiveByExamId(examId, courseCode);
         for (String effectiveCourseCode : effectiveCourseCodeList) {
@@ -1036,7 +1043,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
                         taExamCourseCollegePaperStruct.setExamId(examId);
                         taExamCourseCollegePaperStruct.setSchoolId(tbExamService.getById(examId).getSchoolId());
                         taExamCourseCollegePaperStruct.setCourseCode(effectiveCourseCode);
-                        taExamCourseCollegePaperStruct.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode).getName());
+                        taExamCourseCollegePaperStruct.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode,schoolId).getName());
                         taExamCourseCollegePaperStruct.setPaperId(paperId);
                         taExamCourseCollegePaperStruct.setInspectCollegeId(inspectCollegeId);
                         taExamCourseCollegePaperStruct.setInspectCollegeName(inspectCollegeName);
@@ -1069,6 +1076,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
     @Transactional(rollbackFor = Exception.class)
     @Override
     public String buildAnalyzeTeacherPaperStruct(Long examId, String courseCode) {
+        Long schoolId = tbExamService.findSchoolIdByExamId(examId);
         // 可分析有效课程信息
         List<String> effectiveCourseCodeList = tbExamCourseService.findEffectiveByExamId(examId, courseCode);
         for (String effectiveCourseCode : effectiveCourseCodeList) {
@@ -1137,7 +1145,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
                         taExamCourseTeacherPaperStruct.setExamId(examId);
                         taExamCourseTeacherPaperStruct.setSchoolId(tbExamService.getById(examId).getSchoolId());
                         taExamCourseTeacherPaperStruct.setCourseCode(effectiveCourseCode);
-                        taExamCourseTeacherPaperStruct.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode).getName());
+                        taExamCourseTeacherPaperStruct.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode,schoolId).getName());
                         taExamCourseTeacherPaperStruct.setPaperId(paperId);
                         taExamCourseTeacherPaperStruct.setTeacherId(teacherId);
                         taExamCourseTeacherPaperStruct.setTeacherName(teacherName);
@@ -1170,6 +1178,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
     @Transactional(rollbackFor = Exception.class)
     @Override
     public String buildAnalyzeTeacherCollegePaperStruct(Long examId, String courseCode) {
+        Long schoolId = tbExamService.findSchoolIdByExamId(examId);
         // 可分析有效课程信息
         List<String> effectiveCourseCodeList = tbExamCourseService.findEffectiveByExamId(examId, courseCode);
         for (String effectiveCourseCode : effectiveCourseCodeList) {
@@ -1254,7 +1263,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
                             taExamCourseTeacherCollegePaperStruct.setExamId(examId);
                             taExamCourseTeacherCollegePaperStruct.setSchoolId(tbExamService.getById(examId).getSchoolId());
                             taExamCourseTeacherCollegePaperStruct.setCourseCode(effectiveCourseCode);
-                            taExamCourseTeacherCollegePaperStruct.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode).getName());
+                            taExamCourseTeacherCollegePaperStruct.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode,schoolId).getName());
                             taExamCourseTeacherCollegePaperStruct.setPaperId(paperId);
                             taExamCourseTeacherCollegePaperStruct.setTeacherId(teacherId);
                             taExamCourseTeacherCollegePaperStruct.setTeacherName(teacherName);
@@ -1291,6 +1300,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
     @Transactional(rollbackFor = Exception.class)
     @Override
     public String buildExamPaperDifficult(Long examId, String courseCode) {
+        Long schoolId = tbExamService.findSchoolIdByExamId(examId);
         // 可分析有效课程信息
         List<String> effectiveCourseCodeList = tbExamCourseService.findEffectiveByExamId(examId, courseCode);
 
@@ -1356,7 +1366,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
                         taExamCourseDifficult.setId(SystemConstant.getDbUuid());
                         taExamCourseDifficult.setExamId(examId);
                         taExamCourseDifficult.setCourseCode(effectiveCourseCode);
-                        taExamCourseDifficult.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode).getName());
+                        taExamCourseDifficult.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode,schoolId).getName());
                         taExamCourseDifficult.setPaperId(paperId);
                         taExamCourseDifficult.setPaperType(tbPaperService.getById(paperId).getPaperType());
                         taExamCourseDifficult.setCollegeId(collegeId);
@@ -1381,6 +1391,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
     @Transactional(rollbackFor = Exception.class)
     @Override
     public String buildExamPaperTeacherDifficult(Long examId, String courseCode) {
+        Long schoolId = tbExamService.findSchoolIdByExamId(examId);
         // 可分析有效课程信息
         List<String> effectiveCourseCodeList = tbExamCourseService.findEffectiveByExamId(examId, courseCode);
 
@@ -1448,7 +1459,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
                         taExamCourseTeacherDifficult.setPaperId(paperId);
                         taExamCourseTeacherDifficult.setPaperType(tbPaperService.getById(paperId).getPaperType());
                         taExamCourseTeacherDifficult.setCourseCode(effectiveCourseCode);
-                        taExamCourseTeacherDifficult.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode).getName());
+                        taExamCourseTeacherDifficult.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode,schoolId).getName());
                         taExamCourseTeacherDifficult.setTeacherId(teacherId);
                         taExamCourseTeacherDifficult.setTeacherName(sysUserService.getById(teacherId).getRealName());
                         taExamCourseTeacherDifficult.setSchoolId(tbExamService.getById(examId).getSchoolId());
@@ -1472,6 +1483,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
     @Transactional(rollbackFor = Exception.class)
     @Override
     public String buildAnalyzeExamCourseTeacherCollegeDifficult(Long examId, String courseCode) {
+        Long schoolId = tbExamService.findSchoolIdByExamId(examId);
         // 可分析有效课程信息
         List<String> effectiveCourseCodeList = tbExamCourseService.findEffectiveByExamId(examId, courseCode);
 
@@ -1563,7 +1575,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
                             taExamCourseTeacherCollegeDifficult.setPaperId(paperId);
                             taExamCourseTeacherCollegeDifficult.setPaperType(tbPaperService.getById(paperId).getPaperType());
                             taExamCourseTeacherCollegeDifficult.setCourseCode(effectiveCourseCode);
-                            taExamCourseTeacherCollegeDifficult.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode).getName());
+                            taExamCourseTeacherCollegeDifficult.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode,schoolId).getName());
                             taExamCourseTeacherCollegeDifficult.setTeacherId(teacherId);
                             taExamCourseTeacherCollegeDifficult.setTeacherName(sysUserService.getById(teacherId).getRealName());
                             taExamCourseTeacherCollegeDifficult.setInspectCollegeId(collegeId);
@@ -1665,6 +1677,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
     @Transactional(rollbackFor = Exception.class)
     @Override
     public String buildAnalyzeExamCourseCollegeTeacher(Long examId, String courseCode) {
+        Long schoolId = tbExamService.findSchoolIdByExamId(examId);
         // 可分析有效课程信息
         List<String> effectiveCourseCodeList = tbExamCourseService.findEffectiveByExamId(examId, courseCode);
         for (String effectiveCourseCode : effectiveCourseCodeList) {
@@ -1803,7 +1816,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
                     taExamCourseCollegeTeacher.setExamId(examId);
                     taExamCourseCollegeTeacher.setSchoolId(tbExamService.getById(examId).getSchoolId());
                     taExamCourseCollegeTeacher.setCourseCode(effectiveCourseCode);
-                    taExamCourseCollegeTeacher.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode).getName());
+                    taExamCourseCollegeTeacher.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode,schoolId).getName());
                     taExamCourseCollegeTeacher.setTeacherId(teacherId);
                     taExamCourseCollegeTeacher.setTeacherName(sysUserService.getById(teacherId).getRealName());
                     taExamCourseCollegeTeacher.setMinScoreAssign(BigDecimal.valueOf(minScoreAssign));
@@ -1855,6 +1868,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
     @Transactional(rollbackFor = Exception.class)
     @Override
     public String buildAnalyzeExamCourseTeacher(Long examId, String courseCode) {
+        Long schoolId = tbExamService.findSchoolIdByExamId(examId);
         // 可分析有效课程信息
         List<String> effectiveCourseCodeList = tbExamCourseService.findEffectiveByExamId(examId, courseCode);
         for (String effectiveCourseCode : effectiveCourseCodeList) {
@@ -1915,7 +1929,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
                 taExamCourseTeacher.setExamId(examId);
                 taExamCourseTeacher.setSchoolId(tbExamService.getById(examId).getSchoolId());
                 taExamCourseTeacher.setCourseCode(effectiveCourseCode);
-                taExamCourseTeacher.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode).getName());
+                taExamCourseTeacher.setCourseName(basicCourseService.findByCourseCode(effectiveCourseCode,schoolId).getName());
                 taExamCourseTeacher.setTeacherId(teacherId);
                 taExamCourseTeacher.setTeacherName(sysUserService.getById(teacherId).getRealName());
                 taExamCourseTeacher.setMinScore(BigDecimal.valueOf(minScore));
@@ -2018,7 +2032,7 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
         // 获取当前课程下所有学生考试成绩记录
         List<BasicExamRecordDto> basicExamRecordDtoDatasource = tbExamRecordService.findByExamIdAndCourseCodeS(examId, courseCodeList);
         for (String s : courseCodeList) {
-            if (tbExamCourseService.verifyExamCourseCantRun(examId, schoolId, s, basicCourseService.findByCourseCode(s).getName())) {
+            if (tbExamCourseService.verifyExamCourseCantRun(examId, schoolId, s, basicCourseService.findByCourseCode(s,schoolId).getName())) {
                 throw ExceptionResultEnum.ERROR.exception("课程编号[" + s + "]的课程分析数据已测试或发布,不能变更基础数据");
             }
             List<BasicExamRecordDto> basicExamRecordDtoList = basicExamRecordDtoDatasource.stream()

+ 9 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBExamServiceImpl.java

@@ -35,4 +35,13 @@ public class TBExamServiceImpl extends ServiceImpl<TBExamMapper, TBExam> impleme
         }
         return tbExam;
     }
+
+    @Override
+    public Long findSchoolIdByExamId(Long examId) {
+        TBExam tbExam = this.getById(examId);
+        if (Objects.isNull(tbExam)){
+            throw ExceptionResultEnum.ERROR.exception("未找到考试id为 : " + examId + " 的考试");
+        }
+        return tbExam.getSchoolId();
+    }
 }

+ 5 - 5
teachcloud-report/src/main/java/com/qmth/teachcloud/report/api/BasicDatasourceController.java

@@ -801,7 +801,7 @@ public class BasicDatasourceController {
     @RequestMapping(value = "/normal/assignScore", method = RequestMethod.POST)
     @Transactional(rollbackFor = Exception.class)
     @ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
-    public Result normalAssignScore(@RequestParam Long examId, @RequestParam Long schoolId, @RequestParam String courseCode) throws IOException, NoSuchFieldException {
+    public Result normalAssignScore(@RequestParam Long examId, @RequestParam Long schoolId, @RequestParam String courseCode) {
         analyzeForReportService.normalAssignScore(examId, schoolId, courseCode);
         return ResultUtil.ok(Collections.singletonMap(SystemConstant.SUCCESS, true));
     }
@@ -819,7 +819,7 @@ public class BasicDatasourceController {
         List<BasicExamRecordDto> basicExamRecordDtoDatasource = tbExamRecordService.findByExamIdAndCourseCodeS(examId, courseCodeList);
         Set<TAExamCourseRecord> taExamCourseRecordDatasource = new HashSet<>();
         for (String s : courseCodeList) {
-            if (tbExamCourseService.verifyExamCourseCantRun(examId, schoolId, s, basicCourseService.findByCourseCode(s).getName())) {
+            if (tbExamCourseService.verifyExamCourseCantRun(examId, schoolId, s, basicCourseService.findByCourseCode(s,schoolId).getName())) {
                 throw ExceptionResultEnum.ERROR.exception("课程编号[" + s + "]的课程分析数据已测试或发布,不能变更基础数据");
             }
             List<BasicExamRecordDto> basicExamRecordDtoList = basicExamRecordDtoDatasource.stream()
@@ -929,7 +929,7 @@ public class BasicDatasourceController {
     @Transactional(rollbackFor = Exception.class)
     @ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
     public Result configImport(@RequestParam Long schoolId, @RequestParam Long examId, @RequestParam String courseCode) {
-        String courseName = basicCourseService.findByCourseCode(courseCode).getName();
+        String courseName = basicCourseService.findByCourseCode(courseCode,schoolId).getName();
         if (tbExamCourseService.verifyExamCourseCantRun(examId, schoolId, courseCode, courseName)) {
             throw ExceptionResultEnum.ERROR.exception("课程编号[" + courseCode + "]的课程分析数据已测试或发布,不能变更基础数据");
         }
@@ -1056,7 +1056,7 @@ public class BasicDatasourceController {
     @Transactional(rollbackFor = Exception.class)
     @ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
     public Result exceptionStudentBatchDispose(@RequestParam String schoolId, @RequestParam String examId, @RequestParam(required = false) String courseCode) {
-        String courseName = basicCourseService.findByCourseCode(courseCode).getName();
+        String courseName = basicCourseService.findByCourseCode(courseCode,SystemConstant.convertIdToLong(schoolId)).getName();
         if (tbExamCourseService.verifyExamCourseCantRun(SystemConstant.convertIdToLong(examId), SystemConstant.convertIdToLong(schoolId), courseCode, courseName)) {
             throw ExceptionResultEnum.ERROR.exception("课程编号[" + courseCode + "]的课程分析数据已测试或发布,不能变更基础数据");
         }
@@ -1294,7 +1294,7 @@ public class BasicDatasourceController {
     @ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
     public Result exceptionStudentDispose(@RequestParam String schoolId, @RequestParam String examId, @RequestParam String courseCode) {
 
-        String courseName = basicCourseService.findByCourseCode(courseCode).getName();
+        String courseName = basicCourseService.findByCourseCode(courseCode,SystemConstant.convertIdToLong(schoolId)).getName();
         if (tbExamCourseService.verifyExamCourseCantRun(SystemConstant.convertIdToLong(examId), SystemConstant.convertIdToLong(schoolId), courseCode, courseName)) {
             throw ExceptionResultEnum.ERROR.exception("课程编号[" + courseCode + "]的课程分析数据已测试或发布,不能变更基础数据");
         }