Browse Source

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

wangliang 1 year ago
parent
commit
de83dcc65a
17 changed files with 90 additions and 47 deletions
  1. 3 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/CourseDimensionOccupiedDto.java
  2. 3 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/CourseWeightDetailDto.java
  3. 3 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/CourseWeightDto.java
  4. 3 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/BasicExamStudentResult.java
  5. 3 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/CourseDimensionTree.java
  6. 14 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/CourseWeightSettingStatusResult.java
  7. 0 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/TeachCourseResult.java
  8. 5 6
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/BasicExamStudentMapper.java
  9. 7 7
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/BasicExamStudentService.java
  10. 10 10
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/BasicExamStudentServiceImpl.java
  11. 4 4
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/CourseDimensionServiceImpl.java
  12. 2 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TeachCourseServiceImpl.java
  13. 6 6
      distributed-print-business/src/main/resources/mapper/BasicExamStudentMapper.xml
  14. 16 6
      distributed-print/install/mysql/upgrade/3.3.1.sql
  15. 6 6
      distributed-print/src/main/java/com/qmth/distributed/print/api/BasicExamStudentController.java
  16. 1 0
      distributed-print/src/main/java/com/qmth/distributed/print/api/CourseTargetController.java
  17. 4 1
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/enums/ImportTemplateEnum.java

+ 3 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/CourseDimensionOccupiedDto.java

@@ -1,5 +1,7 @@
 package com.qmth.distributed.print.business.bean.dto;
 
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import io.swagger.annotations.ApiModelProperty;
 
 /**
@@ -9,6 +11,7 @@ import io.swagger.annotations.ApiModelProperty;
  */
 public class CourseDimensionOccupiedDto {
     @ApiModelProperty("课程目标id")
+    @JsonSerialize(using = ToStringSerializer.class)
     private Long courseTargetId;
 
     @ApiModelProperty("知识点占用状态 true:被占用 false:未占用")

+ 3 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/CourseWeightDetailDto.java

@@ -1,5 +1,7 @@
 package com.qmth.distributed.print.business.bean.dto;
 
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.math.BigDecimal;
@@ -12,6 +14,7 @@ import java.math.BigDecimal;
 public class CourseWeightDetailDto {
 
     @ApiModelProperty("评价方式id")
+    @JsonSerialize(using = ToStringSerializer.class)
     private Long evaluationId;
 
     @ApiModelProperty("评价方式名称")

+ 3 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/CourseWeightDto.java

@@ -1,5 +1,7 @@
 package com.qmth.distributed.print.business.bean.dto;
 
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.math.BigDecimal;
@@ -13,6 +15,7 @@ import java.util.List;
 public class CourseWeightDto {
 
     @ApiModelProperty("课程目标id")
+    @JsonSerialize(using = ToStringSerializer.class)
     private Long courseTargetId;
 
     @ApiModelProperty("课程目标名称")

+ 3 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/BasicExamStudentResult.java

@@ -1,5 +1,7 @@
 package com.qmth.distributed.print.business.bean.result;
 
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import io.swagger.annotations.ApiModelProperty;
 
 /**
@@ -10,6 +12,7 @@ import io.swagger.annotations.ApiModelProperty;
 public class BasicExamStudentResult {
 
     @ApiModelProperty("id")
+    @JsonSerialize(using = ToStringSerializer.class)
     private Long id;
 
     @ApiModelProperty("课程名称")

+ 3 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/CourseDimensionTree.java

@@ -1,5 +1,7 @@
 package com.qmth.distributed.print.business.bean.result;
 
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import com.qmth.distributed.print.business.bean.dto.CourseDimensionOccupiedDto;
 import io.swagger.annotations.ApiModelProperty;
 
@@ -12,6 +14,7 @@ import java.util.List;
  */
 public class CourseDimensionTree {
     @ApiModelProperty("知识点id")
+    @JsonSerialize(using = ToStringSerializer.class)
     private Long id;
 
     @ApiModelProperty("知识点编号")

+ 14 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/CourseWeightSettingStatusResult.java

@@ -1,5 +1,7 @@
 package com.qmth.distributed.print.business.bean.result;
 
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import io.swagger.annotations.ApiModelProperty;
 
 /**
@@ -15,6 +17,10 @@ public class CourseWeightSettingStatusResult {
     @ApiModelProperty("当前设置情况,true:当前课程设置过权重,权重设置界面需要展示两个表单,false:当前未设置权重,权重设置界面只展示1个表单")
     private Boolean currentSettingStatus;
 
+    @ApiModelProperty("课程管理人(创建人)")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long courseCreateId;
+
     public Boolean getEverSettingStatus() {
         return everSettingStatus;
     }
@@ -30,4 +36,12 @@ public class CourseWeightSettingStatusResult {
     public void setCurrentSettingStatus(Boolean currentSettingStatus) {
         this.currentSettingStatus = currentSettingStatus;
     }
+
+    public Long getCourseCreateId() {
+        return courseCreateId;
+    }
+
+    public void setCourseCreateId(Long courseCreateId) {
+        this.courseCreateId = courseCreateId;
+    }
 }

+ 0 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/TeachCourseResult.java

@@ -26,7 +26,6 @@ public class TeachCourseResult {
     private String courseCode;
 
     @JsonSerialize(using = ToStringSerializer.class)
-    @ApiModelProperty(value = "创建时间")
     private Long createTime;
 
     public Long getId() {

+ 5 - 6
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/BasicExamStudentMapper.java

@@ -1,11 +1,10 @@
 package com.qmth.distributed.print.business.mapper;
 
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.qmth.distributed.print.business.bean.result.BasicExamStudentResult;
-import com.qmth.distributed.print.business.bean.result.analyze.GradeBatchResult;
 import com.qmth.distributed.print.business.entity.BasicExamStudent;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.qmth.teachcloud.common.bean.dto.DataPermissionRule;
 import org.apache.ibatis.annotations.Param;
 
@@ -31,7 +30,7 @@ public interface BasicExamStudentMapper extends BaseMapper<BasicExamStudent> {
      * @param teacher         教师
      * @param college         学院
      * @param major           专业
-     * @param teachClazzId    教学班id
+     * @param teachClazz      教学班
      * @param examStudentInfo 考生信息(姓名/学号)
      * @param dpr             数据权限
      * @return 查询结果
@@ -39,7 +38,7 @@ public interface BasicExamStudentMapper extends BaseMapper<BasicExamStudent> {
     IPage<BasicExamStudentResult> findBasicExamStudentPage(@Param("iPage") Page<BasicExamStudentResult> iPage,
             @Param("schoolId") Long schoolId, @Param("semesterId") Long semesterId, @Param("examId") Long examId,
             @Param("courseCode") String courseCode, @Param("teacher") String teacher, @Param("college") String college,
-            @Param("major") String major, @Param("teachClazzId") Long teachClazzId,
+            @Param("major") String major, @Param("teachClazz") String teachClazz,
             @Param("examStudentInfo") String examStudentInfo, @Param("dpr") DataPermissionRule dpr);
 
     /**
@@ -52,14 +51,14 @@ public interface BasicExamStudentMapper extends BaseMapper<BasicExamStudent> {
      * @param teacher         教师
      * @param college         学院
      * @param major           专业
-     * @param teachClazzId    教学班id
+     * @param teachClazz      教学班
      * @param examStudentInfo 考生信息(姓名/学号)
      * @param dpr             数据权限
      * @return 查询结果
      */
     List<BasicExamStudentResult> findBasicExamStudentList(@Param("schoolId") Long schoolId, @Param("semesterId") Long semesterId, @Param("examId") Long examId,
             @Param("courseCode") String courseCode, @Param("teacher") String teacher, @Param("college") String college,
-            @Param("major") String major, @Param("teachClazzId") Long teachClazzId, @Param("examStudentInfo") String examStudentInfo,
+            @Param("major") String major, @Param("teachClazz") String teachClazz, @Param("examStudentInfo") String examStudentInfo,
             @Param("dpr") DataPermissionRule dpr);
 
 }

+ 7 - 7
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/BasicExamStudentService.java

@@ -32,14 +32,14 @@ public interface BasicExamStudentService extends IService<BasicExamStudent> {
      * @param teacher         教师
      * @param college         学院
      * @param major           专业
-     * @param teachClazzId    教学班id
+     * @param teachClazz      教学班
      * @param examStudentInfo 考生信息(姓名/学号)
      * @param pageNumber      分页页码
      * @param pageSize        分页数量
      * @return 查询结果
      */
     IPage<BasicExamStudentResult> page(SysUser requestUser, Long semesterId, Long examId, String courseCode, String teacher,
-            String college, String major, Long teachClazzId, String examStudentInfo, int pageNumber, int pageSize);
+            String college, String major, String teachClazz, String examStudentInfo, int pageNumber, int pageSize);
 
     /**
      * 列表查询
@@ -51,12 +51,12 @@ public interface BasicExamStudentService extends IService<BasicExamStudent> {
      * @param teacher         教师
      * @param college         学院
      * @param major           专业
-     * @param teachClazzId    教学班id
+     * @param teachClazz      教学班
      * @param examStudentInfo 考生信息(姓名/学号)
      * @return 查询结果
      */
     List<BasicExamStudentResult> list(SysUser requestUser, Long semesterId, Long examId, String courseCode, String teacher,
-            String college, String major, Long teachClazzId, String examStudentInfo);
+            String college, String major, String teachClazz, String examStudentInfo);
 
     /**
      * 新增编辑
@@ -84,11 +84,11 @@ public interface BasicExamStudentService extends IService<BasicExamStudent> {
      * @param teacher         教师
      * @param college         学院
      * @param major           专业
-     * @param teachClazzId    教学班id
+     * @param teachClazz      教学班
      * @param examStudentInfo 考生信息(姓名/学号)
      */
     void exportLogic(HttpServletResponse response, Long semesterId, Long examId, String courseCode, String teacher,
-            String college, String major, Long teachClazzId, String examStudentInfo) throws Exception;
+            String college, String major, String teachClazz, String examStudentInfo) throws Exception;
 
     /**
      * 批量删除
@@ -105,4 +105,4 @@ public interface BasicExamStudentService extends IService<BasicExamStudent> {
      * @return 考生字典
      */
     BasicExamStudent editEntityHelp(BasicExamStudentParam basicExamStudentParam, SysUser requestUser);
-}
+}

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

@@ -63,7 +63,7 @@ public class BasicExamStudentServiceImpl extends ServiceImpl<BasicExamStudentMap
 
     @Override
     public IPage<BasicExamStudentResult> page(SysUser requestUser, Long semesterId, Long examId, String courseCode,
-            String teacher, String college, String major, Long teachClazzId, String examStudentInfo, int pageNumber,
+            String teacher, String college, String major, String teachClazz, String examStudentInfo, int pageNumber,
             int pageSize) {
         Long schoolId = requestUser.getSchoolId();
 
@@ -72,11 +72,12 @@ public class BasicExamStudentServiceImpl extends ServiceImpl<BasicExamStudentMap
         college = SystemConstant.translateSpecificSign(college);
         major = SystemConstant.translateSpecificSign(major);
         examStudentInfo = SystemConstant.translateSpecificSign(examStudentInfo);
+        teachClazz = SystemConstant.translateSpecificSign(teachClazz);
 
         DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(schoolId, requestUser.getId(),
                 ServletUtil.getRequest().getServletPath());
         IPage<BasicExamStudentResult> page = this.baseMapper.findBasicExamStudentPage(new Page<>(pageNumber, pageSize),
-                schoolId, semesterId, examId, courseCode, teacher, college, major, teachClazzId, examStudentInfo, dpr);
+                schoolId, semesterId, examId, courseCode, teacher, college, major, teachClazz, examStudentInfo, dpr);
         for (BasicExamStudentResult record : page.getRecords()) {
             Long examStartTime = record.getExamStartTime();
             Long examEndTime = record.getExamEndTime();
@@ -93,7 +94,7 @@ public class BasicExamStudentServiceImpl extends ServiceImpl<BasicExamStudentMap
 
     @Override
     public List<BasicExamStudentResult> list(SysUser requestUser, Long semesterId, Long examId, String courseCode,
-            String teacher, String college, String major, Long teachClazzId, String examStudentInfo) {
+            String teacher, String college, String major, String teachClazz, String examStudentInfo) {
         Long schoolId = requestUser.getSchoolId();
 
         courseCode = SystemConstant.translateSpecificSign(courseCode);
@@ -101,11 +102,12 @@ public class BasicExamStudentServiceImpl extends ServiceImpl<BasicExamStudentMap
         college = SystemConstant.translateSpecificSign(college);
         major = SystemConstant.translateSpecificSign(major);
         examStudentInfo = SystemConstant.translateSpecificSign(examStudentInfo);
+        teachClazz = SystemConstant.translateSpecificSign(teachClazz);
 
         DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(schoolId, requestUser.getId(),
                 ServletUtil.getRequest().getServletPath());
         List<BasicExamStudentResult> list = this.baseMapper.findBasicExamStudentList(schoolId, semesterId, examId,
-                courseCode, teacher, college, major, teachClazzId, examStudentInfo, dpr);
+                courseCode, teacher, college, major, teachClazz, examStudentInfo, dpr);
         for (BasicExamStudentResult basicExamStudentResult : list) {
             Long examStartTime = basicExamStudentResult.getExamStartTime();
             Long examEndTime = basicExamStudentResult.getExamEndTime();
@@ -135,12 +137,11 @@ public class BasicExamStudentServiceImpl extends ServiceImpl<BasicExamStudentMap
     }
 
     @Override
-    public void exportLogic(HttpServletResponse response, Long semesterId, Long examId,
-            String courseCode, String teacher, String college, String major, Long teachClazzId, String examStudentInfo)
+    public void exportLogic(HttpServletResponse response, Long semesterId, Long examId, String courseCode, String teacher, String college, String major, String teachClazz, String examStudentInfo)
             throws Exception {
         SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
         List<BasicExamStudentResult> list = this.list(requestUser, semesterId, examId, courseCode, teacher, college,
-                major, teachClazzId, examStudentInfo);
+                major, teachClazz, examStudentInfo);
         List<BasicExamStudentDto> exportDto = list.stream().flatMap(e -> {
             BasicExamStudentDto basicExamStudentDto = new BasicExamStudentDto();
             BeanUtils.copyProperties(e, basicExamStudentDto);
@@ -222,11 +223,10 @@ public class BasicExamStudentServiceImpl extends ServiceImpl<BasicExamStudentMap
                 // 存在教师信息,根据工号查询,不存在报错(缺少机构信息没法直接创建教师),存在更新姓名
                 SysUser teacher = sysUserService.getOne(
                         new QueryWrapper<SysUser>().lambda().eq(SysUser::getSchoolId, schoolId)
-                                .eq(SysUser::getCode, teacherCode)
-                                .eq(SysUser::getRealName,teacherName)
+                                .eq(SysUser::getCode, teacherCode).eq(SysUser::getRealName, teacherName)
                                 .last(SystemConstant.LIMIT1));
                 if (Objects.isNull(teacher)) {
-                    errorMsgList.add(String.format("工号为[%s],姓名为[%s]的教师不存在,请先创建", teacherCode,teacherName));
+                    errorMsgList.add(String.format("工号为[%s],姓名为[%s]的教师不存在,请先创建", teacherCode, teacherName));
                 } else {
                     teacherId = teacher.getId();
                 }

+ 4 - 4
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/CourseDimensionServiceImpl.java

@@ -171,6 +171,7 @@ public class CourseDimensionServiceImpl extends ServiceImpl<CourseDimensionMappe
         this.saveBatch(willSaveDimensions);
     }
 
+    @Transactional
     @Override
     public void syncTikuCourseProperties(Long examId, String courseCode, Long userId) {
         TeachCourse teachCourse = teachCourseService.findByExamIdCourseCodeAndUserId(examId, courseCode, userId);
@@ -182,9 +183,9 @@ public class CourseDimensionServiceImpl extends ServiceImpl<CourseDimensionMappe
         }
         Long semesterId = SystemConstant.convertIdToLong(basicExam.getSemesterId());
 
-        if (this.count(new QueryWrapper<CourseDimension>().lambda().eq(CourseDimension::getTeachCourseId, teachCourseId))
-                == 0) {
-            // 表里没有知识点记录,从题库获取
+        if (this.count(new QueryWrapper<CourseDimension>().lambda().eq(CourseDimension::getTeachCourseId, teachCourseId)
+                .ne(CourseDimension::getSource, CourseDimensionSourceEnum.UNION_QUESTION)) == 0) {
+            // 表里没有导入的知识点记录,从题库获取
             List<TikuCourseProperty> tikuDimensionList = tikuUtils.listCourseProperty(teachCourse.getSchoolId(),
                     courseCode);
             if (CollectionUtils.isNotEmpty(tikuDimensionList)) {
@@ -241,7 +242,6 @@ public class CourseDimensionServiceImpl extends ServiceImpl<CourseDimensionMappe
                 }
             }
         }
-
     }
 
     @Override

+ 2 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TeachCourseServiceImpl.java

@@ -442,8 +442,10 @@ public class TeachCourseServiceImpl extends ServiceImpl<TeachCourseMapper, Teach
         Boolean everSettingStatus = teachCourse.getWeightSetting();
         Boolean currenSettingStatus = courseWeightService.count(
                 new QueryWrapper<CourseWeight>().lambda().eq(CourseWeight::getTeachCourseId, teachCourseId)) > 0;
+        Long createId = teachCourse.getCreateId();
         result.setEverSettingStatus(everSettingStatus);
         result.setCurrentSettingStatus(currenSettingStatus);
+        result.setCourseCreateId(createId);
         return result;
     }
 }

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

@@ -12,7 +12,7 @@
             bes.student_code AS studentCode,
             bes.college,
             bes.major,
-            tbc.clazz_name AS clazzName,
+            tbc.clazz_name AS teachClazz,
             bes.paper_number AS paperNumber,
             teacher.real_name AS teacherName,
             teacher.code AS teacherCode,
@@ -52,8 +52,8 @@
             <if test="major != null and major != ''">
                 AND bes.major LIKE CONCAT('%',#{major},'%')
             </if>
-            <if test="teachClazzId != null">
-                AND tbc.id = #{teachClazzId}
+            <if test="teachClazz != null and teachClazz != ''">
+                AND tbc.clazz_name LIKE CONCAT('%',#{teachClazz},'%')
             </if>
             <if test="examStudentInfo != null and examStudentInfo != ''">
                 AND (bes.student_code LIKE CONCAT('%',#{examStudentInfo},'%') OR bes.student_name LIKE CONCAT('%',#{examStudentInfo},'%'))
@@ -81,7 +81,7 @@
             bes.student_code AS studentCode,
             bes.college,
             bes.major,
-            tbc.clazz_name AS clazzName,
+            tbc.clazz_name AS teachClazz,
             bes.paper_number AS paperNumber,
             teacher.real_name AS teacherName,
             teacher.code AS teacherCode,
@@ -121,8 +121,8 @@
             <if test="major != null and major != ''">
                 AND bes.major LIKE CONCAT('%',#{major},'%')
             </if>
-            <if test="teachClazzId != null">
-                AND tbc.id = #{teachClazzId}
+            <if test="teachClazz != null and teachClazz != ''">
+                AND tbc.clazz_name LIKE CONCAT('%',#{teachClazz},'%')
             </if>
             <if test="examStudentInfo != null and examStudentInfo != ''">
                 AND (bes.student_code LIKE CONCAT('%',#{examStudentInfo},'%') OR bes.student_name LIKE CONCAT('%',#{examStudentInfo},'%'))

+ 16 - 6
distributed-print/install/mysql/upgrade/3.3.1.sql

@@ -426,18 +426,28 @@ ALTER TABLE `teach_course`
     ADD COLUMN `exam_id` BIGINT NOT NULL COMMENT '考试id' AFTER `school_id`,
     ADD COLUMN `course_code` VARCHAR(20) NOT NULL COMMENT '课程编号' AFTER `exam_id`,
     ADD COLUMN `weight_setting` TINYINT(1) NULL COMMENT '权重设置' AFTER `enable`,
-    CHANGE COLUMN `user_id` `user_id` BIGINT NOT NULL COMMENT '任课教师id' AFTER `course_code`,
-DROP INDEX `teach_course_unique` ,
+    CHANGE COLUMN `user_id` `user_id` BIGINT NOT NULL COMMENT '任课教师id' AFTER `course_code`;
+UPDATE teach_course t0
+SET
+    course_code = (SELECT
+                       code
+                   FROM
+                       basic_course
+                   WHERE
+                           id = t0.basic_course_id)
+WHERE
+        id > 0;
+ALTER TABLE `teach_course`
+    DROP INDEX `teach_course_unique` ,
     ADD UNIQUE INDEX `teach_course_unique` USING BTREE (`school_id`, `exam_id`, `course_code`, `user_id`);
 ;
 
 ALTER TABLE `course_dimension`
     ADD COLUMN `teach_course_id` BIGINT NOT NULL COMMENT '教学课程id' AFTER `id`,
-ADD COLUMN `user_id` BIGINT NOT NULL COMMENT '教师id' AFTER `course_code`,
-ADD COLUMN `source` VARCHAR(20) NOT NULL COMMENT '来源' AFTER `user_id`;
+    ADD COLUMN `user_id` BIGINT NOT NULL COMMENT '教师id' AFTER `course_code`,
+    ADD COLUMN `source` VARCHAR(20) NOT NULL COMMENT '来源' AFTER `user_id`;
 ALTER TABLE `course_dimension`
-DROP INDEX `course_dimension_unique` ,
-ADD UNIQUE INDEX `course_dimension_unique` (`teach_course_id` ASC, `source` ASC, `code` ASC);
+    ADD UNIQUE INDEX `course_dimension_unique` (`teach_course_id` ASC, `source` ASC, `code` ASC);
 ;
 
 ALTER TABLE `course_evaluation`

+ 6 - 6
distributed-print/src/main/java/com/qmth/distributed/print/api/BasicExamStudentController.java

@@ -59,13 +59,13 @@ public class BasicExamStudentController {
             @ApiParam(value = "教师(工号/姓名)") @RequestParam(required = false) String teacher,
             @ApiParam(value = "学院") @RequestParam(required = false) String college,
             @ApiParam(value = "专业") @RequestParam(required = false) String major,
-            @ApiParam(value = "教学班ID(下拉选择)") @RequestParam(required = false) String teachClazzId,
+            @ApiParam(value = "教学班(模糊查询)") @RequestParam(required = false) String teachClazz,
             @ApiParam(value = "考生信息(姓名/学号)") @RequestParam(required = false) String examStudentInfo,
             @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
             @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
         SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
         return ResultUtil.ok(basicExamStudentService.page(requestUser, SystemConstant.convertIdToLong(semesterId),
-                SystemConstant.convertIdToLong(examId), courseCode, teacher, college, major, SystemConstant.convertIdToLong(teachClazzId),
+                SystemConstant.convertIdToLong(examId), courseCode, teacher, college, major, teachClazz,
                 examStudentInfo, pageNumber, pageSize));
     }
 
@@ -89,8 +89,8 @@ public class BasicExamStudentController {
             @ApiParam(value = "学期id", required = true) @RequestParam String semesterId, @ApiParam(value = "考试id", required = true) @RequestParam String examId) throws Exception {
         Map<String, Object> map = printCommonService.saveTask(file, SystemConstant.convertIdToLong(semesterId),
                 SystemConstant.convertIdToLong(examId), TaskTypeEnum.STUDENT_IMPORT);
-        map.put("semesterId",SystemConstant.convertIdToLong(semesterId));
-        map.put("examId",SystemConstant.convertIdToLong(examId));
+        map.put("semesterId", SystemConstant.convertIdToLong(semesterId));
+        map.put("examId", SystemConstant.convertIdToLong(examId));
         return syncBasicExamStudentImportService.importTask(map);
     }
 
@@ -104,10 +104,10 @@ public class BasicExamStudentController {
             @ApiParam(value = "教师(工号/姓名)") @RequestParam(required = false) String teacher,
             @ApiParam(value = "学院") @RequestParam(required = false) String college,
             @ApiParam(value = "专业") @RequestParam(required = false) String major,
-            @ApiParam(value = "教学班ID(下拉选择)") @RequestParam(required = false) String teachClazzId,
+            @ApiParam(value = "教学班(模糊查询)") @RequestParam(required = false) String teachClazz,
             @ApiParam(value = "考生信息(姓名/学号)") @RequestParam(required = false) String examStudentInfo, HttpServletResponse response) throws Exception {
         basicExamStudentService.exportLogic(response, SystemConstant.convertIdToLong(semesterId),
-                SystemConstant.convertIdToLong(examId), courseCode, teacher, college, major, SystemConstant.convertIdToLong(teachClazzId),
+                SystemConstant.convertIdToLong(examId), courseCode, teacher, college, major, teachClazz,
                 examStudentInfo);
     }
 

+ 1 - 0
distributed-print/src/main/java/com/qmth/distributed/print/api/CourseTargetController.java

@@ -81,6 +81,7 @@ public class CourseTargetController {
     public Result findDimensionTree(@ApiParam(value = "学期id") @RequestParam(required = false) String examId,
             @ApiParam(value = "考试id") @RequestParam(required = false) String courseCode) {
         SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
+        courseDimensionService.syncTikuCourseProperties(SystemConstant.convertIdToLong(examId), courseCode, requestUser.getId());
         return ResultUtil.ok(courseTargetService.findDimensionTree(SystemConstant.convertIdToLong(examId), courseCode,
                 requestUser.getId()));
     }

+ 4 - 1
teachcloud-common/src/main/java/com/qmth/teachcloud/common/enums/ImportTemplateEnum.java

@@ -15,7 +15,9 @@ public enum ImportTemplateEnum {
     TEMPLATE_EXAM_TASK("examTask.xlsx", "命题任务导入模板.xlsx"),
     TEMPLATE_EXAM_TASK_STUDENT("examTaskStudent.xlsx", "命题任务学生导入模板.xlsx"),
     //    TEMPLATE_EXAM_STUDENT("","考务数据导入模板.xlsx"),// 不需要,有固定接口
-    TEMPLATE_EXAM_STATISTICS("examStatistics.xlsx", "命题计划导入模板.xlsx");
+    TEMPLATE_EXAM_STATISTICS("examStatistics.xlsx", "命题计划导入模板.xlsx"),
+    TEMPLATE_BASIC_EXAM_STUDENT("basicExamStudent.xlsx", "考生字典导入模板.xlsx"),
+    TEMPLATE_COURSE_DIMENSION("courseDimension.xlsx", "课程知识点导入模板.xlsx");
 
     ImportTemplateEnum(String templateName, String fileName) {
         this.templateName = templateName;
@@ -23,6 +25,7 @@ public enum ImportTemplateEnum {
     }
 
     private final String templateName;
+
     private final String fileName;
 
     public String getTemplateName() {