¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.zhitan.web.controller.energyMonitor; |
| | | |
| | | import com.zhitan.common.annotation.Log; |
| | | import com.zhitan.common.core.controller.BaseController; |
| | | import com.zhitan.common.core.domain.AjaxResult; |
| | | import com.zhitan.energyMonitor.service.IElectricThreePhaseService; |
| | | import com.zhitan.model.domain.EnergyIndex; |
| | | import com.zhitan.model.service.IEnergyIndexService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description: ä¸ç¸ä¸å¹³è¡¡ |
| | | * @Author: yxw |
| | | * @Date: 2022-04-24 |
| | | * @Version: V1.2 |
| | | */ |
| | | @Api(tags = "ä¸ç¸ä¸å¹³è¡¡") |
| | | @RestController |
| | | @RequestMapping("/threePhaseUnbalanceAnalysis") |
| | | @Slf4j |
| | | public class ElectricThreePhaseController extends BaseController { |
| | | |
| | | @Autowired |
| | | private IElectricThreePhaseService electricThreePhaseService; |
| | | @Autowired |
| | | private IEnergyIndexService energyIndexService; |
| | | |
| | | /** |
| | | * è·åç¨è½åå
ä¸çæä¸ªçµè¡¨çä¸ç¸ä¸å¹³è¡¡æ°æ® |
| | | * |
| | | * @param nodeId èç¹id |
| | | * @param meterId çµè¡¨id |
| | | * @param timeType æ¶é´ç±»å DAY/MONTH/YEAR |
| | | * @param timeCode æ¶é´å¼ 䏿¶é´ç±»å对åºï¼2022-03-21/2022-03/2022 |
| | | * @param requestType 请æ±ç±»åï¼0.çµåï¼1.çµæµ |
| | | * @return |
| | | */ |
| | | @Log(title = "æ ¹æ®çµè¡¨idæ¥è¯¢ä¸ç¸ä¸å¹³è¡¡æ°æ®") |
| | | @ApiOperation(value = "æ ¹æ®çµè¡¨idæ¥è¯¢ä¸ç¸ä¸å¹³è¡¡æ°æ®", notes = "æ ¹æ®çµè¡¨idæ¥è¯¢ä¸ç¸ä¸å¹³è¡¡æ°æ®") |
| | | @GetMapping(value = "/detail") |
| | | public AjaxResult list(@RequestParam(name = "nodeId") String nodeId, |
| | | @RequestParam(name = "meterId") String meterId, |
| | | @RequestParam(name = "timeType") String timeType, |
| | | @RequestParam(name = "timeCode") String timeCode, |
| | | @RequestParam(name = "requestType") String requestType) { |
| | | if (ObjectUtils.isEmpty(meterId)){ |
| | | return AjaxResult.error("çµè¡¨idä¸è½ä¸ºç©º"); |
| | | } |
| | | |
| | | List<EnergyIndex> energyIndexList = energyIndexService.listDeviceIndex(nodeId, meterId); |
| | | |
| | | return AjaxResult.success(electricThreePhaseService.list(timeType, timeCode, energyIndexList, requestType, meterId)); |
| | | } |
| | | |
| | | } |