有功功率趋势

This commit is contained in:
guofeihu
2024-08-28 11:28:20 +08:00
parent 00fd701122
commit aa0982fb81
17 changed files with 541 additions and 26 deletions

View File

@@ -3,8 +3,11 @@ package com.njcn.prepare.harmonic.api.event;
import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.prepare.harmonic.api.event.fallback.RActivePowerRangeFeignClientFallbackFactory;
import com.njcn.prepare.harmonic.pojo.po.RActivePowerRangePO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
* 有功功率趋势Feign客户端
@@ -20,4 +23,8 @@ public interface RActivePowerRangeFeignClient {
@PostMapping("/record")
HttpResult<Boolean> record();
@GetMapping("/getDataByLineId")
HttpResult<RActivePowerRangePO> getDataByLineId(@RequestParam("lineId") String lineId);
}

View File

@@ -4,6 +4,7 @@ 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.prepare.harmonic.api.event.RActivePowerRangeFeignClient;
import com.njcn.prepare.harmonic.pojo.po.RActivePowerRangePO;
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
@@ -33,6 +34,12 @@ public class RActivePowerRangeFeignClientFallbackFactory implements FallbackFact
log.error("{}异常,降级处理,异常为:{}", "有功功率趋势记录: ", throwable.toString());
throw new BusinessException(finalExceptionEnum);
}
@Override
public HttpResult<RActivePowerRangePO> getDataByLineId(String lineId) {
log.error("{}异常,降级处理,异常为:{}", "根据监测点ID获取有功功率趋势信息: ", throwable.toString());
throw new BusinessException(finalExceptionEnum);
}
};
}
}

View File

@@ -39,7 +39,7 @@ public class RActivePowerRangePO extends BaseEntity {
/**
* 0%~10%区间个数
*/
private Integer minsNum0;
private Integer minsNum0 = 0;
/**
* 0%~10%区间是否越限
@@ -54,7 +54,7 @@ public class RActivePowerRangePO extends BaseEntity {
/**
* 10%~20%区间个数
*/
private Integer minsNum1;
private Integer minsNum1 = 0;;
/**
* 10%~20%区间是否越限
@@ -69,7 +69,7 @@ public class RActivePowerRangePO extends BaseEntity {
/**
* 20%~30%区间个数
*/
private Integer minsNum2;
private Integer minsNum2 = 0;;
/**
* 20%~30%区间是否越限
@@ -84,7 +84,7 @@ public class RActivePowerRangePO extends BaseEntity {
/**
* 30%~40%区间个数
*/
private Integer minsNum3;
private Integer minsNum3 = 0;;
/**
* 30%~40%区间是否越限
@@ -99,7 +99,7 @@ public class RActivePowerRangePO extends BaseEntity {
/**
* 40%~50%区间个数
*/
private Integer minsNum4;
private Integer minsNum4 = 0;;
/**
* 40%~50%区间是否越限
@@ -114,7 +114,7 @@ public class RActivePowerRangePO extends BaseEntity {
/**
* 50%~60%区间个数
*/
private Integer minsNum5;
private Integer minsNum5 = 0;;
/**
* 50%~60%区间是否越限
@@ -129,7 +129,7 @@ public class RActivePowerRangePO extends BaseEntity {
/**
* 60%~70%区间个数
*/
private Integer minsNum6;
private Integer minsNum6 = 0;;
/**
* 60%~70%区间是否越限
@@ -144,7 +144,7 @@ public class RActivePowerRangePO extends BaseEntity {
/**
* 70%~80%区间个数
*/
private Integer minsNum7;
private Integer minsNum7 = 0;;
/**
* 70%~80%区间是否越限
@@ -159,7 +159,7 @@ public class RActivePowerRangePO extends BaseEntity {
/**
* 80%~90%区间个数
*/
private Integer minsNum8;
private Integer minsNum8 = 0;;
/**
* 80%~90%区间是否越限
@@ -174,7 +174,7 @@ public class RActivePowerRangePO extends BaseEntity {
/**
* 90%~100%区间个数
*/
private Integer minsNum9;
private Integer minsNum9 = 0;;
/**
* 90%~100%区间是否越限