|
@@ -343,7 +343,7 @@ public class ImportLogicServiceImpl implements ImportLogicService {
|
|
}
|
|
}
|
|
|
|
|
|
List<BasicExamStudent> basicExamStudentList = basicExamStudentService.list(new QueryWrapper<BasicExamStudent>().lambda()
|
|
List<BasicExamStudent> basicExamStudentList = basicExamStudentService.list(new QueryWrapper<BasicExamStudent>().lambda()
|
|
- .select(BasicExamStudent::getId, BasicExamStudent::getCourseId, BasicExamStudent::getStudentCode, BasicExamStudent::getPaperNumber, BasicExamStudent::getTeachClassName, BasicExamStudent::getTeacherId)
|
|
|
|
|
|
+ .select(BasicExamStudent::getId, BasicExamStudent::getCourseId, BasicExamStudent::getStudentCode, BasicExamStudent::getPaperNumber, BasicExamStudent::getTeachClassName, BasicExamStudent::getTeacherId, BasicExamStudent::getRequiredFields)
|
|
.eq(BasicExamStudent::getSchoolId, schoolId).eq(BasicExamStudent::getExamId, examId));
|
|
.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(), e -> e));
|
|
|
|
|
|
@@ -429,8 +429,9 @@ public class ImportLogicServiceImpl implements ImportLogicService {
|
|
basicExamStudent.setId(student.getId());
|
|
basicExamStudent.setId(student.getId());
|
|
basicExamStudent.setPaperNumber(student.getPaperNumber());
|
|
basicExamStudent.setPaperNumber(student.getPaperNumber());
|
|
basicExamStudent.setPaperType(student.getPaperType());
|
|
basicExamStudent.setPaperType(student.getPaperType());
|
|
|
|
+ List<CodeNameEnableValue> requiredFieldList = StringUtils.isNotBlank(student.getRequiredFields()) ? JSON.parseArray(student.getRequiredFields(), CodeNameEnableValue.class) : Collections.emptyList();
|
|
// 更新requiredFields中的任课老师和任课老师工号
|
|
// 更新requiredFields中的任课老师和任课老师工号
|
|
- for (CodeNameEnableValue codeNameEnableValue : student.getRequiredFieldList()) {
|
|
|
|
|
|
+ for (CodeNameEnableValue codeNameEnableValue : requiredFieldList) {
|
|
if (codeNameEnableValue.getCode().equals(RequiredFieldsEnum.TEACHER_CODE.getCode())) {
|
|
if (codeNameEnableValue.getCode().equals(RequiredFieldsEnum.TEACHER_CODE.getCode())) {
|
|
codeNameEnableValue.setValue(basicExamStudentImport.getTeacherCode());
|
|
codeNameEnableValue.setValue(basicExamStudentImport.getTeacherCode());
|
|
}
|
|
}
|
|
@@ -438,7 +439,7 @@ public class ImportLogicServiceImpl implements ImportLogicService {
|
|
codeNameEnableValue.setValue(basicExamStudentImport.getTeacherName());
|
|
codeNameEnableValue.setValue(basicExamStudentImport.getTeacherName());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- basicExamStudent.setRequiredFields(JSON.toJSONString(student.getRequiredFieldList()));
|
|
|
|
|
|
+ basicExamStudent.setRequiredFields(JSON.toJSONString(requiredFieldList));
|
|
} else {
|
|
} else {
|
|
stringJoiner.add(String.format("课程代码[%s],开课学院[%s],学号[%s]考生管理中不存在", basicExamStudentImport.getCourseCode(), basicExamStudentImport.getTeachingRoomName(), basicExamStudentImport.getStudentCode()));
|
|
stringJoiner.add(String.format("课程代码[%s],开课学院[%s],学号[%s]考生管理中不存在", basicExamStudentImport.getCourseCode(), basicExamStudentImport.getTeachingRoomName(), basicExamStudentImport.getStudentCode()));
|
|
}
|
|
}
|
|
@@ -952,20 +953,20 @@ public class ImportLogicServiceImpl implements ImportLogicService {
|
|
// 4.判断答案是否符合题型
|
|
// 4.判断答案是否符合题型
|
|
if (questionType != null && SystemConstant.strNotNull(answer)) {
|
|
if (questionType != null && SystemConstant.strNotNull(answer)) {
|
|
switch (questionType) {
|
|
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中填写");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1233,7 +1234,7 @@ public class ImportLogicServiceImpl implements ImportLogicService {
|
|
userSaveParams.setPassword(SystemConstant.DEFAULT_PASSWORD);
|
|
userSaveParams.setPassword(SystemConstant.DEFAULT_PASSWORD);
|
|
userSaveParams.setOrgId(orgId);
|
|
userSaveParams.setOrgId(orgId);
|
|
userSaveParams.setEnable(true);
|
|
userSaveParams.setEnable(true);
|
|
- userSaveParams.setRoleIds(new Long[] { markerRole.getId() });
|
|
|
|
|
|
+ userSaveParams.setRoleIds(new Long[]{markerRole.getId()});
|
|
try {
|
|
try {
|
|
markUser.setUserId(sysUserService.saveUser(userSaveParams));
|
|
markUser.setUserId(sysUserService.saveUser(userSaveParams));
|
|
markUser.setName(markerCode);
|
|
markUser.setName(markerCode);
|