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

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

@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/**
*
* 仅供pms系统修改单位部门时候调用同步修改pms台账表里的单位部门
* @author cdf
* @date 2023/4/24
*/

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;
}

View File

@@ -8,6 +8,7 @@ import com.njcn.common.pojo.enums.common.LogEnum;
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.pq.pojo.dto.transformer.EntityLogicDTO;
import com.njcn.device.pq.pojo.param.PqsTransformerParam;
import com.njcn.device.pq.pojo.vo.PqsTflgassVO;
import com.njcn.device.pq.pojo.vo.PqsTransformerVO;
@@ -112,5 +113,15 @@ public class PqsTransformerController extends BaseController {
List<TerminalTree> terminalTree = iPqsTransformerService.getTransformerTree();
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, terminalTree, methodDescribe);
}
@GetMapping("/getLogic")
@ApiOperation(value = "获取变压器策略详情")
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
public HttpResult<List<EntityLogicDTO>> getLogic() {
String methodDescribe = getMethodDescribe("getLogic");
List<EntityLogicDTO> entityLogicDTOList = iPqsTransformerService.getLogic();
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, entityLogicDTOList, methodDescribe);
}
}

View File

@@ -1,6 +1,7 @@
package com.njcn.device.pq.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.device.pq.pojo.dto.transformer.EntityLogicDTO;
import com.njcn.device.pq.pojo.po.PqsTflgass;
import org.apache.ibatis.annotations.Param;
@@ -25,4 +26,9 @@ public interface PqsTflgassMapper extends BaseMapper<PqsTflgass> {
*/
List<PqsTflgass> selectFlgass(@Param("id") String id,@Param("ids") List<String> ids);
/**
* 获取变压器策略物理节点
*/
List<EntityLogicDTO> getLogic();
}

View File

@@ -23,4 +23,18 @@
</where>
</select>
<select id="getLogic" resultType="EntityLogicDTO">
select a.tp_index tPIndex,
b.logic_before nodeBefore,
b.logic_next nodeNext,
d.triphase type
from pqs_tflgployass a
,pqs_tflgass b,
pqs_transformer c,
pqs_dicdata d
where a.tf_index = b.tf_index
and b.tf_index = c.tf_index
and c.wiring = d.dic_index
</select>
</mapper>

View File

@@ -2,6 +2,7 @@ package com.njcn.device.pq.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.njcn.device.pq.pojo.dto.transformer.EntityLogicDTO;
import com.njcn.device.pq.pojo.param.PqsTransformerParam;
import com.njcn.device.pq.pojo.po.PqsTransformer;
import com.njcn.device.pq.pojo.vo.PqsTflgassVO;
@@ -84,4 +85,11 @@ public interface IPqsTransformerService extends IService<PqsTransformer> {
* @date 2023/7/26
*/
List<TerminalTree> getTransformerTree();
/**
* 获取所有策略的详情
* @author cdf
* @date 2023/8/8
*/
List<EntityLogicDTO> getLogic();
}

View File

@@ -14,6 +14,7 @@ import com.njcn.device.pq.enums.PvDeviceResponseEnum;
import com.njcn.device.pq.mapper.LineMapper;
import com.njcn.device.pq.mapper.PqsTflgassMapper;
import com.njcn.device.pq.mapper.PqsTransformerMapper;
import com.njcn.device.pq.pojo.dto.transformer.EntityLogicDTO;
import com.njcn.device.pq.pojo.param.PqsTransformerParam;
import com.njcn.device.pq.pojo.po.Line;
import com.njcn.device.pq.pojo.po.PqsTflgass;
@@ -377,6 +378,11 @@ public class PqsTransformerServiceImpl extends ServiceImpl<PqsTransformerMapper,
return TreedChildren(terminalTrees, "变压器设备树", null);
}
@Override
public List<EntityLogicDTO> getLogic() {
return pqsTflgassMapper.getLogic();
}
/**
* 获取全部子节点
*
@@ -576,4 +582,6 @@ public class PqsTransformerServiceImpl extends ServiceImpl<PqsTransformerMapper,
return getvoltage.get(0);
}
}