| | |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.common.log.annotation.Log; |
| | | import com.ruoyi.common.log.enums.BusinessType; |
| | | import com.ruoyi.order.api.model.ExportUidDto; |
| | | import com.ruoyi.order.api.model.TChargingBill; |
| | | import com.ruoyi.order.api.model.TChargingOrder; |
| | | import com.ruoyi.order.api.query.TOrderInvoiceQuery; |
| | |
| | | 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") |
| | |
| | | return R.ok(null); |
| | | } |
| | | @ApiOperation(value = "导出", tags = {"管理后台-充电算账单"}) |
| | | @PostMapping("/export") |
| | | @PutMapping("/export") |
| | | public void export(@RequestBody ChargingListQuery dto) |
| | | { |
| | | ChargingBillVO res = chargingBillService.chargingBillList(dto); |
| | |
| | | } |
| | | } |
| | | @ApiOperation(value = "下载-未出账", tags = {"管理后台-充电算账单"}) |
| | | @GetMapping("/download") |
| | | public void download(String uid) |
| | | @PutMapping("/download") |
| | | public void download(@RequestBody ExportUidDto uid) |
| | | { |
| | | List<ChargingBillExport> chargingBillExports = new ArrayList<>(); |
| | | List<ChargingBillRefundExport> chargingBillRefundExports = new ArrayList<>(); |
| | | List<ChargingBillPayExport> chargingBillPayExports = new ArrayList<>(); |
| | | TChargingBill byId = chargingBillService.getById(uid); |
| | | TChargingBill byId = chargingBillService.getById(uid.getUid()); |
| | | ChargingBillExport chargingBillExport = new ChargingBillExport(); |
| | | chargingBillExport.setCode(byId.getCode()); |
| | | // todo 确认商户类型 |