|
@@ -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()));
|
|
|
}
|
|
|
}
|
|
|
}
|