From 8a01a386da08eab56e112926b91359e24a2f7117 Mon Sep 17 00:00:00 2001 From: luodangjia <luodangjia> Date: 星期三, 11 九月 2024 09:29:16 +0800 Subject: [PATCH] 9.11 --- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ChargingBillController.java | 22 ++++++++++++++++++++-- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ChargingBillController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ChargingBillController.java index 7f4ca4e..4416b85 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ChargingBillController.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ChargingBillController.java @@ -18,6 +18,7 @@ import com.ruoyi.order.api.model.TChargingBill; import com.ruoyi.order.api.model.TChargingOrder; import com.ruoyi.order.api.query.TOrderInvoiceQuery; +import com.ruoyi.order.api.vo.AccountListVO; import com.ruoyi.order.api.vo.ChargingBillListVO; import com.ruoyi.order.api.vo.ChargingBillVO; import com.ruoyi.order.api.model.ChargingListQuery; @@ -66,7 +67,24 @@ @Resource private TChargingOrderService chargingOrderService; - + @PostMapping(value = "/accountBillList") + @ApiOperation(value = "列表查询", tags = {"管理后台-账户结算账单"}) + public R<AccountListVO> accountBillList(@RequestBody ChargingListQuery dto) { + AccountListVO accountListVO = new AccountListVO(); + ChargingBillVO res = chargingBillService.chargingBillList(dto); + dto.setPageCurr(1); + dto.setPageSize(99999999); + ChargingBillVO res1 = chargingBillService.chargingBillList(dto); + List<ChargingBillListVO> records = res1.getList().getRecords(); + accountListVO.setBillCount(records.size()); + accountListVO.setTotalAmount(res1.getPaymentAmount().subtract(res1.getRefundAmount()).subtract(res1.getCommissionAmount()).subtract(res1.getSharingAmount())); + accountListVO.setPaymentAmount(res1.getPaymentAmount()); + accountListVO.setRefundAmount(res1.getRefundAmount()); + accountListVO.setCommissionAmount(res1.getCommissionAmount()); + accountListVO.setSharingAmount(res1.getSharingAmount()); + accountListVO.setList(res.getList()); + return R.ok(accountListVO); + } @PostMapping(value = "/chargingBillList") @ApiOperation(value = "充电算帐单列表查询", tags = {"管理后台-充电算账单"}) public AjaxResult<ChargingBillVO> chargingBillList(@RequestBody ChargingListQuery dto) { @@ -128,7 +146,7 @@ response.setCharacterEncoding("utf-8"); ServletOutputStream outputStream = null; try { - String fileName = URLEncoder.encode("发票导出.xls", "utf-8"); + String fileName = URLEncoder.encode("月账单-"+res.getCategory()+"-"+res.getBillWeek()+"-"+res.getSiteName()+".xls", "utf-8"); response.setHeader("Content-Disposition", "attachment;filename=" + fileName); response.setContentType("application/vnd.ms-excel;charset=UTF-8"); response.setHeader("Pragma", "no-cache"); -- Gitblit v1.7.1