From 06d3d15a5a08637041cc601101c063b11b07a346 Mon Sep 17 00:00:00 2001 From: net <net@netdeMBP.lan> Date: 星期五, 14 二月 2025 17:25:21 +0800 Subject: [PATCH] 合并理去杀杀人 --- zhitan-admin/src/main/java/com/zhitan/web/controller/energyMonitor/ElectricThreePhaseController.java | 65 ++++++++++++++++++++++++++++++++ 1 files changed, 65 insertions(+), 0 deletions(-) diff --git a/zhitan-admin/src/main/java/com/zhitan/web/controller/energyMonitor/ElectricThreePhaseController.java b/zhitan-admin/src/main/java/com/zhitan/web/controller/energyMonitor/ElectricThreePhaseController.java new file mode 100644 index 0000000..3a10efa --- /dev/null +++ b/zhitan-admin/src/main/java/com/zhitan/web/controller/energyMonitor/ElectricThreePhaseController.java @@ -0,0 +1,65 @@ +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)); + } + +} -- Gitblit v1.9.3