海南初始版本提交
This commit is contained in:
@@ -2,10 +2,7 @@ package com.njcn.device.biz.utils;
|
||||
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import com.njcn.system.enums.DicDataEnum;
|
||||
import com.njcn.system.pojo.po.Dic;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
|
||||
@@ -211,7 +208,13 @@ public class COverlimitUtil {
|
||||
}
|
||||
overlimit.buildIHarm(iHarmTem);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: iHarmCalculate
|
||||
* @Param: protocolCapacity 协议容量 devCapacity设备容量 calCap 短路容量
|
||||
* @return: float
|
||||
* @Author: clam
|
||||
* @Date: 2024/2/4
|
||||
*/
|
||||
private static float iHarmCalculate(int nHarm, Float voltageLevel,float protocolCapacity, float devCapacity,float calCap) {
|
||||
double tag = calCap*getHarmTag(nHarm,voltageLevel);
|
||||
Double limit = getHarmonicLimit(nHarm,tag,new BigDecimal(String.valueOf(devCapacity)).doubleValue(),new BigDecimal(String.valueOf(protocolCapacity)).doubleValue());
|
||||
|
||||
@@ -7,6 +7,8 @@ import com.njcn.device.pq.pojo.vo.TerminalTree;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
*
|
||||
@@ -21,4 +23,8 @@ public interface DeviceTreeClient {
|
||||
*/
|
||||
@GetMapping("/getTerminalTreeForFive")
|
||||
HttpResult<TerminalTree> getTerminalTreeForFive();
|
||||
|
||||
|
||||
@GetMapping("getTerminalTree")
|
||||
HttpResult<List<TerminalTree>> getTerminalTree();
|
||||
}
|
||||
|
||||
@@ -10,6 +10,8 @@ import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
*
|
||||
@@ -36,6 +38,12 @@ public class DeviceTreeClientFallbackFactory implements FallbackFactory<DeviceTr
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<TerminalTree>> getTerminalTree() {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取终端树",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user