|
@@ -24,10 +24,7 @@ import com.qmth.teachcloud.common.annotation.ExcelDBFieldDesc;
|
|
import com.qmth.teachcloud.common.bean.dto.excel.*;
|
|
import com.qmth.teachcloud.common.bean.dto.excel.*;
|
|
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;
|
|
-import com.qmth.teachcloud.common.entity.BasicAttachment;
|
|
|
|
-import com.qmth.teachcloud.common.entity.BasicSchool;
|
|
|
|
-import com.qmth.teachcloud.common.entity.SysUser;
|
|
|
|
-import com.qmth.teachcloud.common.entity.TBTask;
|
|
|
|
|
|
+import com.qmth.teachcloud.common.entity.*;
|
|
import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
|
|
import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
|
|
import com.qmth.teachcloud.common.enums.FlowStatusEnum;
|
|
import com.qmth.teachcloud.common.enums.FlowStatusEnum;
|
|
import com.qmth.teachcloud.common.enums.PageSizeEnum;
|
|
import com.qmth.teachcloud.common.enums.PageSizeEnum;
|
|
@@ -1325,6 +1322,38 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
if (finalExcelErrorList.size() > 0) {
|
|
if (finalExcelErrorList.size() > 0) {
|
|
throw ExceptionResultEnum.ERROR.exception(JSONObject.toJSONString(finalExcelErrorList));
|
|
throw ExceptionResultEnum.ERROR.exception(JSONObject.toJSONString(finalExcelErrorList));
|
|
}
|
|
}
|
|
|
|
+ List<ExcelError> excelErrorTemp = new ArrayList<>();
|
|
|
|
+ for (int i = 0; i < finalExcelList.size(); i++) {
|
|
|
|
+ LinkedMultiValueMap<Integer, Object> excelMap = finalExcelList.get(i);
|
|
|
|
+ List<Object> statisticsTempList = excelMap.get(i);
|
|
|
|
+ for (int y = 0; y < statisticsTempList.size(); y++) {
|
|
|
|
+ StatisticsImportDto statisticsImportDto = (StatisticsImportDto) statisticsTempList.get(y);
|
|
|
|
+
|
|
|
|
+// if (StringUtils.isBlank(userImportDto.getTicketNumber())) {
|
|
|
|
+// excelErrorTemp.add(new ExcelError(y + 1, "excel第" + (i + 1) + "个sheet第" + (y + 1) + "行[准考证号]必填"));
|
|
|
|
+// }
|
|
|
|
+// if (StringUtils.isBlank(userImportDto.getCourseCode())) {
|
|
|
|
+// excelErrorTemp.add(new ExcelError(y + 1, "excel第" + (i + 1) + "个sheet第" + (y + 1) + "行[课程代码]必填"));
|
|
|
|
+// }
|
|
|
|
+// if (StringUtils.isBlank(userImportDto.getCourseName())) {
|
|
|
|
+// excelErrorTemp.add(new ExcelError(y + 1, "excel第" + (i + 1) + "个sheet第" + (y + 1) + "行[课程名称]必填"));
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// // 课程是否存在并且与名称对应
|
|
|
|
+// QueryWrapper<BasicCourse> queryWrapper = new QueryWrapper<>();
|
|
|
|
+// queryWrapper.lambda().eq(BasicCourse::getSchoolId, schoolId).eq(BasicCourse::getCode, userImportDto.getCourseCode());
|
|
|
|
+// BasicCourse course = basicCourseService.getOne(queryWrapper);
|
|
|
|
+// if (course == null) {
|
|
|
|
+// excelErrorTemp.add(new ExcelError(y + 1, "excel第" + (i + 1) + "个sheet第" + (y + 1) + "行[课程代码]在系统中不存在"));
|
|
|
|
+// } else if (!course.getName().equals(userImportDto.getCourseName())) {
|
|
|
|
+// excelErrorTemp.add(new ExcelError(y + 1, "excel第" + (i + 1) + "个sheet第" + (y + 1) + "行[课程名称]与系统中不匹配"));
|
|
|
|
+// }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (excelErrorTemp.size() > 0) {
|
|
|
|
+ List<String> errors = excelErrorTemp.stream().map(m -> m.getExcelErrorType()).collect(Collectors.toList());
|
|
|
|
+ throw ExceptionResultEnum.ERROR.exception(JSONObject.toJSONString(errors));
|
|
|
|
+ }
|
|
return finalExcelList;
|
|
return finalExcelList;
|
|
});
|
|
});
|
|
return map;
|
|
return map;
|