Browse Source

Merge remote-tracking branch 'origin/dev_v3.3.1' into dev_v3.3.1

wangliang 1 year ago
parent
commit
ff9978b23b
18 changed files with 113 additions and 244 deletions
  1. 11 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/BasicTeachClazzResult.java
  2. 7 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/BasicExamStudentMapper.java
  3. 5 3
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/BasicTeachClazzMapper.java
  4. 11 3
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/BasicTeachClazzService.java
  5. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ConditionService.java
  6. 21 14
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/BasicExamStudentServiceImpl.java
  7. 19 3
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/BasicTeachClazzServiceImpl.java
  8. 2 3
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ConditionServiceImpl.java
  9. 16 0
      distributed-print-business/src/main/resources/mapper/BasicExamStudentMapper.xml
  10. 11 5
      distributed-print-business/src/main/resources/mapper/BasicTeachClazzMapper.xml
  11. 1 8
      distributed-print/src/main/java/com/qmth/distributed/print/api/BasicCourseController.java
  12. 3 1
      distributed-print/src/main/java/com/qmth/distributed/print/api/ConditionController.java
  13. BIN
      distributed-print/src/main/resources/temps/course.xlsx
  14. 0 14
      distributed-print/src/test/java/com/qmth/distributed/print/ImportTest.java
  15. 1 34
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/bean/dto/BasicCourseExportDto.java
  16. 2 38
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/bean/dto/excel/BasicCourseImportDto.java
  17. 0 24
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/bean/params/BasicCourseParams.java
  18. 2 93
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/BasicCourseServiceImpl.java

+ 11 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/BasicTeachClazzResult.java

@@ -21,6 +21,9 @@ public class BasicTeachClazzResult {
     @ApiModelProperty(value = "课程编号")
     private String courseCode;
 
+    @ApiModelProperty(value = "课程名称")
+    private String courseName;
+
     @ApiModelProperty(value = "教学班名称")
     private String clazzName;
 
@@ -48,6 +51,14 @@ public class BasicTeachClazzResult {
         this.courseCode = courseCode;
     }
 
+    public String getCourseName() {
+        return courseName;
+    }
+
+    public void setCourseName(String courseName) {
+        this.courseName = courseName;
+    }
+
     public String getClazzName() {
         return clazzName;
     }

+ 7 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/BasicExamStudentMapper.java

@@ -61,4 +61,11 @@ public interface BasicExamStudentMapper extends BaseMapper<BasicExamStudent> {
             @Param("major") String major, @Param("teachClazz") String teachClazz, @Param("examStudentInfo") String examStudentInfo,
             @Param("dpr") DataPermissionRule dpr);
 
+    /**
+     * 查询被绑定的考生字典
+     *
+     * @param idList 考生字典id集合
+     * @return 被绑定的考生字典
+     */
+    List<String> findBoundBasicExamStudentNames(@Param("idList") List<Long> idList);
 }

+ 5 - 3
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/BasicTeachClazzMapper.java

@@ -20,9 +20,11 @@ public interface BasicTeachClazzMapper extends BaseMapper<BasicTeachClazz> {
     /**
      * 查询教学课程字典集合
      *
-     * @param examId    考试id
-     * @param clazzName 班级名称
+     * @param examId     考试id
+     * @param courseCode 课程编号
+     * @param clazzName  班级名称
      * @return 教学课程字典集合
      */
-    List<BasicTeachClazzResult> findTeachClazzList(@Param("examId") Long examId, @Param("clazzName") String clazzName);
+    List<BasicTeachClazzResult> findTeachClazzList(@Param("examId") Long examId, @Param("courseCode") String courseCode,
+            @Param("clazzName") String clazzName);
 }

+ 11 - 3
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/BasicTeachClazzService.java

@@ -31,9 +31,17 @@ public interface BasicTeachClazzService extends IService<BasicTeachClazz> {
     /**
      * 查询所有加血版
      *
-     * @param examId    考试id
-     * @param clazzName 班级名称
+     * @param examId     考试id
+     * @param courseCode 课程编号
+     * @param clazzName  班级名称
      * @return 教学班结果
      */
-    List<BasicTeachClazzResult> findAllTeachClazz(Long examId, String clazzName);
+    List<BasicTeachClazzResult> findAllTeachClazz(Long examId, String courseCode, String clazzName);
+
+    /**
+     * 根据基础班id删除空闲的班级(该班级已经没有学生了)
+     *
+     * @param basicTeachClazzId 基础班级id
+     */
+    void deleteFreeClazz(Long basicTeachClazzId);
 }

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ConditionService.java

@@ -28,5 +28,5 @@ public interface ConditionService {
 
     List<SysOrg> listCollege();
 
-    List<BasicTeachClazzResult> listBasicTeachClazz(Long examId, String clazzName);
+    List<BasicTeachClazzResult> listBasicTeachClazz(Long examId, String courseCode, String clazzName);
 }

+ 21 - 14
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/BasicExamStudentServiceImpl.java

@@ -30,7 +30,6 @@ import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -132,7 +131,7 @@ public class BasicExamStudentServiceImpl extends ServiceImpl<BasicExamStudentMap
 
     @Transactional
     @Override
-    public void buildImportObjects(Map<String, Object> map) throws IOException, NoSuchFieldException {
+    public void buildImportObjects(Map<String, Object> map) {
 
     }
 
@@ -155,7 +154,17 @@ public class BasicExamStudentServiceImpl extends ServiceImpl<BasicExamStudentMap
     @Transactional
     @Override
     public void deleteBatch(List<Long> idList) {
-        this.removeByIds(idList);
+        if (CollectionUtils.isNotEmpty(idList)) {
+            List<BasicExamStudent> basicExamStudentList = this.listByIds(idList);
+
+            List<String> boundStudentNameList = this.baseMapper.findBoundBasicExamStudentNames(idList);
+            if (CollectionUtils.isNotEmpty(boundStudentNameList)) {
+                throw ExceptionResultEnum.ERROR.exception(
+                        String.format("学生[%s]已经被绑定", String.join(",", boundStudentNameList)));
+            }
+            this.removeByIds(idList);
+            basicExamStudentList.stream().map(BasicExamStudent::getClazzId).distinct().forEach(e -> basicTeachClazzService.deleteFreeClazz(e));
+        }
     }
 
     /**
@@ -214,13 +223,13 @@ public class BasicExamStudentServiceImpl extends ServiceImpl<BasicExamStudentMap
         }
 
         Long teacherId = null;
-        if (SystemConstant.strNotNull(teacherCode) && !SystemConstant.strNotNull(teacherName)){
+        if (SystemConstant.strNotNull(teacherCode) && !SystemConstant.strNotNull(teacherName)) {
             errorMsgList.add("存在任课老师工号,但缺少任课老师姓名");
         }
-        if (SystemConstant.strNotNull(teacherName) && !SystemConstant.strNotNull(teacherCode)){
+        if (SystemConstant.strNotNull(teacherName) && !SystemConstant.strNotNull(teacherCode)) {
             errorMsgList.add("存在任课老师姓名,但缺少任课老师工号");
         }
-        if (SystemConstant.strNotNull(teacherName) && SystemConstant.strNotNull(teacherCode)){
+        if (SystemConstant.strNotNull(teacherName) && SystemConstant.strNotNull(teacherCode)) {
             // 存在教师信息,根据工号查询,不存在报错(缺少机构信息没法直接创建教师)
             SysUser teacher = sysUserService.getOne(
                     new QueryWrapper<SysUser>().lambda().eq(SysUser::getSchoolId, schoolId)
@@ -268,14 +277,12 @@ public class BasicExamStudentServiceImpl extends ServiceImpl<BasicExamStudentMap
         basicExamStudent.setStudentCode(studentCode);
         basicExamStudent.setCollege(college);
         basicExamStudent.setMajor(major);
-        if (SystemConstant.strNotNull(paperNumber)) {
-            basicExamStudent.setPaperNumber(paperNumber);
-            basicExamStudent.setTeacherId(teacherId);
-            basicExamStudent.setExamStartTime(examStartTime);
-            basicExamStudent.setExamEndTime(examEndTime);
-            basicExamStudent.setExamPlace(examPlace);
-            basicExamStudent.setExamRoom(examRoom);
-        }
+        basicExamStudent.setPaperNumber(paperNumber);
+        basicExamStudent.setTeacherId(teacherId);
+        basicExamStudent.setExamStartTime(examStartTime);
+        basicExamStudent.setExamEndTime(examEndTime);
+        basicExamStudent.setExamPlace(examPlace);
+        basicExamStudent.setExamRoom(examRoom);
 
         if (SystemConstant.longNotNull(id)) {
             // 编辑 (学号不可更改)

+ 19 - 3
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/BasicTeachClazzServiceImpl.java

@@ -3,14 +3,17 @@ package com.qmth.distributed.print.business.service.impl;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.qmth.distributed.print.business.bean.result.BasicTeachClazzResult;
+import com.qmth.distributed.print.business.entity.BasicExamStudent;
 import com.qmth.distributed.print.business.entity.BasicTeachClazz;
 import com.qmth.distributed.print.business.mapper.BasicTeachClazzMapper;
+import com.qmth.distributed.print.business.service.BasicExamStudentService;
 import com.qmth.distributed.print.business.service.BasicTeachClazzService;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.entity.SysUser;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import javax.annotation.Resource;
 import java.util.List;
 import java.util.Objects;
 
@@ -25,6 +28,9 @@ import java.util.Objects;
 @Service
 public class BasicTeachClazzServiceImpl extends ServiceImpl<BasicTeachClazzMapper, BasicTeachClazz> implements BasicTeachClazzService {
 
+    @Resource
+    private BasicExamStudentService basicExamStudentService;
+
     @Transactional
     @Override
     public BasicTeachClazz findOrCreateBasicTeachClazz(SysUser requestUser, Long examId, String courseCode, String teachClazzName) {
@@ -48,8 +54,18 @@ public class BasicTeachClazzServiceImpl extends ServiceImpl<BasicTeachClazzMappe
     }
 
     @Override
-    public List<BasicTeachClazzResult> findAllTeachClazz(Long examId, String clazzName) {
+    public List<BasicTeachClazzResult> findAllTeachClazz(Long examId, String courseCode, String clazzName) {
         clazzName = SystemConstant.translateSpecificSign(clazzName);
-        return this.baseMapper.findTeachClazzList(examId, clazzName);
+        return this.baseMapper.findTeachClazzList(examId, courseCode, clazzName);
+    }
+
+    @Transactional
+    @Override
+    public void deleteFreeClazz(Long basicTeachClazzId) {
+        if (basicExamStudentService.count(
+                new QueryWrapper<BasicExamStudent>().lambda().eq(BasicExamStudent::getClazzId, basicTeachClazzId))
+                == 0) {
+            this.removeById(basicTeachClazzId);
+        }
     }
-}
+}

+ 2 - 3
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ConditionServiceImpl.java

@@ -188,8 +188,7 @@ public class ConditionServiceImpl implements ConditionService {
     }
 
     @Override
-    public List<BasicTeachClazzResult> listBasicTeachClazz(Long examId, String clazzName) {
-        return basicTeachClazzService.findAllTeachClazz(examId, clazzName);
+    public List<BasicTeachClazzResult> listBasicTeachClazz(Long examId, String courseCode, String clazzName) {
+        return basicTeachClazzService.findAllTeachClazz(examId, courseCode, clazzName);
     }
-
 }

+ 16 - 0
distributed-print-business/src/main/resources/mapper/BasicExamStudentMapper.xml

@@ -142,4 +142,20 @@
             </if>
         </where>
     </select>
+    <select id="findBoundBasicExamStudentNames" resultType="java.lang.String">
+        SELECT
+            bes.student_name AS studentName
+        FROM
+            basic_exam_student bes
+                INNER JOIN
+            teach_student ts ON bes.id = ts.student_id
+        <where>
+            <if test="idList != null and idList != '' and idList.size > 0">
+                AND bes.id IN
+                <foreach collection="idList" item="item" index="index" open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+        </where>
+    </select>
 </mapper>

+ 11 - 5
distributed-print-business/src/main/resources/mapper/BasicTeachClazzMapper.xml

@@ -5,18 +5,24 @@
     <select id="findTeachClazzList"
             resultType="com.qmth.distributed.print.business.bean.result.BasicTeachClazzResult">
         SELECT
-            id,
-            exam_id AS examId,
+            btc.id,
+            btc.exam_id AS examId,
+            bc.name AS courseName,
             course_code AS courseCode,
             clazz_name AS clazzName
         FROM
-            basic_teach_clazz
+            basic_teach_clazz btc
+        LEFT JOIN
+            basic_course bc ON btc.school_id = bc.school_id AND btc.course_code = bc.code
         <where>
             <if test="examId != null">
-                AND exam_id = #{examId}
+                AND btc.exam_id = #{examId}
+            </if>
+            <if test="courseCode != null and courseCode != ''">
+                AND btc.course_code = #{courseCode}
             </if>
             <if test="clazzName != null and clazzName != ''">
-                AND clazz_name LIKE CONCAT('%',#{clazzName},'%')
+                AND btc.clazz_name LIKE CONCAT('%',#{clazzName},'%')
             </if>
         </where>
     </select>

+ 1 - 8
distributed-print/src/main/java/com/qmth/distributed/print/api/BasicCourseController.java

@@ -141,14 +141,7 @@ public class BasicCourseController {
     @Transactional
     public Result basicCourseImportAsync(@ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file)
             throws Exception {
-        List<BasicCourseParams> basicCourseParamsList = basicCourseService.executeImportBasicCourseLogic(file);
-        if (!CollectionUtils.isEmpty(basicCourseParamsList)) {
-            for (BasicCourseParams basicCourseParams : basicCourseParamsList) {
-                if (!CollectionUtils.isEmpty(basicCourseParams.getTeachIdSet())) {
-                    teachCourseService.updateByCourseIdAndTeacherList(basicCourseParams.getId(), basicCourseParams.getTeachIdSet());
-                }
-            }
-        }
+        basicCourseService.executeImportBasicCourseLogic(file);
         return ResultUtil.ok();
     }
 

+ 3 - 1
distributed-print/src/main/java/com/qmth/distributed/print/api/ConditionController.java

@@ -113,7 +113,9 @@ public class ConditionController {
     @RequestMapping(value = "/list_basic_teach_clazz", method = RequestMethod.POST)
     @ApiResponses({ @ApiResponse(code = 200, message = "查询成功", response = Map.class) })
     public Result listBasicTeachClazz(@ApiParam(value = "考试ID", required = true) @RequestParam(value = "examId") String examId,
+            @ApiParam(value = "课程编号") @RequestParam(value = "courseCode", required = false) String courseCode,
             @ApiParam(value = "名称") @RequestParam(value = "clazzName", required = false) String clazzName) {
-        return ResultUtil.ok(conditionService.listBasicTeachClazz(SystemConstant.convertIdToLong(examId), clazzName));
+        return ResultUtil.ok(
+                conditionService.listBasicTeachClazz(SystemConstant.convertIdToLong(examId), courseCode, clazzName));
     }
 }

BIN
distributed-print/src/main/resources/temps/course.xlsx


+ 0 - 14
distributed-print/src/test/java/com/qmth/distributed/print/ImportTest.java

@@ -59,25 +59,11 @@ public class ImportTest {
                         String courseCode = basicCourseImportDto.getCourseCode();
                         String courseName = basicCourseImportDto.getCourseName();
                         String teachingRoomName = basicCourseImportDto.getTeachingRoomName();
-                        String clazz = basicCourseImportDto.getClazz();
-
-                        if (courseMap.containsKey(courseCode)){
-                            BasicCourseImportDto old = courseMap.get(courseCode);
-                            String oldClazz = old.getClazz();
-                            oldClazz = oldClazz + "," + clazz;
-                            old.setClazz(oldClazz);
-                        } else {
-                            courseMap.put(courseCode,basicCourseImportDto);
-                        }
-
                     }
                 }
             }
         }
         List<BasicCourseImportDto> basicCourseImportDtoList = new ArrayList<>();
-        for (String courseCode : courseMap.keySet()) {
-            basicCourseImportDtoList.add(courseMap.get(courseCode));
-        }
         System.out.println(JSON.toJSONString(basicCourseImportDtoList));
 
         File outfile = new File("E:" + File.separator + "导入导出" + File.separator + "新课程导入模板.xlsx");

+ 1 - 34
teachcloud-common/src/main/java/com/qmth/teachcloud/common/bean/dto/BasicCourseExportDto.java

@@ -20,29 +20,12 @@ public class BasicCourseExportDto {
     @ExcelProperty(name = "课程名称", width = 20, index = 1)
     private String courseName;
 
-    @ExcelProperty(name = "课程码", width = 20, index = 2)
+    @ExcelProperty(name = "课程码", width = 20, index = 2)
     private String courseCode;
 
     @ExcelProperty(name = "开课学院", width = 20, index = 3)
     private String teachingRoomName;
 
-    @ApiModelProperty(value = "班级信息集合")
-    private List<ClazzDatasourceResult> clazzList;
-
-    @ExcelProperty(name = "授课班级", width = 20, index = 4)
-    private String clazzName = "";
-
-    @ExcelProperty(name = "授课老师", width = 20, index = 5)
-    private String teachName = "";
-
-    public String getTeachName() {
-        return teachName;
-    }
-
-    public void setTeachName(String teachName) {
-        this.teachName = teachName;
-    }
-
     public Long getId() {
         return id;
     }
@@ -74,20 +57,4 @@ public class BasicCourseExportDto {
     public void setTeachingRoomName(String teachingRoomName) {
         this.teachingRoomName = teachingRoomName;
     }
-
-    public List<ClazzDatasourceResult> getClazzList() {
-        return clazzList;
-    }
-
-    public void setClazzList(List<ClazzDatasourceResult> clazzList) {
-        this.clazzList = clazzList;
-    }
-
-    public String getClazzName() {
-        return clazzName;
-    }
-
-    public void setClazzName(String clazzName) {
-        this.clazzName = clazzName;
-    }
 }

+ 2 - 38
teachcloud-common/src/main/java/com/qmth/teachcloud/common/bean/dto/excel/BasicCourseImportDto.java

@@ -21,8 +21,8 @@ public class BasicCourseImportDto implements Serializable {
     @NotNull
     private String courseName;
 
-    @ExcelNote(value = "课程码")
-    @ExcelProperty(name = "课程码", width = 30, index = 2)
+    @ExcelNote(value = "课程码")
+    @ExcelProperty(name = "课程码", width = 30, index = 2)
     @NotNull
     private String courseCode;
 
@@ -31,37 +31,9 @@ public class BasicCourseImportDto implements Serializable {
     @NotNull
     private String teachingRoomName;
 
-    @ExcelNote(value = "授课班级")
-    @ExcelProperty(name = "授课班级", width = 30, index = 4)
-    private String clazz;
-
-    @ExcelNote(value = "姓名")
-    @ExcelProperty(name = "姓名", width = 30, index = 5)
-    private String name;
-
-    @ExcelNote(value = "用户名/工号")
-    @ExcelProperty(name = "用户名/工号", width = 30, index = 6)
-    private String code;
-
     @ApiModelProperty("行索引")
     private Integer rowIndex;
 
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getCode() {
-        return code;
-    }
-
-    public void setCode(String code) {
-        this.code = code;
-    }
-
     public String getCourseName() {
         return courseName;
     }
@@ -86,14 +58,6 @@ public class BasicCourseImportDto implements Serializable {
         this.teachingRoomName = teachingRoomName;
     }
 
-    public String getClazz() {
-        return clazz;
-    }
-
-    public void setClazz(String clazz) {
-        this.clazz = clazz;
-    }
-
     public Integer getRowIndex() {
         return rowIndex;
     }

+ 0 - 24
teachcloud-common/src/main/java/com/qmth/teachcloud/common/bean/params/BasicCourseParams.java

@@ -38,26 +38,10 @@ public class BasicCourseParams {
     @Range(min = 1L, message = "请选择所属教研室")
     private Long teachingRoomId;
 
-    @JsonSerialize(using = ToStringSerializer.class)
-    @ApiModelProperty(value = "授课班级集合")
-    private Set<Long> clazzIdSet;
-
-    @JsonSerialize(using = ToStringSerializer.class)
-    @ApiModelProperty(value = "授课老师集合")
-    private Set<Long> teachIdSet;
-
     public Long getId() {
         return id;
     }
 
-    public Set<Long> getTeachIdSet() {
-        return teachIdSet;
-    }
-
-    public void setTeachIdSet(Set<Long> teachIdSet) {
-        this.teachIdSet = teachIdSet;
-    }
-
     public void setId(Long id) {
         this.id = id;
     }
@@ -85,12 +69,4 @@ public class BasicCourseParams {
     public void setTeachingRoomId(Long teachingRoomId) {
         this.teachingRoomId = teachingRoomId;
     }
-
-    public Set<Long> getClazzIdSet() {
-        return clazzIdSet;
-    }
-
-    public void setClazzIdSet(Set<Long> clazzIdSet) {
-        this.clazzIdSet = clazzIdSet;
-    }
 }

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

@@ -20,7 +20,6 @@ import com.qmth.teachcloud.common.bean.result.TeachCourseSelectResult;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.entity.*;
 import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
-import com.qmth.teachcloud.common.enums.RoleTypeEnum;
 import com.qmth.teachcloud.common.mapper.BasicCourseMapper;
 import com.qmth.teachcloud.common.service.*;
 import com.qmth.teachcloud.common.util.ExcelUtil;
@@ -76,9 +75,6 @@ public class BasicCourseServiceImpl extends ServiceImpl<BasicCourseMapper, Basic
     @Resource
     private SysUserService sysUserService;
 
-    @Resource
-    private SysUserRoleService sysUserRoleService;
-
     @Override
     public List<BasicCourse> listCoursesByUserId(Long userId) {
         return this.baseMapper.listCoursesByUserId(userId);
@@ -160,9 +156,6 @@ public class BasicCourseServiceImpl extends ServiceImpl<BasicCourseMapper, Basic
         BasicCourse editBasicCourse = this.editEntityHelp(basicCourseParamsList, sysUser).get(0);
         try {
             this.saveOrUpdate(editBasicCourse);
-
-            basicTeachCourseService.updateByCourseIdAndTeacherList(basicCourseParams.getId(), basicCourseParams.getTeachIdSet());
-
             // 同步更新命题任务中的课程名称
             this.baseMapper.updateCourseNameFormExamTask(sysUser.getSchoolId(), editBasicCourse.getCode(),
                     editBasicCourse.getName());
@@ -273,9 +266,7 @@ public class BasicCourseServiceImpl extends ServiceImpl<BasicCourseMapper, Basic
                             String courseName = basicCourseImportDto.getCourseName();
                             String courseCode = basicCourseImportDto.getCourseCode();
                             String teachingRoomName = basicCourseImportDto.getTeachingRoomName();
-                            String clazz = basicCourseImportDto.getClazz();
-                            String name = basicCourseImportDto.getName();
-                            String code = basicCourseImportDto.getCode();
+
                             String emptyCheckError = ExcelUtil.checkExcelField(basicCourseImportDto);
                             if (SystemConstant.strNotNull(emptyCheckError)) {
                                 if (errorMap.containsKey(y + 1)) {
@@ -298,11 +289,6 @@ public class BasicCourseServiceImpl extends ServiceImpl<BasicCourseMapper, Basic
                                         String cellException = "课程编码[" + courseCode + "],存在不同的开课学院";
                                         this.updateErrorInfoMap(errorMap, y + 1, cellException);
                                     }
-                                    String primaryClazz = primaryCell.getClazz();
-                                    if (SystemConstant.strNotNull(clazz)) {
-                                        primaryClazz = primaryClazz + SystemConstant.COMMA + clazz;
-                                        primaryCell.setClazz(primaryClazz);
-                                    }
                                     duplicateData.add(basicCourseImportDto);
                                 } else {
                                     courseDtoMap.put(courseCode, basicCourseImportDto);
@@ -375,7 +361,7 @@ public class BasicCourseServiceImpl extends ServiceImpl<BasicCourseMapper, Basic
                 String courseName = basicCourseImportDto.getCourseName();
                 String courseCode = basicCourseImportDto.getCourseCode();
                 String teachingRoomName = basicCourseImportDto.getTeachingRoomName();
-                String clazz = basicCourseImportDto.getClazz();
+
                 // 原始excel中的行索引
                 Integer rowIndex = basicCourseImportDto.getRowIndex();
 
@@ -386,56 +372,11 @@ public class BasicCourseServiceImpl extends ServiceImpl<BasicCourseMapper, Basic
                     continue;
                 }
                 Long teachingRoomId = sysOrg.getId();
-                LinkedHashSet<Long> clazzIdSet = new LinkedHashSet<>(), teachIdSet = new LinkedHashSet<>();
-                if (SystemConstant.strNotNull(clazz)) {
-                    String[] clazzList = clazz.split(SystemConstant.COMMA);
-                    for (String clzName : clazzList) {
-                        BasicClazz basicClazz = basicClazzService.getOne(
-                                new QueryWrapper<BasicClazz>().lambda().eq(BasicClazz::getEnable, true).eq(BasicClazz::getSchoolId, schoolId).eq(BasicClazz::getClazzName, clzName));
-                        if (Objects.isNull(basicClazz)) {
-                            this.updateErrorInfoMap(errorMap, rowIndex, "所选择班级[" + clzName + "]不存在");
-                            continue;
-                        }
-                        clazzIdSet.add(basicClazz.getId());
-                    }
-                }
-                if (SystemConstant.strNotNull(basicCourseImportDto.getName())) {
-                    String[] nameList = basicCourseImportDto.getName().split(SystemConstant.COMMA);
-                    String[] codeList = null;
-                    if (SystemConstant.strNotNull(basicCourseImportDto.getCode())) {
-                        codeList = basicCourseImportDto.getCode().split(SystemConstant.COMMA);
-                    }
-                    if (Objects.nonNull(codeList) && codeList.length != nameList.length) {
-                        this.updateErrorInfoMap(errorMap, rowIndex, "姓名和工号长度不匹配");
-                        continue;
-                    }
-                    for (int k = 0; k < nameList.length; k++) {
-                        String name = nameList[k].trim();
-                        String code = codeList[k].trim();
-                        SysUser sysUserDb = sysUserService.getOne(
-                                new QueryWrapper<SysUser>().lambda().eq(SysUser::getEnable, true).eq(SysUser::getSchoolId, schoolId).eq(SysUser::getRealName, name)
-                                        .eq(SysUser::getCode, code));
-                        if (Objects.isNull(sysUserDb)) {
-                            this.updateErrorInfoMap(errorMap, rowIndex, "姓名[" + name + "],工号[" + code + "]不存在");
-                            continue;
-                        }
-
-                        List<SysRole> sysRoleList = sysUserRoleService.listRoleByUserId(sysUserDb.getId());
-                        sysRoleList = sysRoleList.stream().filter(s -> s.getType() == RoleTypeEnum.SCHOOL_TEACHER).collect(Collectors.toList());
-                        if (CollectionUtils.isEmpty(sysRoleList)) {
-                            this.updateErrorInfoMap(errorMap, rowIndex, "姓名[" + name + "],工号[" + code + "]没有老师角色");
-                            continue;
-                        }
-                        teachIdSet.add(sysUserDb.getId());
-                    }
-                }
 
                 BasicCourseParams basicCourseParams = new BasicCourseParams();
                 basicCourseParams.setCourseCode(courseCode);
                 basicCourseParams.setCourseName(courseName);
                 basicCourseParams.setTeachingRoomId(teachingRoomId);
-                basicCourseParams.setClazzIdSet(clazzIdSet);
-                basicCourseParams.setTeachIdSet(teachIdSet);
                 BasicCourse old = this.getOne(
                         new QueryWrapper<BasicCourse>().lambda().eq(BasicCourse::getSchoolId, schoolId).eq(BasicCourse::getEnable, true).eq(BasicCourse::getCode, courseCode));
                 if (Objects.nonNull(old)) {
@@ -498,31 +439,6 @@ public class BasicCourseServiceImpl extends ServiceImpl<BasicCourseMapper, Basic
         if (courseExportDtos.isEmpty()) {
             throw ExceptionResultEnum.ERROR.exception("没有可导出数据");
         }
-        for (BasicCourseExportDto basicCourseExportDto : courseExportDtos) {
-            Long courseId = basicCourseExportDto.getId();
-            List<BasicUserCourse> basicUserCourseList = basicUserCourseService.list(
-                    new QueryWrapper<BasicUserCourse>().lambda().eq(BasicUserCourse::getCourseId, courseId));
-            Set<Long> clazzIdSet = basicUserCourseList.stream().map(BasicUserCourse::getClazzId).collect(Collectors.toSet());
-            if (clazzIdSet.size() > 0) {
-                List<BasicClazz> clazzList = basicClazzService.list(
-                        new QueryWrapper<BasicClazz>().lambda().in(BasicClazz::getId, clazzIdSet).orderByAsc(BasicClazz::getCreateTime));
-                if (!clazzList.isEmpty()) {
-                    List<String> clazzNameList = clazzList.stream().map(BasicClazz::getClazzName).collect(Collectors.toList());
-                    basicCourseExportDto.setClazzName(String.join(",", clazzNameList));
-                }
-            }
-
-            List<BasicTeachCourse> basicTeachCourseList = basicTeachCourseService.list(
-                    new QueryWrapper<BasicTeachCourse>().lambda().eq(BasicTeachCourse::getCourseId, courseId));
-            Set<Long> teachIdSet = basicTeachCourseList.stream().map(BasicTeachCourse::getUserId).collect(Collectors.toSet());
-            if (!CollectionUtils.isEmpty(teachIdSet)) {
-                List<SysUserResult> sysUserResultList = sysUserService.findCourseSysUserResultByTeachIdSet(teachIdSet);
-                if (!CollectionUtils.isEmpty(sysUserResultList)) {
-                    List<String> teachNameList = sysUserResultList.stream().map(s -> s.getRealName() + "(" + s.getOrgName() + ")").collect(Collectors.toList());
-                    basicCourseExportDto.setTeachName(String.join(",", teachNameList));
-                }
-            }
-        }
         ExcelUtil.excelExport("课程数据", BasicCourseExportDto.class, courseExportDtos, response);
     }
 
@@ -584,7 +500,6 @@ public class BasicCourseServiceImpl extends ServiceImpl<BasicCourseMapper, Basic
             //                throw ExceptionResultEnum.ERROR.exception("所选教研室不存在");
             //            }
             // 校验班级
-            Set<Long> clazzIdSet = basicCourseParams.getClazzIdSet();
 
             //基础数据组装
             Long orgId;
@@ -617,12 +532,6 @@ public class BasicCourseServiceImpl extends ServiceImpl<BasicCourseMapper, Basic
             basicCourseParams.setId(basicCourse.getId());
             basicCourse.setOrgId(orgId);
 
-            // 根据课程id和授课班级集合更新'basic_user_course'表
-            basicUserCourseService.updateByCourseIdAndClazzList(id, clazzIdSet, sysUser, orgId);
-            if (!CollectionUtils.isEmpty(basicCourseParams.getTeachIdSet())) {
-                basicTeachCourseService.updateByCourseIdAndTeacherList(id, basicCourseParams.getTeachIdSet());
-            }
-
             basicCourseList.add(basicCourse);
         }
         return basicCourseList;