1.典型源荷,国网下穿接口编写
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package com.njcn.device.pms.api;
|
||||
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.pms.api.fallback.LineIntegrityDataFallbackFactory;
|
||||
import com.njcn.device.pms.pojo.param.DataQualityDetailsParam;
|
||||
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
||||
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 yzh
|
||||
* @date 2022/10/18
|
||||
*/
|
||||
@FeignClient(
|
||||
value = ServerInfo.DEVICE,
|
||||
path = "/monitorIntegrity",
|
||||
contextId = "monitorIntegrity",
|
||||
fallbackFactory = LineIntegrityDataFallbackFactory.class)
|
||||
public interface LineIntegrityDataClient {
|
||||
|
||||
/**
|
||||
* 获取监测点数据完整率
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/getIntegrityData")
|
||||
HttpResult<List<RStatIntegrityD>> getIntegrityData(@RequestBody DataQualityDetailsParam param);
|
||||
|
||||
}
|
||||
@@ -10,9 +10,11 @@ import com.njcn.device.pms.pojo.param.MonitorTerminalParam;
|
||||
import com.njcn.device.pms.pojo.param.PmsMonitorInfoParam;
|
||||
import com.njcn.device.pms.pojo.param.PmsMonitorParam;
|
||||
import com.njcn.device.pms.pojo.param.TerminalQueryParam;
|
||||
import com.njcn.device.pms.pojo.param.gw.TypicalSourceParam;
|
||||
import com.njcn.device.pms.pojo.po.Monitor;
|
||||
import com.njcn.device.pms.pojo.vo.MonitorVO;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import com.njcn.device.pms.pojo.vo.gw.TypicalSourceOnLine;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -69,7 +71,6 @@ public interface MonitorClient {
|
||||
@PostMapping("getMonitorList")
|
||||
HttpResult<List<Monitor>> getMonitorList(@RequestBody List<String> monitorIds);
|
||||
|
||||
|
||||
@PostMapping("getMonitorPage")
|
||||
HttpResult<Page<Monitor>> getMonitorPage(@RequestBody TerminalQueryParam baseParam);
|
||||
|
||||
@@ -83,4 +84,12 @@ public interface MonitorClient {
|
||||
*/
|
||||
@PostMapping("getMonitorTerminal")
|
||||
HttpResult<MonitorVO> getMonitorTerminal(@RequestBody MonitorTerminalParam param);
|
||||
|
||||
/**
|
||||
* @Description: 典型源荷下穿监测点信息接口
|
||||
* @Author: wr
|
||||
* @Date: 2024/5/27 14:00
|
||||
*/
|
||||
@PostMapping("/monitorTypicalList")
|
||||
HttpResult<Page<TypicalSourceOnLine>> monitorTypicalList(@RequestBody TypicalSourceParam param);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.njcn.device.pms.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.pms.api.LineIntegrityDataClient;
|
||||
import com.njcn.device.pms.pojo.param.*;
|
||||
import com.njcn.device.pms.utils.PmsDeviceEnumUtil;
|
||||
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: wr
|
||||
* @Date: 2024/5/28 9:41
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class LineIntegrityDataFallbackFactory implements FallbackFactory<LineIntegrityDataClient> {
|
||||
|
||||
@Override
|
||||
public LineIntegrityDataClient create(Throwable throwable) {
|
||||
//判断抛出异常是否为解码器抛出的业务异常
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException) throwable.getCause();
|
||||
exceptionEnum = PmsDeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
return new LineIntegrityDataClient()
|
||||
{
|
||||
@Override
|
||||
public HttpResult<List<RStatIntegrityD>> getIntegrityData(DataQualityDetailsParam param) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "获取监测点数据完整率", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,10 @@ import com.njcn.device.pms.pojo.param.MonitorTerminalParam;
|
||||
import com.njcn.device.pms.pojo.param.PmsMonitorInfoParam;
|
||||
import com.njcn.device.pms.pojo.param.PmsMonitorParam;
|
||||
import com.njcn.device.pms.pojo.param.TerminalQueryParam;
|
||||
import com.njcn.device.pms.pojo.param.gw.TypicalSourceParam;
|
||||
import com.njcn.device.pms.pojo.po.Monitor;
|
||||
import com.njcn.device.pms.pojo.vo.MonitorVO;
|
||||
import com.njcn.device.pms.pojo.vo.gw.TypicalSourceOnLine;
|
||||
import com.njcn.device.pms.utils.PmsDeviceEnumUtil;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
@@ -75,6 +77,12 @@ public class MonitorClientFallbackFactory implements FallbackFactory<MonitorClie
|
||||
log.error("{}异常,降级处理,异常为:{}", "获取台账和终端信息(波形专用) ", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<Page<TypicalSourceOnLine>> monitorTypicalList(TypicalSourceParam param) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "典型源荷下穿监测点信息接口 ", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.njcn.device.pms.pojo.param.gw;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wr
|
||||
* @description
|
||||
@@ -11,7 +13,6 @@ import lombok.Data;
|
||||
@Data
|
||||
public class TypicalSourceParam {
|
||||
|
||||
|
||||
@ApiModelProperty("详情类型")
|
||||
private String detailType;
|
||||
|
||||
@@ -66,4 +67,6 @@ public class TypicalSourceParam {
|
||||
@ApiModelProperty("统计时间,日数据:yyyy-mm-dd,月数据:yyyy-mm,年数据:yyyy")
|
||||
private String statDate;
|
||||
|
||||
@ApiModelProperty("监测点id集合->自定义不是国网下穿入参")
|
||||
List<String> monitorIds;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
package com.njcn.device.pms.pojo.vo.gw;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wr
|
||||
* @description 超标指标数据表下穿详细信息
|
||||
* @date 2024/5/27 10:03
|
||||
*/
|
||||
@Data
|
||||
public class TypicalOverIndex {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("副备电站id")
|
||||
private String auxiliarySubstationId;
|
||||
|
||||
@ApiModelProperty("副备电站名称")
|
||||
private String auxiliarySubstationName;
|
||||
|
||||
@ApiModelProperty("副备电站电压等级")
|
||||
private String auxiliaryVoltageLevel;
|
||||
|
||||
@ApiModelProperty("副备电站电压等级名称")
|
||||
private String auxiliaryVoltageLevelName;
|
||||
|
||||
@ApiModelProperty("日平均值")
|
||||
private String avgValue;
|
||||
|
||||
@ApiModelProperty("母线id")
|
||||
private String busId;
|
||||
|
||||
@ApiModelProperty("母线名称")
|
||||
private String busName;
|
||||
|
||||
@ApiModelProperty("母线电压等级")
|
||||
private String busVoltageLevel;
|
||||
|
||||
@ApiModelProperty("母线电压等级名称")
|
||||
private String busVoltageLevelName;
|
||||
|
||||
@ApiModelProperty("协议容量")
|
||||
private String capacity;
|
||||
|
||||
@ApiModelProperty("所属单位id")
|
||||
private String cityOrg;
|
||||
|
||||
@ApiModelProperty("所属单位名称")
|
||||
private String cityOrgName;
|
||||
|
||||
@ApiModelProperty("有效监测点数量")
|
||||
private Integer effectMonitorNum;
|
||||
|
||||
@ApiModelProperty("谐波次数")
|
||||
private String harmonicNum;
|
||||
|
||||
@ApiModelProperty("主键")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("主备电站id")
|
||||
private String mainSubstationId;
|
||||
|
||||
@ApiModelProperty("主备电站名称")
|
||||
private String mainSubstationName;
|
||||
|
||||
@ApiModelProperty("主备电站电压等级")
|
||||
private String mainVoltageLevel;
|
||||
|
||||
@ApiModelProperty("主备电站电压等级名称")
|
||||
private String mainVoltageLevelName;
|
||||
|
||||
@ApiModelProperty("运维单位id")
|
||||
private String maintOrg;
|
||||
|
||||
@ApiModelProperty("运维单位名称")
|
||||
private String maintOrgName;
|
||||
|
||||
@ApiModelProperty("日最大值")
|
||||
private String maxValue;
|
||||
|
||||
@ApiModelProperty("日最小值")
|
||||
private String minValue;
|
||||
|
||||
@ApiModelProperty("监测日期")
|
||||
private String monitorDate;
|
||||
|
||||
@ApiModelProperty("监测点编号")
|
||||
private String monitorId;
|
||||
|
||||
@ApiModelProperty("场站属性")
|
||||
private String monitorObjectType;
|
||||
|
||||
@ApiModelProperty("场站属性名称")
|
||||
private String monitorObjectTypeName;
|
||||
|
||||
@ApiModelProperty("各站点名称,如:牵引站对应牵引站名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("日95值")
|
||||
private String nfValue;
|
||||
|
||||
@ApiModelProperty("一般限值")
|
||||
private String normalLimit;
|
||||
|
||||
@ApiModelProperty("铁路名称")
|
||||
private String railWayName;
|
||||
|
||||
@ApiModelProperty("铁路编号")
|
||||
private String railWayNumber;
|
||||
|
||||
@ApiModelProperty("铁路类型")
|
||||
private String railWayType;
|
||||
|
||||
@ApiModelProperty("铁路类型名称")
|
||||
private String railWayTypeName;
|
||||
|
||||
@ApiModelProperty("运行状态")
|
||||
private String runStatus;
|
||||
|
||||
@ApiModelProperty("运行状态名称")
|
||||
private String runStatusName;
|
||||
|
||||
@ApiModelProperty("相别")
|
||||
private String seq;
|
||||
|
||||
@ApiModelProperty("短时限值")
|
||||
private String shortLimit;
|
||||
|
||||
@ApiModelProperty("关联变电站id")
|
||||
private String stationId;
|
||||
|
||||
@ApiModelProperty("关联变电站名称")
|
||||
private String stationName;
|
||||
|
||||
@ApiModelProperty("变电站类型")
|
||||
private String stationType;
|
||||
|
||||
@ApiModelProperty("关联变电站电压等级")
|
||||
private String stationVoltageLevel;
|
||||
|
||||
@ApiModelProperty("关联变电站电压等级名称")
|
||||
private String stationVoltageLevelName;
|
||||
|
||||
@ApiModelProperty("行业分类")
|
||||
private String tradeCode;
|
||||
|
||||
@ApiModelProperty("行业分类名称")
|
||||
private String tradeCodeName;
|
||||
|
||||
@ApiModelProperty("接入电压等级")
|
||||
private String voltageLevel;
|
||||
|
||||
@ApiModelProperty("接入电压等级名称")
|
||||
private String voltageLevelName;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
package com.njcn.device.pms.pojo.vo.gw;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wr
|
||||
* @description
|
||||
* @date 2024/5/27 9:49
|
||||
*/
|
||||
@Data
|
||||
public class TypicalOverStation {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("副备电站id")
|
||||
private String auxiliarySubstationId;
|
||||
|
||||
@ApiModelProperty("副备电站名称")
|
||||
private String auxiliarySubstationName;
|
||||
|
||||
@ApiModelProperty("副备电站电压等级")
|
||||
private String auxiliaryVoltageLevel;
|
||||
|
||||
@ApiModelProperty("副备电站电压等级名称")
|
||||
private String auxiliaryVoltageLevelName;
|
||||
|
||||
@ApiModelProperty("母线电压等级")
|
||||
private String busVoltageLevel;
|
||||
|
||||
@ApiModelProperty("母线电压等级名称")
|
||||
private String busVoltageLevelName;
|
||||
|
||||
@ApiModelProperty("协议容量")
|
||||
private String capacity;
|
||||
|
||||
@ApiModelProperty("所属单位id")
|
||||
private String cityOrg;
|
||||
|
||||
@ApiModelProperty("所属单位名称")
|
||||
private String cityOrgName;
|
||||
|
||||
@ApiModelProperty("有效监测点数量")
|
||||
private Integer effectMonitorNum;
|
||||
|
||||
@ApiModelProperty("闪变超标天数")
|
||||
private Integer flicker;
|
||||
|
||||
@ApiModelProperty("谐波电流超标天数")
|
||||
private Integer gi;
|
||||
|
||||
@ApiModelProperty("谐波电压超标天数")
|
||||
private Integer gv;
|
||||
|
||||
@ApiModelProperty("三相不平衡超标天数")
|
||||
private Integer unban;
|
||||
|
||||
@ApiModelProperty("负序电流超标数")
|
||||
private Integer inseq;
|
||||
|
||||
@ApiModelProperty("主键")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("闪变是否超标")
|
||||
private String isFlicker;
|
||||
|
||||
@ApiModelProperty("谐波电流是否超标")
|
||||
private String isGi;
|
||||
|
||||
@ApiModelProperty("谐波电压是否超标")
|
||||
private String isGv;
|
||||
|
||||
@ApiModelProperty("负序电流是否超标")
|
||||
private String isInseq;
|
||||
|
||||
@ApiModelProperty("三相不平衡是否超标")
|
||||
private String isUnban;
|
||||
|
||||
@ApiModelProperty("主备电站id")
|
||||
private String mainSubstationId;
|
||||
|
||||
@ApiModelProperty("主备电站名称")
|
||||
private String mainSubstationName;
|
||||
|
||||
@ApiModelProperty("主备电站电压等级")
|
||||
private String mainVoltageLevel;
|
||||
|
||||
@ApiModelProperty("主备电站电压等级名称")
|
||||
private String mainVoltageLevelName;
|
||||
|
||||
@ApiModelProperty("运维单位id")
|
||||
private String maintOrg;
|
||||
|
||||
@ApiModelProperty("运维单位名称")
|
||||
private String maintOrgName;
|
||||
|
||||
@ApiModelProperty("监测日期")
|
||||
private String monitorDate;
|
||||
|
||||
@ApiModelProperty("场站属性")
|
||||
private String monitorObjectType;
|
||||
|
||||
@ApiModelProperty("场站属性名称")
|
||||
private String monitorObjectTypeName;
|
||||
|
||||
@ApiModelProperty("各站点名称,如:牵引站对应牵引站名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("铁路名称")
|
||||
private String railWayName;
|
||||
|
||||
@ApiModelProperty("铁路编号")
|
||||
private String railWayNumber;
|
||||
|
||||
@ApiModelProperty("铁路类型")
|
||||
private String railWayType;
|
||||
|
||||
@ApiModelProperty("铁路类型名称")
|
||||
private String railWayTypeName;
|
||||
|
||||
@ApiModelProperty("运行状态")
|
||||
private String runStatus;
|
||||
|
||||
@ApiModelProperty("运行状态名称")
|
||||
private String runStatusName;
|
||||
|
||||
@ApiModelProperty("关联变电站id")
|
||||
private String stationId;
|
||||
|
||||
@ApiModelProperty("关联变电站名称")
|
||||
private String stationName;
|
||||
|
||||
@ApiModelProperty("变电站类型")
|
||||
private String stationType;
|
||||
|
||||
@ApiModelProperty("关联变电站电压等级")
|
||||
private String stationVoltageLevel;
|
||||
|
||||
@ApiModelProperty("关联变电站电压等级名称")
|
||||
private String stationVoltageLevelName;
|
||||
|
||||
@ApiModelProperty("行业分类")
|
||||
private String tradeCode;
|
||||
|
||||
@ApiModelProperty("行业分类名称")
|
||||
private String tradeCodeName;
|
||||
|
||||
@ApiModelProperty("接入电压等级")
|
||||
private String voltageLevel;
|
||||
|
||||
@ApiModelProperty("接入电压等级名称")
|
||||
private String voltageLevelName;
|
||||
|
||||
}
|
||||
@@ -5,14 +5,13 @@ import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wr
|
||||
* @description
|
||||
* @description 有效监测点列表下穿详细信息
|
||||
* @date 2024/5/16 15:41
|
||||
*/
|
||||
@Data
|
||||
public class TypicalSourceEffectiveLine {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@ApiModelProperty("实收数")
|
||||
private Integer actualCollectNum;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wr
|
||||
* @description
|
||||
* @description 在线干扰源用户下穿实体类
|
||||
* @date 2024/5/16 9:36
|
||||
*/
|
||||
@Data
|
||||
@@ -24,6 +24,15 @@ public class TypicalSourceOnLine {
|
||||
@ApiModelProperty("副备电站电压等级名称")
|
||||
private String auxiliaryVoltageLevelName;
|
||||
|
||||
@ApiModelProperty("母线主键->自定义信息国网上送信息")
|
||||
private String busId;
|
||||
|
||||
@ApiModelProperty("母线名称->自定义信息国网上送信息")
|
||||
private String busName;
|
||||
|
||||
@ApiModelProperty("监测点编码->自定义信息国网上送信息")
|
||||
private String monitorId;
|
||||
|
||||
@ApiModelProperty("母线电压等级")
|
||||
private String busVoltageLevel;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user