Browse Source

1.1.0 update

xiaofei 1 năm trước cách đây
mục cha
commit
5a1b52f079
22 tập tin đã thay đổi với 217 bổ sung193 xóa
  1. 20 25
      src/main/java/com/qmth/eds/api/SysController.java
  2. 42 0
      src/main/java/com/qmth/eds/bean/dto/ExamAssignDto.java
  3. 15 2
      src/main/java/com/qmth/eds/bean/dto/ExamCourseMappingDto.java
  4. 20 0
      src/main/java/com/qmth/eds/common/entity/CloudMarkingScore.java
  5. 1 1
      src/main/java/com/qmth/eds/common/entity/ExamAssign.java
  6. 12 1
      src/main/java/com/qmth/eds/common/entity/ExamCourseMapping.java
  7. 1 10
      src/main/java/com/qmth/eds/mapper/CloudMarkingScoreMapper.java
  8. 2 11
      src/main/java/com/qmth/eds/mapper/ExamSyncStudentMapper.java
  9. 2 0
      src/main/java/com/qmth/eds/service/CloudMarkingScoreService.java
  10. 2 1
      src/main/java/com/qmth/eds/service/CommonService.java
  11. 2 1
      src/main/java/com/qmth/eds/service/ExamSyncStudentService.java
  12. 13 2
      src/main/java/com/qmth/eds/service/impl/CloudMarkingScoreServiceImpl.java
  13. 7 7
      src/main/java/com/qmth/eds/service/impl/CommonServiceImpl.java
  14. 11 32
      src/main/java/com/qmth/eds/service/impl/ExamAssignServiceImpl.java
  15. 2 4
      src/main/java/com/qmth/eds/service/impl/ExamCourseMappingServiceImpl.java
  16. 2 1
      src/main/java/com/qmth/eds/service/impl/ExamSemesterServiceImpl.java
  17. 5 9
      src/main/java/com/qmth/eds/service/impl/ExamSyncStudentServiceImpl.java
  18. 5 3
      src/main/java/com/qmth/eds/service/impl/WhuDataSyncServiceImpl.java
  19. 3 0
      src/main/resources/db/log/1.1.0.sql
  20. 22 34
      src/main/resources/mapper/CloudMarkingScoreMapper.xml
  21. 21 38
      src/main/resources/mapper/ExamAssignMapper.xml
  22. 7 11
      src/main/resources/mapper/ExamSyncStudentMapper.xml

+ 20 - 25
src/main/java/com/qmth/eds/api/SysController.java

@@ -5,6 +5,7 @@ import com.qmth.boot.api.annotation.Aac;
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.eds.bean.params.LoginParam;
 import com.qmth.eds.bean.result.*;
+import com.qmth.eds.common.entity.CloudMarkingScore;
 import com.qmth.eds.common.entity.ExamSyncStudent;
 import com.qmth.eds.common.entity.SysUser;
 import com.qmth.eds.common.enums.AppSourceEnum;
@@ -25,6 +26,7 @@ import javax.validation.Valid;
 import java.security.NoSuchAlgorithmException;
 import java.time.temporal.ChronoUnit;
 import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * 系统公共Controller
@@ -115,17 +117,12 @@ public class SysController {
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = ExamineCollegeResult.class)})
     public Result examineCollegeList(@ApiParam(value = "学期id") @RequestParam(required = false) Long semesterId,
                                      @ApiParam(value = "考试类型id") @RequestParam(required = false) Long examTypeId) {
-        List<ExamSyncStudent> examSyncStudentList = commonService.conditionCourseQuery(semesterId, examTypeId);
+        List<CloudMarkingScore> examSyncStudentList = commonService.conditionCourseQuery(semesterId, examTypeId);
         Set<CourseResult> courseResultList = null;
         if (!CollectionUtils.isEmpty(examSyncStudentList)) {
             courseResultList = new HashSet<>();
-            Map<String, String> map = new HashMap<>();
-            for (ExamSyncStudent e : examSyncStudentList) {
-                if (map.containsKey(e.getKch())) {
-                    continue;
-                }
-                map.put(e.getKch(), e.getKcmc());
-                courseResultList.add(new CourseResult(e.getKch(), e.getKcmc()));
+            for (CloudMarkingScore e : examSyncStudentList) {
+                courseResultList.add(new CourseResult(e.getSubjectCode(), e.getSubjectName()));
             }
         }
         return ResultUtil.ok(!CollectionUtils.isEmpty(courseResultList) ? courseResultList : Collections.emptyList());
@@ -138,17 +135,17 @@ public class SysController {
                                      @ApiParam(value = "考试id", required = true) @RequestParam Long examTypeId,
                                      @ApiParam(value = "科目代码", required = true) @RequestParam String courseCode,
                                      @ApiParam(value = "开课学院", required = true) @RequestParam String openCollege,
-                                     @ApiParam(value = "开课学院", required = true) @RequestParam Long collegeId) {
-        List<ExamSyncStudent> examSyncStudentList = examSyncStudentService.queryByExamineCollegeList(semesterId, examTypeId, courseCode, openCollege, collegeId,null, null);
-        Set<ExamineCollegeResult> examineCollegeResultList = null;
+                                     @ApiParam(value = "开课学院ID", required = true) @RequestParam Long collegeId) {
+        List<CloudMarkingScore> examSyncStudentList = examSyncStudentService.queryByExamineCollegeList(semesterId, examTypeId, courseCode, openCollege, collegeId,null, null);
+        List<ExamineCollegeResult> examineCollegeResultList = new ArrayList<>();
         if (!CollectionUtils.isEmpty(examSyncStudentList)) {
-            examineCollegeResultList = new LinkedHashSet<>(examSyncStudentList.size());
-            for (ExamSyncStudent e : examSyncStudentList) {
-                if (Objects.nonNull(e.getJgmc()) && !Objects.equals(e.getJgmc().trim(), "")) {
-                    examineCollegeResultList.add(new ExamineCollegeResult(e.getJgmc(), e.getJgmc()));
+            for (CloudMarkingScore e : examSyncStudentList) {
+                if (StringUtils.isNotBlank(e.getCollege())) {
+                    examineCollegeResultList.add(new ExamineCollegeResult(e.getCollege(), e.getCollege()));
                 }
             }
         }
+        examineCollegeResultList= examSyncStudentList.stream().filter(m->StringUtils.isNotBlank(m.getCollege())).map(m->new ExamineCollegeResult(m.getCollege(), m.getCollege())).distinct().collect(Collectors.toList());
         return ResultUtil.ok(!CollectionUtils.isEmpty(examineCollegeResultList) ? examineCollegeResultList : Collections.emptyList());
     }
 
@@ -160,14 +157,13 @@ public class SysController {
                             @ApiParam(value = "科目代码", required = true) @RequestParam String courseCode,
                             @ApiParam(value = "开课学院", required = true) @RequestParam String openCollege,
                             @ApiParam(value = "考查学院名称", required = true) @RequestParam String kcCollege) {
-        List<ExamSyncStudent> examSyncStudentList = examSyncStudentService.queryByExamineCollegeList(semesterId, examTypeId, courseCode, openCollege, null, kcCollege, null);
+        List<CloudMarkingScore> examSyncStudentList = examSyncStudentService.queryByExamineCollegeList(semesterId, examTypeId, courseCode, openCollege, null, kcCollege, null);
         Set<ClazzResult> clazzResultList = null;
         if (!CollectionUtils.isEmpty(examSyncStudentList)) {
             clazzResultList = new LinkedHashSet<>(examSyncStudentList.size());
-            for (ExamSyncStudent e : examSyncStudentList) {
-                if ((Objects.nonNull(e.getJxbId()) && !Objects.equals(e.getJxbId().trim(), ""))
-                        && (Objects.nonNull(e.getJxbmc()) && !Objects.equals(e.getJxbmc().trim(), ""))) {
-                    clazzResultList.add(new ClazzResult(e.getJxbId(), e.getJxbmc()));
+            for (CloudMarkingScore e : examSyncStudentList) {
+                if (StringUtils.isNotBlank(e.getClassName())) {
+                    clazzResultList.add(new ClazzResult(e.getClassName(), e.getClassName()));
                 }
             }
         }
@@ -183,14 +179,13 @@ public class SysController {
                               @ApiParam(value = "开课学院", required = true) @RequestParam String openCollege,
                               @ApiParam(value = "考查学院名称", required = true) @RequestParam String kcCollege,
                               @ApiParam(value = "班级id", required = true) @RequestParam String clazzId) {
-        List<ExamSyncStudent> examSyncStudentList = examSyncStudentService.queryByExamineCollegeList(semesterId, examTypeId, courseCode, openCollege, null, kcCollege, clazzId);
+        List<CloudMarkingScore> examSyncStudentList = examSyncStudentService.queryByExamineCollegeList(semesterId, examTypeId, courseCode, openCollege, null, kcCollege, clazzId);
         Set<TeacherResult> teacherResultList = null;
         if (!CollectionUtils.isEmpty(examSyncStudentList)) {
             teacherResultList = new LinkedHashSet<>(examSyncStudentList.size());
-            for (ExamSyncStudent e : examSyncStudentList) {
-                if ((Objects.nonNull(e.getJxbId()) && !Objects.equals(e.getJxbId().trim(), ""))
-                        && (Objects.nonNull(e.getJxbmc()) && !Objects.equals(e.getJxbmc().trim(), ""))) {
-                    teacherResultList.add(new TeacherResult(e.getJgh(), e.getXm()));
+            for (CloudMarkingScore e : examSyncStudentList) {
+                if (StringUtils.isNotBlank(e.getTeacher())) {
+                    teacherResultList.add(new TeacherResult(e.getTeacher(), e.getTeacher()));
                 }
             }
         }

+ 42 - 0
src/main/java/com/qmth/eds/bean/dto/ExamAssignDto.java

@@ -1,6 +1,8 @@
 package com.qmth.eds.bean.dto;
 
 import com.qmth.eds.common.entity.ExamAssign;
+import com.qmth.eds.common.enums.ExamAssignStatusEnum;
+import com.qmth.eds.common.enums.FormulaEnum;
 
 import java.util.List;
 
@@ -8,6 +10,12 @@ public class ExamAssignDto extends ExamAssign {
 
     private Integer actualCount;
 
+    private String syncCourseCode;
+    private String openCollege;
+    private String formulaStr;
+
+    private String statusStr;
+
     private List<String> inspectCollege;
 
     public Integer getActualCount() {
@@ -18,6 +26,24 @@ public class ExamAssignDto extends ExamAssign {
         this.actualCount = actualCount;
     }
 
+    public String getSyncCourseCode() {
+        return syncCourseCode;
+    }
+
+    public void setSyncCourseCode(String syncCourseCode) {
+        this.syncCourseCode = syncCourseCode;
+    }
+
+    @Override
+    public String getOpenCollege() {
+        return openCollege;
+    }
+
+    @Override
+    public void setOpenCollege(String openCollege) {
+        this.openCollege = openCollege;
+    }
+
     public List<String> getInspectCollege() {
         return inspectCollege;
     }
@@ -25,4 +51,20 @@ public class ExamAssignDto extends ExamAssign {
     public void setInspectCollege(List<String> inspectCollege) {
         this.inspectCollege = inspectCollege;
     }
+
+    public String getFormulaStr() {
+        return super.getFormula() != null ? super.getFormula().getName() : null;
+    }
+
+    public void setFormulaStr(String formulaStr) {
+        this.formulaStr = formulaStr;
+    }
+
+    public String getStatusStr() {
+        return super.getStatus() != null ? super.getStatus().getDesc() : null;
+    }
+
+    public void setStatusStr(String statusStr) {
+        this.statusStr = statusStr;
+    }
 }

+ 15 - 2
src/main/java/com/qmth/eds/bean/dto/ExamCourseMappingDto.java

@@ -13,6 +13,11 @@ public class ExamCourseMappingDto implements Serializable {
      */
     @ExcelColumn(name = "课程代码*", index = 1, nullable = true)
     String cloudMarkingCourseCode;
+    /**
+     * 学号
+     */
+    @ExcelColumn(name = "学号*", index = 4, nullable = true)
+    String studentCode;
 
     /**
      * 武大考务数据课程代码
@@ -28,6 +33,14 @@ public class ExamCourseMappingDto implements Serializable {
         this.cloudMarkingCourseCode = cloudMarkingCourseCode;
     }
 
+    public String getStudentCode() {
+        return studentCode;
+    }
+
+    public void setStudentCode(String studentCode) {
+        this.studentCode = studentCode;
+    }
+
     public String getSyncCourseCode() {
         return syncCourseCode;
     }
@@ -41,11 +54,11 @@ public class ExamCourseMappingDto implements Serializable {
         if (this == o) return true;
         if (o == null || getClass() != o.getClass()) return false;
         ExamCourseMappingDto that = (ExamCourseMappingDto) o;
-        return cloudMarkingCourseCode.equals(that.cloudMarkingCourseCode) && syncCourseCode.equals(that.syncCourseCode);
+        return studentCode.equals(that.studentCode) && cloudMarkingCourseCode.equals(that.cloudMarkingCourseCode) && syncCourseCode.equals(that.syncCourseCode);
     }
 
     @Override
     public int hashCode() {
-        return Objects.hash(cloudMarkingCourseCode, syncCourseCode);
+        return Objects.hash(studentCode, cloudMarkingCourseCode, syncCourseCode);
     }
 }

+ 20 - 0
src/main/java/com/qmth/eds/common/entity/CloudMarkingScore.java

@@ -54,6 +54,10 @@ public class CloudMarkingScore implements Serializable {
 
     @ApiModelProperty(value = "课程名称")
     private String subjectName;
+    @ApiModelProperty(value = "武大考务数据课程名称")
+    private String syncCourseCode;
+    @ApiModelProperty(value = "武大考务数据开课学院")
+    private String openCollege;
 
     @ApiModelProperty(value = "试卷类型")
     private String paperType;
@@ -185,6 +189,22 @@ public class CloudMarkingScore implements Serializable {
         this.subjectName = subjectName;
     }
 
+    public String getSyncCourseCode() {
+        return syncCourseCode;
+    }
+
+    public void setSyncCourseCode(String syncCourseCode) {
+        this.syncCourseCode = syncCourseCode;
+    }
+
+    public String getOpenCollege() {
+        return openCollege;
+    }
+
+    public void setOpenCollege(String openCollege) {
+        this.openCollege = openCollege;
+    }
+
     public String getPaperType() {
         return paperType;
     }

+ 1 - 1
src/main/java/com/qmth/eds/common/entity/ExamAssign.java

@@ -32,7 +32,7 @@ public class ExamAssign extends BaseEntity implements Serializable {
     @JsonSerialize(using = ToStringSerializer.class)
     private Long examTypeId;
 
-    @ApiModelProperty(value = "课程代码")
+    @ApiModelProperty(value = "云阅卷课程代码")
     private String courseCode;
 
     @ApiModelProperty(value = "课程名称")

+ 12 - 1
src/main/java/com/qmth/eds/common/entity/ExamCourseMapping.java

@@ -40,6 +40,8 @@ public class ExamCourseMapping implements Serializable {
 
     @ApiModelProperty(value = "考试类型名称")
     private String examTypeName;
+    @ApiModelProperty(value = "学号")
+    private String studentCode;
 
     @ApiModelProperty(value = "武大考务数据课程代码")
     private String syncCourseCode;
@@ -50,13 +52,14 @@ public class ExamCourseMapping implements Serializable {
     public ExamCourseMapping() {
     }
 
-    public ExamCourseMapping(Long schoolId, Long semesterId, String semesterName, Long examTypeId, String examTypeName, String syncCourseCode, String cloudMarkingCourseCode) {
+    public ExamCourseMapping(Long schoolId, Long semesterId, String semesterName, Long examTypeId, String examTypeName, String studentCode, String syncCourseCode, String cloudMarkingCourseCode) {
         this.id = SystemConstant.getDbUuid();
         this.schoolId = schoolId;
         this.semesterId = semesterId;
         this.semesterName = semesterName;
         this.examTypeId = examTypeId;
         this.examTypeName = examTypeName;
+        this.studentCode = studentCode;
         this.syncCourseCode = syncCourseCode;
         this.cloudMarkingCourseCode = cloudMarkingCourseCode;
     }
@@ -109,6 +112,14 @@ public class ExamCourseMapping implements Serializable {
         this.examTypeName = examTypeName;
     }
 
+    public String getStudentCode() {
+        return studentCode;
+    }
+
+    public void setStudentCode(String studentCode) {
+        this.studentCode = studentCode;
+    }
+
     public String getSyncCourseCode() {
         return syncCourseCode;
     }

+ 1 - 10
src/main/java/com/qmth/eds/mapper/CloudMarkingScoreMapper.java

@@ -23,17 +23,8 @@ public interface CloudMarkingScoreMapper extends BaseMapper<CloudMarkingScore> {
 
     /**
      * 查询学生成绩
-     *
-     * @param schoolId
-     * @param collegeId
-     * @param semesterId
-     * @param examTypeId
-     * @param openCollege
-     * @param courseCode
-     * @return
      */
-    List<StudentMarkResult> queryStudentMark(@Param("schoolId") Long schoolId,
-                                             @Param("collegeId") Long collegeId,
+    List<StudentMarkResult> queryStudentMark(@Param("collegeId") Long collegeId,
                                              @Param("semesterId") Long semesterId,
                                              @Param("examTypeId") Long examTypeId,
                                              @Param("openCollege") String openCollege,

+ 2 - 11
src/main/java/com/qmth/eds/mapper/ExamSyncStudentMapper.java

@@ -1,6 +1,7 @@
 package com.qmth.eds.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.qmth.eds.common.entity.CloudMarkingScore;
 import com.qmth.eds.common.entity.ExamSyncStudent;
 import org.apache.ibatis.annotations.Param;
 
@@ -13,17 +14,7 @@ public interface ExamSyncStudentMapper extends BaseMapper<ExamSyncStudent> {
 
     /**
      * 根据机构id、考试id、科目代码查询考查学院
-     *
-     * @param schoolId
-     * @param semesterId
-     * @param orgId
-     * @param examTypeId
-     * @param courseCode
-     * @param openCollege
-     * @param kcCollege
-     * @param clazzId
-     * @return
      */
-    List<ExamSyncStudent> queryByExamineCollegeList(@Param("schoolId") Long schoolId, @Param("semesterId") Long semesterId, @Param("orgId") Long orgId, @Param("examTypeId") Long examTypeId, @Param("courseCode") String courseCode
+    List<CloudMarkingScore> queryByExamineCollegeList(@Param("semesterId") Long semesterId, @Param("orgId") Long orgId, @Param("examTypeId") Long examTypeId, @Param("courseCode") String courseCode
             , @Param("openCollege") String openCollege, @Param("kcCollege") String kcCollege, @Param("clazzId") String clazzId);
 }

+ 2 - 0
src/main/java/com/qmth/eds/service/CloudMarkingScoreService.java

@@ -37,4 +37,6 @@ public interface CloudMarkingScoreService extends IService<CloudMarkingScore> {
                                              String courseCode);
 
     List<ScoreDownloadDto> listScoreBySemesterIdAndExamTypeIdAndCollegeIdAndCourseCodeAndOpenCollege(Long semesterId, Long examTypeId, Long collegeId, String courseCode, String openCollege);
+
+    List<CloudMarkingScore> listByCollegeIdAndSemesterIdAndExamTypeIdAndSubjectCodeAndOpenCollege(Long collegeId, Long semesterId, Long examTypeId, String courseCode, String openCollege);
 }

+ 2 - 1
src/main/java/com/qmth/eds/service/CommonService.java

@@ -2,6 +2,7 @@ package com.qmth.eds.service;
 
 import com.qmth.eds.bean.auth.AuthBean;
 import com.qmth.eds.bean.result.MenuResult;
+import com.qmth.eds.common.entity.CloudMarkingScore;
 import com.qmth.eds.common.entity.ExamSyncStudent;
 import com.qmth.eds.common.entity.SysRolePrivilege;
 import com.qmth.eds.common.entity.SysUserRole;
@@ -77,5 +78,5 @@ public interface CommonService {
      */
     String getSysSettingValue(Long schoolId, String code);
 
-    List<ExamSyncStudent> conditionCourseQuery(Long semesterId, Long examTypeId);
+    List<CloudMarkingScore> conditionCourseQuery(Long semesterId, Long examTypeId);
 }

+ 2 - 1
src/main/java/com/qmth/eds/service/ExamSyncStudentService.java

@@ -1,6 +1,7 @@
 package com.qmth.eds.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.qmth.eds.common.entity.CloudMarkingScore;
 import com.qmth.eds.common.entity.ExamSyncStudent;
 import com.qmth.eds.common.entity.ExamSyncTotal;
 
@@ -25,5 +26,5 @@ public interface ExamSyncStudentService extends IService<ExamSyncStudent> {
      * @param clazzId
      * @return
      */
-    List<ExamSyncStudent> queryByExamineCollegeList(Long semesterId, Long examTypeId, String courseCode, String openCollege, Long collegeId, String kcCollege, String clazzId);
+    List<CloudMarkingScore> queryByExamineCollegeList(Long semesterId, Long examTypeId, String courseCode, String openCollege, Long collegeId, String kcCollege, String clazzId);
 }

+ 13 - 2
src/main/java/com/qmth/eds/service/impl/CloudMarkingScoreServiceImpl.java

@@ -1,5 +1,6 @@
 package com.qmth.eds.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -57,12 +58,22 @@ public class CloudMarkingScoreServiceImpl extends ServiceImpl<CloudMarkingScoreM
      */
     @Override
     public List<StudentMarkResult> queryStudentMark(Long semesterId, Long examTypeId, Long collegeId, String openCollege, String courseCode) {
-        Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
-        return cloudMarkingScoreMapper.queryStudentMark(schoolId, collegeId, semesterId, examTypeId, openCollege, courseCode);
+        return cloudMarkingScoreMapper.queryStudentMark(collegeId, semesterId, examTypeId, openCollege, courseCode);
     }
 
     @Override
     public List<ScoreDownloadDto> listScoreBySemesterIdAndExamTypeIdAndCollegeIdAndCourseCodeAndOpenCollege(Long semesterId, Long examTypeId, Long collegeId, String courseCode, String openCollege) {
         return this.baseMapper.listScoreBySemesterIdAndExamTypeIdAndCollegeIdAndCourseCodeAndOpenCollege(semesterId, examTypeId, collegeId, courseCode, openCollege);
     }
+
+    @Override
+    public List<CloudMarkingScore> listByCollegeIdAndSemesterIdAndExamTypeIdAndSubjectCodeAndOpenCollege(Long collegeId, Long semesterId, Long examTypeId, String courseCode, String openCollege) {
+        QueryWrapper<CloudMarkingScore> queryWrapper = new QueryWrapper<>();
+        queryWrapper.lambda().eq(CloudMarkingScore::getSchoolId, collegeId)
+                .eq(CloudMarkingScore::getSemesterId, semesterId)
+                .eq(CloudMarkingScore::getExamTypeId, examTypeId)
+                .eq(CloudMarkingScore::getSubjectCode, courseCode)
+                .eq(CloudMarkingScore::getOpenCollege, openCollege);
+        return this.list(queryWrapper);
+    }
 }

+ 7 - 7
src/main/java/com/qmth/eds/service/impl/CommonServiceImpl.java

@@ -245,12 +245,12 @@ public class CommonServiceImpl implements CommonService {
     }
 
     @Override
-    public List<ExamSyncStudent> conditionCourseQuery(Long semesterId, Long examTypeId) {
-        Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
-        ExamSyncTotal examSyncTotal = examSyncTotalService.getBySemesterIdAndExamTypeIdAndUseFile(schoolId, semesterId, examTypeId, true);
-        if (examSyncTotal != null) {
-            return examSyncStudentService.listByExamSyncTotalId(examSyncTotal);
-        }
-        return null;
+    public List<CloudMarkingScore> conditionCourseQuery(Long semesterId, Long examTypeId) {
+        QueryWrapper<CloudMarkingScore> queryWrapper = new QueryWrapper<>();
+        queryWrapper.select("distinct subject_code, subject_name").lambda()
+                .eq(CloudMarkingScore::getSemesterId, semesterId)
+                .eq(CloudMarkingScore::getExamTypeId, examTypeId)
+                .orderByAsc(CloudMarkingScore::getSubjectCode);
+        return cloudMarkingScoreService.list(queryWrapper);
     }
 }

+ 11 - 32
src/main/java/com/qmth/eds/service/impl/ExamAssignServiceImpl.java

@@ -18,19 +18,16 @@ import com.qmth.eds.common.util.FileUtil;
 import com.qmth.eds.common.util.ServletUtil;
 import com.qmth.eds.mapper.ExamAssignMapper;
 import com.qmth.eds.service.*;
+import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.util.CollectionUtils;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**
@@ -61,32 +58,15 @@ public class ExamAssignServiceImpl extends ServiceImpl<ExamAssignMapper, ExamAss
 
     @Override
     public IPage<ExamAssignDto> pageData(Long semesterId, Long examTypeId, Long collegeId, String courseCode, Integer pageNumber, Integer pageSize) {
-        Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
         Page<ExamAssignDto> page = new Page<>(pageNumber, pageSize);
         IPage<ExamAssignDto> assignListDtoIPage = this.baseMapper.pageData(page, collegeId, semesterId, examTypeId, courseCode);
 
-        ExamSyncTotal examSyncTotal = examSyncTotalService.getBySemesterIdAndExamTypeIdAndUseFile(schoolId, semesterId, examTypeId, true);
-        if (examSyncTotal == null) {
-            throw ExceptionResultEnum.ERROR.exception("未设置使用数据文件,请联系管理员处理");
-        }
         for (ExamAssignDto record : assignListDtoIPage.getRecords()) {
-            int actualCount = 0;
-            String kkxy = "";
-
-            List<ExamSyncStudent> examSyncStudents = examSyncStudentService.listByExamSyncTotalId(examSyncTotal);
-            if (!CollectionUtils.isEmpty(examSyncStudents)) {
-                List<ExamSyncStudent> syncStudents = examSyncStudents.stream().filter(m -> m.getKch().equals(record.getCourseCode())).collect(Collectors.toList());
-                actualCount = syncStudents.size();
-                List<String> kkxyList = syncStudents.stream().map(ExamSyncStudent::getKkbm).distinct().collect(Collectors.toList());
-                if (!CollectionUtils.isEmpty(kkxyList) && kkxyList.size() > 1) {
-                    throw ExceptionResultEnum.ERROR.exception(String.format("课程[%s]查询出%d个开课学院,请联系管理员检查数据", courseCode, kkxyList.size()));
-                }
-                kkxy = kkxyList.get(0);
+            if (StringUtils.isNotBlank(record.getOpenCollege())) {
+                record.setOpenCollege(Arrays.asList(record.getOpenCollege().split(",")).stream().filter(m -> StringUtils.isNotBlank(m)).collect(Collectors.joining(",")));
             }
-            record.setActualCount(actualCount);
-            record.setOpenCollege(kkxy);
 
-            ExamAssign examAssign = this.baseMapper.getBySchoolIdAndSemesterIdAndExamTypeIdAndCourseCodeAndOpenCollege(collegeId, semesterId, examTypeId, record.getCourseCode(), kkxy);
+            ExamAssign examAssign = this.baseMapper.getBySchoolIdAndSemesterIdAndExamTypeIdAndCourseCodeAndOpenCollege(collegeId, semesterId, examTypeId, record.getCourseCode(), record.getOpenCollege());
             if (examAssign != null) {
                 record.setId(examAssign.getId());
                 record.setFormula(examAssign.getFormula());
@@ -114,6 +94,7 @@ public class ExamAssignServiceImpl extends ServiceImpl<ExamAssignMapper, ExamAss
             examAssign.setUpdateTime(System.currentTimeMillis());
         }
         this.saveOrUpdate(examAssign);
+        examAssign = this.getById(examAssign.getId());
 
         // 计算赋分
         asyncTaskService.calcAssignScore(examAssign);
@@ -174,11 +155,10 @@ public class ExamAssignServiceImpl extends ServiceImpl<ExamAssignMapper, ExamAss
         }
         int actualCount = 0;
         List<String> kcxyList = new ArrayList<>();
-        List<ExamSyncStudent> examSyncStudents = examSyncStudentService.listByExamSyncTotalId(examSyncTotal);
-        if (!CollectionUtils.isEmpty(examSyncStudents)) {
-            List<ExamSyncStudent> syncStudents = examSyncStudents.stream().filter(m -> m.getKch().equals(courseCode) && m.getKkbm().equals(openCollege)).collect(Collectors.toList());
-            actualCount = syncStudents.size();
-            kcxyList = syncStudents.stream().map(ExamSyncStudent::getJgmc).distinct().collect(Collectors.toList());
+        List<CloudMarkingScore> cloudMarkingScoreList = cloudMarkingScoreService.listByCollegeIdAndSemesterIdAndExamTypeIdAndSubjectCodeAndOpenCollege(collegeId, semesterId, examTypeId, courseCode, openCollege);
+        if (!CollectionUtils.isEmpty(cloudMarkingScoreList)) {
+            actualCount = cloudMarkingScoreList.size();
+            kcxyList = cloudMarkingScoreList.stream().filter(m -> StringUtils.isNotBlank(m.getCollege())).map(CloudMarkingScore::getCollege).distinct().collect(Collectors.toList());
         }
         examAssignDto.setActualCount(actualCount);
         examAssignDto.setInspectCollege(kcxyList);
@@ -224,8 +204,7 @@ public class ExamAssignServiceImpl extends ServiceImpl<ExamAssignMapper, ExamAss
                 cloudMarkingScoreForeigns.add(new CloudMarkingScoreForeign(collegeId, semesterId, examTypeId, cloudMarkingScore.getExamId(), examSyncStudent.getXnm(), examSyncStudent.getXqm(), examSyncStudent.getJxbId(), examSyncStudent.getKch(), examSyncStudent.getKcmc(), examSyncStudent.getXh(), cloudMarkingScore.getAssignScore()));
             } else {
                 Optional<ExamSyncStudent> optional = examSyncStudents.stream()
-                        .filter(s -> s.getJxbmc().equals(cloudMarkingScore.getClassName())
-                                && ((StringUtils.isBlank(s.getCloudMarkingCourseCode()) && s.getKch().equals(cloudMarkingScore.getSubjectCode())) || (StringUtils.isNotBlank(s.getCloudMarkingCourseCode()) && s.getCloudMarkingCourseCode().equals(cloudMarkingScore.getSubjectCode())))
+                        .filter(s -> ((StringUtils.isBlank(s.getCloudMarkingCourseCode()) && s.getKch().equals(cloudMarkingScore.getSubjectCode())) || (StringUtils.isNotBlank(s.getCloudMarkingCourseCode()) && s.getCloudMarkingCourseCode().equals(cloudMarkingScore.getSubjectCode())))
                                 && s.getXh().equals(cloudMarkingScore.getStudentCode())).findFirst();
                 if (!optional.isPresent()) {
                     cloudMarkingScoreForeigns.add(new CloudMarkingScoreForeign(collegeId, semesterId, examTypeId, cloudMarkingScore.getExamId(), null, null, null, cloudMarkingScore.getSubjectCode(), cloudMarkingScore.getSubjectName(), cloudMarkingScore.getStudentCode(), cloudMarkingScore.getAssignScore()));

+ 2 - 4
src/main/java/com/qmth/eds/service/impl/ExamCourseMappingServiceImpl.java

@@ -93,20 +93,18 @@ public class ExamCourseMappingServiceImpl extends ServiceImpl<ExamCourseMappingM
             List<ExamCourseMapping> examCourseMappings = new ArrayList<>();
             for (ExamCourseMappingDto examCourseMappingDto : courseMappingDtoHashSet) {
                 ExamCourseMapping examCourseMapping = null;
-                Optional<ExamCourseMapping> optionalExamCourseMapping = examCourseMappingList.stream().filter(m -> examCourseMappingDto.getSyncCourseCode().equals(m.getSyncCourseCode())).findFirst();
+                Optional<ExamCourseMapping> optionalExamCourseMapping = examCourseMappingList.stream().filter(m -> examCourseMappingDto.getStudentCode().equals(m.getStudentCode()) && examCourseMappingDto.getSyncCourseCode().equals(m.getSyncCourseCode())).findFirst();
                 if (optionalExamCourseMapping.isPresent()) {
                     examCourseMapping = optionalExamCourseMapping.get();
                 }
                 // 不存在,新增
                 if (examCourseMapping == null) {
-                    examCourseMapping = new ExamCourseMapping(schoolId, semesterId, examSemester.getName(), examTypeId, examType.getName(), examCourseMappingDto.getSyncCourseCode(), examCourseMappingDto.getCloudMarkingCourseCode());
+                    examCourseMapping = new ExamCourseMapping(schoolId, semesterId, examSemester.getName(), examTypeId, examType.getName(),examCourseMappingDto.getStudentCode(), examCourseMappingDto.getSyncCourseCode(), examCourseMappingDto.getCloudMarkingCourseCode());
                 }
                 // 存在且云阅卷课程代码不一致,更新
                 else if (!examCourseMapping.getCloudMarkingCourseCode().equals(examCourseMappingDto.getCloudMarkingCourseCode())) {
                     examCourseMapping.setCloudMarkingCourseCode(examCourseMappingDto.getCloudMarkingCourseCode());
                 }
-                // 存在且云阅卷课程代码一致,不处理
-
                 examCourseMappings.add(examCourseMapping);
             }
             // 批量新增、修改

+ 2 - 1
src/main/java/com/qmth/eds/service/impl/ExamSemesterServiceImpl.java

@@ -28,7 +28,8 @@ public class ExamSemesterServiceImpl extends ServiceImpl<ExamSemesterMapper, Exa
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
         QueryWrapper<ExamSemester> queryWrapper = new QueryWrapper<>();
         queryWrapper.lambda().eq(ExamSemester::getSchoolId, schoolId)
-                .eq(ExamSemester::getEnable, true);
+                .eq(ExamSemester::getEnable, true)
+                .orderByDesc(ExamSemester::getCreateTime);
         return this.baseMapper.selectList(queryWrapper);
     }
 

+ 5 - 9
src/main/java/com/qmth/eds/service/impl/ExamSyncStudentServiceImpl.java

@@ -2,14 +2,12 @@ package com.qmth.eds.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.qmth.eds.common.entity.ExamCourseMapping;
-import com.qmth.eds.common.entity.ExamSyncStudent;
-import com.qmth.eds.common.entity.ExamSyncTotal;
-import com.qmth.eds.common.entity.SysUser;
+import com.qmth.eds.common.entity.*;
 import com.qmth.eds.common.util.ServletUtil;
 import com.qmth.eds.mapper.ExamSyncStudentMapper;
 import com.qmth.eds.service.ExamCourseMappingService;
 import com.qmth.eds.service.ExamSyncStudentService;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -43,7 +41,7 @@ public class ExamSyncStudentServiceImpl extends ServiceImpl<ExamSyncStudentMappe
         List<ExamCourseMapping> examCourseMappings = examCourseMappingService.list(examCourseMappingQueryWrapper);
         if (!examCourseMappings.isEmpty()) {
             for (ExamSyncStudent examSyncStudent : examSyncStudents) {
-                Optional<ExamCourseMapping> examCourseMapping = examCourseMappings.stream().filter(m -> m.getSyncCourseCode().equals(examSyncStudent.getKch())).findFirst();
+                Optional<ExamCourseMapping> examCourseMapping = examCourseMappings.stream().filter(m -> StringUtils.isNotBlank(m.getStudentCode()) && m.getStudentCode().equals(examSyncStudent.getXh()) && m.getSyncCourseCode().equals(examSyncStudent.getKch())).findFirst();
                 if (examCourseMapping.isPresent()) {
                     examSyncStudent.setCloudMarkingCourseCode(examCourseMapping.get().getCloudMarkingCourseCode());
                 }
@@ -66,9 +64,7 @@ public class ExamSyncStudentServiceImpl extends ServiceImpl<ExamSyncStudentMappe
      * @return
      */
     @Override
-    public List<ExamSyncStudent> queryByExamineCollegeList(Long semesterId, Long examTypeId, String courseCode, String openCollege, Long collegeId, String kcCollege, String clazzId) {
-        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-        Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
-        return examSyncStudentMapper.queryByExamineCollegeList(schoolId, semesterId, collegeId, examTypeId, courseCode, openCollege, kcCollege, clazzId);
+    public List<CloudMarkingScore> queryByExamineCollegeList(Long semesterId, Long examTypeId, String courseCode, String openCollege, Long collegeId, String kcCollege, String clazzId) {
+        return examSyncStudentMapper.queryByExamineCollegeList(semesterId, collegeId, examTypeId, courseCode, openCollege, kcCollege, clazzId);
     }
 }

+ 5 - 3
src/main/java/com/qmth/eds/service/impl/WhuDataSyncServiceImpl.java

@@ -432,12 +432,14 @@ public class WhuDataSyncServiceImpl implements WhuDataSyncService {
         List<ExamSyncStudent> examSyncStudents = examSyncStudentService.listByExamSyncTotalId(examSyncTotal);
         for (CloudMarkingScore cloudMarkingScore : cloudMarkingScoreList) {
             Optional<ExamSyncStudent> optional = examSyncStudents.stream()
-                    .filter(s -> s.getJxbmc().equals(cloudMarkingScore.getClassName())
-                            && ((StringUtils.isBlank(s.getCloudMarkingCourseCode()) && s.getKch().equals(cloudMarkingScore.getSubjectCode())) || (StringUtils.isNotBlank(s.getCloudMarkingCourseCode()) && s.getCloudMarkingCourseCode().equals(cloudMarkingScore.getSubjectCode())))
-                            && s.getXh().equals(cloudMarkingScore.getStudentCode())).findFirst();
+                    .filter(s ->
+                            ((StringUtils.isBlank(s.getCloudMarkingCourseCode()) && s.getKch().equals(cloudMarkingScore.getSubjectCode())) || (StringUtils.isNotBlank(s.getCloudMarkingCourseCode()) && s.getCloudMarkingCourseCode().equals(cloudMarkingScore.getSubjectCode())))
+                                    && s.getXh().equals(cloudMarkingScore.getStudentCode())).findFirst();
             if (optional.isPresent()) {
                 ExamSyncStudent examSyncStudent = optional.get();
                 // 匹配上,保存考务数据表ID
+                cloudMarkingScore.setSyncCourseCode(examSyncStudent.getKch());
+                cloudMarkingScore.setOpenCollege(examSyncStudent.getKkbm());
                 cloudMarkingScore.setExamSyncStudentId(examSyncStudent.getId());
             }
         }

+ 3 - 0
src/main/resources/db/log/1.1.0.sql

@@ -0,0 +1,3 @@
+ALTER TABLE `exam_course_mapping` ADD COLUMN `student_code` VARCHAR(50) NULL COMMENT '学号' AFTER `exam_type_name`;
+ALTER TABLE `cloud_marking_score` ADD COLUMN `sync_course_code` VARCHAR(45) NULL COMMENT '武大考务数据课程代码' AFTER `subject_name`;
+ALTER TABLE `cloud_marking_score` ADD COLUMN `open_college` VARCHAR(150) NULL COMMENT '开课学院' AFTER `sync_course_code`;

+ 22 - 34
src/main/resources/mapper/CloudMarkingScoreMapper.xml

@@ -48,12 +48,10 @@
         SELECT
             cms.id cloudMarkingScoreId,
             cms.total_score totalScore,
-            ess.kkbm,
-            ess.jgmc
+            cms.open_college kkbm,
+            cms.college jgmc
         FROM
             cloud_marking_score cms
-                LEFT JOIN
-            exam_sync_student ess ON cms.exam_sync_student_id = ess.id
         <where>
             <if test="schoolId != null">
                 and cms.school_id = #{schoolId}
@@ -65,41 +63,31 @@
                 and cms.exam_type_id = #{examTypeId}
             </if>
             <if test="courseCode != null and courseCode != ''">
-                and ess.kch = #{courseCode}
+                and cms.subject_code = #{courseCode}
             </if>
             <if test="openCollege != null and openCollege != ''">
-                and ess.kkbm = #{openCollege}
+                and cms.open_college = #{openCollege}
             </if>
         </where>
     </select>
 
     <select id="queryStudentMark" resultType="com.qmth.eds.bean.result.StudentMarkResult">
         select
-            ess.id,
-            ess.school_id as schoolId,
-            ess.xnm as xnm,
-            ess.xqm as xqm,
-            ess.jxb_id as jxbId,
-            ess.jxbmc as jxbmc,
-            ess.kch as kch,
-            ess.kcmc as kcmc,
-            ess.kkbm as kkbm,
-            ess.xf as xf,
-            ess.xh as xh,
-            ess.xsxm as xsxm,
-            ess.jgmc as jgmc,
+            t.class_name jxbmc,
+            t.subject_code kch,
+            t.subject_name kcmc,
+            t.open_college kkbm,
+            t.student_code xh,
+            t.name xsxm,
+            t.college jgmc,
             t.status,
-            t.total_score as totalScore,
-            t.assign_score as assignScore,
-            t.objective_score as objectiveScore,
-            t.subjective_score as subjectiveScore
+            t.total_score totalScore,
+            t.assign_score assignScore,
+            t.objective_score objectiveScore,
+            t.subjective_score subjectiveScore
         from
-        exam_sync_student ess
-        join cloud_marking_score t on ess.id = t.exam_sync_student_id
+         cloud_marking_score t
         <where> 1 = 1
-            <if test="schoolId != null">
-                and ess.school_id = #{schoolId}
-            </if>
             <if test="collegeId != null">
                 and t.school_id = #{collegeId}
             </if>
@@ -110,10 +98,10 @@
                 and t.exam_type_id = #{examTypeId}
             </if>
             <if test="courseCode != null and courseCode != ''">
-                and ess.kch = #{courseCode}
+                and t.subject_code = #{courseCode}
             </if>
             <if test="openCollege != null and openCollege != ''">
-                and ess.kkbm = #{openCollege}
+                and t.open_college = #{openCollege}
             </if>
         </where>
     </select>
@@ -124,11 +112,11 @@
             et.name examTypeName,
             ess.xnm,
             ess.xqm,
-            ess.kch,
-            ess.kcmc,
+            cms.subject_code kch,
+            cms.subject_name kcmc,
             ess.kkbm,
-            ess.xh,
-            ess.xsxm,
+            cms.student_code xh,
+            cms.name xsxm,
             ess.jgmc,
             cms.total_score totalScore,
             cms.assign_score assignScore

+ 21 - 38
src/main/resources/mapper/ExamAssignMapper.xml

@@ -3,12 +3,14 @@
 <mapper namespace="com.qmth.eds.mapper.ExamAssignMapper">
     <select id="pageData" resultType="com.qmth.eds.bean.dto.ExamAssignDto">
         select
-            distinct
             school_id schoolId,
             semester_id semesterId,
             exam_type_id examTypeId,
             subject_code courseCode,
-            subject_name courseName
+            subject_name courseName,
+            sync_course_code syncCourseCode,
+            group_concat(distinct open_college) openCollege,
+            count(1) actualCount
             from cloud_marking_score
         <where>
             school_id = #{schoolId}
@@ -22,37 +24,32 @@
                 and subject_code = #{courseCode}
             </if>
         </where>
+        group by school_id, semester_id, exam_type_id, subject_code, subject_name, sync_course_code
     </select>
 
     <select id="assignResultPreview" resultType="com.qmth.eds.bean.result.AssignResultPreviewResult">
         select
-            ess.id,
-            ess.kch as courseCode,
-            ess.kcmc as courseName,
-            ess.xh as studentCode,
-            ess.xsxm as studentName,
+            cms.id,
+            cms.subject_code as courseCode,
+            cms.subject_name as courseName,
+            cms.student_code as studentCode,
+            cms.name as studentName,
             IFNULL(cms.objective_score,'/') as objectiveScore,
             IFNULL(cms.subjective_score,'/') as subjectiveScore,
             IFNULL(cms.total_score,'/') as totalScore,
             cms.objective_score_detail as objectiveScoreDetail,
             cms.subjective_score_detail as subjectiveScoreDetail,
---             group_concat(cms.objective_score_detail, CONCAT('|', cms.subjective_score_detail)) as scoreDetail,
-            ess.jxbmc as clazzName,
-            ess.jgmc as collegeName,
-            ess.xm as teacherName,
+            cms.class_name as clazzName,
+            cms.college as collegeName,
+            cms.teacher as teacherName,
             IFNULL(cms.assign_score,'/') as assignScore
-        from
-            exam_sync_student ess
-        join cloud_marking_score cms on cms.exam_sync_student_id = ess.id
+        from cloud_marking_score cms
         <where>
-            <if test="schoolId != null">
-                and ess.school_id = #{schoolId}
-            </if>
             <if test="collegeId != null">
                 and cms.school_id = #{collegeId}
             </if>
             <if test="kcCollege != null and kcCollege != ''">
-                and ess.jgmc = #{kcCollege}
+                and cms.college = #{kcCollege}
             </if>
             <if test="semesterId != null and semesterId != ''">
                 and cms.semester_id = #{semesterId}
@@ -61,16 +58,16 @@
                 and cms.exam_type_id = #{examTypeId}
             </if>
             <if test="courseCode != null and courseCode != ''">
-                and ess.kch = #{courseCode}
+                and cms.subject_code = #{courseCode}
             </if>
             <if test="openCollege != null and openCollege != ''">
-                and ess.kkbm = #{openCollege}
+                and cms.open_college = #{openCollege}
             </if>
             <if test="clazzId != null and clazzId != ''">
-                and ess.jxb_id = #{clazzId}
+                and cms.class_name = #{clazzId}
             </if>
             <if test="teacherCode != null and teacherCode != ''">
-                and ess.jgh = #{teacherCode}
+                and cms.teacher = #{teacherCode}
             </if>
             <if test="minAssignScore != null and minAssignScore != ''">
                 and cms.assign_score &gt;= #{minAssignScore}
@@ -79,22 +76,7 @@
                 and cms.assign_score &lt;= #{maxAssignScore}
             </if>
         </where>
-        group by
-            ess.id,
-            ess.kch,
-            ess.kcmc,
-            ess.xh,
-            ess.xsxm,
-            cms.objective_score,
-            cms.subjective_score,
-            cms.total_score,
-            cms.objective_score_detail,
-            cms.subjective_score_detail,
-            ess.jxbmc,
-            ess.jgmc,
-            ess.xm,
-            cms.assign_score
-        order by ess.xh
+        order by cms.student_code
     </select>
     <select id="getBySchoolIdAndSemesterIdAndExamTypeIdAndCourseCodeAndOpenCollege"
             resultType="com.qmth.eds.common.entity.ExamAssign">
@@ -103,6 +85,7 @@
                semester_id semesterId,
                exam_type_id examTypeId,
                course_code courseCode,
+               course_name courseName,
                open_college openCollege,
                formula,
                coefficient,

+ 7 - 11
src/main/resources/mapper/ExamSyncStudentMapper.xml

@@ -2,16 +2,12 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="com.qmth.eds.mapper.ExamSyncStudentMapper">
 
-    <select id="queryByExamineCollegeList" resultType="com.qmth.eds.common.entity.ExamSyncStudent">
+    <select id="queryByExamineCollegeList" resultType="com.qmth.eds.common.entity.CloudMarkingScore">
         select
             *
         from
-            exam_sync_student ess
-            join cloud_marking_score cms on ess.id = cms.exam_sync_student_id
+            cloud_marking_score cms
         <where> 1 = 1
-            <if test="schoolId != null and schoolId != ''">
-                and ess.school_id = #{schoolId}
-            </if>
             <if test="orgId != null and orgId != ''">
                 and cms.school_id = #{orgId}
             </if>
@@ -22,18 +18,18 @@
                 and cms.exam_type_id = #{examTypeId}
             </if>
             <if test="courseCode != null and courseCode != ''">
-                and ess.kch = #{courseCode}
+                and cms.subject_code = #{courseCode}
             </if>
             <if test="openCollege != null and openCollege != ''">
-                and ess.kkbm = #{openCollege}
+                and cms.open_college = #{openCollege}
             </if>
             <if test="kcCollege != null and kcCollege != ''">
-                and ess.jgmc = #{kcCollege}
+                and cms.college = #{kcCollege}
             </if>
             <if test="clazzId != null and clazzId != ''">
-                and ess.jxb_id = #{clazzId}
+                and cms.class_name = #{clazzId}
             </if>
         </where>
-        order by ess.jgmc
+        order by cms.college
     </select>
 </mapper>