限值提交
This commit is contained in:
@@ -0,0 +1,107 @@
|
||||
package com.njcn.device.biz.commApi;
|
||||
|
||||
import cn.hutool.core.date.TimeInterval;
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.device.biz.commApi.fallback.CommTerminalGeneralClientFallbackFactory;
|
||||
import com.njcn.device.biz.pojo.dto.*;
|
||||
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2023/4/24
|
||||
*/
|
||||
@FeignClient(
|
||||
value = ServerInfo.DEVICE,
|
||||
path = "commTerminal",
|
||||
fallbackFactory = CommTerminalGeneralClientFallbackFactory.class)
|
||||
public interface CommTerminalGeneralClient {
|
||||
|
||||
|
||||
/**
|
||||
* 通过部门获取所有子级部门详情
|
||||
* @author cdf
|
||||
* @date 2023/5/15
|
||||
*/
|
||||
@PostMapping("getDeptChildrenByParent")
|
||||
HttpResult<List<DeptGetBase>> getDeptChildrenByParent(@RequestBody @Validated DeptGetLineParam deptGetLineParam);
|
||||
|
||||
|
||||
/**
|
||||
* 根据单位获取监测点信息
|
||||
* @author cdf
|
||||
* @date 2023/5/10
|
||||
*/
|
||||
@PostMapping("deptGetLine")
|
||||
HttpResult<List<DeptGetChildrenMoreDTO>> deptGetLine(@RequestBody @Validated DeptGetLineParam deptGetLineParam);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据单位获取所有变电站
|
||||
* @author cdf
|
||||
* @date 2023/5/10
|
||||
*/
|
||||
@PostMapping("deptGetSubStation")
|
||||
HttpResult<List<DeptGetSubStationDTO>> deptSubStation(@RequestBody @Validated DeptGetLineParam deptGetLineParam);
|
||||
|
||||
/**
|
||||
* 根据单位获取所有变电站
|
||||
* @author cdf
|
||||
* @date 2023/5/10
|
||||
*/
|
||||
@PostMapping("deptGetBusBar")
|
||||
HttpResult<List<DeptGetBusBarDTO>> deptBusBar(@RequestBody @Validated DeptGetLineParam deptGetLineParam);
|
||||
|
||||
|
||||
/**
|
||||
* 根据单位获取所有装置
|
||||
* @author cdf
|
||||
* @date 2023/5/10
|
||||
*/
|
||||
@PostMapping("deptGetDevice")
|
||||
HttpResult<List<DeptGetDeviceDTO>> deptGetDevice(@RequestBody @Validated DeptGetLineParam deptGetLineParam);
|
||||
|
||||
|
||||
/**
|
||||
* 根据单站id获取监测点信息
|
||||
* @author cdf
|
||||
* @date 2023/5/10
|
||||
*/
|
||||
@PostMapping("substationGetLine")
|
||||
HttpResult<List<LineDevGetDTO>> substationGetLine(@RequestParam("substationId")String substationId);
|
||||
|
||||
|
||||
/**
|
||||
* 根据母线id获取监测点信息
|
||||
* @author cdf
|
||||
* @date 2023/5/10
|
||||
*/
|
||||
@PostMapping("busBarGetLine")
|
||||
public HttpResult<List<LineDevGetDTO>> busBarGetLine(@RequestParam("busBarId")String busBarId);
|
||||
|
||||
|
||||
/**
|
||||
* 通过部门获取所有子集部门所拥有的监测点
|
||||
*
|
||||
* @param deptGetLineParam
|
||||
* @return 指定的部门监测点信息
|
||||
*/
|
||||
@PostMapping("/deptGetLineIds")
|
||||
HttpResult<List<DeptGetChildrenDTO>> deptGetLineList(@RequestBody DeptGetLineParam deptGetLineParam);
|
||||
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package com.njcn.device.biz.commApi;
|
||||
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.commApi.fallback.DeptLineGeneralClientFallbackFactory;
|
||||
import com.njcn.device.biz.pojo.dto.DeptGetChildrenDTO;
|
||||
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2023/4/24
|
||||
*/
|
||||
@FeignClient(
|
||||
value = ServerInfo.DEVICE,
|
||||
path = "commTerminal",
|
||||
fallbackFactory = DeptLineGeneralClientFallbackFactory.class)
|
||||
public interface DeptLineGeneralClient {
|
||||
|
||||
/**
|
||||
* 通过部门获取所有子集部门所拥有的监测点
|
||||
*
|
||||
* @param deptGetLineParam
|
||||
* @return 指定的部门监测点信息
|
||||
*/
|
||||
@PostMapping("/deptGetLineIds")
|
||||
HttpResult<List<DeptGetChildrenDTO>> deptGetLineList(@RequestBody DeptGetLineParam deptGetLineParam);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.njcn.device.biz.commApi.fallback;
|
||||
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.commApi.CommTerminalGeneralClient;
|
||||
import com.njcn.device.biz.pojo.dto.*;
|
||||
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 告警管理熔断降级
|
||||
* @author yzh
|
||||
* @date 2022/9/19
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class CommTerminalGeneralClientFallbackFactory implements FallbackFactory<CommTerminalGeneralClient> {
|
||||
@Override
|
||||
public CommTerminalGeneralClient create(Throwable throwable) {
|
||||
//判断抛出异常是否为解码器抛出的业务异常
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException) throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
return new CommTerminalGeneralClient() {
|
||||
@Override
|
||||
public HttpResult<List<DeptGetBase>> getDeptChildrenByParent(DeptGetLineParam deptGetLineParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "通过部门获取所有子级部门详情", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<DeptGetChildrenMoreDTO>> deptGetLine(DeptGetLineParam deptGetLineParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "根据单位获取监测点信息", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<DeptGetSubStationDTO>> deptSubStation(DeptGetLineParam deptGetLineParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "根据单位获取所有变电站", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<DeptGetBusBarDTO>> deptBusBar(DeptGetLineParam deptGetLineParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "根据单位获取所有变电站", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<DeptGetDeviceDTO>> deptGetDevice(DeptGetLineParam deptGetLineParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "根据单位获取所有装置", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<LineDevGetDTO>> substationGetLine(String substationId) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "根据单站id获取监测点信息", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<LineDevGetDTO>> busBarGetLine(String busBarId) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "根据母线id获取监测点信息", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<DeptGetChildrenDTO>> deptGetLineList(DeptGetLineParam deptGetLineParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "通过部门获取所有子集部门所拥有的监测点", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
package com.njcn.device.biz.commApi.fallback;
|
||||
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.commApi.DeptLineGeneralClient;
|
||||
import com.njcn.device.biz.pojo.dto.DeptGetChildrenDTO;
|
||||
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 告警管理熔断降级
|
||||
* @author yzh
|
||||
* @date 2022/9/19
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class DeptLineGeneralClientFallbackFactory implements FallbackFactory<DeptLineGeneralClient> {
|
||||
@Override
|
||||
public DeptLineGeneralClient create(Throwable throwable) {
|
||||
//判断抛出异常是否为解码器抛出的业务异常
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException) throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
return new DeptLineGeneralClient() {
|
||||
@Override
|
||||
public HttpResult<List<DeptGetChildrenDTO>> deptGetLineList(DeptGetLineParam deptGetLineParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "获取终获取告警策略列表", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.njcn.device.pq.pojo.po;
|
||||
package com.njcn.device.biz.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.device.biz.utils.COverlimit;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
@@ -15,7 +17,7 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
@TableName("pq_overlimit")
|
||||
public class Overlimit {
|
||||
public class Overlimit implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -29,6 +31,11 @@ public class Overlimit {
|
||||
*/
|
||||
private Float freqDev;
|
||||
|
||||
/**
|
||||
* 电压波动
|
||||
*/
|
||||
private Float voltageFluctuation;
|
||||
|
||||
/**
|
||||
* 电压上偏差限值
|
||||
*/
|
||||
@@ -44,6 +51,11 @@ public class Overlimit {
|
||||
*/
|
||||
private Float ubalance;
|
||||
|
||||
/**
|
||||
* 短时电压不平衡度限值
|
||||
*/
|
||||
private Float shortUbalance;
|
||||
|
||||
/**
|
||||
* 闪变限值
|
||||
*/
|
||||
@@ -203,6 +215,158 @@ public class Overlimit {
|
||||
@TableField("uharm_25")
|
||||
private Float uharm25;
|
||||
|
||||
/**
|
||||
* 2次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_26")
|
||||
private Float uharm26;
|
||||
|
||||
/**
|
||||
* 3次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_27")
|
||||
private Float uharm27;
|
||||
|
||||
/**
|
||||
* 4次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_28")
|
||||
private Float uharm28;
|
||||
|
||||
/**
|
||||
* 5次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_29")
|
||||
private Float uharm29;
|
||||
|
||||
/**
|
||||
* 6次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_30")
|
||||
private Float uharm30;
|
||||
|
||||
/**
|
||||
* 7次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_31")
|
||||
private Float uharm31;
|
||||
|
||||
/**
|
||||
* 8次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_32")
|
||||
private Float uharm32;
|
||||
|
||||
/**
|
||||
* 9次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_33")
|
||||
private Float uharm33;
|
||||
|
||||
/**
|
||||
* 10次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_34")
|
||||
private Float uharm34;
|
||||
|
||||
/**
|
||||
* 11次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_35")
|
||||
private Float uharm35;
|
||||
|
||||
/**
|
||||
* 12次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_36")
|
||||
private Float uharm36;
|
||||
|
||||
/**
|
||||
* 13次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_37")
|
||||
private Float uharm37;
|
||||
|
||||
/**
|
||||
* 14次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_38")
|
||||
private Float uharm38;
|
||||
|
||||
/**
|
||||
* 15次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_39")
|
||||
private Float uharm39;
|
||||
|
||||
/**
|
||||
* 16次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_40")
|
||||
private Float uharm40;
|
||||
|
||||
/**
|
||||
* 17次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_41")
|
||||
private Float uharm41;
|
||||
|
||||
/**
|
||||
* 18次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_42")
|
||||
private Float uharm42;
|
||||
|
||||
/**
|
||||
* 19次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_43")
|
||||
private Float uharm43;
|
||||
|
||||
/**
|
||||
* 20次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_44")
|
||||
private Float uharm44;
|
||||
|
||||
/**
|
||||
* 21次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_45")
|
||||
private Float uharm45;
|
||||
|
||||
/**
|
||||
* 22次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_46")
|
||||
private Float uharm46;
|
||||
|
||||
/**
|
||||
* 23次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_47")
|
||||
private Float uharm47;
|
||||
|
||||
/**
|
||||
* 24次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_48")
|
||||
private Float uharm48;
|
||||
|
||||
/**
|
||||
* 25次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_49")
|
||||
private Float uharm49;
|
||||
|
||||
/**
|
||||
* 50次谐波电压限值
|
||||
*/
|
||||
@TableField("uharm_50")
|
||||
private Float uharm50;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 2次谐波电流限值
|
||||
*/
|
||||
@@ -347,6 +511,158 @@ public class Overlimit {
|
||||
@TableField("iharm_25")
|
||||
private Float iharm25;
|
||||
|
||||
/**
|
||||
* 2次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_26")
|
||||
private Float iharm26;
|
||||
|
||||
/**
|
||||
* 3次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_27")
|
||||
private Float iharm27;
|
||||
|
||||
/**
|
||||
* 4次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_28")
|
||||
private Float iharm28;
|
||||
|
||||
/**
|
||||
* 5次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_29")
|
||||
private Float iharm29;
|
||||
|
||||
/**
|
||||
* 6次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_30")
|
||||
private Float iharm30;
|
||||
|
||||
/**
|
||||
* 7次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_31")
|
||||
private Float iharm31;
|
||||
|
||||
/**
|
||||
* 8次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_32")
|
||||
private Float iharm32;
|
||||
|
||||
/**
|
||||
* 9次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_33")
|
||||
private Float iharm33;
|
||||
|
||||
/**
|
||||
* 10次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_34")
|
||||
private Float iharm34;
|
||||
|
||||
/**
|
||||
* 11次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_35")
|
||||
private Float iharm35;
|
||||
|
||||
/**
|
||||
* 12次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_36")
|
||||
private Float iharm36;
|
||||
|
||||
/**
|
||||
* 13次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_37")
|
||||
private Float iharm37;
|
||||
|
||||
/**
|
||||
* 14次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_38")
|
||||
private Float iharm38;
|
||||
|
||||
/**
|
||||
* 15次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_39")
|
||||
private Float iharm39;
|
||||
|
||||
/**
|
||||
* 16次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_40")
|
||||
private Float iharm40;
|
||||
|
||||
/**
|
||||
* 17次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_41")
|
||||
private Float iharm41;
|
||||
|
||||
/**
|
||||
* 18次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_42")
|
||||
private Float iharm42;
|
||||
|
||||
/**
|
||||
* 19次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_43")
|
||||
private Float iharm43;
|
||||
|
||||
/**
|
||||
* 20次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_44")
|
||||
private Float iharm44;
|
||||
|
||||
/**
|
||||
* 21次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_45")
|
||||
private Float iharm45;
|
||||
|
||||
/**
|
||||
* 22次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_46")
|
||||
private Float iharm46;
|
||||
|
||||
/**
|
||||
* 23次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_47")
|
||||
private Float iharm47;
|
||||
|
||||
/**
|
||||
* 24次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_48")
|
||||
private Float iharm48;
|
||||
|
||||
/**
|
||||
* 25次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_49")
|
||||
private Float iharm49;
|
||||
|
||||
/**
|
||||
* 50次谐波电压限值
|
||||
*/
|
||||
@TableField("iharm_50")
|
||||
private Float iharm50;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 0.5次间谐波电压限值
|
||||
*/
|
||||
@@ -342,13 +342,13 @@ public class COverlimit {
|
||||
|
||||
//处理基准容量
|
||||
public static float getStandShortCap(String voltageLevel){
|
||||
if(DicDataEnum.KV01.getCode().equalsIgnoreCase(voltageLevel)){
|
||||
if(DicDataEnum.V100.getCode().equalsIgnoreCase(voltageLevel)){
|
||||
return 10;
|
||||
} else if(DicDataEnum.KV038.getCode().equalsIgnoreCase(voltageLevel)){
|
||||
} else if(DicDataEnum.V380.getCode().equalsIgnoreCase(voltageLevel)){
|
||||
return 10;
|
||||
}else if(DicDataEnum.V380.getCode().equalsIgnoreCase(voltageLevel)){
|
||||
}else if(DicDataEnum.KV038.getCode().equalsIgnoreCase(voltageLevel)){
|
||||
return 10;
|
||||
}else if(DicDataEnum.V022.getCode().equalsIgnoreCase(voltageLevel)){
|
||||
}else if(DicDataEnum.V220.getCode().equalsIgnoreCase(voltageLevel)){
|
||||
return 10;
|
||||
}else if(DicDataEnum.KV04.getCode().equalsIgnoreCase(voltageLevel)){
|
||||
return 100;
|
||||
|
||||
@@ -0,0 +1,449 @@
|
||||
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 java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
* 限值计算工具类
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2023/5/15
|
||||
*/
|
||||
public class COverlimitUtil {
|
||||
|
||||
|
||||
/**
|
||||
* 谐波电流系数
|
||||
*/
|
||||
private static final double[][] ARR = {
|
||||
{78, 62, 39, 62, 26, 44, 19, 21, 16, 28, 13, 24, 11, 12, 9.7, 18, 8.6, 16, 7.8, 8.9, 7.1, 14, 6.5, 12, 6.0, 6.9, 5.6, 11, 5.2, 10, 4.9, 5.6, 4.6, 8.9, 4.3, 8.4, 4.1, 4.8, 3.9, 7.6, 3.7, 7.2, 3.5, 4.1, 3.4, 6.6, 3.3, 6.3, 3.1},
|
||||
{43, 34, 21, 34, 14, 24, 11, 11, 8.5, 16, 7.1, 13, 6.1, 6.8, 5.3, 10, 4.7, 9, 4.3, 4.9, 3.9, 7.4, 3.6, 6.8, 3.3, 3.8, 3.1, 5.9, 2.9, 5.5, 2.7, 3.1, 2.5, 4.9, 2.4, 4.6, 2.3, 2.6, 2.2, 4.1, 2.0, 4.0, 2.0, 2.3, 1.9, 3.6, 1.8, 3.5, 1.7},
|
||||
{26, 20, 13, 20, 8.5, 15, 6.4, 6.8, 5.1, 9.3, 4.3, 7.9, 3.7, 4.1, 3.2, 6, 2.8, 5.4, 2.6, 2.9, 2.3, 4.5, 2.1, 4.1, 2.0, 2.2, 1.9, 3.4, 1.7, 3.2, 1.6, 1.8, 1.5, 2.9, 1.4, 2.7, 1.4, 1.5, 1.3, 2.4, 1.2, 2.3, 1.2, 1.3, 1.1, 2.1, 1.1, 2.0, 1.0},
|
||||
{15, 12, 7.7, 12, 5.1, 8.8, 3.8, 4.1, 3.1, 5.6, 2.6, 4.7, 2.2, 2.5, 1.9, 3.6, 1.7, 3.2, 1.5, 1.8, 1.4, 2.7, 1.3, 2.5, 1.2, 1.3, 1.1, 2.1, 1.0, 1.9, 0.9, 1.1, 0.9, 1.7, 0.8, 1.6, 0.8, 0.9, 0.8, 1.5, 0.7, 1.4, 0.7, 0.8, 0.7, 1.3, 0.6, 1.2, 0.6},
|
||||
{16, 13, 8.1, 13, 5.4, 9.3, 4.1, 4.3, 3.3, 5.9, 2.7, 5, 2.3, 2.6, 2, 3.8, 1.8, 3.4, 1.6, 1.9, 1.5, 2.8, 1.4, 2.6, 1.2, 1.4, 1.1, 2.2, 1.1, 2.1, 1.0, 1.2, 0.9, 1.9, 0.9, 1.8, 0.8, 1.0, 0.8, 1.6, 0.8, 1.5, 0.7, 0.9, 0.7, 1.4, 0.7, 1.3, 0.6},
|
||||
{12, 9.6, 6, 9.6, 4, 6.8, 3, 3.2, 2.4, 4.3, 2, 3.7, 1.7, 1.9, 1.5, 2.8, 1.3, 2.5, 1.2, 1.4, 1.1, 2.1, 1, 1.9, 0.9, 1.1, 0.9, 1.7, 0.8, 1.5, 0.8, 0.9, 0.7, 1.4, 0.7, 1.3, 0.6, 0.7, 0.6, 1.2, 0.6, 1.1, 0.5, 0.6, 0.5, 1.0, 0.5, 1.0, 0.5}
|
||||
};
|
||||
|
||||
|
||||
public static Overlimit globalAssemble(Float voltageLevel,Float protocolCapacity,Float devCapacity,Float shortCapacity) {
|
||||
Overlimit overlimit = new Overlimit();
|
||||
voltageDeviation(overlimit,voltageLevel);
|
||||
frequency(overlimit);
|
||||
voltageFluctuation(overlimit,voltageLevel);
|
||||
voltageFlicker(overlimit,voltageLevel);
|
||||
totalHarmonicDistortion(overlimit,voltageLevel);
|
||||
uHarm(overlimit,voltageLevel);
|
||||
threeVoltageUnbalance(overlimit);
|
||||
iHarm(overlimit,voltageLevel,protocolCapacity,devCapacity);
|
||||
negativeSequenceCurrent(overlimit,voltageLevel,shortCapacity);
|
||||
interharmonicCurrent(overlimit,voltageLevel);
|
||||
return overlimit;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 电压限值
|
||||
*
|
||||
*/
|
||||
public static void voltageDeviation(Overlimit overlimit,Float voltageLevel) {
|
||||
float voltageDev = 3.14159f,uvoltageDev = 3.14159f;
|
||||
if(voltageLevel <= Float.parseFloat(DicDataEnum.V220.getCode())){
|
||||
voltageDev = 7.0f;
|
||||
uvoltageDev=-10.0f;
|
||||
}else if(voltageLevel>Float.parseFloat(DicDataEnum.V220.getCode())&&voltageLevel<Float.parseFloat(DicDataEnum.KV20.getCode())){
|
||||
voltageDev = 7.0f;
|
||||
uvoltageDev=-7.0f;
|
||||
}else if(voltageLevel>=Float.parseFloat(DicDataEnum.KV20.getCode())&&voltageLevel<Float.parseFloat(DicDataEnum.KV35.getCode())){
|
||||
voltageDev = 7.0f;
|
||||
uvoltageDev=-7.0f;
|
||||
}else if(voltageLevel>=Float.parseFloat(DicDataEnum.KV35.getCode())&&voltageLevel<Float.parseFloat(DicDataEnum.KV66.getCode())){
|
||||
voltageDev = 10.0f;
|
||||
uvoltageDev=-10.0f;
|
||||
}else if(voltageLevel>=Float.parseFloat(DicDataEnum.KV66.getCode())&&voltageLevel<=Float.parseFloat(DicDataEnum.KV110.getCode())){
|
||||
voltageDev = 7.0f;
|
||||
uvoltageDev=-3.0f;
|
||||
}else if(voltageLevel>Float.parseFloat(DicDataEnum.KV110.getCode())){
|
||||
voltageDev = 10.0f;
|
||||
uvoltageDev=-10.0f;
|
||||
}
|
||||
overlimit.setVoltageDev(voltageDev);
|
||||
overlimit.setUvoltageDev(uvoltageDev);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 频率偏差
|
||||
* 默认限值:±0.2Hz(即:-0.2 Hz≤限值≤0.2 Hz)
|
||||
*/
|
||||
public static void frequency(Overlimit overlimit) {
|
||||
overlimit.setFreqDev(0.2f);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 电压波动
|
||||
* 对LV、MV:0≤限值≤3%;对HV:0≤限值≤2.5%。
|
||||
* LV、MV、HV的定义:
|
||||
* 低压(LV) UN≤1kV
|
||||
* 中压(MV) 1kV<UN≤35kV
|
||||
* 高压(HV) 35kV<UN≤220kV
|
||||
* 超高压(EHV),220kV<UN,参照HV执行
|
||||
*/
|
||||
public static void voltageFluctuation(Overlimit overlimit, Float voltageLevel) {
|
||||
if (voltageLevel < Float.parseFloat(DicDataEnum.KV35.getCode())) {
|
||||
overlimit.setVoltageFluctuation(3.0f);
|
||||
} else {
|
||||
overlimit.setVoltageFluctuation(2.5f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 电压闪变
|
||||
* ≤110kV 1
|
||||
* >110kV 0.8
|
||||
*/
|
||||
public static void voltageFlicker(Overlimit overlimit, Float voltageLevel) {
|
||||
if (voltageLevel <= Float.parseFloat(DicDataEnum.KV110.getCode())) {
|
||||
overlimit.setFlicker(1.0f);
|
||||
} else {
|
||||
overlimit.setFlicker(0.8f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 总谐波电压畸变率
|
||||
*
|
||||
*
|
||||
*/
|
||||
public static void totalHarmonicDistortion(Overlimit overlimit, Float voltageLevel) {
|
||||
float result = 3.14159f;
|
||||
if (voltageLevel < Float.parseFloat(DicDataEnum.KV6.getCode())) {
|
||||
result = 5.0f;
|
||||
} else if(voltageLevel >= Float.parseFloat(DicDataEnum.KV6.getCode()) && voltageLevel <= Float.parseFloat(DicDataEnum.KV20.getCode())){
|
||||
result = 4.0f;
|
||||
} else if(voltageLevel >= Float.parseFloat(DicDataEnum.KV35.getCode()) && voltageLevel <= Float.parseFloat(DicDataEnum.KV66.getCode())){
|
||||
result = 3.0f;
|
||||
} else if(voltageLevel >= Float.parseFloat(DicDataEnum.KV110.getCode()) && voltageLevel <= Float.parseFloat(DicDataEnum.KV1000.getCode())){
|
||||
result = 2.0f;
|
||||
}
|
||||
overlimit.setUaberrance(result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 谐波电压含有率
|
||||
*/
|
||||
public static void uHarm(Overlimit overlimit, Float voltageLevel) {
|
||||
float resultOdd = 3.14159f,resultEven = 3.14159f;
|
||||
if (voltageLevel < Float.parseFloat(DicDataEnum.KV6.getCode())) {
|
||||
resultOdd = 4.0f;
|
||||
resultEven = 2.0f;
|
||||
} else if(voltageLevel >= Float.parseFloat(DicDataEnum.KV6.getCode()) && voltageLevel <= Float.parseFloat(DicDataEnum.KV20.getCode())){
|
||||
resultOdd = 3.2f;
|
||||
resultEven = 1.6f;
|
||||
} else if(voltageLevel >= Float.parseFloat(DicDataEnum.KV35.getCode()) && voltageLevel <= Float.parseFloat(DicDataEnum.KV66.getCode())){
|
||||
resultOdd = 2.4f;
|
||||
resultEven = 1.2f;
|
||||
} else if(voltageLevel >= Float.parseFloat(DicDataEnum.KV110.getCode()) && voltageLevel <= Float.parseFloat(DicDataEnum.KV1000.getCode())){
|
||||
resultOdd = 1.6f;
|
||||
resultEven = 0.8f;
|
||||
}
|
||||
overlimit.setUharm2(resultEven);
|
||||
overlimit.setUharm4(resultEven);
|
||||
overlimit.setUharm6(resultEven);
|
||||
overlimit.setUharm8(resultEven);
|
||||
overlimit.setUharm10(resultEven);
|
||||
overlimit.setUharm12(resultEven);
|
||||
overlimit.setUharm14(resultEven);
|
||||
overlimit.setUharm16(resultEven);
|
||||
overlimit.setUharm18(resultEven);
|
||||
overlimit.setUharm20(resultEven);
|
||||
overlimit.setUharm22(resultEven);
|
||||
overlimit.setUharm24(resultEven);
|
||||
overlimit.setUharm26(resultEven);
|
||||
overlimit.setUharm28(resultEven);
|
||||
overlimit.setUharm30(resultEven);
|
||||
overlimit.setUharm32(resultEven);
|
||||
overlimit.setUharm34(resultEven);
|
||||
overlimit.setUharm36(resultEven);
|
||||
overlimit.setUharm38(resultEven);
|
||||
overlimit.setUharm40(resultEven);
|
||||
overlimit.setUharm42(resultEven);
|
||||
overlimit.setUharm44(resultEven);
|
||||
overlimit.setUharm46(resultEven);
|
||||
overlimit.setUharm48(resultEven);
|
||||
overlimit.setUharm50(resultEven);
|
||||
|
||||
|
||||
|
||||
overlimit.setUharm3(resultOdd);
|
||||
overlimit.setUharm5(resultOdd);
|
||||
overlimit.setUharm7(resultOdd);
|
||||
overlimit.setUharm9(resultOdd);
|
||||
overlimit.setUharm11(resultOdd);
|
||||
overlimit.setUharm13(resultOdd);
|
||||
overlimit.setUharm15(resultOdd);
|
||||
overlimit.setUharm17(resultOdd);
|
||||
overlimit.setUharm19(resultOdd);
|
||||
overlimit.setUharm21(resultOdd);
|
||||
overlimit.setUharm23(resultOdd);
|
||||
overlimit.setUharm25(resultOdd);
|
||||
overlimit.setUharm27(resultOdd);
|
||||
overlimit.setUharm29(resultOdd);
|
||||
overlimit.setUharm31(resultOdd);
|
||||
overlimit.setUharm33(resultOdd);
|
||||
overlimit.setUharm35(resultOdd);
|
||||
overlimit.setUharm37(resultOdd);
|
||||
overlimit.setUharm39(resultOdd);
|
||||
overlimit.setUharm41(resultOdd);
|
||||
overlimit.setUharm43(resultOdd);
|
||||
overlimit.setUharm45(resultOdd);
|
||||
overlimit.setUharm47(resultOdd);
|
||||
overlimit.setUharm49(resultOdd);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 负序电压不平衡(三相电压不平衡度)
|
||||
*
|
||||
*/
|
||||
public static void threeVoltageUnbalance(Overlimit overlimit) {
|
||||
overlimit.setUbalance(2.0f);
|
||||
overlimit.setShortUbalance(4.0f);
|
||||
}
|
||||
|
||||
|
||||
/*---------------------------------谐波电流限值start-----------------------------------*/
|
||||
|
||||
/**
|
||||
* 谐波电流限值
|
||||
*/
|
||||
public static void iHarm(Overlimit overlimit, Float voltageLevel,Float protocolCapacity,Float devCapacity) {
|
||||
float calCap = getDlCapByVoltageLevel(voltageLevel);
|
||||
//24谐波电流幅值
|
||||
Float[] iHarmTem = new Float[49];
|
||||
for (int i = 0; i <= 48; i++) {
|
||||
float v = iHarmCalculate(i+2,voltageLevel,protocolCapacity,devCapacity,calCap);
|
||||
iHarmTem[i] = v;
|
||||
}
|
||||
|
||||
|
||||
overlimit.setIharm2(iHarmTem[0]);
|
||||
overlimit.setIharm4(iHarmTem[2]);
|
||||
overlimit.setIharm6(iHarmTem[4]);
|
||||
overlimit.setIharm8(iHarmTem[6]);
|
||||
overlimit.setIharm10(iHarmTem[8]);
|
||||
overlimit.setIharm12(iHarmTem[10]);
|
||||
overlimit.setIharm14(iHarmTem[12]);
|
||||
overlimit.setIharm16(iHarmTem[14]);
|
||||
overlimit.setIharm18(iHarmTem[16]);
|
||||
overlimit.setIharm20(iHarmTem[18]);
|
||||
overlimit.setIharm22(iHarmTem[20]);
|
||||
overlimit.setIharm24(iHarmTem[22]);
|
||||
overlimit.setIharm26(iHarmTem[24]);
|
||||
overlimit.setIharm28(iHarmTem[26]);
|
||||
overlimit.setIharm30(iHarmTem[28]);
|
||||
overlimit.setIharm32(iHarmTem[30]);
|
||||
overlimit.setIharm34(iHarmTem[32]);
|
||||
overlimit.setIharm36(iHarmTem[34]);
|
||||
overlimit.setIharm38(iHarmTem[36]);
|
||||
overlimit.setIharm40(iHarmTem[38]);
|
||||
overlimit.setIharm42(iHarmTem[40]);
|
||||
overlimit.setIharm44(iHarmTem[42]);
|
||||
overlimit.setIharm46(iHarmTem[44]);
|
||||
overlimit.setIharm48(iHarmTem[46]);
|
||||
overlimit.setIharm50(iHarmTem[48]);
|
||||
|
||||
|
||||
|
||||
overlimit.setIharm3(iHarmTem[1]);
|
||||
overlimit.setIharm5(iHarmTem[3]);
|
||||
overlimit.setIharm7(iHarmTem[5]);
|
||||
overlimit.setIharm9(iHarmTem[7]);
|
||||
overlimit.setIharm11(iHarmTem[9]);
|
||||
overlimit.setIharm13(iHarmTem[11]);
|
||||
overlimit.setIharm15(iHarmTem[13]);
|
||||
overlimit.setIharm17(iHarmTem[15]);
|
||||
overlimit.setIharm19(iHarmTem[17]);
|
||||
overlimit.setIharm21(iHarmTem[19]);
|
||||
overlimit.setIharm23(iHarmTem[21]);
|
||||
overlimit.setIharm25(iHarmTem[23]);
|
||||
overlimit.setIharm27(iHarmTem[25]);
|
||||
overlimit.setIharm29(iHarmTem[27]);
|
||||
overlimit.setIharm31(iHarmTem[29]);
|
||||
overlimit.setIharm33(iHarmTem[31]);
|
||||
overlimit.setIharm35(iHarmTem[33]);
|
||||
overlimit.setIharm37(iHarmTem[35]);
|
||||
overlimit.setIharm39(iHarmTem[37]);
|
||||
overlimit.setIharm41(iHarmTem[39]);
|
||||
overlimit.setIharm43(iHarmTem[41]);
|
||||
overlimit.setIharm45(iHarmTem[43]);
|
||||
overlimit.setIharm47(iHarmTem[45]);
|
||||
overlimit.setIharm49(iHarmTem[47]);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
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());
|
||||
BigDecimal bigDecimal = new BigDecimal(limit).setScale(4,RoundingMode.HALF_UP);
|
||||
return bigDecimal.floatValue();
|
||||
}
|
||||
|
||||
//电流谐波限值
|
||||
private static Double getHarmTag(Integer iCount, Float voltageLevel) {
|
||||
int x, y;
|
||||
if (voltageLevel < DicDataEnum.KV6.getValue()) {
|
||||
x = 0;
|
||||
} else if (voltageLevel>=DicDataEnum.KV6.getValue()&&voltageLevel<DicDataEnum.KV10.getValue()) {
|
||||
x = 1;
|
||||
} else if (voltageLevel>=DicDataEnum.KV10.getValue()&& voltageLevel<DicDataEnum.KV35.getValue()) {
|
||||
x = 2;
|
||||
} else if (voltageLevel>=DicDataEnum.KV35.getValue()&&voltageLevel<DicDataEnum.KV66.getValue()) {
|
||||
x = 3;
|
||||
} else if (voltageLevel>=DicDataEnum.KV66.getValue()&&voltageLevel<DicDataEnum.KV110.getValue()) {
|
||||
x = 4;
|
||||
} else {
|
||||
x = 5;
|
||||
}
|
||||
y = iCount - 2;
|
||||
return ARR[x][y];
|
||||
}
|
||||
|
||||
/**
|
||||
* 相位叠加系数的取值
|
||||
*/
|
||||
public static Double getHarmonicLimit(Integer times, double iTag, double supply, double user) {
|
||||
if (supply == 0) {
|
||||
return 0.0;
|
||||
}
|
||||
double coefficient = 2.0;
|
||||
if (times == 3) {
|
||||
coefficient = 1.1;
|
||||
} else if (times == 5) {
|
||||
coefficient = 1.2;
|
||||
} else if (times == 7) {
|
||||
coefficient = 1.4;
|
||||
} else if (times == 11) {
|
||||
coefficient = 1.8;
|
||||
} else if (times == 13) {
|
||||
coefficient = 1.9;
|
||||
}
|
||||
BigDecimal bd = new BigDecimal(iTag * Math.pow((user / supply), (1 / coefficient)));
|
||||
bd = bd.setScale(2, RoundingMode.HALF_UP);
|
||||
return Double.parseDouble(bd.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据电压等级获取基准短路容量
|
||||
*/
|
||||
public static float getDlCapByVoltageLevel(Float voltageLevel){
|
||||
float capValue = 3.141592f;
|
||||
if(voltageLevel< DicDataEnum.KV06.getValue()){
|
||||
capValue = 10;
|
||||
}else if(voltageLevel>=DicDataEnum.KV06.getValue() && voltageLevel<DicDataEnum.KV20.getValue()){
|
||||
capValue = 100;
|
||||
}else if(voltageLevel>=DicDataEnum.KV20.getValue() && voltageLevel<DicDataEnum.KV35.getValue()){
|
||||
capValue = 200;
|
||||
}else if(voltageLevel>=DicDataEnum.KV35.getValue() && voltageLevel<DicDataEnum.KV66.getValue()){
|
||||
capValue = 250;
|
||||
}else if(voltageLevel>=DicDataEnum.KV66.getValue() && voltageLevel<DicDataEnum.KV110.getValue()){
|
||||
capValue = 500;
|
||||
}else if(voltageLevel>=DicDataEnum.KV110.getValue() && voltageLevel<DicDataEnum.KV220.getValue()){
|
||||
capValue = 750;
|
||||
}else if(voltageLevel>=DicDataEnum.KV220.getValue() && voltageLevel<DicDataEnum.KV330.getValue()){
|
||||
capValue = 2000;
|
||||
}else if(voltageLevel>=DicDataEnum.KV330.getValue() && voltageLevel<DicDataEnum.KV500.getValue()){
|
||||
capValue = 3000;
|
||||
}else if(voltageLevel>=DicDataEnum.KV500.getValue() && voltageLevel<DicDataEnum.KV750.getValue()){
|
||||
capValue = 7000;
|
||||
}else if(voltageLevel>=DicDataEnum.KV750.getValue() && voltageLevel<DicDataEnum.KV1000.getValue()){
|
||||
capValue = 9000;
|
||||
}
|
||||
return capValue;
|
||||
}
|
||||
|
||||
|
||||
/*---------------------------------谐波电流限值end-----------------------------------*/
|
||||
|
||||
|
||||
/**
|
||||
* 间谐波电压含有率
|
||||
*/
|
||||
|
||||
public static void interharmonicCurrent(Overlimit overlimit,Float voltageLevel){
|
||||
float aValue,bValue;
|
||||
if(voltageLevel <= DicDataEnum.KV1.getValue()){
|
||||
aValue = 0.2f;bValue = 0.5f;
|
||||
}else {
|
||||
aValue = 0.16f;bValue = 0.4f;
|
||||
}
|
||||
overlimit.setInuharm1(aValue);
|
||||
overlimit.setInuharm2(aValue);
|
||||
|
||||
overlimit.setInuharm3(bValue);
|
||||
overlimit.setInuharm4(bValue);
|
||||
overlimit.setInuharm5(bValue);
|
||||
overlimit.setInuharm6(bValue);
|
||||
overlimit.setInuharm7(bValue);
|
||||
overlimit.setInuharm8(bValue);
|
||||
overlimit.setInuharm9(bValue);
|
||||
overlimit.setInuharm10(bValue);
|
||||
overlimit.setInuharm11(bValue);
|
||||
overlimit.setInuharm12(bValue);
|
||||
overlimit.setInuharm13(bValue);
|
||||
overlimit.setInuharm14(bValue);
|
||||
overlimit.setInuharm15(bValue);
|
||||
overlimit.setInuharm16(bValue);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 负序电流限值
|
||||
*/
|
||||
public static void negativeSequenceCurrent(Overlimit overlimit,Float voltageLevel,Float shortCapacity){
|
||||
double v = (0.013*shortCapacity)/(getUl(voltageLevel)*Math.sqrt(3));
|
||||
overlimit.setINeg((float) v);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取额定线电压
|
||||
*/
|
||||
private static float getUl(Float voltageLevel){
|
||||
float value = 3.14159f;
|
||||
if(voltageLevel<DicDataEnum.KV6.getValue()){
|
||||
value = 0.4f;
|
||||
}else if(voltageLevel>=DicDataEnum.KV6.getValue()&&voltageLevel<DicDataEnum.KV10.getValue()){
|
||||
value = 6.3f;
|
||||
}else if(voltageLevel>=DicDataEnum.KV10.getValue()&&voltageLevel<DicDataEnum.KV20.getValue()){
|
||||
value = 10.5f;
|
||||
}else if(voltageLevel>=DicDataEnum.KV20.getValue()&&voltageLevel<DicDataEnum.KV35.getValue()){
|
||||
value = 21.0f;
|
||||
}else if(voltageLevel>=DicDataEnum.KV35.getValue()&&voltageLevel<DicDataEnum.KV66.getValue()){
|
||||
value = 36.5f;
|
||||
}else if(voltageLevel>=DicDataEnum.KV66.getValue()&&voltageLevel<DicDataEnum.KV110.getValue()){
|
||||
value = 69.0f;
|
||||
}else if(voltageLevel>=DicDataEnum.KV110.getValue()&&voltageLevel<DicDataEnum.KV220.getValue()){
|
||||
value = 115.5f;
|
||||
}else if(voltageLevel>=DicDataEnum.KV220.getValue()&&voltageLevel<DicDataEnum.KV330.getValue()){
|
||||
value = 230.0f;
|
||||
}else if(voltageLevel>=DicDataEnum.KV330.getValue()){
|
||||
value = 345.0f;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import com.njcn.device.pms.pojo.param.PmsMonitorInfoParam;
|
||||
import com.njcn.device.pms.pojo.param.PmsMonitorParam;
|
||||
import com.njcn.device.pms.pojo.po.Monitor;
|
||||
import com.njcn.device.pms.pojo.vo.MonitorVO;
|
||||
import com.njcn.device.pq.pojo.po.Overlimit;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.njcn.device.pms.pojo.param.PmsMonitorParam;
|
||||
import com.njcn.device.pms.pojo.po.Monitor;
|
||||
import com.njcn.device.pms.pojo.vo.MonitorVO;
|
||||
import com.njcn.device.pms.utils.PmsDeviceEnumUtil;
|
||||
import com.njcn.device.pq.pojo.po.Overlimit;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.njcn.harmonic.pojo.po.report;
|
||||
|
||||
|
||||
import com.njcn.device.pq.pojo.po.Overlimit;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.njcn.common.utils.PubUtils;
|
||||
import com.njcn.device.pms.api.MonitorClient;
|
||||
import com.njcn.device.pms.pojo.po.Monitor;
|
||||
import com.njcn.device.pq.api.LineFeignClient;
|
||||
import com.njcn.device.pq.pojo.po.Overlimit;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import com.njcn.device.pq.pojo.vo.LineDetailDataVO;
|
||||
import com.njcn.event.enums.EventResponseEnum;
|
||||
import com.njcn.harmonic.pojo.param.ReportQueryParam;
|
||||
@@ -36,7 +36,6 @@ import sun.misc.BASE64Encoder;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.njcn.harmonic.service.impl;
|
||||
|
||||
import com.njcn.common.utils.PubUtils;
|
||||
import com.njcn.device.pq.api.LineFeignClient;
|
||||
import com.njcn.device.pq.pojo.po.Overlimit;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import com.njcn.harmonic.constant.Param;
|
||||
import com.njcn.harmonic.pojo.param.HarmInHarmParam;
|
||||
import com.njcn.harmonic.pojo.vo.HarmInHarmVO;
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.njcn.common.pojo.constant.BizParamConstant;
|
||||
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
||||
import com.njcn.common.utils.PubUtils;
|
||||
import com.njcn.device.pq.api.LineFeignClient;
|
||||
import com.njcn.device.pq.pojo.po.Overlimit;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import com.njcn.device.pq.pojo.vo.LineDetailDataVO;
|
||||
import com.njcn.event.api.EventDetailFeignClient;
|
||||
import com.njcn.event.pojo.po.EventDetail;
|
||||
@@ -36,10 +36,8 @@ import org.springframework.util.CollectionUtils;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.Instant;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.njcn.device.pms.pojo.dto.PmsMonitorDTO;
|
||||
import com.njcn.device.pms.pojo.dto.PmsStatationStatInfoDTO;
|
||||
import com.njcn.device.pms.pojo.param.PmsMonitorParam;
|
||||
import com.njcn.device.pms.pojo.param.PmsStatationStatInfoParam;
|
||||
import com.njcn.device.pq.pojo.po.Overlimit;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import com.njcn.harmonic.pojo.param.RMpHarmonicReportDParam;
|
||||
import com.njcn.harmonic.pojo.po.*;
|
||||
import com.njcn.harmonic.pojo.vo.RMpHarmonicReportDVO;
|
||||
|
||||
@@ -6,7 +6,7 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.njcn.common.pojo.dto.SimpleDTO;
|
||||
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
||||
import com.njcn.device.biz.commApi.DeptLineGeneralClient;
|
||||
import com.njcn.device.biz.commApi.CommTerminalGeneralClient;
|
||||
import com.njcn.device.biz.pojo.dto.DeptGetChildrenDTO;
|
||||
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
||||
import com.njcn.device.pms.api.PmsGeneralDeviceInfoClient;
|
||||
@@ -40,7 +40,7 @@ import java.util.stream.Collectors;
|
||||
public class PVOverviewServiceImpl implements PVOverviewService {
|
||||
|
||||
private final PVOverviewMapper pvOverviewMapper;
|
||||
private final DeptLineGeneralClient deptLineGeneralClient;
|
||||
private final CommTerminalGeneralClient commTerminalGeneralClient;
|
||||
|
||||
private final RStatPollutionSubstationDPOMapper pollutionSubstationDPOMapper;
|
||||
private final StatationStatClient statationStatClient;
|
||||
@@ -50,7 +50,7 @@ public class PVOverviewServiceImpl implements PVOverviewService {
|
||||
public List<Integer> getPVSynthesisCount(StatisticsBizBaseParam param) {
|
||||
DeptGetLineParam deptGetLineParam=new DeptGetLineParam();
|
||||
deptGetLineParam.setDeptId(param.getId());
|
||||
List<DeptGetChildrenDTO> data = deptLineGeneralClient.deptGetLineList(deptGetLineParam).getData();
|
||||
List<DeptGetChildrenDTO> data = commTerminalGeneralClient.deptGetLineList(deptGetLineParam).getData();
|
||||
if(CollUtil.isNotEmpty(data)){
|
||||
List<String> monitorIds = data.stream().flatMap(dto -> dto.getLineIds().stream()).collect(Collectors.toList());
|
||||
return pvOverviewMapper.selectPVSynthesisCount(param, monitorIds);
|
||||
|
||||
Reference in New Issue
Block a user