package com.mh.user.controller; import com.mh.common.http.HttpResult; import com.mh.user.dto.EnergyPreDTO; import com.mh.user.service.HistoryDataPreService; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; /** * @author LJF * @version 1.0 * @project CHWS * @description 用能预测controller * @date 2024-05-09 17:24:48 */ @RestController @RequestMapping("/energyPre") public class EnergyPreController { @Resource private HistoryDataPreService historyDataPreService; @PostMapping("/topData") public HttpResult getTopData(String buildingId, String type) { return HttpResult.ok(historyDataPreService.getTopData(buildingId, type)); } @PostMapping("/echartData") public HttpResult getEnergyPre(String buildingId, String beginDate, String endDate, String type) { return HttpResult.ok(historyDataPreService.getEnergyPre(buildingId, beginDate, endDate, type)); } }