增加导出功能

This commit is contained in:
wuweihua
2026-10-26 16:20:46 +08:00
parent 7f4fc3df8c
commit 76cc5b5781
16 changed files with 801 additions and 10 deletions
@@ -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())