无关风月
2024-11-05 472fc1b5980db8cd69c77a5c1bcb8aded3d3b3a6
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TApplyChargingPileController.java
@@ -372,8 +372,6 @@
    public R downloadSettlementTotal(@RequestBody ExportUidDto uid,HttpServletResponse response)
    {
        SettlementTotalVO data = chargingOrderClient.settlementTotalR(uid.getTime()).getData();
        try {
            response.setCharacterEncoding(Constants.UTF8);
            response.setContentType("application/vnd.ms-excel");
@@ -392,7 +390,7 @@
                WriteSheet writeSheet = EasyExcel.writerSheet().build();
                FillConfig fillConfig = FillConfig.builder().direction(WriteDirectionEnum.VERTICAL).build();
                excelWriter.fill(new FillWrapper("data1", data.getList1()), fillConfig, writeSheet);
//                excelWriter.fill(new FillWrapper("data2", data.getList2()), fillConfig, writeSheet);
                excelWriter.fill(new FillWrapper("data2", data.getList2()), fillConfig, writeSheet);
                excelWriter.finish();
            } catch (Exception e) {
                return R.fail("excel导出失败!");
@@ -657,7 +655,8 @@
            response.setContentType("application/vnd.ms-excel");
            response.setHeader("Access-Control-Expose-Headers", "Content-disposition");
            response.setHeader("Content-Disposition", "attachment;filename=" +
                    URLEncoder.encode("月账单-"+data.getCategory()+data.getBillWeek()+data.getSiteName(), CharEncoding.UTF_8) + ".xlsx");
//                    URLEncoder.encode("月账单-"+data.getCategory()+data.getBillWeek()+data.getSiteName(), CharEncoding.UTF_8) + ".xlsx");
                    URLEncoder.encode("月账单", CharEncoding.UTF_8) + ".xlsx");
        } catch (UnsupportedEncodingException e) {
            return R.fail("excel导出失败!");
        }