}
public void addColumns(PdfPTable t, Map<String, ColInfo> cols) {
if (cols != null) {
for (Entry<String, ColInfo> entry : cols.entrySet()) {
ColInfo colInfo = entry.getValue();
if (colInfo == null) {
LOG.warn("字段【{}】为空!!", entry.getKey());
continue;
}
boolean nullable = colInfo.isNullable();
addCell(t, colInfo.getName(), nullable);
addCell(t, colInfo.getCode(), nullable);
addCell(t, colInfo.getType(), nullable);
addCell(t, nullable ? "可选" : "必填", nullable);
addCell(t, colInfo.getDesc(), nullable);
}
}
}