1.pms电能质量综合评估功能兼容

This commit is contained in:
2024-11-06 11:13:18 +08:00
parent 7b6099e2dc
commit a608b3850c
24 changed files with 213 additions and 92 deletions

View File

@@ -5,6 +5,7 @@ import com.njcn.common.pojo.response.HttpResult;
import com.njcn.device.biz.commApi.fallback.CommLineClientFallbackFactory;
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
import com.njcn.device.biz.pojo.dto.LineDTO;
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -52,4 +53,8 @@ public interface CommLineClient {
@GetMapping("/getLineAllDetailList")
HttpResult<List<LineALLInfoDTO>> getLineAllDetailList(@RequestParam("ids") List<String> ids);
@PostMapping("/getLineInfo")
HttpResult<List<PollutionLineDTO>> getLineInfo(@RequestBody List<String> ids);
}

View File

@@ -6,6 +6,7 @@ import com.njcn.common.pojo.response.HttpResult;
import com.njcn.device.biz.commApi.CommLineClient;
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
import com.njcn.device.biz.pojo.dto.LineDTO;
import com.njcn.device.biz.pojo.dto.PollutionLineDTO;
import com.njcn.device.biz.utils.DeviceEnumUtil;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
@@ -56,6 +57,12 @@ public class CommLineClientFallbackFactory implements FallbackFactory<CommLineCl
throw new BusinessException(finalExceptionEnum);
}
@Override
public HttpResult<List<PollutionLineDTO>> getLineInfo(List<String> ids) {
log.error("{}异常,降级处理,异常为:{}", "获取监测点列表信息", throwable.toString());
throw new BusinessException(finalExceptionEnum);
}
};
}
}

View File

@@ -0,0 +1,45 @@
package com.njcn.device.biz.pojo.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/4/25 11:02
*/
@Data
public class PollutionLineDTO {
private static final long serialVersionUID = 1L;
@ApiModelProperty("id")
private String id;
@ApiModelProperty("名称")
private String name;
@ApiModelProperty("供电公司")
private String powerCompany;
@ApiModelProperty("变电站")
private String substation;
@ApiModelProperty("变电站id")
private String substationId;
@ApiModelProperty("母线")
private String busBar;
@ApiModelProperty("数据")
private Double data = 3.14159;
@Data
public static class PVPollution extends PollutionLineDTO{
@ApiModelProperty("变电站电压等级")
private String powerVoltageLevel;
}
}