无关风月
2024-10-23 02aa8adb8ce9ca916dd1ef0afd2adbea54dd1ee6
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ChargingBillController.java
@@ -73,18 +73,13 @@
    public R<AccountListVO> accountBillList(@RequestBody ChargingListQuery dto) {
        AccountListVO accountListVO = new AccountListVO();
        ChargingBillVO res = chargingBillService.chargingBillList1(dto);
        ChargingBillVO res1 = chargingBillService.chargingBillList1(dto);
        List<ChargingBillListVO> records = res1.getList().getRecords();
        List<ChargingBillListVO> records = res.getList().getRecords();
        accountListVO.setBillCount(records.size());
        accountListVO.setTotalAmount(
                res1.getPaymentAmount().subtract(res1.getRefundAmount()==null?BigDecimal.ZERO:res1.getRefundAmount())
                        .subtract(res1.getCommissionAmount()==null?BigDecimal.ZERO:res1.getCommissionAmount())
                        .subtract(res1.getSharingAmount()==null?BigDecimal.ZERO:res1.getSharingAmount()));
        accountListVO.setPaymentAmount(res1.getPaymentAmount());
        accountListVO.setRefundAmount(res1.getRefundAmount());
        accountListVO.setCommissionAmount(res1.getCommissionAmount());
        accountListVO.setSharingAmount(res1.getSharingAmount());
        accountListVO.setTotalAmount(res.getOrderAmount());
        accountListVO.setPaymentAmount(res.getPaymentAmount());
        accountListVO.setRefundAmount(res.getRefundAmount());
        accountListVO.setCommissionAmount(res.getCommissionAmount());
        accountListVO.setSharingAmount(res.getSharingAmount());
        accountListVO.setList(res.getList());
        return R.ok(accountListVO);
    }