|
|
|
@ -582,16 +582,16 @@ public class CollectController extends Controller {
|
|
|
|
|
if (allow_blank && StrKit.isBlank(obj.toString())) continue;
|
|
|
|
|
if (column_type.equals("Integer") && !CommonUtil.isInteger(obj.toString())) {//要求整数,实际不是整数
|
|
|
|
|
PoiUtil.addComment(wb, cell, "要求是整数,实际数据类型不是整数!");
|
|
|
|
|
PoiUtil.fillColor(wb, cell, IndexedColors.YELLOW.getIndex());
|
|
|
|
|
PoiUtil.fillColorWithOldStyle(cell, IndexedColors.YELLOW.getIndex());
|
|
|
|
|
flag = false;
|
|
|
|
|
} else if (column_type.equals("Double") && !CommonUtil.isDouble(obj.toString())) {//要求是浮点数,实际不是浮点数
|
|
|
|
|
PoiUtil.addComment(wb, cell, "要求是小数,实际数据类型不是小数!");
|
|
|
|
|
PoiUtil.fillColor(wb, cell, IndexedColors.YELLOW.getIndex());
|
|
|
|
|
PoiUtil.fillColorWithOldStyle(cell, IndexedColors.YELLOW.getIndex());
|
|
|
|
|
flag = false;
|
|
|
|
|
} else if (column_type.equals("Date")) {//要求是日期,实际不是日期
|
|
|
|
|
if (!CommonUtil.isDate(obj.toString())) {
|
|
|
|
|
PoiUtil.addComment(wb, cell, "要求是日期格式,实际数据类型不是日期格式!");
|
|
|
|
|
PoiUtil.fillColor(wb, cell, IndexedColors.YELLOW.getIndex());
|
|
|
|
|
PoiUtil.fillColorWithOldStyle(cell, IndexedColors.YELLOW.getIndex());
|
|
|
|
|
flag = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|