Commit 01d7275f zshaohui

出入库导出

1 个父辈 6118c180
...@@ -634,7 +634,7 @@ public class InnerReportController { ...@@ -634,7 +634,7 @@ public class InnerReportController {
@RequestMapping("/getInAndOutCount/download") @RequestMapping("/getInAndOutCount/download")
@AnonymousAccess @AnonymousAccess
public void getInAndOutCountDownload(ReportQueryCondition queryCondition, HttpServletResponse response) { public void getInAndOutCountDownload(ReportQueryCondition queryCondition, HttpServletResponse response) {
ResultBean bean = getInAndOutCount(queryCondition); /*ResultBean bean = getInAndOutCount(queryCondition);
Map<String, Object> map = (Map<String, Object>) bean.getData(); Map<String, Object> map = (Map<String, Object>) bean.getData();
List<String> titleList = (List<String>) map.get("title"); List<String> titleList = (List<String>) map.get("title");
List<Integer> countList = (List<Integer>) map.get("count"); List<Integer> countList = (List<Integer>) map.get("count");
...@@ -648,6 +648,23 @@ public class InnerReportController { ...@@ -648,6 +648,23 @@ public class InnerReportController {
FileUtil.downloadCSV(results,titleList, response); FileUtil.downloadCSV(results,titleList, response);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
}*/
ResultBean bean = getInAndOutCount(queryCondition);
Map<String, Object> map = (Map<String, Object>) bean.getData();
List<String> titleList = (List<String>) map.get("title");
List<Integer> countList = (List<Integer>) map.get("count");
List<Map<String, Object>> results = new ArrayList<>();
Map<String, Object> resultMap = new LinkedHashMap<>();
for (int i = 0; i < titleList.size(); i++) {
resultMap.put(titleList.get(i), countList.get(i));
}
results.add(resultMap);
try {
FileUtil.downloadExcel(results, response);
} catch (IOException e) {
e.printStackTrace();
log.info("内仓出入库导出导出失败--" + e.getMessage());
} }
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!