|
@@ -23,6 +23,7 @@ import com.qmth.distributed.print.business.templete.service.TaskLogicService;
|
|
import com.qmth.distributed.print.business.util.CreatePdfUtil;
|
|
import com.qmth.distributed.print.business.util.CreatePdfUtil;
|
|
import com.qmth.distributed.print.business.util.HtmlToPdfUtil;
|
|
import com.qmth.distributed.print.business.util.HtmlToPdfUtil;
|
|
import com.qmth.teachcloud.common.annotation.ExcelDBFieldDesc;
|
|
import com.qmth.teachcloud.common.annotation.ExcelDBFieldDesc;
|
|
|
|
+import com.qmth.teachcloud.common.bean.dto.excel.DescribeImportDto;
|
|
import com.qmth.teachcloud.common.bean.dto.excel.SysUserImportDto;
|
|
import com.qmth.teachcloud.common.bean.dto.excel.SysUserImportDto;
|
|
import com.qmth.teachcloud.common.bean.params.ArraysParams;
|
|
import com.qmth.teachcloud.common.bean.params.ArraysParams;
|
|
import com.qmth.teachcloud.common.contant.SystemConstant;
|
|
import com.qmth.teachcloud.common.contant.SystemConstant;
|
|
@@ -561,7 +562,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
String dirName = stringJoiner.toString().replaceAll("\\\\", "/");
|
|
String dirName = stringJoiner.toString().replaceAll("\\\\", "/");
|
|
|
|
|
|
// ossUtil.ossUpload(dirName, in, null);
|
|
// ossUtil.ossUpload(dirName, in, null);
|
|
- fileStoreUtil.ossUpload(dirName, in,DigestUtils.md5Hex(new ByteArrayInputStream(outputStream.toByteArray())), fileStoreUtil.getUploadEnumByPath(dirName).getFssType());
|
|
|
|
|
|
+ fileStoreUtil.ossUpload(dirName, in, DigestUtils.md5Hex(new ByteArrayInputStream(outputStream.toByteArray())), fileStoreUtil.getUploadEnumByPath(dirName).getFssType());
|
|
jsonObject.put(SystemConstant.TYPE, SystemConstant.OSS);
|
|
jsonObject.put(SystemConstant.TYPE, SystemConstant.OSS);
|
|
jsonObject.put(SystemConstant.PATH, dirName);
|
|
jsonObject.put(SystemConstant.PATH, dirName);
|
|
jsonObject.put(SystemConstant.UPLOAD_TYPE, UploadFileEnum.FILE);
|
|
jsonObject.put(SystemConstant.UPLOAD_TYPE, UploadFileEnum.FILE);
|
|
@@ -816,11 +817,11 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
.add(SystemConstant.TEMP_FILES_DIR).add(File.separator)
|
|
.add(SystemConstant.TEMP_FILES_DIR).add(File.separator)
|
|
.add((String) jsonObject.get(SystemConstant.PATH));
|
|
.add((String) jsonObject.get(SystemConstant.PATH));
|
|
// sourceFiles.add(ossUtil.ossDownload((String) jsonObject.get(SystemConstant.PATH), stringJoinerPdf.toString()));
|
|
// sourceFiles.add(ossUtil.ossDownload((String) jsonObject.get(SystemConstant.PATH), stringJoinerPdf.toString()));
|
|
- sourceFiles.add(fileStoreUtil.ossDownload((String) jsonObject.get(SystemConstant.PATH), stringJoinerPdf.toString(),uploadFileEnum.getFssType()));
|
|
|
|
|
|
+ sourceFiles.add(fileStoreUtil.ossDownload((String) jsonObject.get(SystemConstant.PATH), stringJoinerPdf.toString(), uploadFileEnum.getFssType()));
|
|
}
|
|
}
|
|
FileUtil.doZip(zipFile, sourceFiles);
|
|
FileUtil.doZip(zipFile, sourceFiles);
|
|
// ossUtil.ossUpload(dirName.toString(), zipFile, BinaryUtil.toBase64String(HexUtils.decodeHex(DigestUtils.md5Hex(new FileInputStream(zipFile)))));
|
|
// ossUtil.ossUpload(dirName.toString(), zipFile, BinaryUtil.toBase64String(HexUtils.decodeHex(DigestUtils.md5Hex(new FileInputStream(zipFile)))));
|
|
- fileStoreUtil.ossUpload(dirName.toString(), zipFile, BinaryUtil.toBase64String(HexUtils.decodeHex(DigestUtils.md5Hex(new FileInputStream(zipFile)))),fileStoreUtil.getUploadEnumByPath(dirName.toString()).getFssType());
|
|
|
|
|
|
+ fileStoreUtil.ossUpload(dirName.toString(), zipFile, BinaryUtil.toBase64String(HexUtils.decodeHex(DigestUtils.md5Hex(new FileInputStream(zipFile)))), fileStoreUtil.getUploadEnumByPath(dirName.toString()).getFssType());
|
|
JSONObject jsonObject = new JSONObject();
|
|
JSONObject jsonObject = new JSONObject();
|
|
jsonObject.put(SystemConstant.PATH, dirName.toString());
|
|
jsonObject.put(SystemConstant.PATH, dirName.toString());
|
|
jsonObject.put(SystemConstant.TYPE, SystemConstant.OSS);
|
|
jsonObject.put(SystemConstant.TYPE, SystemConstant.OSS);
|
|
@@ -903,7 +904,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
UploadFileEnum uploadFileEnum = UploadFileEnum.valueOf((String) jsonObject.get(SystemConstant.UPLOAD_TYPE));
|
|
UploadFileEnum uploadFileEnum = UploadFileEnum.valueOf((String) jsonObject.get(SystemConstant.UPLOAD_TYPE));
|
|
String paperPath = firstPath + File.separator + "试卷" + File.separator + paperAttachment.getName() + paperAttachment.getType();
|
|
String paperPath = firstPath + File.separator + "试卷" + File.separator + paperAttachment.getName() + paperAttachment.getType();
|
|
// ossUtil.ossDownload((String) jsonObject.get(SystemConstant.PATH), paperPath);
|
|
// ossUtil.ossDownload((String) jsonObject.get(SystemConstant.PATH), paperPath);
|
|
- fileStoreUtil.ossDownload((String) jsonObject.get(SystemConstant.PATH), paperPath,uploadFileEnum.getFssType());
|
|
|
|
|
|
+ fileStoreUtil.ossDownload((String) jsonObject.get(SystemConstant.PATH), paperPath, uploadFileEnum.getFssType());
|
|
count++;
|
|
count++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -926,7 +927,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
UploadFileEnum uploadFileEnum = UploadFileEnum.valueOf((String) jsonObject.get(SystemConstant.UPLOAD_TYPE));
|
|
UploadFileEnum uploadFileEnum = UploadFileEnum.valueOf((String) jsonObject.get(SystemConstant.UPLOAD_TYPE));
|
|
String confirmPath = firstPath + File.separator + "审核样本" + File.separator + confirmAttachment.getName() + confirmAttachment.getType();
|
|
String confirmPath = firstPath + File.separator + "审核样本" + File.separator + confirmAttachment.getName() + confirmAttachment.getType();
|
|
// ossUtil.ossDownload((String) jsonObject.get(SystemConstant.PATH), confirmPath);
|
|
// ossUtil.ossDownload((String) jsonObject.get(SystemConstant.PATH), confirmPath);
|
|
- fileStoreUtil.ossDownload((String) jsonObject.get(SystemConstant.PATH), confirmPath,uploadFileEnum.getFssType());
|
|
|
|
|
|
+ fileStoreUtil.ossDownload((String) jsonObject.get(SystemConstant.PATH), confirmPath, uploadFileEnum.getFssType());
|
|
count++;
|
|
count++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -959,7 +960,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
String cardPath = firstPath + File.separator + "题卡" + File.separator + cardAttachment.getName() + cardAttachment.getType();
|
|
String cardPath = firstPath + File.separator + "题卡" + File.separator + cardAttachment.getName() + cardAttachment.getType();
|
|
UploadFileEnum uploadFileEnum = UploadFileEnum.valueOf((String) jsonObject.get(SystemConstant.UPLOAD_TYPE));
|
|
UploadFileEnum uploadFileEnum = UploadFileEnum.valueOf((String) jsonObject.get(SystemConstant.UPLOAD_TYPE));
|
|
// ossUtil.ossDownload((String) jsonObject.get(SystemConstant.PATH), cardPath);
|
|
// ossUtil.ossDownload((String) jsonObject.get(SystemConstant.PATH), cardPath);
|
|
- fileStoreUtil.ossDownload((String) jsonObject.get(SystemConstant.PATH), cardPath,uploadFileEnum.getFssType());
|
|
|
|
|
|
+ fileStoreUtil.ossDownload((String) jsonObject.get(SystemConstant.PATH), cardPath, uploadFileEnum.getFssType());
|
|
} else {
|
|
} else {
|
|
List<ExamCardDetail> examCardDetailList = examCardDetailService.list(new QueryWrapper<ExamCardDetail>().lambda().eq(ExamCardDetail::getCardId, cardId));
|
|
List<ExamCardDetail> examCardDetailList = examCardDetailService.list(new QueryWrapper<ExamCardDetail>().lambda().eq(ExamCardDetail::getCardId, cardId));
|
|
if (examCardDetailList.size() != 1) {
|
|
if (examCardDetailList.size() != 1) {
|
|
@@ -979,7 +980,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
}
|
|
}
|
|
ZipUtil.zip(zipLocalRootPath, zipFile.getPath(), false);
|
|
ZipUtil.zip(zipLocalRootPath, zipFile.getPath(), false);
|
|
// ossUtil.ossUpload(dirNameTmp, zipFile, BinaryUtil.toBase64String(HexUtils.decodeHex(DigestUtils.md5Hex(new FileInputStream(zipFile)))));
|
|
// ossUtil.ossUpload(dirNameTmp, zipFile, BinaryUtil.toBase64String(HexUtils.decodeHex(DigestUtils.md5Hex(new FileInputStream(zipFile)))));
|
|
- fileStoreUtil.ossUpload(dirNameTmp, zipFile, BinaryUtil.toBase64String(HexUtils.decodeHex(DigestUtils.md5Hex(new FileInputStream(zipFile)))),fileStoreUtil.getUploadEnumByPath(dirNameTmp).getFssType());
|
|
|
|
|
|
+ fileStoreUtil.ossUpload(dirNameTmp, zipFile, BinaryUtil.toBase64String(HexUtils.decodeHex(DigestUtils.md5Hex(new FileInputStream(zipFile)))), fileStoreUtil.getUploadEnumByPath(dirNameTmp).getFssType());
|
|
JSONObject jsonObject = new JSONObject();
|
|
JSONObject jsonObject = new JSONObject();
|
|
jsonObject.put(SystemConstant.PATH, dirNameTmp);
|
|
jsonObject.put(SystemConstant.PATH, dirNameTmp);
|
|
jsonObject.put(SystemConstant.TYPE, SystemConstant.OSS);
|
|
jsonObject.put(SystemConstant.TYPE, SystemConstant.OSS);
|
|
@@ -1033,7 +1034,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
UploadFileEnum uploadFileEnum = UploadFileEnum.valueOf((String) jsonObject.get(SystemConstant.UPLOAD_TYPE));
|
|
UploadFileEnum uploadFileEnum = UploadFileEnum.valueOf((String) jsonObject.get(SystemConstant.UPLOAD_TYPE));
|
|
|
|
|
|
// ossUtil.ossDownload((String) jsonObject.get(SystemConstant.PATH), paperPath);
|
|
// ossUtil.ossDownload((String) jsonObject.get(SystemConstant.PATH), paperPath);
|
|
- fileStoreUtil.ossDownload((String) jsonObject.get(SystemConstant.PATH), paperPath,uploadFileEnum.getFssType());
|
|
|
|
|
|
+ fileStoreUtil.ossDownload((String) jsonObject.get(SystemConstant.PATH), paperPath, uploadFileEnum.getFssType());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1084,7 +1085,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
|
|
|
|
ZipUtil.zip(zipLocalRootPath, zipFile.getPath(), false);
|
|
ZipUtil.zip(zipLocalRootPath, zipFile.getPath(), false);
|
|
// ossUtil.ossUpload(dirNameTmp, zipFile, BinaryUtil.toBase64String(HexUtils.decodeHex(DigestUtils.md5Hex(new FileInputStream(zipFile)))));
|
|
// ossUtil.ossUpload(dirNameTmp, zipFile, BinaryUtil.toBase64String(HexUtils.decodeHex(DigestUtils.md5Hex(new FileInputStream(zipFile)))));
|
|
- fileStoreUtil.ossUpload(dirNameTmp, zipFile, BinaryUtil.toBase64String(HexUtils.decodeHex(DigestUtils.md5Hex(new FileInputStream(zipFile)))),fileStoreUtil.getUploadEnumByPath(dirNameTmp).getFssType());
|
|
|
|
|
|
+ fileStoreUtil.ossUpload(dirNameTmp, zipFile, BinaryUtil.toBase64String(HexUtils.decodeHex(DigestUtils.md5Hex(new FileInputStream(zipFile)))), fileStoreUtil.getUploadEnumByPath(dirNameTmp).getFssType());
|
|
JSONObject jsonObject = new JSONObject();
|
|
JSONObject jsonObject = new JSONObject();
|
|
jsonObject.put(SystemConstant.PATH, dirNameTmp);
|
|
jsonObject.put(SystemConstant.PATH, dirNameTmp);
|
|
jsonObject.put(SystemConstant.TYPE, SystemConstant.OSS);
|
|
jsonObject.put(SystemConstant.TYPE, SystemConstant.OSS);
|
|
@@ -1102,12 +1103,16 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
public Map<String, Object> executeImportBasicStudentLogic(Map<String, Object> map) throws Exception {
|
|
public Map<String, Object> executeImportBasicStudentLogic(Map<String, Object> map) throws Exception {
|
|
InputStream inputStream = (InputStream) map.get("inputStream");
|
|
InputStream inputStream = (InputStream) map.get("inputStream");
|
|
System.out.println(inputStream);
|
|
System.out.println(inputStream);
|
|
- List<LinkedMultiValueMap<Integer, Object>> finalList = ExcelUtil.excelReader(inputStream, Lists.newArrayList(BasicStudentImportDto.class), (finalExcelList, finalColumnNameList, finalExcelErrorList) -> {
|
|
|
|
|
|
+ List<LinkedMultiValueMap<Integer, Object>> finalList = ExcelUtil.excelReader(inputStream, Lists.newArrayList(BasicStudentImportDto.class,DescribeImportDto.class), (finalExcelList, finalColumnNameList, finalExcelErrorList) -> {
|
|
List<ExcelError> excelErrorTemp = new ArrayList<>();
|
|
List<ExcelError> excelErrorTemp = new ArrayList<>();
|
|
Map<String, String> checkMap = new HashMap<>();
|
|
Map<String, String> checkMap = 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);
|
|
List<Object> basicStudentImportDtoList = excelMap.get(i);
|
|
List<Object> basicStudentImportDtoList = excelMap.get(i);
|
|
|
|
+ assert basicStudentImportDtoList != null;
|
|
|
|
+ if (basicStudentImportDtoList.get(0) instanceof DescribeImportDto){
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
for (int y = 0; y < Objects.requireNonNull(basicStudentImportDtoList).size(); y++) {
|
|
for (int y = 0; y < Objects.requireNonNull(basicStudentImportDtoList).size(); y++) {
|
|
BasicStudentImportDto basicStudentImportDto = (BasicStudentImportDto) basicStudentImportDtoList.get(y);
|
|
BasicStudentImportDto basicStudentImportDto = (BasicStudentImportDto) basicStudentImportDtoList.get(y);
|
|
String studentName = basicStudentImportDto.getStudentName();
|
|
String studentName = basicStudentImportDto.getStudentName();
|
|
@@ -1145,12 +1150,16 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
public Map<String, Object> executeImportBasicCourseLogic(Map<String, Object> map) throws Exception {
|
|
public Map<String, Object> executeImportBasicCourseLogic(Map<String, Object> map) throws Exception {
|
|
|
|
|
|
InputStream inputStream = (InputStream) map.get("inputStream");
|
|
InputStream inputStream = (InputStream) map.get("inputStream");
|
|
- List<LinkedMultiValueMap<Integer, Object>> finalList = ExcelUtil.excelReader(inputStream, Lists.newArrayList(BasicCourseImportDto.class), (finalExcelList, finalColumnNameList, finalExcelErrorList) -> {
|
|
|
|
|
|
+ List<LinkedMultiValueMap<Integer, Object>> finalList = ExcelUtil.excelReader(inputStream, Lists.newArrayList(BasicCourseImportDto.class, DescribeImportDto.class), (finalExcelList, finalColumnNameList, finalExcelErrorList) -> {
|
|
List<ExcelError> excelErrorTemp = new ArrayList<>();
|
|
List<ExcelError> excelErrorTemp = new ArrayList<>();
|
|
Map<String, String> checkMap = new HashMap<>();
|
|
Map<String, String> checkMap = 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);
|
|
List<Object> basicCourseImportDtoList = excelMap.get(i);
|
|
List<Object> basicCourseImportDtoList = excelMap.get(i);
|
|
|
|
+ assert basicCourseImportDtoList != null;
|
|
|
|
+ if (basicCourseImportDtoList.get(0) instanceof DescribeImportDto) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
for (int y = 0; y < Objects.requireNonNull(basicCourseImportDtoList).size(); y++) {
|
|
for (int y = 0; y < Objects.requireNonNull(basicCourseImportDtoList).size(); y++) {
|
|
BasicCourseImportDto basicCourseImportDto = (BasicCourseImportDto) basicCourseImportDtoList.get(y);
|
|
BasicCourseImportDto basicCourseImportDto = (BasicCourseImportDto) basicCourseImportDtoList.get(y);
|
|
String courseName = basicCourseImportDto.getCourseName();
|
|
String courseName = basicCourseImportDto.getCourseName();
|
|
@@ -1186,13 +1195,17 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
@Override
|
|
@Override
|
|
public Map<String, Object> executeImportSysUserLogic(Map<String, Object> map) throws Exception {
|
|
public Map<String, Object> executeImportSysUserLogic(Map<String, Object> map) throws Exception {
|
|
InputStream inputStream = (InputStream) map.get("inputStream");
|
|
InputStream inputStream = (InputStream) map.get("inputStream");
|
|
- List<LinkedMultiValueMap<Integer, Object>> finalList = ExcelUtil.excelReader(inputStream, Lists.newArrayList(SysUserImportDto.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,String> checkName = new HashMap<>();
|
|
|
|
- Map<String,String> checkCode = new HashMap<>();
|
|
|
|
|
|
+ Map<String, String> checkName = new HashMap<>();
|
|
|
|
+ Map<String, String> checkCode = 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);
|
|
List<Object> sysUserImportDtoList = excelMap.get(i);
|
|
List<Object> sysUserImportDtoList = excelMap.get(i);
|
|
|
|
+ assert sysUserImportDtoList != null;
|
|
|
|
+ if (sysUserImportDtoList.get(0) instanceof DescribeImportDto) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
for (int y = 0; y < Objects.requireNonNull(sysUserImportDtoList).size(); y++) {
|
|
for (int y = 0; y < Objects.requireNonNull(sysUserImportDtoList).size(); y++) {
|
|
SysUserImportDto sysUserImportDto = (SysUserImportDto) sysUserImportDtoList.get(y);
|
|
SysUserImportDto sysUserImportDto = (SysUserImportDto) sysUserImportDtoList.get(y);
|
|
String name = sysUserImportDto.getName();
|
|
String name = sysUserImportDto.getName();
|
|
@@ -1202,26 +1215,26 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
String roleName = sysUserImportDto.getRoleName();
|
|
String roleName = sysUserImportDto.getRoleName();
|
|
|
|
|
|
// 检验excel中
|
|
// 检验excel中
|
|
- if (checkName.containsKey(name)){
|
|
|
|
|
|
+ if (checkName.containsKey(name)) {
|
|
throw ExceptionResultEnum.ERROR.exception("导入的excel中包含在重复的【姓名】:" + name);
|
|
throw ExceptionResultEnum.ERROR.exception("导入的excel中包含在重复的【姓名】:" + name);
|
|
- }else {
|
|
|
|
- checkName.put(name,code);
|
|
|
|
|
|
+ } else {
|
|
|
|
+ checkName.put(name, code);
|
|
}
|
|
}
|
|
- if (checkCode.containsKey(code)){
|
|
|
|
|
|
+ if (checkCode.containsKey(code)) {
|
|
throw ExceptionResultEnum.ERROR.exception("导入的excel中包含在重复的【工号】:" + code);
|
|
throw ExceptionResultEnum.ERROR.exception("导入的excel中包含在重复的【工号】:" + code);
|
|
- }else {
|
|
|
|
- checkCode.put(code,name);
|
|
|
|
|
|
+ } else {
|
|
|
|
+ checkCode.put(code, name);
|
|
}
|
|
}
|
|
|
|
|
|
excelErrorTemp.addAll(ExcelUtil.checkExcelField(sysUserImportDto, y, i));
|
|
excelErrorTemp.addAll(ExcelUtil.checkExcelField(sysUserImportDto, y, i));
|
|
- if (Objects.isNull(code) || code.length() > 30 || !code.matches(SystemConstant.REGULAR_EXPRESSION_OF_CODE)){
|
|
|
|
- excelErrorTemp.add(new ExcelError(y + 1,"excel第" + (i + 1) + "个sheet第" + (y + 1) + "行[课程编号]不符合输入规范"));
|
|
|
|
|
|
+ if (Objects.isNull(code) || code.length() > 30 || !code.matches(SystemConstant.REGULAR_EXPRESSION_OF_CODE)) {
|
|
|
|
+ excelErrorTemp.add(new ExcelError(y + 1, "excel第" + (i + 1) + "个sheet第" + (y + 1) + "行[课程编号]不符合输入规范"));
|
|
}
|
|
}
|
|
- if (Objects.isNull(name) || name.length() > 30){
|
|
|
|
- excelErrorTemp.add(new ExcelError(y + 1,"excel第" + (i + 1) + "个sheet第" + (y + 1) + "行[课程名称]不符合输入规范"));
|
|
|
|
|
|
+ if (Objects.isNull(name) || name.length() > 30) {
|
|
|
|
+ excelErrorTemp.add(new ExcelError(y + 1, "excel第" + (i + 1) + "个sheet第" + (y + 1) + "行[课程名称]不符合输入规范"));
|
|
}
|
|
}
|
|
- if (Objects.isNull(phoneNumber) || !phoneNumber.matches(SystemConstant.REGULAR_EXPRESSION_OF_PHONE)){
|
|
|
|
- excelErrorTemp.add(new ExcelError(y + 1,"excel第" + (i + 1) + "个sheet第" + (y + 1) + "行[电话号码]不符合输入规范"));
|
|
|
|
|
|
+ if (Objects.isNull(phoneNumber) || !phoneNumber.matches(SystemConstant.REGULAR_EXPRESSION_OF_PHONE)) {
|
|
|
|
+ excelErrorTemp.add(new ExcelError(y + 1, "excel第" + (i + 1) + "个sheet第" + (y + 1) + "行[电话号码]不符合输入规范"));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1230,7 +1243,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
}
|
|
}
|
|
return finalExcelList;
|
|
return finalExcelList;
|
|
});
|
|
});
|
|
- return sysUserService.executeSysUserImportLogic(finalList,map);
|
|
|
|
|
|
+ return sysUserService.executeSysUserImportLogic(finalList, map);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|