|
|
@ -339,48 +339,6 @@ public class ManualAthensThread extends BaseThread { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 递归导出数据到excel文件,防止jvm oom |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param pramsMap |
|
|
|
|
|
|
|
* 查询数据参数集合 |
|
|
|
|
|
|
|
* @param curr |
|
|
|
|
|
|
|
* 当前第几页 |
|
|
|
|
|
|
|
* @param excelFile |
|
|
|
|
|
|
|
* 导出的文件 |
|
|
|
|
|
|
|
* @param writer |
|
|
|
|
|
|
|
* @throws Exception |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private boolean detailCicleExport(Map<String, Object> pramsMap, int curr, String excelFile, OutputStream out, |
|
|
|
|
|
|
|
ExcelWriter writer) throws Exception { |
|
|
|
|
|
|
|
// 查询指定页数的数据
|
|
|
|
|
|
|
|
JSONObject pageData = rzFpxxService.getTaxRebateList(pramsMap, curr, default_size); |
|
|
|
|
|
|
|
boolean hasNext = pageData.getBooleanValue("hasNext"); |
|
|
|
|
|
|
|
List<String[]> dataList = (List<String[]>)pageData.get("datalist"); |
|
|
|
|
|
|
|
boolean firstPage = false; |
|
|
|
|
|
|
|
if (curr == default_curr) { |
|
|
|
|
|
|
|
firstPage = true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 数据不是最后一页
|
|
|
|
|
|
|
|
if (hasNext) { |
|
|
|
|
|
|
|
int nextPage = pageData.getIntValue("nextPage"); |
|
|
|
|
|
|
|
// 写入当前页数据
|
|
|
|
|
|
|
|
exportListArrayToExcel(excelFile, title, detailTitleColumns, dataList, firstPage, false, 2, "货物信息", out, |
|
|
|
|
|
|
|
writer); |
|
|
|
|
|
|
|
// 更新页数
|
|
|
|
|
|
|
|
return detailCicleExport(pramsMap, nextPage, excelFile, out, writer); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
// 写入最后一页数据
|
|
|
|
|
|
|
|
exportListArrayToExcel(excelFile, title, detailTitleColumns, dataList, firstPage, true, 2, "货物信息", out, |
|
|
|
|
|
|
|
writer); |
|
|
|
|
|
|
|
return hasNext; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void exportListArrayToExcel(String excelFile, String title, String[] titleColumns, List<String[]> dataList, |
|
|
|
public void exportListArrayToExcel(String excelFile, String title, String[] titleColumns, List<String[]> dataList, |
|
|
|
boolean firstPage, boolean lastPage, int sheetNo, String sheetName, OutputStream out, ExcelWriter writer) { |
|
|
|
boolean firstPage, boolean lastPage, int sheetNo, String sheetName, OutputStream out, ExcelWriter writer) { |
|
|
|
|
|
|
|
|
|
|
|