冀北监测点试运行功能提交
This commit is contained in:
@@ -6,7 +6,9 @@ import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.pq.api.fallback.DeviceTreeClientFallbackFactory;
|
||||
import com.njcn.device.pq.api.fallback.LineIntegrityClientFallbackFactory;
|
||||
import com.njcn.device.pq.pojo.dto.LineDataQualityDTO;
|
||||
import com.njcn.device.pq.pojo.param.LineBaseQueryParam;
|
||||
import com.njcn.device.pq.pojo.param.LineDataQualityParam;
|
||||
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
||||
import com.njcn.device.pq.pojo.vo.AlarmStrategyVO;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -46,4 +48,7 @@ public interface LineIntegrityClient {
|
||||
*/
|
||||
@PostMapping("/getTotalIntegrityByLineIds")
|
||||
HttpResult<Float> getTotalIntegrityByLineIds(@RequestBody LineBaseQueryParam param);
|
||||
|
||||
@PostMapping("/lineDataQuality")
|
||||
HttpResult<List<LineDataQualityDTO>> getLineDataQuality(@RequestBody LineDataQualityParam lineDataQualityParam);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
import com.njcn.device.pq.api.AlarmClient;
|
||||
import com.njcn.device.pq.api.LineIntegrityClient;
|
||||
import com.njcn.device.pq.pojo.dto.LineDataQualityDTO;
|
||||
import com.njcn.device.pq.pojo.param.LineBaseQueryParam;
|
||||
import com.njcn.device.pq.pojo.param.LineDataQualityParam;
|
||||
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
||||
import com.njcn.device.pq.pojo.vo.AlarmStrategyVO;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
@@ -46,6 +48,12 @@ public class LineIntegrityClientFallbackFactory implements FallbackFactory<LineI
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<LineDataQualityDTO>> getLineDataQuality(LineDataQualityParam lineDataQualityParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "获取监测点的在线率和数据完成性", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.njcn.device.pq.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2024/5/22
|
||||
*/
|
||||
@Data
|
||||
public class LineDataQualityDTO {
|
||||
|
||||
private String lineId;
|
||||
|
||||
|
||||
/**
|
||||
* 在线率
|
||||
*/
|
||||
private Double onlineRate;
|
||||
|
||||
/**
|
||||
*数据完整性
|
||||
*/
|
||||
private Double integrityRate;
|
||||
|
||||
/**
|
||||
*数据符合性
|
||||
*/
|
||||
private Double suitRate;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.njcn.device.pq.pojo.param;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2024/5/22
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class LineDataQualityParam {
|
||||
|
||||
private String beginTime;
|
||||
|
||||
private String endTime;
|
||||
|
||||
private List<String> lineIds;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user