|
@@ -128,7 +128,7 @@ public class ImportLogicServiceImpl implements ImportLogicService {
|
|
|
List<BasicExamStudent> basicExamStudentList = basicExamStudentService.list(new QueryWrapper<BasicExamStudent>().lambda()
|
|
|
.select(BasicExamStudent::getId, BasicExamStudent::getCourseId, BasicExamStudent::getStudentCode, BasicExamStudent::getPaperNumber, BasicExamStudent::getPaperType, BasicExamStudent::getExamStartTime, BasicExamStudent::getExamEndTime)
|
|
|
.eq(BasicExamStudent::getSchoolId, schoolId).eq(BasicExamStudent::getExamId, examId));
|
|
|
- Map<String, BasicExamStudent> courseIdStudentCodeMap = basicExamStudentList.stream().collect(Collectors.toMap(k -> k.getCourseId() + SystemConstant.HYPHEN + k.getStudentCode(), Function.identity()));
|
|
|
+ Map<String, BasicExamStudent> courseIdStudentCodeMap = basicExamStudentList.stream().collect(Collectors.toMap(k -> k.getCourseId() + SystemConstant.HYPHEN + k.getStudentCode(), Function.identity(), (v1, v2) -> v1));
|
|
|
|
|
|
BasicSchool basicSchool = commonCacheService.schoolCache(schoolId);
|
|
|
// 学校设置强制校验卷型或者模式4
|
|
@@ -346,7 +346,7 @@ public class ImportLogicServiceImpl implements ImportLogicService {
|
|
|
List<BasicExamStudent> basicExamStudentList = basicExamStudentService.list(new QueryWrapper<BasicExamStudent>().lambda()
|
|
|
.select(BasicExamStudent::getId, BasicExamStudent::getCourseId, BasicExamStudent::getStudentCode, BasicExamStudent::getPaperNumber, BasicExamStudent::getTeachClassName, BasicExamStudent::getTeacherId, BasicExamStudent::getRequiredFields)
|
|
|
.eq(BasicExamStudent::getSchoolId, schoolId).eq(BasicExamStudent::getExamId, examId));
|
|
|
- Map<String, BasicExamStudent> courseIdStudentCodeMap = basicExamStudentList.stream().collect(Collectors.toMap(k -> k.getCourseId() + SystemConstant.HYPHEN + k.getStudentCode(), e -> e));
|
|
|
+ Map<String, BasicExamStudent> courseIdStudentCodeMap = basicExamStudentList.stream().collect(Collectors.toMap(k -> k.getCourseId() + SystemConstant.HYPHEN + k.getStudentCode(), Function.identity(), (v1, v2) -> v1));
|
|
|
|
|
|
Map<String, Long> basicCourseIdMap = new HashMap<>();
|
|
|
// 课程学号唯一
|
|
@@ -525,7 +525,7 @@ public class ImportLogicServiceImpl implements ImportLogicService {
|
|
|
List<BasicExamStudent> basicExamStudentList = basicExamStudentService.list(new QueryWrapper<BasicExamStudent>().lambda()
|
|
|
.select(BasicExamStudent::getId, BasicExamStudent::getCourseId, BasicExamStudent::getStudentCode, BasicExamStudent::getPaperNumber, BasicExamStudent::getExamStartTime, BasicExamStudent::getExamEndTime)
|
|
|
.eq(BasicExamStudent::getSchoolId, schoolId).eq(BasicExamStudent::getExamId, examId));
|
|
|
- Map<String, BasicExamStudent> courseIdStudentCodeMap = basicExamStudentList.stream().collect(Collectors.toMap(k -> k.getCourseId() + SystemConstant.HYPHEN + k.getStudentCode(), Function.identity()));
|
|
|
+ Map<String, BasicExamStudent> courseIdStudentCodeMap = basicExamStudentList.stream().collect(Collectors.toMap(k -> k.getCourseId() + SystemConstant.HYPHEN + k.getStudentCode(), Function.identity(), (v1, v2) -> v1));
|
|
|
|
|
|
// 文件中试卷编号对应多个课程代码
|
|
|
Map<String, Long> paperNumberCourseIdInMap = new HashMap<>();
|
|
@@ -954,20 +954,20 @@ public class ImportLogicServiceImpl implements ImportLogicService {
|
|
|
// 4.判断答案是否符合题型
|
|
|
if (questionType != null && SystemConstant.strNotNull(answer)) {
|
|
|
switch (questionType) {
|
|
|
- case 1:
|
|
|
- if (answer.length() > 1) {
|
|
|
- logicErrorList.add("单选题答案只能有一个");
|
|
|
- }
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- if (optionCount != 2) {
|
|
|
- logicErrorList.add("判断题[选项个数]只能为2");
|
|
|
- }
|
|
|
- break;
|
|
|
- default:
|
|
|
- logicErrorList.add("[题型(1-单选,2-多选,3-判断)]必须从1、2、3中填写");
|
|
|
+ case 1:
|
|
|
+ if (answer.length() > 1) {
|
|
|
+ logicErrorList.add("单选题答案只能有一个");
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ if (optionCount != 2) {
|
|
|
+ logicErrorList.add("判断题[选项个数]只能为2");
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ logicErrorList.add("[题型(1-单选,2-多选,3-判断)]必须从1、2、3中填写");
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1241,7 +1241,7 @@ public class ImportLogicServiceImpl implements ImportLogicService {
|
|
|
userSaveParams.setPassword(SystemConstant.DEFAULT_PASSWORD);
|
|
|
userSaveParams.setOrgId(orgId);
|
|
|
userSaveParams.setEnable(true);
|
|
|
- userSaveParams.setRoleIds(new Long[] { markerRole.getId() });
|
|
|
+ userSaveParams.setRoleIds(new Long[]{markerRole.getId()});
|
|
|
try {
|
|
|
markUser.setUserId(sysUserService.saveUser(userSaveParams, requestUser.getId()));
|
|
|
markUser.setName(markerCode);
|