|  |  |  | 
|---|
|  |  |  | package com.ruoyi.order.controller; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.RequestMapping; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.RestController; | 
|---|
|  |  |  | import com.ruoyi.common.core.domain.R; | 
|---|
|  |  |  | 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> | 
|---|
|  |  |  | 
|---|
|  |  |  | * @author xiaochen | 
|---|
|  |  |  | * @since 2024-08-07 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Api(tags = "充电订单计费策略明细") | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | @RequestMapping("/t-charging-order-accounting-strategy") | 
|---|
|  |  |  | public class TChargingOrderAccountingStrategyController { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Resource | 
|---|
|  |  |  | private TChargingOrderAccountingStrategyService chargingOrderAccountingStrategyService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 获取给定天数每天的充电量统计数据 | 
|---|
|  |  |  | * @param days 天数 | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ResponseBody | 
|---|
|  |  |  | @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); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|