“`
customVo.getCname().matches(“^[a-zA-Z]*”);
//验证名字是否包含大小写
vos.getPosition() == null ? “” : vos.getPosition();
//判断该字段内容是否为null,避免空指针
SimpleDateFormat sdf = new SimpleDateFormat(“yyyy-MM-dd”);
Date date=sdf.parse(vos.getFinalDate);
//格式化时间,将String类型转换为年月日格式的时间
// 当数据量较大时,分批次处理,cell需要处理的数据
if (null != cell && cell.size() > 0) {
int pointsDataLimit = 1000;// 限制条数
Integer size = cell.size();//获取数据量
// 判断是否有必要分批,超过1000,则需要分批处理
if (pointsDataLimit < size) {
int part = size / pointsDataLimit;// 分批数
//循环处理
for (int i = 0; i < part; i++) {
// 1000条
/你需要处理的数据方法/
// 剔除已处理好的数据
cell.subList(0, pointsDataLimit).clear();
}
if (!cell.isEmpty()) {
System.out.println(cell);// 表示最后剩下的数据
/处理剩下的数据/
}
} else {
/无需分批处理方法/
}
}