|
@@ -1199,23 +1199,23 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
String teachingRoomName = basicCourseImportDto.getTeachingRoomName();
|
|
String teachingRoomName = basicCourseImportDto.getTeachingRoomName();
|
|
String clazz = basicCourseImportDto.getClazz();
|
|
String clazz = basicCourseImportDto.getClazz();
|
|
|
|
|
|
- if (courseDtoMap.containsKey(courseCode)){
|
|
|
|
|
|
+ if (courseDtoMap.containsKey(courseCode)) {
|
|
BasicCourseImportDto primaryCell = courseDtoMap.get(courseCode);
|
|
BasicCourseImportDto primaryCell = courseDtoMap.get(courseCode);
|
|
String primaryName = primaryCell.getCourseName();
|
|
String primaryName = primaryCell.getCourseName();
|
|
String primaryTeachingRoomName = primaryCell.getTeachingRoomName();
|
|
String primaryTeachingRoomName = primaryCell.getTeachingRoomName();
|
|
- if (!Objects.equals(primaryName,courseName)){
|
|
|
|
|
|
+ if (!Objects.equals(primaryName, courseName)) {
|
|
throw ExceptionResultEnum.ERROR.exception("【课程编号】 : " + courseCode + ",存在不同的【课程名称】");
|
|
throw ExceptionResultEnum.ERROR.exception("【课程编号】 : " + courseCode + ",存在不同的【课程名称】");
|
|
}
|
|
}
|
|
- if (!Objects.equals(primaryTeachingRoomName,teachingRoomName)){
|
|
|
|
|
|
+ if (!Objects.equals(primaryTeachingRoomName, teachingRoomName)) {
|
|
throw ExceptionResultEnum.ERROR.exception("【课程编号】 : " + courseCode + ",存在不同的【所属教研室】");
|
|
throw ExceptionResultEnum.ERROR.exception("【课程编号】 : " + courseCode + ",存在不同的【所属教研室】");
|
|
}
|
|
}
|
|
String primaryClazz = primaryCell.getClazz();
|
|
String primaryClazz = primaryCell.getClazz();
|
|
- if (SystemConstant.strNotNull(clazz)){
|
|
|
|
|
|
+ if (SystemConstant.strNotNull(clazz)) {
|
|
primaryClazz = primaryClazz + SystemConstant.COMMA + clazz;
|
|
primaryClazz = primaryClazz + SystemConstant.COMMA + clazz;
|
|
primaryCell.setClazz(primaryClazz);
|
|
primaryCell.setClazz(primaryClazz);
|
|
}
|
|
}
|
|
duplicateData.add(basicCourseImportDto);
|
|
duplicateData.add(basicCourseImportDto);
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
courseDtoMap.put(courseCode, basicCourseImportDto);
|
|
courseDtoMap.put(courseCode, basicCourseImportDto);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1244,7 +1244,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
InputStream inputStream = (InputStream) map.get("inputStream");
|
|
InputStream inputStream = (InputStream) map.get("inputStream");
|
|
List<LinkedMultiValueMap<Integer, Object>> finalList = ExcelUtil.excelReader(inputStream, Lists.newArrayList(SysUserImportDto.class, DescribeImportDto.class), (finalExcelList, finalColumnNameList, finalExcelErrorList) -> {
|
|
List<LinkedMultiValueMap<Integer, Object>> finalList = ExcelUtil.excelReader(inputStream, Lists.newArrayList(SysUserImportDto.class, DescribeImportDto.class), (finalExcelList, finalColumnNameList, finalExcelErrorList) -> {
|
|
List<ExcelError> excelErrorTemp = new ArrayList<>();
|
|
List<ExcelError> excelErrorTemp = new ArrayList<>();
|
|
- Map<String,SysUserImportDto> checkDtoMap = new HashMap<>();
|
|
|
|
|
|
+ Map<String, SysUserImportDto> checkDtoMap = new HashMap<>();
|
|
|
|
|
|
for (int i = 0; i < finalExcelList.size(); i++) {
|
|
for (int i = 0; i < finalExcelList.size(); i++) {
|
|
LinkedMultiValueMap<Integer, Object> excelMap = finalExcelList.get(i);
|
|
LinkedMultiValueMap<Integer, Object> excelMap = finalExcelList.get(i);
|
|
@@ -1263,28 +1263,28 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
String orgName = sysUserImportDto.getOrgName();
|
|
String orgName = sysUserImportDto.getOrgName();
|
|
String roleName = sysUserImportDto.getRoleName();
|
|
String roleName = sysUserImportDto.getRoleName();
|
|
|
|
|
|
- if (checkDtoMap.containsKey(code)){
|
|
|
|
|
|
+ if (checkDtoMap.containsKey(code)) {
|
|
SysUserImportDto primaryCell = checkDtoMap.get(code);
|
|
SysUserImportDto primaryCell = checkDtoMap.get(code);
|
|
String priName = primaryCell.getName();
|
|
String priName = primaryCell.getName();
|
|
String priPhoneNumber = primaryCell.getPhoneNumber();
|
|
String priPhoneNumber = primaryCell.getPhoneNumber();
|
|
String priOrgName = primaryCell.getOrgName();
|
|
String priOrgName = primaryCell.getOrgName();
|
|
- if (!Objects.equals(priName,name)){
|
|
|
|
|
|
+ if (!Objects.equals(priName, name)) {
|
|
throw ExceptionResultEnum.ERROR.exception("【工号】 :" + code + ",的用户存在不同的用户名称异常");
|
|
throw ExceptionResultEnum.ERROR.exception("【工号】 :" + code + ",的用户存在不同的用户名称异常");
|
|
}
|
|
}
|
|
- if (!Objects.equals(priPhoneNumber,phoneNumber)){
|
|
|
|
|
|
+ if (!Objects.equals(priPhoneNumber, phoneNumber)) {
|
|
throw ExceptionResultEnum.ERROR.exception("【工号】 :" + code + ",的用户存在不同的手机号异常");
|
|
throw ExceptionResultEnum.ERROR.exception("【工号】 :" + code + ",的用户存在不同的手机号异常");
|
|
}
|
|
}
|
|
- if (!Objects.equals(priOrgName,orgName)){
|
|
|
|
|
|
+ if (!Objects.equals(priOrgName, orgName)) {
|
|
throw ExceptionResultEnum.ERROR.exception("【工号】 :" + code + ",的用户存在不同的组织架构异常");
|
|
throw ExceptionResultEnum.ERROR.exception("【工号】 :" + code + ",的用户存在不同的组织架构异常");
|
|
}
|
|
}
|
|
String priRoleName = primaryCell.getRoleName();
|
|
String priRoleName = primaryCell.getRoleName();
|
|
- if (SystemConstant.strNotNull(roleName)){
|
|
|
|
|
|
+ if (SystemConstant.strNotNull(roleName)) {
|
|
priRoleName = priRoleName + SystemConstant.COMMA + roleName;
|
|
priRoleName = priRoleName + SystemConstant.COMMA + roleName;
|
|
primaryCell.setRoleName(priRoleName);
|
|
primaryCell.setRoleName(priRoleName);
|
|
}
|
|
}
|
|
duplicateData.add(sysUserImportDto);
|
|
duplicateData.add(sysUserImportDto);
|
|
- }else {
|
|
|
|
- checkDtoMap.put(code,sysUserImportDto);
|
|
|
|
|
|
+ } else {
|
|
|
|
+ checkDtoMap.put(code, sysUserImportDto);
|
|
}
|
|
}
|
|
|
|
|
|
excelErrorTemp.addAll(ExcelUtil.checkExcelField(sysUserImportDto, y, i));
|
|
excelErrorTemp.addAll(ExcelUtil.checkExcelField(sysUserImportDto, y, i));
|
|
@@ -1514,6 +1514,12 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
boolean update = Objects.isNull(t.getTrajectoryUrls()) ? true : false;
|
|
boolean update = Objects.isNull(t.getTrajectoryUrls()) ? true : false;
|
|
t = tSyncExamStudentScoreService.createImageTrajectory(t, ImageTrajectoryEnum.DOWNLOAD);
|
|
t = tSyncExamStudentScoreService.createImageTrajectory(t, ImageTrajectoryEnum.DOWNLOAD);
|
|
if (Objects.nonNull(t.getTrajectoryFileList())) {
|
|
if (Objects.nonNull(t.getTrajectoryFileList())) {
|
|
|
|
+ File[] files = t.getTrajectoryFileList().get(0).getParentFile().listFiles();
|
|
|
|
+ List<File> fileList = new ArrayList<>(Arrays.asList(files));
|
|
|
|
+ fileList.removeAll(t.getTrajectoryFileList());
|
|
|
|
+ for (File file : fileList) {
|
|
|
|
+ file.delete();
|
|
|
|
+ }
|
|
sourceFiles.add(t.getTrajectoryFileList().get(0).getParentFile());
|
|
sourceFiles.add(t.getTrajectoryFileList().get(0).getParentFile());
|
|
} else {
|
|
} else {
|
|
errorTSyncExamStudentScoreList.add(t);
|
|
errorTSyncExamStudentScoreList.add(t);
|