|
@@ -219,6 +219,7 @@ public class PoiUtils {
|
219
|
219
|
**/
|
220
|
220
|
public static String getCellValue(Cell cell){
|
221
|
221
|
String value = null;
|
|
222
|
+ if (cell == null) return value;
|
222
|
223
|
DecimalFormat df = new DecimalFormat("0"); //格式化number String字符
|
223
|
224
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); //日期格式化
|
224
|
225
|
DecimalFormat df2 = new DecimalFormat("0"); //格式化数字
|
|
@@ -294,6 +295,7 @@ public class PoiUtils {
|
294
|
295
|
**/
|
295
|
296
|
public static Map<String, Object> readAssess(MultipartFile file, Integer schoolid, AssessUserService assessService) {
|
296
|
297
|
Map<String, Object> resultMap = new HashMap<>();
|
|
298
|
+ Map<Integer, List<String>> errMsg = new LinkedHashMap<>();
|
297
|
299
|
try {
|
298
|
300
|
// 数据校验
|
299
|
301
|
isExcelEmpty(file);
|
|
@@ -312,7 +314,6 @@ public class PoiUtils {
|
312
|
314
|
|
313
|
315
|
// 导入用户信息
|
314
|
316
|
List<TAssessUser> users = new ArrayList<>();
|
315
|
|
- Map<Integer, List<String>> errMsg = new LinkedHashMap<>();
|
316
|
317
|
Map<String, Integer> grades = listGrade();
|
317
|
318
|
TSchool school = assessService.getSchoolById(schoolid);
|
318
|
319
|
List<SubjectVo> subject = assessService.listSubject(schoolid, school.getSchoollevel());
|
|
@@ -412,12 +413,12 @@ public class PoiUtils {
|
412
|
413
|
|
413
|
414
|
resultMap.put("code", 0);
|
414
|
415
|
resultMap.put("users", users);
|
415
|
|
- resultMap.put("errMsg", errMsg);
|
416
|
416
|
} catch (Exception e) {
|
417
|
417
|
resultMap.put("code", 1);
|
418
|
418
|
resultMap.put("msg", e.getMessage());
|
419
|
419
|
log.error("读取评价用户出错", e.getMessage());
|
420
|
420
|
}
|
|
421
|
+ resultMap.put("errMsg", errMsg);
|
421
|
422
|
return resultMap;
|
422
|
423
|
}
|
423
|
424
|
|