高级算法特征值,暂降事件范围分析代码提交

This commit is contained in:
2023-08-10 16:30:01 +08:00
parent 336f3b1281
commit 855c8d98d6
73 changed files with 5766 additions and 88 deletions

View File

@@ -117,7 +117,7 @@ public interface GeneralDeviceInfoClient {
HttpResult<List<RStatOnlinerateVO>> getOnlineRateByDevIds(@RequestBody OnlineRateParam param);
/**
*根据单位获取投运监测点
*根据单位获取投运监测点(双系统)
* @author cdf
* @date 2023/6/7
*/
@@ -126,7 +126,7 @@ public interface GeneralDeviceInfoClient {
/**
*根据单位获取投运监测点
*根据单位获取暂态系统投运监测点
* @author cdf
* @date 2023/6/7
*/

View File

@@ -0,0 +1,28 @@
package com.njcn.device.pq.api;
import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.device.pq.api.fallback.TerminalBaseClientFallbackFactory;
import com.njcn.device.pq.pojo.dto.transformer.EntityLogicDTO;
import com.njcn.device.pq.pojo.po.Line;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
/**
* @author hongawen
* @version 1.0.0
* @date 2022年02月14日 14:02
*/
@FeignClient(value = ServerInfo.DEVICE, path = "/pqsTransformer", fallbackFactory = TerminalBaseClientFallbackFactory.class, contextId = "pqsTransformer")
public interface TransformerClient {
HttpResult<List<EntityLogicDTO>> getLogic();
}

View File

@@ -0,0 +1,45 @@
package com.njcn.device.pq.api.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.utils.DeviceEnumUtil;
import com.njcn.device.pq.api.TerminalBaseClient;
import com.njcn.device.pq.api.TransformerClient;
import com.njcn.device.pq.pojo.dto.transformer.EntityLogicDTO;
import com.njcn.device.pq.pojo.po.Line;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* @author hongawen
* @version 1.0.0
* @date 2022年02月14日 14:03
*/
@Slf4j
@Component
public class TransformerClientFallbackFactory implements FallbackFactory<TransformerClient> {
@Override
public TransformerClient 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 TransformerClient()
{
@Override
public HttpResult<List<EntityLogicDTO>> getLogic() {
return null;
}
};
}
}

View File

@@ -0,0 +1,26 @@
package com.njcn.device.pq.pojo.dto.transformer;
import lombok.Data;
/**
* pqs
*
* @author cdf
* @date 2023/8/8
*/
@Data
public class EntityLogicDTO {
// 物理隔绝GUID
private String tPIndex;
/* 变压器逻辑上节点 */
private String node_h;
//变压器逻辑下节点
private String node_l;
// 变压器连接方式
private Integer type;
//变压器物理上节点
private String nodeBefore;
//变压器物理下节点
private String nodeNext;
}