增加导出功能
This commit is contained in:
+25
@@ -64,6 +64,31 @@ public final class OrderBillExportSupport
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/** Null/empty => export all columns; otherwise only named Java props. */
|
||||
public static String[] toExportFieldArray(List<String> exportFields)
|
||||
{
|
||||
if (exportFields == null || exportFields.isEmpty())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
List<String> cleaned = new ArrayList<String>();
|
||||
for (String f : exportFields)
|
||||
{
|
||||
if (f == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
String t = f.trim();
|
||||
if (t.isEmpty() || cleaned.contains(t))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
cleaned.add(t);
|
||||
}
|
||||
return cleaned.isEmpty() ? null : cleaned.toArray(new String[cleaned.size()]);
|
||||
}
|
||||
|
||||
private static boolean hasTexts(List<?> list)
|
||||
{
|
||||
if (list == null || list.isEmpty())
|
||||
|
||||
Reference in New Issue
Block a user