| | |
| | | package com.ruoyi.order.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.order.api.model.TChargingOrderAccountingStrategy; |
| | | import com.ruoyi.order.service.TChargingOrderAccountingStrategyService; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @GetMapping("/getTotalElectricQuantity/{days}") |
| | | public R<List<List<Map<String, Object>>>> getTotalElectricQuantity(@PathVariable Integer days){ |
| | | List<List<Map<String, Object>>> list = chargingOrderAccountingStrategyService.getTotalElectricQuantity(days); |
| | | @PostMapping("/getTotalElectricQuantity/{days}") |
| | | public R<List<List<Map<String, Object>>>> getTotalElectricQuantity(@PathVariable Integer days, @RequestParam("siteIds") Set<Integer> siteIds){ |
| | | List<List<Map<String, Object>>> list = chargingOrderAccountingStrategyService.getTotalElectricQuantity(days, siteIds); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取给定天数每天的充电度数 |
| | | * @param days 天数 |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/getDailyChargingDegree/{days}") |
| | | public R<List<Double>> getDailyChargingDegree(@PathVariable Integer days, @RequestParam("siteIds") Set<Integer> siteIds){ |
| | | List<Double> list = chargingOrderAccountingStrategyService.getDailyChargingDegree(days, siteIds); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 根据订单id查询充电明细 |
| | | * @param chargingOrderId |
| | | * @return |
| | | */ |
| | | @PostMapping("/getChargingOrderAccountingStrategyByOrderId") |
| | | public R<List<TChargingOrderAccountingStrategy>> getChargingOrderAccountingStrategyByOrderId(@RequestParam("chargingOrderId") Long chargingOrderId){ |
| | | List<TChargingOrderAccountingStrategy> list = chargingOrderAccountingStrategyService.list(new LambdaQueryWrapper<TChargingOrderAccountingStrategy>().eq(TChargingOrderAccountingStrategy::getChargingOrderId, chargingOrderId)); |
| | | return R.ok(list); |
| | | } |
| | | } |