| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.cloud.board; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.LoginNoRequired; |
| | | import com.doumee.core.haikang.model.param.respose.RegionDataRankingDataResponse; |
| | | import com.doumee.core.haikang.model.param.respose.RegionEnergyListResponse; |
| | | import com.doumee.service.business.third.model.ApiResponse; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.web.response.platformReport.*; |
| | | import com.doumee.service.business.third.BoardService; |
| | | import io.swagger.annotations.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2024/10/28 13:42 |
| | | */ |
| | | |
| | | @Api(tags = "ãçæ¿å¤§å±ãè½èçæ¿") |
| | | @RestController |
| | | @Slf4j |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/board/api/energy") |
| | | public class EnergyController extends BaseController { |
| | | @Autowired |
| | | private BoardService boardService; |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation("ä¸å¿æ°æ®") |
| | | @GetMapping("/centerData") |
| | | public ApiResponse<EnergyBoardVO> centerData() { |
| | | EnergyBoardVO data =boardService.centerEnergyData(); |
| | | return ApiResponse.success(data); |
| | | } |
| | | |
| | | |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation("ä¸å¿ç¨çµè½èæ°æ®") |
| | | @GetMapping("/regionDataRanking") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type", value = "æ¥è¯¢ç±»åï¼1=仿¥ï¼2=æ¬æï¼3=æ¨æ¥", required = true), |
| | | }) |
| | | public ApiResponse<List<RegionDataRankingDataResponse>> regionDataRanking(@RequestParam Integer type) { |
| | | return ApiResponse.success(boardService.getRegionDataRanking(type)); |
| | | } |
| | | |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation("ç¨çµæ»è½è忝ãç¯æ¯ååºåç¨çµééå") |
| | | @GetMapping("/energyRegionData") |
| | | public ApiResponse< RegionEnergyListResponse> energyRegionData() { |
| | | RegionEnergyListResponse data=boardService.energyRegionData(); |
| | | return ApiResponse.success(data); |
| | | } |
| | | |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation("宿¶è´è·æ²çº¿") |
| | | @GetMapping("/loadCurve") |
| | | public ApiResponse<List<EnergyDataVO>> loadCurve() { |
| | | List<EnergyDataVO> loadCurveList =boardService.loadEnergyCurve(); |
| | | return ApiResponse.success(loadCurveList); |
| | | } |
| | | |
| | | |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation("æè½èãæ²¹èåæ") |
| | | @GetMapping("/energyDataList") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type", value = "æ¥è¯¢ç±»åï¼0=æ°´ï¼1=æ°ï¼2=æ²¹èï¼3=ç¨çµ", required = true), |
| | | }) |
| | | public ApiResponse<List<EnergyDataVO>> energyDataList(@RequestParam Integer type) { |
| | | List<EnergyDataVO> energyDataVOList = boardService.energyDataList(type); |
| | | return ApiResponse.success(energyDataVOList); |
| | | } |
| | | |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation("ä¸ææ²¹èæè¡") |
| | | @GetMapping("/lastMonthOil") |
| | | public ApiResponse<List<OilDataVO>> lastMonthOil() { |
| | | List<OilDataVO> oilDataVOList = boardService.energyLastMonthOilSort(); |
| | | return ApiResponse.success(oilDataVOList); |
| | | } |
| | | } |