时间格式 @param v 值 @param excelCheck 注解 @param i 行数 @param fieldName excel段名 @param errList 错误信息集合
(Object v, ExcelCheck excelCheck, int i, String fieldName, List<String> errList)
| 163 | * @param errList 错误信息集合 |
| 164 | */ |
| 165 | private static void dateFormat(Object v, ExcelCheck excelCheck, int i, String fieldName, List<String> errList) { |
| 166 | if (ObjectUtil.isEmpty(excelCheck.dateFormat()) || v instanceof Date || ObjectUtil.isNotEmpty(v)) { |
| 167 | return; |
| 168 | } |
| 169 | if (!isDate(v.toString(), excelCheck.dateFormat(), excelCheck.dateFormat().length())) { |
| 170 | StringBuilder err = new StringBuilder("第").append(i).append("行,").append(fieldName).append("时间格式不是:").append(excelCheck.dateFormat()).append(";"); |
| 171 | errList.add(err.toString()); |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | /** |
| 176 | * 小数长度 |