Commit c24a569e by liuzz

校验长度汉字x3

parent f8879e66
......@@ -543,7 +543,7 @@ public class ExcelDataServiceImpl extends ServiceImpl<ExcelDataMapper, ExcelData
vo.addValue(cellValue);
}
} else if (StringUtils.containsIgnoreCase(vo.getFieldType(), "VARCHAR")) {
if (l < cellValue.length()) {
if (l < cellValue.length() * 3) {
errorList.add( StrFormatter.format("字段数据:[{}],字段类型:[{}],字段名称:[{}],数据位置:[{}],数据长度不足",
cellValue, vo.getFieldType(), vo.getFieldName(),new CellReference(cell.getRowIndex(),cell.getColumnIndex()).formatAsString()));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment