1.终端在线率
2.稳态指标合格率统计
This commit is contained in:
@@ -205,10 +205,10 @@ public class ExecutionCenter extends BaseController {
|
||||
if (CollectionUtils.isEmpty(calculatedParam.getIdList())) {
|
||||
Dept data = deptFeignClient.getRootDept().getData();
|
||||
deptGetLineParam.setDeptId(data.getId());
|
||||
List<DeptGetDeviceDTO> list = commTerminalGeneralClient.deptGetDeviceAndMonitor(deptGetLineParam).getData();
|
||||
List<DeptGetDeviceDTO> list = commTerminalGeneralClient.deptGetDevice(deptGetLineParam).getData();
|
||||
DeptGetDeviceDTO dto = list.stream().filter(po -> Objects.equals(po.getUnitId(), data.getId())).collect(Collectors.toList()).get(0);
|
||||
List<LineDevGetDTO> devList = dto.getDeviceList();
|
||||
calculatedParam.setIdList(devList.stream().distinct().collect(Collectors.toList()));
|
||||
calculatedParam.setIdList(devList.stream().map(LineDevGetDTO::getDevId).distinct().collect(Collectors.toList()));
|
||||
}
|
||||
LiteflowResponse liteflowResponse;
|
||||
if (baseParam.isRepair()) {
|
||||
|
||||
@@ -298,4 +298,13 @@ public class MeasurementExecutor extends BaseExecutor {
|
||||
public void dataLimitRateProcess(NodeComponent bindCmp) {
|
||||
dataCrossingService.limitRateHandler(bindCmp.getRequestData());
|
||||
}
|
||||
|
||||
@LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "dataLimitTarget", nodeType = NodeTypeEnum.COMMON)
|
||||
public boolean dataLimitTargetAccess(NodeComponent bindCmp) {
|
||||
return isAccess(bindCmp);
|
||||
}
|
||||
@LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "dataLimitTarget", nodeType = NodeTypeEnum.COMMON)
|
||||
public void dataLimitTargetProcess(NodeComponent bindCmp) {
|
||||
dataCrossingService.limitTargetHandler(bindCmp.getRequestData());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,9 @@ package com.njcn.algorithm.service.line;
|
||||
|
||||
|
||||
import com.njcn.algorithm.pojo.bo.CalculatedParam;
|
||||
import com.njcn.dataProcess.pojo.dto.QualifiedDetail;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
@@ -12,8 +15,23 @@ public interface IDataCrossingService {
|
||||
|
||||
/***
|
||||
* r_stat_limit_rate_d数据越线次数
|
||||
* @author xy
|
||||
* @author wr
|
||||
* @param calculatedParam 查询条件
|
||||
*/
|
||||
void limitRateHandler(CalculatedParam calculatedParam);
|
||||
|
||||
/***
|
||||
* r_stat_limit_target_d数据越线次数
|
||||
* @author wr
|
||||
* @param calculatedParam 查询条件
|
||||
*/
|
||||
void limitTargetHandler(CalculatedParam calculatedParam);
|
||||
|
||||
/**
|
||||
* 监测点稳态指标合格率(日)
|
||||
* @param calculatedParam
|
||||
* @Author: wr
|
||||
* @Date: 2025/3/12 16:03
|
||||
*/
|
||||
List<QualifiedDetail> limitQualifiedDayHandler(CalculatedParam calculatedParam);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,9 @@ package com.njcn.algorithm.service.line;
|
||||
|
||||
|
||||
import com.njcn.algorithm.pojo.bo.CalculatedParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataOnlineRateDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
@@ -17,4 +20,12 @@ public interface IDataOnlineRateService {
|
||||
* @param calculatedParam 查询条件
|
||||
*/
|
||||
void dataOnlineRate(CalculatedParam calculatedParam);
|
||||
|
||||
/**
|
||||
* 装置数据月在线率
|
||||
* @param calculatedParam
|
||||
* @Author: wr
|
||||
* @Date: 2025/3/12 16:18
|
||||
*/
|
||||
List<DataOnlineRateDto.Detail> dataOnlineRateMonth(CalculatedParam calculatedParam);
|
||||
}
|
||||
|
||||
@@ -4,13 +4,12 @@ package com.njcn.algorithm.serviceimpl.line;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.njcn.algorithm.pojo.bo.CalculatedParam;
|
||||
import com.njcn.algorithm.service.line.IDataCrossingService;
|
||||
import com.njcn.common.utils.PubUtils;
|
||||
import com.njcn.dataProcess.api.*;
|
||||
import com.njcn.dataProcess.constant.PhaseType;
|
||||
import com.njcn.dataProcess.enums.DataCleanEnum;
|
||||
@@ -25,14 +24,15 @@ import com.njcn.influx.pojo.constant.InfluxDBTableConstant;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
@@ -68,6 +68,10 @@ public class IDataCrossingServiceImpl implements IDataCrossingService {
|
||||
private DataLimitRateDetailFeignClient dataLimitRateDetailFeignClient;
|
||||
@Resource
|
||||
private PqDataVerifyFeignClient pqDataVerifyFeignClient;
|
||||
@Resource
|
||||
private DataLimitTargetFeignClient dataLimitTargetFeignClient;
|
||||
|
||||
|
||||
@Override
|
||||
public void limitRateHandler(CalculatedParam calculatedParam) {
|
||||
logger.info("{},limitRate表转r_stat_limit_rate_d算法开始=====》", LocalDateTime.now());
|
||||
@@ -210,17 +214,112 @@ public class IDataCrossingServiceImpl implements IDataCrossingService {
|
||||
|
||||
if (CollUtil.isNotEmpty(result)) {
|
||||
//存储数据
|
||||
List<DataLimitRateDto> dataLimitRate = result.stream().map(DataLimitDetailDto::getDataLimitRate).filter(x-> ObjectUtil.isNotNull(x)).collect(Collectors.toList());
|
||||
List<DataLimitRateDto> dataLimitRate = result.stream().map(DataLimitDetailDto::getDataLimitRate).filter(x -> ObjectUtil.isNotNull(x)).collect(Collectors.toList());
|
||||
dataLimitRateFeignClient.batchInsertion(dataLimitRate);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(result)) {
|
||||
//存储数据
|
||||
List<DataLimitRateDetailDto> detail = result.stream().map(DataLimitDetailDto::getDataLimitRateDetail).filter(x-> ObjectUtil.isNotNull(x)).collect(Collectors.toList());
|
||||
List<DataLimitRateDetailDto> detail = result.stream().map(DataLimitDetailDto::getDataLimitRateDetail).filter(x -> ObjectUtil.isNotNull(x)).collect(Collectors.toList());
|
||||
dataLimitRateDetailFeignClient.batchInsertion(detail);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void limitTargetHandler(CalculatedParam calculatedParam) {
|
||||
log.info(LocalDateTime.now() + "r_stat_limit_target_d开始执行=======》");
|
||||
List<DataLimitTargetDto> list = new ArrayList<>();
|
||||
List<DataLimitRateDto> limitRateData = new ArrayList<>();
|
||||
//远程接口获取分钟数据
|
||||
LineCountEvaluateParam lineParam = new LineCountEvaluateParam();
|
||||
lineParam.setStartTime(TimeUtils.getBeginOfDay(calculatedParam.getDataDate()));
|
||||
lineParam.setEndTime(TimeUtils.getEndOfDay(calculatedParam.getDataDate()));
|
||||
List<String> lineIds = calculatedParam.getIdList();
|
||||
|
||||
|
||||
//以尺寸100分片,查询数据
|
||||
List<List<String>> pendingIds = ListUtils.partition(lineIds, NUM);
|
||||
for (List<String> pendingId : pendingIds) {
|
||||
lineParam.setLineId(pendingId);
|
||||
limitRateData.addAll(dataLimitRateFeignClient.getRawData(lineParam).getData());
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(limitRateData)) {
|
||||
for (DataLimitRateDto limitRate : limitRateData) {
|
||||
DataLimitTargetDto limitTarget = new DataLimitTargetDto();
|
||||
limitTarget.setTime(LocalDateTimeUtil.parseDate(calculatedParam.getDataDate(), DatePattern.NORM_DATE_PATTERN));
|
||||
limitTarget.setLineId(limitRate.getLineId());
|
||||
limitTarget.setPhasicType(limitRate.getPhasicType());
|
||||
chanelData(limitRate, limitTarget);
|
||||
list.add(limitTarget);
|
||||
}
|
||||
}
|
||||
if (CollUtil.isNotEmpty(list)) {
|
||||
dataLimitTargetFeignClient.batchInsertion(list);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<QualifiedDetail> limitQualifiedDayHandler(CalculatedParam calculatedParam) {
|
||||
LineCountEvaluateParam lineParam = new LineCountEvaluateParam();
|
||||
lineParam.setStartTime(TimeUtils.getBeginOfMonth(calculatedParam.getDataDate()));
|
||||
lineParam.setEndTime(TimeUtils.getEndOfMonth(calculatedParam.getDataDate()));
|
||||
List<String> devIdList = calculatedParam.getIdList();
|
||||
|
||||
List<QualifiedDetail> info = new ArrayList<>();
|
||||
List<List<String>> pendingIds = ListUtils.partition(devIdList, NUM);
|
||||
for (List<String> pendingId : pendingIds) {
|
||||
lineParam.setLineId(pendingId);
|
||||
List<DataLimitRateDto> data = dataLimitRateFeignClient.getRawData(lineParam).getData();
|
||||
Map<String, List<DataLimitRateDto>> limitRateMap = data.stream().collect(Collectors.groupingBy(DataLimitRateDto::getLineId));
|
||||
limitRateMap.forEach((key, value) -> {
|
||||
QualifiedDetail qualified = new QualifiedDetail();
|
||||
qualified.setLineId(key);
|
||||
qualified.setTime(calculatedParam.getDataDate());
|
||||
int all = value.stream().mapToInt(DataLimitRateDto::getAllTime).sum();
|
||||
if (all > 0) {
|
||||
qualified.setFreqDevOvertime(PubUtils.doubleRound(2, 100.0 - (value.stream().mapToInt(DataLimitRateDto::getFreqDevOvertime).sum() * 100.0 / all)));
|
||||
qualified.setVoltageDevOvertime(PubUtils.doubleRound(2, 100.0 - (value.stream().mapToInt(DataLimitRateDto::getVoltageDevOvertime).sum() * 100.0 / all)));
|
||||
qualified.setUbalanceOvertime(PubUtils.doubleRound(2, 100.0 - (value.stream().mapToInt(DataLimitRateDto::getUbalanceOvertime).sum() * 100.0 / all)));
|
||||
qualified.setUaberranceOvertime(PubUtils.doubleRound(2, 100.0 - (value.stream().mapToInt(DataLimitRateDto::getUaberranceOvertime).sum() * 100.0 / all)));
|
||||
qualified.setINegOvertime(PubUtils.doubleRound(2, 100.0 - (value.stream().mapToInt(DataLimitRateDto::getINegOvertime).sum() * 100.0 / all)));
|
||||
setOverTime(2,25,"getUharm",value, qualified, all);
|
||||
setOverTime(2,25,"getIharm",value, qualified, all);
|
||||
setOverTime(1,16,"getInuharm",value, qualified, all);
|
||||
}
|
||||
int flickerAll = value.stream().mapToInt(DataLimitRateDto::getFlickerAllTime).sum();
|
||||
if (flickerAll > 0) {
|
||||
qualified.setFlickerOvertime(PubUtils.doubleRound(2, 100.0 - (value.stream().mapToInt(DataLimitRateDto::getFlickerOvertime).sum() * 100.0 / flickerAll)));
|
||||
}
|
||||
info.add(qualified);
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
return info;
|
||||
}
|
||||
|
||||
private static void setOverTime(Integer start, Integer end, String targetName,List<DataLimitRateDto> value, QualifiedDetail qualified, int all) {
|
||||
for (int i = start; i <= end; i++) {
|
||||
// 构造方法名
|
||||
String methodName = targetName + i + "Overtime";
|
||||
try {
|
||||
Field finalField = DataLimitRateDto.class.getDeclaredField(methodName);
|
||||
finalField.setAccessible(true);
|
||||
finalField.set(qualified, PubUtils.doubleRound(2, 100.0 - (value.stream().mapToInt(temp -> {
|
||||
Integer o;
|
||||
try {
|
||||
o = (Integer) finalField.get(temp);
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return o.intValue();
|
||||
}).sum() * 100.0 / all)));
|
||||
} catch (NoSuchFieldException | IllegalAccessException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Description: getData
|
||||
@@ -230,18 +329,18 @@ public class IDataCrossingServiceImpl implements IDataCrossingService {
|
||||
* @Date: 2022/10/18
|
||||
*/
|
||||
private List<DataLimitDetailDto> getData(String dataDate,
|
||||
Overlimit overlimit,
|
||||
List<DataVDto> allTimeList,
|
||||
List<DataPltDto> flickerAllTimeList,
|
||||
List<DataHarmDto> dataHarmRateVPOList,
|
||||
List<DataIDto> dataIPOList,
|
||||
List<DataHarmDto> dataInHarmVPOList,
|
||||
List<DataVDto> dataVPOList,
|
||||
List<DataVDto> dataVPOUnbalanceList,
|
||||
List<DataIDto> dataIPONegList,
|
||||
List<DataVDto> dataVPOFreqList,
|
||||
List<DataVDto> dataVPODevList,
|
||||
List<DataPltDto> dataPltPOList) {
|
||||
Overlimit overlimit,
|
||||
List<DataVDto> allTimeList,
|
||||
List<DataPltDto> flickerAllTimeList,
|
||||
List<DataHarmDto> dataHarmRateVPOList,
|
||||
List<DataIDto> dataIPOList,
|
||||
List<DataHarmDto> dataInHarmVPOList,
|
||||
List<DataVDto> dataVPOList,
|
||||
List<DataVDto> dataVPOUnbalanceList,
|
||||
List<DataIDto> dataIPONegList,
|
||||
List<DataVDto> dataVPOFreqList,
|
||||
List<DataVDto> dataVPODevList,
|
||||
List<DataPltDto> dataPltPOList) {
|
||||
List<DataLimitDetailDto> result = new ArrayList<>();
|
||||
|
||||
Map<String, List<DataHarmDto>> harmRateVByPhaseType = new HashMap<>();
|
||||
@@ -288,9 +387,10 @@ public class IDataCrossingServiceImpl implements IDataCrossingService {
|
||||
result.add(t);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @param lineParam
|
||||
* @Description:
|
||||
* @Author: wr
|
||||
* @Date: 2025/3/11 9:04
|
||||
*/
|
||||
@@ -302,7 +402,7 @@ public class IDataCrossingServiceImpl implements IDataCrossingService {
|
||||
Map<String, List<String>> timeMap = pqDataVerifies.stream()
|
||||
.collect(Collectors.groupingBy(
|
||||
PqDataVerify::getLineId,
|
||||
Collectors.mapping(item->TimeUtils.LocalDateTimeToString(item.getTime()), Collectors.toList())
|
||||
Collectors.mapping(item -> TimeUtils.LocalDateTimeToString(item.getTime()), Collectors.toList())
|
||||
));
|
||||
lineParam.setAbnormalTime(timeMap);
|
||||
}
|
||||
@@ -345,8 +445,8 @@ public class IDataCrossingServiceImpl implements IDataCrossingService {
|
||||
// 获取 Overlimit 类的 getUharmx 方法
|
||||
Method getUharmMethod = Overlimit.class.getMethod("getUharm" + i);
|
||||
float limit = (float) getUharmMethod.invoke(overlimit);
|
||||
if (value > limit ) {
|
||||
addAbnormalData(v[i - 2], item.getValueType(),item.getPhasicType(), item.getMinTime(), value, limit);
|
||||
if (value > limit) {
|
||||
addAbnormalData(v[i - 2], item.getValueType(), item.getPhasicType(), item.getMinTime(), value, limit);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -371,8 +471,8 @@ public class IDataCrossingServiceImpl implements IDataCrossingService {
|
||||
// 获取 Overlimit 类的 getUharmx 方法
|
||||
Method getUharmMethod = Overlimit.class.getMethod("getIharm" + j);
|
||||
float limit = (float) getUharmMethod.invoke(overlimit);
|
||||
if (value > limit ) {
|
||||
addAbnormalData(i[j - 2], item.getValueType(),item.getPhasicType(), item.getMinTime(), value, limit);
|
||||
if (value > limit) {
|
||||
addAbnormalData(i[j - 2], item.getValueType(), item.getPhasicType(), item.getMinTime(), value, limit);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -397,7 +497,7 @@ public class IDataCrossingServiceImpl implements IDataCrossingService {
|
||||
Method getUharmMethod = Overlimit.class.getMethod("getInuharm" + j);
|
||||
float limit = (float) getUharmMethod.invoke(overlimit);
|
||||
if (value > limit) {
|
||||
addAbnormalData(uHarm[j - 1],item.getPhasicType(), item.getValueType(), item.getMinTime(), value, limit);
|
||||
addAbnormalData(uHarm[j - 1], item.getPhasicType(), item.getValueType(), item.getMinTime(), value, limit);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -409,7 +509,7 @@ public class IDataCrossingServiceImpl implements IDataCrossingService {
|
||||
if (!CollectionUtils.isEmpty(dataVPOList)) {
|
||||
for (DataVDto item : dataVPOList) {
|
||||
if (item.getVThd() > overlimit.getUaberrance()) {
|
||||
addAbnormalData(thd,item.getPhasicType(), item.getValueType(), item.getMinTime(), item.getVThd(), overlimit.getUaberrance());
|
||||
addAbnormalData(thd, item.getPhasicType(), item.getValueType(), item.getMinTime(), item.getVThd(), overlimit.getUaberrance());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -418,11 +518,11 @@ public class IDataCrossingServiceImpl implements IDataCrossingService {
|
||||
for (DataVDto item : dataVPODevList) {
|
||||
if (item.getVlDev() >= 0) {
|
||||
if (item.getVlDev() > overlimit.getVoltageDev()) {
|
||||
addAbnormalData(uDev,item.getPhasicType(), item.getValueType(), item.getMinTime(), item.getVlDev(), overlimit.getVoltageDev());
|
||||
addAbnormalData(uDev, item.getPhasicType(), item.getValueType(), item.getMinTime(), item.getVlDev(), overlimit.getVoltageDev());
|
||||
}
|
||||
} else {
|
||||
if (Math.abs(item.getVuDev()) > Math.abs(overlimit.getUvoltageDev()) ) {
|
||||
addAbnormalData(uDev,item.getPhasicType(), item.getValueType(), item.getMinTime(), item.getVlDev(), overlimit.getUvoltageDev());
|
||||
if (Math.abs(item.getVuDev()) > Math.abs(overlimit.getUvoltageDev())) {
|
||||
addAbnormalData(uDev, item.getPhasicType(), item.getValueType(), item.getMinTime(), item.getVlDev(), overlimit.getUvoltageDev());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -430,8 +530,8 @@ public class IDataCrossingServiceImpl implements IDataCrossingService {
|
||||
//长时间闪变
|
||||
if (!CollectionUtils.isEmpty(dataPltPOList)) {
|
||||
for (DataPltDto item : dataPltPOList) {
|
||||
if (item.getPlt() > overlimit.getFlicker() ) {
|
||||
addAbnormalData(flicker,item.getPhasicType(), item.getValueType(), item.getMinTime(), item.getPlt(), overlimit.getFlicker());
|
||||
if (item.getPlt() > overlimit.getFlicker()) {
|
||||
addAbnormalData(flicker, item.getPhasicType(), item.getValueType(), item.getMinTime(), item.getPlt(), overlimit.getFlicker());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -488,7 +588,7 @@ public class IDataCrossingServiceImpl implements IDataCrossingService {
|
||||
Method getUharmMethod = Overlimit.class.getMethod("getUharm" + i);
|
||||
float limit = (float) getUharmMethod.invoke(overlimit);
|
||||
if (value > limit) {
|
||||
addAbnormalData(v[i - 2],item.getPhasicType(), item.getValueType(), item.getMinTime(), value, limit);
|
||||
addAbnormalData(v[i - 2], item.getPhasicType(), item.getValueType(), item.getMinTime(), value, limit);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -513,8 +613,8 @@ public class IDataCrossingServiceImpl implements IDataCrossingService {
|
||||
// 获取 Overlimit 类的 getUharmx 方法
|
||||
Method getUharmMethod = Overlimit.class.getMethod("getIharm" + j);
|
||||
float limit = (float) getUharmMethod.invoke(overlimit);
|
||||
if (value > limit ) {
|
||||
addAbnormalData(i[j - 2],item.getPhasicType(), item.getValueType(), item.getMinTime(), value, limit);
|
||||
if (value > limit) {
|
||||
addAbnormalData(i[j - 2], item.getPhasicType(), item.getValueType(), item.getMinTime(), value, limit);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -538,8 +638,8 @@ public class IDataCrossingServiceImpl implements IDataCrossingService {
|
||||
// 获取 Overlimit 类的 getUharmx 方法
|
||||
Method getUharmMethod = Overlimit.class.getMethod("getInuharm" + j);
|
||||
float limit = (float) getUharmMethod.invoke(overlimit);
|
||||
if (value > limit ) {
|
||||
addAbnormalData(uHarm[j - 1],item.getPhasicType(), item.getValueType(), item.getMinTime(), value, limit);
|
||||
if (value > limit) {
|
||||
addAbnormalData(uHarm[j - 1], item.getPhasicType(), item.getValueType(), item.getMinTime(), value, limit);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -550,16 +650,16 @@ public class IDataCrossingServiceImpl implements IDataCrossingService {
|
||||
//电压总谐波畸变率
|
||||
if (!CollectionUtils.isEmpty(dataVPOList)) {
|
||||
for (DataVDto item : dataVPOList) {
|
||||
if (item.getVThd() > overlimit.getUaberrance() ) {
|
||||
addAbnormalData(thd,item.getPhasicType(), item.getValueType(), item.getMinTime(), item.getVThd(), overlimit.getUaberrance());
|
||||
if (item.getVThd() > overlimit.getUaberrance()) {
|
||||
addAbnormalData(thd, item.getPhasicType(), item.getValueType(), item.getMinTime(), item.getVThd(), overlimit.getUaberrance());
|
||||
}
|
||||
}
|
||||
}
|
||||
//三相电压不平衡度
|
||||
if (!CollectionUtils.isEmpty(dataVPOUnbalanceList)) {
|
||||
for (DataVDto item : dataVPOUnbalanceList) {
|
||||
if (item.getVUnbalance() > overlimit.getUbalance() ) {
|
||||
addAbnormalData(uAberrance,item.getPhasicType(), item.getValueType(), item.getMinTime(), item.getVUnbalance(), overlimit.getUbalance());
|
||||
if (item.getVUnbalance() > overlimit.getUbalance()) {
|
||||
addAbnormalData(uAberrance, item.getPhasicType(), item.getValueType(), item.getMinTime(), item.getVUnbalance(), overlimit.getUbalance());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -567,15 +667,15 @@ public class IDataCrossingServiceImpl implements IDataCrossingService {
|
||||
if (!CollectionUtils.isEmpty(dataIPONegList)) {
|
||||
for (DataIDto item : dataIPONegList) {
|
||||
if (item.getINeg() > overlimit.getINeg()) {
|
||||
addAbnormalData(iNeg,item.getPhasicType(), item.getValueType(), item.getMinTime(), item.getINeg(), overlimit.getINeg());
|
||||
addAbnormalData(iNeg, item.getPhasicType(), item.getValueType(), item.getMinTime(), item.getINeg(), overlimit.getINeg());
|
||||
}
|
||||
}
|
||||
}
|
||||
//频率偏差
|
||||
if (!CollectionUtils.isEmpty(dataVPOFreqList)) {
|
||||
for (DataVDto item : dataVPOFreqList) {
|
||||
if (item.getFreqDev() > overlimit.getFreqDev() ) {
|
||||
addAbnormalData(freqDev,item.getPhasicType(), item.getValueType(), item.getMinTime(), item.getFreqDev(), overlimit.getFreqDev());
|
||||
if (item.getFreqDev() > overlimit.getFreqDev()) {
|
||||
addAbnormalData(freqDev, item.getPhasicType(), item.getValueType(), item.getMinTime(), item.getFreqDev(), overlimit.getFreqDev());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -584,12 +684,12 @@ public class IDataCrossingServiceImpl implements IDataCrossingService {
|
||||
if (!CollectionUtils.isEmpty(dataVPODevList)) {
|
||||
for (DataVDto item : dataVPODevList) {
|
||||
if (item.getVlDev() >= 0) {
|
||||
if (item.getVlDev() > overlimit.getVoltageDev() ) {
|
||||
addAbnormalData(uDev,item.getPhasicType(), item.getMinTime(), item.getValueType(), item.getVlDev(), overlimit.getVoltageDev());
|
||||
if (item.getVlDev() > overlimit.getVoltageDev()) {
|
||||
addAbnormalData(uDev, item.getPhasicType(), item.getMinTime(), item.getValueType(), item.getVlDev(), overlimit.getVoltageDev());
|
||||
}
|
||||
} else {
|
||||
if (Math.abs(item.getVuDev()) > Math.abs(overlimit.getUvoltageDev()) ) {
|
||||
addAbnormalData(uDev,item.getPhasicType(), item.getMinTime(), item.getValueType(), item.getVlDev(), overlimit.getUvoltageDev());
|
||||
if (Math.abs(item.getVuDev()) > Math.abs(overlimit.getUvoltageDev())) {
|
||||
addAbnormalData(uDev, item.getPhasicType(), item.getMinTime(), item.getValueType(), item.getVlDev(), overlimit.getUvoltageDev());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -597,8 +697,8 @@ public class IDataCrossingServiceImpl implements IDataCrossingService {
|
||||
//长时间闪变
|
||||
if (!CollectionUtils.isEmpty(dataPltPOList)) {
|
||||
for (DataPltDto item : dataPltPOList) {
|
||||
if (item.getPlt() > overlimit.getFlicker() ) {
|
||||
addAbnormalData(flicker,item.getPhasicType(), item.getValueType(), item.getMinTime(), item.getPlt(), overlimit.getFlicker());
|
||||
if (item.getPlt() > overlimit.getFlicker()) {
|
||||
addAbnormalData(flicker, item.getPhasicType(), item.getValueType(), item.getMinTime(), item.getPlt(), overlimit.getFlicker());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -683,7 +783,7 @@ public class IDataCrossingServiceImpl implements IDataCrossingService {
|
||||
v[0].size() + v[1].size() + v[2].size() + v[3].size() + v[4].size() + v[5].size() + v[6].size() + v[7].size() + v[8].size() + v[9].size() + v[11].size() + v[12].size() + v[13].size() + v[14].size() + v[15].size() + v[16].size() + v[17].size() + v[18].size() + v[19].size() + v[20].size() + v[21].size() + v[22].size() + v[23].size() +
|
||||
i[0].size() + i[1].size() + i[2].size() + i[3].size() + i[4].size() + i[5].size() + i[6].size() + i[7].size() + i[8].size() + i[9].size() + i[10].size() + i[11].size() + i[12].size() + i[13].size() + i[14].size() + i[15].size() + i[16].size() + i[17].size() + i[18].size() + i[19].size() + i[20].size() + i[21].size() + i[22].size() + i[23].size() +
|
||||
uHarm[0].size() + uHarm[1].size() + uHarm[2].size() + uHarm[3].size() + uHarm[4].size() + uHarm[5].size() + uHarm[6].size() + uHarm[7].size() + uHarm[8].size() + uHarm[9].size() + uHarm[10].size() + uHarm[11].size() + uHarm[12].size() + uHarm[13].size() + uHarm[14].size() + uHarm[15].size();
|
||||
if(detailAllTime>0){
|
||||
if (detailAllTime > 0) {
|
||||
DataLimitRateDetailDto detail = new DataLimitRateDetailDto();
|
||||
detail.setLineId(lineId);
|
||||
detail.setTime(LocalDateTimeUtil.parseDate(dataDate, DatePattern.NORM_DATE_PATTERN));
|
||||
@@ -830,31 +930,32 @@ public class IDataCrossingServiceImpl implements IDataCrossingService {
|
||||
limitRate.setInuharm16Overtime(uHarm[15].size());
|
||||
return limitRate;
|
||||
}
|
||||
|
||||
private String toJson(List<AbnormalData> list) {
|
||||
Map<String, List<AbnormalData>> abnormalMap = list.stream().collect(Collectors.groupingBy(x->x.getPhasic()+"_"+x.getValueType()));
|
||||
List<AbnormalData.Json> info=new ArrayList<>();
|
||||
abnormalMap.forEach((key,value)->{
|
||||
Map<String, List<AbnormalData>> abnormalMap = list.stream().collect(Collectors.groupingBy(x -> x.getPhasic() + "_" + x.getValueType()));
|
||||
List<AbnormalData.Json> info = new ArrayList<>();
|
||||
abnormalMap.forEach((key, value) -> {
|
||||
String[] split = key.split("_");
|
||||
AbnormalData.Json json=new AbnormalData.Json();
|
||||
AbnormalData.Json json = new AbnormalData.Json();
|
||||
json.setPhasic(split[0]);
|
||||
json.setValueType(split[1]);
|
||||
json.setTime(String.join(",", value.stream()
|
||||
.map(abnormal -> abnormal.getTime())
|
||||
.distinct()
|
||||
.collect(Collectors.toList())));
|
||||
json.setValue(String.join(",", value.stream()
|
||||
.map(abnormal -> abnormal.getValue()+"")
|
||||
.distinct()
|
||||
.collect(Collectors.toList())));
|
||||
.map(abnormal -> abnormal.getTime())
|
||||
.distinct()
|
||||
.collect(Collectors.toList())));
|
||||
json.setValue(String.join(",", value.stream()
|
||||
.map(abnormal -> abnormal.getValue() + "")
|
||||
.distinct()
|
||||
.collect(Collectors.toList())));
|
||||
info.add(json);
|
||||
});
|
||||
if(CollUtil.isNotEmpty(info)){
|
||||
if (CollUtil.isNotEmpty(info)) {
|
||||
return JSON.toJSONString(info);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
private void addAbnormalData(List<AbnormalData> list,String phasicType, String valueType, String time, Double value, float overLimitValue) {
|
||||
private void addAbnormalData(List<AbnormalData> list, String phasicType, String valueType, String time, Double value, float overLimitValue) {
|
||||
AbnormalData data = new AbnormalData();
|
||||
data.setTime(time.substring(11, time.length()));
|
||||
data.setPhasic(phasicType);
|
||||
@@ -863,4 +964,107 @@ public class IDataCrossingServiceImpl implements IDataCrossingService {
|
||||
data.setOverLimitValue(overLimitValue);
|
||||
list.add(data);
|
||||
}
|
||||
|
||||
|
||||
private void chanelData(DataLimitRateDto limitRate, DataLimitTargetDto limitTarget) {
|
||||
//有一个指标超标,allTime则为1
|
||||
int allTime = limitRate.getFreqDevOvertime() + limitRate.getVoltageDevOvertime() + limitRate.getUbalanceOvertime() + limitRate.getUaberranceOvertime() + limitRate.getINegOvertime();
|
||||
try {
|
||||
Class<?> clazz = limitRate.getClass();
|
||||
for (int i = 2; i <= 25; i++) {
|
||||
String methodName = "getUharm" + i + "Overtime";
|
||||
String methodName2 = "getIharm" + i + "Overtime";
|
||||
Method method = clazz.getMethod(methodName);
|
||||
int overtime = (int) method.invoke(limitRate);
|
||||
allTime += overtime;
|
||||
Method method2 = clazz.getMethod(methodName2);
|
||||
int overtime2 = (int) method2.invoke(limitRate);
|
||||
allTime += overtime2;
|
||||
}
|
||||
for (int i = 1; i <= 16; i++) {
|
||||
String methodName = "getInuharm" + i + "Overtime";
|
||||
Method method = clazz.getMethod(methodName);
|
||||
int overtime = (int) method.invoke(limitRate);
|
||||
allTime += overtime;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.getMessage();
|
||||
}
|
||||
limitTarget.setAllTime((allTime > 0) ? 1 : 0);
|
||||
//闪变指标超标,flickerAllTime则为1
|
||||
limitTarget.setFlickerAllTime((limitRate.getFlickerOvertime() > 0) ? 1 : 0);
|
||||
limitTarget.setFreqDevOvertime((limitRate.getFreqDevOvertime() > 0) ? 1 : 0);
|
||||
limitTarget.setVoltageDevOvertime((limitRate.getVoltageDevOvertime() > 0) ? 1 : 0);
|
||||
limitTarget.setUbalanceOvertime((limitRate.getUbalanceOvertime() > 0) ? 1 : 0);
|
||||
limitTarget.setFlickerOvertime((limitRate.getFlickerOvertime() > 0) ? 1 : 0);
|
||||
limitTarget.setUaberranceOvertime((limitRate.getUaberranceOvertime() > 0) ? 1 : 0);
|
||||
limitTarget.setINegOvertime((limitRate.getINegOvertime() > 0) ? 1 : 0);
|
||||
|
||||
limitTarget.setUharm2Overtime((limitRate.getUharm2Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setUharm3Overtime((limitRate.getUharm3Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setUharm4Overtime((limitRate.getUharm4Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setUharm5Overtime((limitRate.getUharm5Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setUharm6Overtime((limitRate.getUharm6Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setUharm7Overtime((limitRate.getUharm7Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setUharm8Overtime((limitRate.getUharm8Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setUharm9Overtime((limitRate.getUharm9Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setUharm10Overtime((limitRate.getUharm10Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setUharm11Overtime((limitRate.getUharm11Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setUharm12Overtime((limitRate.getUharm12Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setUharm13Overtime((limitRate.getUharm13Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setUharm14Overtime((limitRate.getUharm14Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setUharm15Overtime((limitRate.getUharm15Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setUharm16Overtime((limitRate.getUharm16Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setUharm17Overtime((limitRate.getUharm17Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setUharm18Overtime((limitRate.getUharm18Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setUharm19Overtime((limitRate.getUharm19Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setUharm20Overtime((limitRate.getUharm20Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setUharm21Overtime((limitRate.getUharm21Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setUharm22Overtime((limitRate.getUharm22Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setUharm23Overtime((limitRate.getUharm23Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setUharm24Overtime((limitRate.getUharm24Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setUharm25Overtime((limitRate.getUharm25Overtime() > 0) ? 1 : 0);
|
||||
|
||||
limitTarget.setIharm2Overtime((limitRate.getIharm2Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setIharm3Overtime((limitRate.getIharm3Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setIharm4Overtime((limitRate.getIharm4Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setIharm5Overtime((limitRate.getIharm5Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setIharm6Overtime((limitRate.getIharm6Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setIharm7Overtime((limitRate.getIharm7Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setIharm8Overtime((limitRate.getIharm8Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setIharm9Overtime((limitRate.getIharm9Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setIharm10Overtime((limitRate.getIharm10Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setIharm11Overtime((limitRate.getIharm11Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setIharm12Overtime((limitRate.getIharm12Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setIharm13Overtime((limitRate.getIharm13Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setIharm14Overtime((limitRate.getIharm14Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setIharm15Overtime((limitRate.getIharm15Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setIharm16Overtime((limitRate.getIharm16Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setIharm17Overtime((limitRate.getIharm17Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setIharm18Overtime((limitRate.getIharm18Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setIharm19Overtime((limitRate.getIharm19Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setIharm20Overtime((limitRate.getIharm20Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setIharm21Overtime((limitRate.getIharm21Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setIharm22Overtime((limitRate.getIharm22Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setIharm23Overtime((limitRate.getIharm23Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setIharm24Overtime((limitRate.getIharm24Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setIharm25Overtime((limitRate.getIharm25Overtime() > 0) ? 1 : 0);
|
||||
|
||||
limitTarget.setInuharm1Overtime((limitRate.getInuharm1Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setInuharm2Overtime((limitRate.getInuharm2Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setInuharm3Overtime((limitRate.getInuharm3Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setInuharm4Overtime((limitRate.getInuharm4Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setInuharm5Overtime((limitRate.getInuharm5Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setInuharm6Overtime((limitRate.getInuharm6Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setInuharm7Overtime((limitRate.getInuharm7Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setInuharm8Overtime((limitRate.getInuharm8Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setInuharm9Overtime((limitRate.getInuharm9Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setInuharm10Overtime((limitRate.getInuharm10Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setInuharm11Overtime((limitRate.getInuharm11Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setInuharm12Overtime((limitRate.getInuharm12Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setInuharm13Overtime((limitRate.getInuharm13Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setInuharm14Overtime((limitRate.getInuharm14Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setInuharm15Overtime((limitRate.getInuharm15Overtime() > 0) ? 1 : 0);
|
||||
limitTarget.setInuharm16Overtime((limitRate.getInuharm16Overtime() > 0) ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,9 +14,16 @@ import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataOnlineRateDto;
|
||||
import com.njcn.dataProcess.pojo.dto.PqsCommunicateDto;
|
||||
import com.njcn.dataProcess.util.TimeUtils;
|
||||
import com.njcn.device.biz.commApi.CommTerminalGeneralClient;
|
||||
import com.njcn.device.biz.pojo.dto.DeptGetDeviceDTO;
|
||||
import com.njcn.device.biz.pojo.dto.LineDevGetDTO;
|
||||
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
||||
import com.njcn.influx.deprecated.InfluxDBPublicParam;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.pojo.po.Dept;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -39,41 +46,57 @@ public class IDataOnlineRateServiceImpl implements IDataOnlineRateService {
|
||||
private DataVFeignClient dataVFeignClient;
|
||||
@Resource
|
||||
private DataOnlineRateFeignClient onlineRateFeignClient;
|
||||
@Resource
|
||||
private CommTerminalGeneralClient commTerminalGeneralClient;
|
||||
@Resource
|
||||
private DeptFeignClient deptFeignClient;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void dataOnlineRate(CalculatedParam calculatedParam) {
|
||||
|
||||
LineCountEvaluateParam lineParam = new LineCountEvaluateParam();
|
||||
lineParam.setStartTime(TimeUtils.getBeginOfDay(calculatedParam.getDataDate()));
|
||||
lineParam.setEndTime(TimeUtils.getEndOfDay(calculatedParam.getDataDate()));
|
||||
List<LineDevGetDTO> devList = calculatedParam.getIdList();
|
||||
List<String> devIdList = calculatedParam.getIdList();
|
||||
|
||||
Map<String, List<LineDevGetDTO>> LineDevGetMap = devList.stream().collect(Collectors.groupingBy(LineDevGetDTO::getDevId));
|
||||
List<List<String>> pendingIds = ListUtils.partition(devIdList,NUM);
|
||||
List<DataOnlineRateDto.Detail> list = new ArrayList<>();
|
||||
if(ObjectUtil.isNotNull(calculatedParam.getType())){
|
||||
LineDevGetMap.forEach((key,value)->{
|
||||
DataOnlineRateDto.Detail onlineRateDpo = new DataOnlineRateDto.Detail();
|
||||
List<String> collect = value.stream().map(LineDevGetDTO::getPointId).collect(Collectors.toList());
|
||||
lineParam.setLineId(collect);
|
||||
Integer data = dataVFeignClient.getCountRawData(lineParam).getData();
|
||||
onlineRateDpo.setTimeId(calculatedParam.getDataDate());
|
||||
onlineRateDpo.setDevIndex(key);
|
||||
if(data>0){
|
||||
onlineRateDpo.setOnlineMin(InfluxDBPublicParam.DAY_MINUTE);
|
||||
onlineRateDpo.setOfflineMin(0);
|
||||
}else{
|
||||
onlineRateDpo.setOnlineMin(0);
|
||||
onlineRateDpo.setOfflineMin(InfluxDBPublicParam.DAY_MINUTE);
|
||||
}
|
||||
list.add(onlineRateDpo);
|
||||
});
|
||||
if(calculatedParam.getType()==1){
|
||||
DeptGetLineParam deptGetLineParam = new DeptGetLineParam();
|
||||
Dept dept = deptFeignClient.getRootDept().getData();
|
||||
deptGetLineParam.setDeptId(dept.getId());
|
||||
List<DeptGetDeviceDTO> DeviceAndMonitorList = commTerminalGeneralClient.deptGetDeviceAndMonitor(deptGetLineParam).getData();
|
||||
DeptGetDeviceDTO dto = DeviceAndMonitorList.stream().filter(po -> Objects.equals(po.getUnitId(), dept.getId())).collect(Collectors.toList()).get(0);
|
||||
List<LineDevGetDTO> devList = dto.getDeviceList();
|
||||
Map<String, List<LineDevGetDTO>> LineDevGetMap = devList.stream()
|
||||
.filter(x -> devIdList.contains(x.getDevId()))
|
||||
.collect(Collectors.groupingBy(LineDevGetDTO::getDevId));
|
||||
LineDevGetMap.forEach((key,value)->{
|
||||
DataOnlineRateDto.Detail onlineRateDpo = new DataOnlineRateDto.Detail();
|
||||
List<String> collect = value.stream().map(LineDevGetDTO::getPointId).collect(Collectors.toList());
|
||||
lineParam.setLineId(collect);
|
||||
Integer data = dataVFeignClient.getCountRawData(lineParam).getData();
|
||||
onlineRateDpo.setTimeId(calculatedParam.getDataDate());
|
||||
onlineRateDpo.setDevIndex(key);
|
||||
if(data>0){
|
||||
onlineRateDpo.setOnlineMin(InfluxDBPublicParam.DAY_MINUTE);
|
||||
onlineRateDpo.setOfflineMin(0);
|
||||
}else{
|
||||
onlineRateDpo.setOnlineMin(0);
|
||||
onlineRateDpo.setOfflineMin(InfluxDBPublicParam.DAY_MINUTE);
|
||||
}
|
||||
list.add(onlineRateDpo);
|
||||
});
|
||||
}
|
||||
}else{
|
||||
List<PqsCommunicateDto> outCommunicateData = new ArrayList<>();
|
||||
LineDevGetMap.forEach((key,value)->{
|
||||
lineParam.setLineId(Arrays.asList(key));
|
||||
for (List<String> pendingId : pendingIds) {
|
||||
lineParam.setLineId(pendingId);
|
||||
List<PqsCommunicateDto> data = communicateFeignClient.getRawDataLatest(lineParam).getData();
|
||||
outCommunicateData.addAll(data);
|
||||
});
|
||||
}
|
||||
Date dateOut = DateUtil.parse(calculatedParam.getDataDate());
|
||||
for (PqsCommunicateDto pqsCommunicate : outCommunicateData) {
|
||||
DataOnlineRateDto.Detail onlineRateDpo = new DataOnlineRateDto.Detail();
|
||||
@@ -92,6 +115,31 @@ public class IDataOnlineRateServiceImpl implements IDataOnlineRateService {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DataOnlineRateDto.Detail> dataOnlineRateMonth(CalculatedParam calculatedParam) {
|
||||
LineCountEvaluateParam lineParam = new LineCountEvaluateParam();
|
||||
lineParam.setStartTime(TimeUtils.getBeginOfMonth(calculatedParam.getDataDate()));
|
||||
lineParam.setEndTime(TimeUtils.getEndOfMonth(calculatedParam.getDataDate()));
|
||||
List<String> devIdList = calculatedParam.getIdList();
|
||||
|
||||
List<DataOnlineRateDto.Detail> info=new ArrayList<>();
|
||||
List<List<String>> pendingIds = ListUtils.partition(devIdList,NUM);
|
||||
for (List<String> pendingId : pendingIds) {
|
||||
lineParam.setLineId(pendingId);
|
||||
List<DataOnlineRateDto.Detail> data = onlineRateFeignClient.getRawData(lineParam).getData();
|
||||
Map<String, List<DataOnlineRateDto.Detail>> collect = data.stream().collect(Collectors.groupingBy(DataOnlineRateDto.Detail::getDevIndex));
|
||||
collect.forEach((key,value)->{
|
||||
DataOnlineRateDto.Detail onlineRateDto=new DataOnlineRateDto.Detail();
|
||||
onlineRateDto.setTimeId(calculatedParam.getDataDate());
|
||||
onlineRateDto.setDevIndex(key);
|
||||
onlineRateDto.setOnlineMin(value.stream().mapToInt(DataOnlineRateDto.Detail::getOnlineMin).sum());
|
||||
onlineRateDto.setOfflineMin(value.stream().mapToInt(DataOnlineRateDto.Detail::getOfflineMin).sum());
|
||||
info.add(onlineRateDto);
|
||||
});
|
||||
}
|
||||
return info;
|
||||
}
|
||||
|
||||
/**
|
||||
* new的时间和当前统计时间 不是/是 同一天
|
||||
*/
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.njcn.dataProcess.api;
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.dataProcess.api.fallback.DataLimitRateFeignClientFallbackFactory;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataLimitRateDto;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -15,10 +16,12 @@ import java.util.List;
|
||||
* @Author: wr
|
||||
* @Date: 2025/3/7 9:30
|
||||
*/
|
||||
@FeignClient(value = ServerInfo.PLATFORM_DATA_PROCESSING_BOOT, path = "/dataLimitRate", fallbackFactory = DataLimitRateFeignClientFallbackFactory.class, contextId = "dataLimitRate")
|
||||
@FeignClient(value = ServerInfo.PLATFORM_DATA_PROCESSING_BOOT, path = "/dataLimitRate", fallbackFactory = DataLimitRateFeignClientFallbackFactory.class, contextId = "dataLimitRate")
|
||||
public interface DataLimitRateFeignClient {
|
||||
|
||||
@PostMapping("/batchInsertion")
|
||||
HttpResult<String> batchInsertion(@RequestBody List<DataLimitRateDto> dataIDTOList);
|
||||
|
||||
@PostMapping("/getRawData")
|
||||
HttpResult<List<DataLimitRateDto>> getRawData(@RequestBody LineCountEvaluateParam lineParam);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.njcn.dataProcess.api;
|
||||
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.dataProcess.api.fallback.DataLimitTargetFeignClientFallbackFactory;
|
||||
import com.njcn.dataProcess.pojo.dto.DataLimitTargetDto;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Author: wr
|
||||
* @Date: 2025/3/7 9:30
|
||||
*/
|
||||
@FeignClient(value = ServerInfo.PLATFORM_DATA_PROCESSING_BOOT, path = "/dataLimitTarget", fallbackFactory = DataLimitTargetFeignClientFallbackFactory.class, contextId = "dataLimitTarget")
|
||||
public interface DataLimitTargetFeignClient {
|
||||
|
||||
@PostMapping("/batchInsertion")
|
||||
HttpResult<String> batchInsertion(@RequestBody List<DataLimitTargetDto> dataIDTOList);
|
||||
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.njcn.dataProcess.api;
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.dataProcess.api.fallback.DataOnlineRateFeignClientFallbackFactory;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataOnlineRateDto;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -15,10 +16,12 @@ import java.util.List;
|
||||
* @Author: wr
|
||||
* @Date: 2025/3/7 9:30
|
||||
*/
|
||||
@FeignClient(value = ServerInfo.PLATFORM_DATA_PROCESSING_BOOT, path = "/dataOnlineRate", fallbackFactory = DataOnlineRateFeignClientFallbackFactory.class, contextId = "dataOnlineRate")
|
||||
@FeignClient(value = ServerInfo.PLATFORM_DATA_PROCESSING_BOOT, path = "/dataOnlineRate", fallbackFactory = DataOnlineRateFeignClientFallbackFactory.class, contextId = "dataOnlineRate")
|
||||
public interface DataOnlineRateFeignClient {
|
||||
|
||||
@PostMapping("/batchInsertion")
|
||||
HttpResult<String> batchInsertion(@RequestBody List<DataOnlineRateDto.Detail> dataIDTOList);
|
||||
|
||||
@PostMapping("/getRawData")
|
||||
HttpResult<List<DataOnlineRateDto.Detail>> getRawData(@RequestBody LineCountEvaluateParam lineParam);
|
||||
}
|
||||
|
||||
@@ -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.dataProcess.api.DataLimitRateFeignClient;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataLimitRateDto;
|
||||
import com.njcn.dataProcess.util.DataProcessingEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
@@ -42,6 +43,12 @@ public class DataLimitRateFeignClientFallbackFactory implements FallbackFactory<
|
||||
log.error("{}异常,降级处理,异常为:{}","批量插入数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<DataLimitRateDto>> getRawData(LineCountEvaluateParam lineParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取原始数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.njcn.dataProcess.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.dataProcess.api.DataLimitTargetFeignClient;
|
||||
import com.njcn.dataProcess.pojo.dto.DataLimitTargetDto;
|
||||
import com.njcn.dataProcess.util.DataProcessingEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Author: wr
|
||||
* @Date: 2025/3/7 9:30
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class DataLimitTargetFeignClientFallbackFactory implements FallbackFactory<DataLimitTargetFeignClient> {
|
||||
|
||||
|
||||
/**
|
||||
* 输出远程请求接口异常日志
|
||||
* @param cause RPC请求异常
|
||||
*/
|
||||
@Override
|
||||
public DataLimitTargetFeignClient create(Throwable cause) {
|
||||
//判断抛出异常是否为解码器抛出的业务异常
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if(cause.getCause() instanceof BusinessException){
|
||||
BusinessException businessException = (BusinessException) cause.getCause();
|
||||
exceptionEnum = DataProcessingEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
return new DataLimitTargetFeignClient() {
|
||||
|
||||
@Override
|
||||
public HttpResult<String> batchInsertion(List<DataLimitTargetDto> dataIDTOList) {
|
||||
log.error("{}异常,降级处理,异常为:{}","批量插入数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -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.dataProcess.api.DataOnlineRateFeignClient;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataOnlineRateDto;
|
||||
import com.njcn.dataProcess.util.DataProcessingEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
@@ -42,6 +43,12 @@ public class DataOnlineRateFeignClientFallbackFactory implements FallbackFactory
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<DataOnlineRateDto.Detail>> getRawData(LineCountEvaluateParam lineParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取原始数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ public class DataLimitRateDto implements Serializable {
|
||||
/**
|
||||
* 合格率时间
|
||||
*/
|
||||
|
||||
private LocalDate time;
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,383 @@
|
||||
package com.njcn.dataProcess.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
public class DataLimitTargetDto {
|
||||
/**
|
||||
* 监测点ID合格率的变电站/装置/母线/线路序号
|
||||
*/
|
||||
private String lineId;
|
||||
|
||||
/**
|
||||
* 数据类型,’A’表示A相,’B’表示B相,’C’表示C相,’’M’表示ABC三项总和,T’表示总
|
||||
*/
|
||||
private String phasicType;
|
||||
|
||||
/**
|
||||
* 合格率时间
|
||||
*/
|
||||
private LocalDate time;
|
||||
|
||||
/**
|
||||
* 总计算次数
|
||||
*/
|
||||
private Integer allTime;
|
||||
|
||||
/**
|
||||
* 闪变总计算次数
|
||||
*/
|
||||
private Integer flickerAllTime;
|
||||
|
||||
/**
|
||||
* 闪变越限次数
|
||||
*/
|
||||
private Integer flickerOvertime;
|
||||
|
||||
/**
|
||||
* 频率偏差越限次数
|
||||
*/
|
||||
private Integer freqDevOvertime;
|
||||
|
||||
/**
|
||||
* 电压偏差越限次数
|
||||
*/
|
||||
private Integer voltageDevOvertime;
|
||||
|
||||
/**
|
||||
* 电压不平衡度越限次数
|
||||
*/
|
||||
private Integer ubalanceOvertime;
|
||||
|
||||
/**
|
||||
* 电压谐波畸变率越限次数
|
||||
*/
|
||||
private Integer uaberranceOvertime;
|
||||
|
||||
/**
|
||||
* 负序电流限值次数
|
||||
*/
|
||||
private Integer iNegOvertime;
|
||||
|
||||
/**
|
||||
* 2次电压谐波含有率越限次数
|
||||
*/
|
||||
private Integer uharm2Overtime;
|
||||
|
||||
/**
|
||||
* 3次电压谐波含有率越限次数
|
||||
*/
|
||||
private Integer uharm3Overtime;
|
||||
|
||||
/**
|
||||
* 4次电压谐波含有率越限次数
|
||||
*/
|
||||
private Integer uharm4Overtime;
|
||||
|
||||
/**
|
||||
* 5次电压谐波含有率越限次数
|
||||
*/
|
||||
private Integer uharm5Overtime;
|
||||
|
||||
/**
|
||||
* 6次电压谐波含有率越限次数
|
||||
*/
|
||||
private Integer uharm6Overtime;
|
||||
|
||||
/**
|
||||
* 7次电压谐波含有率越限次数
|
||||
*/
|
||||
private Integer uharm7Overtime;
|
||||
|
||||
/**
|
||||
* 8次电压谐波含有率越限次数
|
||||
*/
|
||||
private Integer uharm8Overtime;
|
||||
|
||||
/**
|
||||
* 9次电压谐波含有率越限次数
|
||||
*/
|
||||
private Integer uharm9Overtime;
|
||||
|
||||
/**
|
||||
* 10次电压谐波含有率越限次数
|
||||
*/
|
||||
private Integer uharm10Overtime;
|
||||
|
||||
/**
|
||||
* 11次电压谐波含有率越限次数
|
||||
*/
|
||||
private Integer uharm11Overtime;
|
||||
|
||||
/**
|
||||
* 12次电压谐波含有率越限次数
|
||||
*/
|
||||
private Integer uharm12Overtime;
|
||||
|
||||
/**
|
||||
* 13次电压谐波含有率越限次数
|
||||
*/
|
||||
private Integer uharm13Overtime;
|
||||
|
||||
/**
|
||||
* 14次电压谐波含有率越限次数
|
||||
*/
|
||||
private Integer uharm14Overtime;
|
||||
|
||||
/**
|
||||
* 15次电压谐波含有率越限次数
|
||||
*/
|
||||
private Integer uharm15Overtime;
|
||||
|
||||
/**
|
||||
* 16次电压谐波含有率越限次数
|
||||
*/
|
||||
private Integer uharm16Overtime;
|
||||
|
||||
/**
|
||||
* 17次电压谐波含有率越限次数
|
||||
*/
|
||||
private Integer uharm17Overtime;
|
||||
|
||||
/**
|
||||
* 18次电压谐波含有率越限次数
|
||||
*/
|
||||
private Integer uharm18Overtime;
|
||||
|
||||
/**
|
||||
* 19次电压谐波含有率越限次数
|
||||
*/
|
||||
private Integer uharm19Overtime;
|
||||
|
||||
/**
|
||||
* 20次电压谐波含有率越限次数
|
||||
*/
|
||||
private Integer uharm20Overtime;
|
||||
|
||||
/**
|
||||
* 21次电压谐波含有率越限次数
|
||||
*/
|
||||
private Integer uharm21Overtime;
|
||||
|
||||
/**
|
||||
* 22次电压谐波含有率越限次数
|
||||
*/
|
||||
private Integer uharm22Overtime;
|
||||
|
||||
/**
|
||||
* 23次电压谐波含有率越限次数
|
||||
*/
|
||||
private Integer uharm23Overtime;
|
||||
|
||||
/**
|
||||
* 24次电压谐波含有率越限次数
|
||||
*/
|
||||
private Integer uharm24Overtime;
|
||||
|
||||
/**
|
||||
* 25次电压谐波含有率越限次数
|
||||
*/
|
||||
private Integer uharm25Overtime;
|
||||
|
||||
/**
|
||||
* 2次电流谐波幅值越限次数
|
||||
*/
|
||||
private Integer iharm2Overtime;
|
||||
|
||||
/**
|
||||
* 3次电流谐波幅值越限次数
|
||||
*/
|
||||
private Integer iharm3Overtime;
|
||||
|
||||
/**
|
||||
* 4次电流谐波幅值越限次数
|
||||
*/
|
||||
private Integer iharm4Overtime;
|
||||
|
||||
/**
|
||||
* 5次电流谐波幅值越限次数
|
||||
*/
|
||||
private Integer iharm5Overtime;
|
||||
|
||||
/**
|
||||
* 6次电流谐波幅值越限次数
|
||||
*/
|
||||
private Integer iharm6Overtime;
|
||||
|
||||
/**
|
||||
* 7次电流谐波幅值越限次数
|
||||
*/
|
||||
private Integer iharm7Overtime;
|
||||
|
||||
/**
|
||||
* 8次电流谐波幅值越限次数
|
||||
*/
|
||||
private Integer iharm8Overtime;
|
||||
|
||||
/**
|
||||
* 9次电流谐波幅值越限次数
|
||||
*/
|
||||
private Integer iharm9Overtime;
|
||||
|
||||
/**
|
||||
* 10次电流谐波幅值越限次数
|
||||
*/
|
||||
private Integer iharm10Overtime;
|
||||
|
||||
/**
|
||||
* 11次电流谐波幅值越限次数
|
||||
*/
|
||||
private Integer iharm11Overtime;
|
||||
|
||||
/**
|
||||
* 12次电流谐波幅值越限次数
|
||||
*/
|
||||
private Integer iharm12Overtime;
|
||||
|
||||
/**
|
||||
* 13次电流谐波幅值越限次数
|
||||
*/
|
||||
private Integer iharm13Overtime;
|
||||
|
||||
/**
|
||||
* 14次电流谐波幅值越限次数
|
||||
*/
|
||||
private Integer iharm14Overtime;
|
||||
|
||||
/**
|
||||
* 15次电流谐波幅值越限次数
|
||||
*/
|
||||
private Integer iharm15Overtime;
|
||||
|
||||
/**
|
||||
* 16次电流谐波幅值越限次数
|
||||
*/
|
||||
private Integer iharm16Overtime;
|
||||
|
||||
/**
|
||||
* 17次电流谐波幅值越限次数
|
||||
*/
|
||||
private Integer iharm17Overtime;
|
||||
|
||||
/**
|
||||
* 18次电流谐波幅值越限次数
|
||||
*/
|
||||
private Integer iharm18Overtime;
|
||||
|
||||
/**
|
||||
* 19次电流谐波幅值越限次数
|
||||
*/
|
||||
private Integer iharm19Overtime;
|
||||
|
||||
/**
|
||||
* 20次电流谐波幅值越限次数
|
||||
*/
|
||||
private Integer iharm20Overtime;
|
||||
|
||||
/**
|
||||
* 21次电流谐波幅值越限次数
|
||||
*/
|
||||
private Integer iharm21Overtime;
|
||||
|
||||
/**
|
||||
* 22次电流谐波幅值越限次数
|
||||
*/
|
||||
private Integer iharm22Overtime;
|
||||
|
||||
/**
|
||||
* 23次电流谐波幅值越限次数
|
||||
*/
|
||||
private Integer iharm23Overtime;
|
||||
|
||||
/**
|
||||
* 24次电流谐波幅值越限次数
|
||||
*/
|
||||
private Integer iharm24Overtime;
|
||||
|
||||
/**
|
||||
* 25次电流谐波幅值越限次数
|
||||
*/
|
||||
private Integer iharm25Overtime;
|
||||
|
||||
/**
|
||||
* 0.5次间谐波电压限值次数
|
||||
*/
|
||||
private Integer inuharm1Overtime;
|
||||
|
||||
/**
|
||||
* 1.5次间谐波电压限值次数
|
||||
*/
|
||||
private Integer inuharm2Overtime;
|
||||
|
||||
/**
|
||||
* 2.5次间谐波电压限值次数
|
||||
*/
|
||||
private Integer inuharm3Overtime;
|
||||
|
||||
/**
|
||||
* 3.5次间谐波电压限值次数
|
||||
*/
|
||||
private Integer inuharm4Overtime;
|
||||
|
||||
/**
|
||||
* 4.5次间谐波电压限值次数
|
||||
*/
|
||||
private Integer inuharm5Overtime;
|
||||
|
||||
/**
|
||||
* 5.5次间谐波电压限值次数
|
||||
*/
|
||||
private Integer inuharm6Overtime;
|
||||
|
||||
/**
|
||||
* 6.5次间谐波电压限值次数
|
||||
*/
|
||||
private Integer inuharm7Overtime;
|
||||
|
||||
/**
|
||||
* 7.5次间谐波电压限值次数
|
||||
*/
|
||||
private Integer inuharm8Overtime;
|
||||
|
||||
/**
|
||||
* 8.5次间谐波电压限值次数
|
||||
*/
|
||||
private Integer inuharm9Overtime;
|
||||
|
||||
/**
|
||||
* 9.5次间谐波电压限值次数
|
||||
*/
|
||||
private Integer inuharm10Overtime;
|
||||
|
||||
/**
|
||||
* 10.5次间谐波电压限值次数
|
||||
*/
|
||||
private Integer inuharm11Overtime;
|
||||
|
||||
/**
|
||||
* 11.5次间谐波电压限值次数
|
||||
*/
|
||||
private Integer inuharm12Overtime;
|
||||
|
||||
/**
|
||||
* 12.5次间谐波电压限值次数
|
||||
*/
|
||||
private Integer inuharm13Overtime;
|
||||
|
||||
/**
|
||||
* 13.5次间谐波电压限值次数
|
||||
*/
|
||||
private Integer inuharm14Overtime;
|
||||
|
||||
/**
|
||||
* 14.5次间谐波电压限值次数
|
||||
*/
|
||||
private Integer inuharm15Overtime;
|
||||
|
||||
/**
|
||||
* 15.5次间谐波电压限值次数
|
||||
*/
|
||||
private Integer inuharm16Overtime;
|
||||
}
|
||||
@@ -0,0 +1,376 @@
|
||||
package com.njcn.dataProcess.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Author: wr
|
||||
* @Date: 2025/3/12 19:16
|
||||
*/
|
||||
@Data
|
||||
public class QualifiedDetail {
|
||||
|
||||
/**
|
||||
* 监测点ID合格率的变电站/装置/母线/线路序号
|
||||
*/
|
||||
private String lineId;
|
||||
|
||||
|
||||
/**
|
||||
* 合格率时间
|
||||
*/
|
||||
private String time;
|
||||
|
||||
/**
|
||||
* 闪变越限次数
|
||||
*/
|
||||
private Double flickerOvertime;
|
||||
|
||||
/**
|
||||
* 频率偏差越限次数
|
||||
*/
|
||||
private Double freqDevOvertime;
|
||||
|
||||
/**
|
||||
* 电压偏差越限次数
|
||||
*/
|
||||
private Double voltageDevOvertime;
|
||||
|
||||
/**
|
||||
* 三相电压不平衡度越限次数
|
||||
*/
|
||||
private Double ubalanceOvertime;
|
||||
|
||||
/**
|
||||
* 电压谐波畸变率越限次数
|
||||
*/
|
||||
private Double uaberranceOvertime;
|
||||
|
||||
/**
|
||||
* 负序电流限值次数
|
||||
*/
|
||||
private Double iNegOvertime;
|
||||
|
||||
/**
|
||||
* 2次电压谐波含有率越限次数
|
||||
*/
|
||||
private Double uharm2Overtime;
|
||||
|
||||
/**
|
||||
* 3次电压谐波含有率越限次数
|
||||
*/
|
||||
private Double uharm3Overtime;
|
||||
|
||||
/**
|
||||
* 4次电压谐波含有率越限次数
|
||||
*/
|
||||
private Double uharm4Overtime;
|
||||
|
||||
/**
|
||||
* 5次电压谐波含有率越限次数
|
||||
*/
|
||||
private Double uharm5Overtime;
|
||||
|
||||
/**
|
||||
* 6次电压谐波含有率越限次数
|
||||
*/
|
||||
private Double uharm6Overtime;
|
||||
|
||||
/**
|
||||
* 7次电压谐波含有率越限次数
|
||||
*/
|
||||
private Double uharm7Overtime;
|
||||
|
||||
/**
|
||||
* 8次电压谐波含有率越限次数
|
||||
*/
|
||||
private Double uharm8Overtime;
|
||||
|
||||
/**
|
||||
* 9次电压谐波含有率越限次数
|
||||
*/
|
||||
private Double uharm9Overtime;
|
||||
|
||||
/**
|
||||
* 10次电压谐波含有率越限次数
|
||||
*/
|
||||
private Double uharm10Overtime;
|
||||
|
||||
/**
|
||||
* 11次电压谐波含有率越限次数
|
||||
*/
|
||||
private Double uharm11Overtime;
|
||||
|
||||
/**
|
||||
* 12次电压谐波含有率越限次数
|
||||
*/
|
||||
private Double uharm12Overtime;
|
||||
|
||||
/**
|
||||
* 13次电压谐波含有率越限次数
|
||||
*/
|
||||
private Double uharm13Overtime;
|
||||
|
||||
/**
|
||||
* 14次电压谐波含有率越限次数
|
||||
*/
|
||||
private Double uharm14Overtime;
|
||||
|
||||
/**
|
||||
* 15次电压谐波含有率越限次数
|
||||
*/
|
||||
private Double uharm15Overtime;
|
||||
|
||||
/**
|
||||
* 16次电压谐波含有率越限次数
|
||||
*/
|
||||
private Double uharm16Overtime;
|
||||
|
||||
/**
|
||||
* 17次电压谐波含有率越限次数
|
||||
*/
|
||||
private Double uharm17Overtime;
|
||||
|
||||
/**
|
||||
* 18次电压谐波含有率越限次数
|
||||
*/
|
||||
private Double uharm18Overtime;
|
||||
|
||||
/**
|
||||
* 19次电压谐波含有率越限次数
|
||||
*/
|
||||
private Double uharm19Overtime;
|
||||
|
||||
/**
|
||||
* 20次电压谐波含有率越限次数
|
||||
*/
|
||||
private Double uharm20Overtime;
|
||||
|
||||
/**
|
||||
* 21次电压谐波含有率越限次数
|
||||
*/
|
||||
private Double uharm21Overtime;
|
||||
|
||||
/**
|
||||
* 22次电压谐波含有率越限次数
|
||||
*/
|
||||
private Double uharm22Overtime;
|
||||
|
||||
/**
|
||||
* 23次电压谐波含有率越限次数
|
||||
*/
|
||||
private Double uharm23Overtime;
|
||||
|
||||
/**
|
||||
* 24次电压谐波含有率越限次数
|
||||
*/
|
||||
private Double uharm24Overtime;
|
||||
|
||||
/**
|
||||
* 25次电压谐波含有率越限次数
|
||||
*/
|
||||
private Double uharm25Overtime;
|
||||
|
||||
/**
|
||||
* 2次电流谐波幅值越限次数
|
||||
*/
|
||||
private Double iharm2Overtime;
|
||||
|
||||
/**
|
||||
* 3次电流谐波幅值越限次数
|
||||
*/
|
||||
private Double iharm3Overtime;
|
||||
|
||||
/**
|
||||
* 4次电流谐波幅值越限次数
|
||||
*/
|
||||
private Double iharm4Overtime;
|
||||
|
||||
/**
|
||||
* 5次电流谐波幅值越限次数
|
||||
*/
|
||||
private Double iharm5Overtime;
|
||||
|
||||
/**
|
||||
* 6次电流谐波幅值越限次数
|
||||
*/
|
||||
private Double iharm6Overtime;
|
||||
|
||||
/**
|
||||
* 7次电流谐波幅值越限次数
|
||||
*/
|
||||
private Double iharm7Overtime;
|
||||
|
||||
/**
|
||||
* 8次电流谐波幅值越限次数
|
||||
*/
|
||||
private Double iharm8Overtime;
|
||||
|
||||
/**
|
||||
* 9次电流谐波幅值越限次数
|
||||
*/
|
||||
private Double iharm9Overtime;
|
||||
|
||||
/**
|
||||
* 10次电流谐波幅值越限次数
|
||||
*/
|
||||
private Double iharm10Overtime;
|
||||
|
||||
/**
|
||||
* 11次电流谐波幅值越限次数
|
||||
*/
|
||||
private Double iharm11Overtime;
|
||||
|
||||
/**
|
||||
* 12次电流谐波幅值越限次数
|
||||
*/
|
||||
private Double iharm12Overtime;
|
||||
|
||||
/**
|
||||
* 13次电流谐波幅值越限次数
|
||||
*/
|
||||
private Double iharm13Overtime;
|
||||
|
||||
/**
|
||||
* 14次电流谐波幅值越限次数
|
||||
*/
|
||||
private Double iharm14Overtime;
|
||||
|
||||
/**
|
||||
* 15次电流谐波幅值越限次数
|
||||
*/
|
||||
private Double iharm15Overtime;
|
||||
|
||||
/**
|
||||
* 16次电流谐波幅值越限次数
|
||||
*/
|
||||
private Double iharm16Overtime;
|
||||
|
||||
/**
|
||||
* 17次电流谐波幅值越限次数
|
||||
*/
|
||||
private Double iharm17Overtime;
|
||||
|
||||
/**
|
||||
* 18次电流谐波幅值越限次数
|
||||
*/
|
||||
private Double iharm18Overtime;
|
||||
|
||||
/**
|
||||
* 19次电流谐波幅值越限次数
|
||||
*/
|
||||
private Double iharm19Overtime;
|
||||
|
||||
/**
|
||||
* 20次电流谐波幅值越限次数
|
||||
*/
|
||||
private Double iharm20Overtime;
|
||||
|
||||
/**
|
||||
* 21次电流谐波幅值越限次数
|
||||
*/
|
||||
private Double iharm21Overtime;
|
||||
|
||||
/**
|
||||
* 22次电流谐波幅值越限次数
|
||||
*/
|
||||
private Double iharm22Overtime;
|
||||
|
||||
/**
|
||||
* 23次电流谐波幅值越限次数
|
||||
*/
|
||||
private Double iharm23Overtime;
|
||||
|
||||
/**
|
||||
* 24次电流谐波幅值越限次数
|
||||
*/
|
||||
private Double iharm24Overtime;
|
||||
|
||||
/**
|
||||
* 25次电流谐波幅值越限次数
|
||||
*/
|
||||
private Double iharm25Overtime;
|
||||
|
||||
/**
|
||||
* 0.5次间谐波电压限值次数
|
||||
*/
|
||||
private Double inuharm1Overtime;
|
||||
|
||||
/**
|
||||
* 1.5次间谐波电压限值次数
|
||||
*/
|
||||
private Double inuharm2Overtime;
|
||||
|
||||
/**
|
||||
* 2.5次间谐波电压限值次数
|
||||
*/
|
||||
private Double inuharm3Overtime;
|
||||
|
||||
/**
|
||||
* 3.5次间谐波电压限值次数
|
||||
*/
|
||||
private Double inuharm4Overtime;
|
||||
|
||||
/**
|
||||
* 4.5次间谐波电压限值次数
|
||||
*/
|
||||
private Double inuharm5Overtime;
|
||||
|
||||
/**
|
||||
* 5.5次间谐波电压限值次数
|
||||
*/
|
||||
private Double inuharm6Overtime;
|
||||
|
||||
/**
|
||||
* 6.5次间谐波电压限值次数
|
||||
*/
|
||||
private Double inuharm7Overtime;
|
||||
|
||||
/**
|
||||
* 7.5次间谐波电压限值次数
|
||||
*/
|
||||
private Double inuharm8Overtime;
|
||||
|
||||
/**
|
||||
* 8.5次间谐波电压限值次数
|
||||
*/
|
||||
private Double inuharm9Overtime;
|
||||
|
||||
/**
|
||||
* 9.5次间谐波电压限值次数
|
||||
*/
|
||||
private Double inuharm10Overtime;
|
||||
|
||||
/**
|
||||
* 10.5次间谐波电压限值次数
|
||||
*/
|
||||
private Double inuharm11Overtime;
|
||||
|
||||
/**
|
||||
* 11.5次间谐波电压限值次数
|
||||
*/
|
||||
private Double inuharm12Overtime;
|
||||
|
||||
/**
|
||||
* 12.5次间谐波电压限值次数
|
||||
*/
|
||||
private Double inuharm13Overtime;
|
||||
|
||||
/**
|
||||
* 13.5次间谐波电压限值次数
|
||||
*/
|
||||
private Double inuharm14Overtime;
|
||||
|
||||
/**
|
||||
* 14.5次间谐波电压限值次数
|
||||
*/
|
||||
private Double inuharm15Overtime;
|
||||
|
||||
/**
|
||||
* 15.5次间谐波电压限值次数
|
||||
*/
|
||||
private Double inuharm16Overtime;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,469 @@
|
||||
package com.njcn.dataProcess.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName(value = "r_stat_limit_target_d")
|
||||
public class RStatLimitTargetD {
|
||||
/**
|
||||
* 监测点ID合格率的变电站/装置/母线/线路序号
|
||||
*/
|
||||
@MppMultiId
|
||||
@TableField(value = "my_index")
|
||||
private String lineId;
|
||||
|
||||
/**
|
||||
* 数据类型,’A’表示A相,’B’表示B相,’C’表示C相,’’M’表示ABC三项总和,T’表示总
|
||||
*/
|
||||
@MppMultiId
|
||||
@TableField(value = "phasic_type")
|
||||
private String phasicType;
|
||||
|
||||
/**
|
||||
* 合格率时间
|
||||
*/
|
||||
@MppMultiId
|
||||
@TableField(value = "time_id")
|
||||
private LocalDate time;
|
||||
|
||||
/**
|
||||
* 总计算次数
|
||||
*/
|
||||
@TableField(value = "all_time")
|
||||
private Integer allTime;
|
||||
|
||||
/**
|
||||
* 闪变总计算次数
|
||||
*/
|
||||
@TableField(value = "flicker_all_time")
|
||||
private Integer flickerAllTime;
|
||||
|
||||
/**
|
||||
* 闪变越限次数
|
||||
*/
|
||||
@TableField(value = "flicker_overtime")
|
||||
private Integer flickerOvertime;
|
||||
|
||||
/**
|
||||
* 频率偏差越限次数
|
||||
*/
|
||||
@TableField(value = "freq_dev_overtime")
|
||||
private Integer freqDevOvertime;
|
||||
|
||||
/**
|
||||
* 电压偏差越限次数
|
||||
*/
|
||||
@TableField(value = "voltage_dev_overtime")
|
||||
private Integer voltageDevOvertime;
|
||||
|
||||
/**
|
||||
* 电压不平衡度越限次数
|
||||
*/
|
||||
@TableField(value = "ubalance_overtime")
|
||||
private Integer ubalanceOvertime;
|
||||
|
||||
/**
|
||||
* 电压谐波畸变率越限次数
|
||||
*/
|
||||
@TableField(value = "uaberrance_overtime")
|
||||
private Integer uaberranceOvertime;
|
||||
|
||||
/**
|
||||
* 负序电流限值次数
|
||||
*/
|
||||
@TableField(value = "i_neg_overtime")
|
||||
private Integer iNegOvertime;
|
||||
|
||||
/**
|
||||
* 2次电压谐波含有率越限次数
|
||||
*/
|
||||
@TableField(value = "uharm_2_overtime")
|
||||
private Integer uharm2Overtime;
|
||||
|
||||
/**
|
||||
* 3次电压谐波含有率越限次数
|
||||
*/
|
||||
@TableField(value = "uharm_3_overtime")
|
||||
private Integer uharm3Overtime;
|
||||
|
||||
/**
|
||||
* 4次电压谐波含有率越限次数
|
||||
*/
|
||||
@TableField(value = "uharm_4_overtime")
|
||||
private Integer uharm4Overtime;
|
||||
|
||||
/**
|
||||
* 5次电压谐波含有率越限次数
|
||||
*/
|
||||
@TableField(value = "uharm_5_overtime")
|
||||
private Integer uharm5Overtime;
|
||||
|
||||
/**
|
||||
* 6次电压谐波含有率越限次数
|
||||
*/
|
||||
@TableField(value = "uharm_6_overtime")
|
||||
private Integer uharm6Overtime;
|
||||
|
||||
/**
|
||||
* 7次电压谐波含有率越限次数
|
||||
*/
|
||||
@TableField(value = "uharm_7_overtime")
|
||||
private Integer uharm7Overtime;
|
||||
|
||||
/**
|
||||
* 8次电压谐波含有率越限次数
|
||||
*/
|
||||
@TableField(value = "uharm_8_overtime")
|
||||
private Integer uharm8Overtime;
|
||||
|
||||
/**
|
||||
* 9次电压谐波含有率越限次数
|
||||
*/
|
||||
@TableField(value = "uharm_9_overtime")
|
||||
private Integer uharm9Overtime;
|
||||
|
||||
/**
|
||||
* 10次电压谐波含有率越限次数
|
||||
*/
|
||||
@TableField(value = "uharm_10_overtime")
|
||||
private Integer uharm10Overtime;
|
||||
|
||||
/**
|
||||
* 11次电压谐波含有率越限次数
|
||||
*/
|
||||
@TableField(value = "uharm_11_overtime")
|
||||
private Integer uharm11Overtime;
|
||||
|
||||
/**
|
||||
* 12次电压谐波含有率越限次数
|
||||
*/
|
||||
@TableField(value = "uharm_12_overtime")
|
||||
private Integer uharm12Overtime;
|
||||
|
||||
/**
|
||||
* 13次电压谐波含有率越限次数
|
||||
*/
|
||||
@TableField(value = "uharm_13_overtime")
|
||||
private Integer uharm13Overtime;
|
||||
|
||||
/**
|
||||
* 14次电压谐波含有率越限次数
|
||||
*/
|
||||
@TableField(value = "uharm_14_overtime")
|
||||
private Integer uharm14Overtime;
|
||||
|
||||
/**
|
||||
* 15次电压谐波含有率越限次数
|
||||
*/
|
||||
@TableField(value = "uharm_15_overtime")
|
||||
private Integer uharm15Overtime;
|
||||
|
||||
/**
|
||||
* 16次电压谐波含有率越限次数
|
||||
*/
|
||||
@TableField(value = "uharm_16_overtime")
|
||||
private Integer uharm16Overtime;
|
||||
|
||||
/**
|
||||
* 17次电压谐波含有率越限次数
|
||||
*/
|
||||
@TableField(value = "uharm_17_overtime")
|
||||
private Integer uharm17Overtime;
|
||||
|
||||
/**
|
||||
* 18次电压谐波含有率越限次数
|
||||
*/
|
||||
@TableField(value = "uharm_18_overtime")
|
||||
private Integer uharm18Overtime;
|
||||
|
||||
/**
|
||||
* 19次电压谐波含有率越限次数
|
||||
*/
|
||||
@TableField(value = "uharm_19_overtime")
|
||||
private Integer uharm19Overtime;
|
||||
|
||||
/**
|
||||
* 20次电压谐波含有率越限次数
|
||||
*/
|
||||
@TableField(value = "uharm_20_overtime")
|
||||
private Integer uharm20Overtime;
|
||||
|
||||
/**
|
||||
* 21次电压谐波含有率越限次数
|
||||
*/
|
||||
@TableField(value = "uharm_21_overtime")
|
||||
private Integer uharm21Overtime;
|
||||
|
||||
/**
|
||||
* 22次电压谐波含有率越限次数
|
||||
*/
|
||||
@TableField(value = "uharm_22_overtime")
|
||||
private Integer uharm22Overtime;
|
||||
|
||||
/**
|
||||
* 23次电压谐波含有率越限次数
|
||||
*/
|
||||
@TableField(value = "uharm_23_overtime")
|
||||
private Integer uharm23Overtime;
|
||||
|
||||
/**
|
||||
* 24次电压谐波含有率越限次数
|
||||
*/
|
||||
@TableField(value = "uharm_24_overtime")
|
||||
private Integer uharm24Overtime;
|
||||
|
||||
/**
|
||||
* 25次电压谐波含有率越限次数
|
||||
*/
|
||||
@TableField(value = "uharm_25_overtime")
|
||||
private Integer uharm25Overtime;
|
||||
|
||||
/**
|
||||
* 2次电流谐波幅值越限次数
|
||||
*/
|
||||
@TableField(value = "iharm_2_overtime")
|
||||
private Integer iharm2Overtime;
|
||||
|
||||
/**
|
||||
* 3次电流谐波幅值越限次数
|
||||
*/
|
||||
@TableField(value = "iharm_3_overtime")
|
||||
private Integer iharm3Overtime;
|
||||
|
||||
/**
|
||||
* 4次电流谐波幅值越限次数
|
||||
*/
|
||||
@TableField(value = "iharm_4_overtime")
|
||||
private Integer iharm4Overtime;
|
||||
|
||||
/**
|
||||
* 5次电流谐波幅值越限次数
|
||||
*/
|
||||
@TableField(value = "iharm_5_overtime")
|
||||
private Integer iharm5Overtime;
|
||||
|
||||
/**
|
||||
* 6次电流谐波幅值越限次数
|
||||
*/
|
||||
@TableField(value = "iharm_6_overtime")
|
||||
private Integer iharm6Overtime;
|
||||
|
||||
/**
|
||||
* 7次电流谐波幅值越限次数
|
||||
*/
|
||||
@TableField(value = "iharm_7_overtime")
|
||||
private Integer iharm7Overtime;
|
||||
|
||||
/**
|
||||
* 8次电流谐波幅值越限次数
|
||||
*/
|
||||
@TableField(value = "iharm_8_overtime")
|
||||
private Integer iharm8Overtime;
|
||||
|
||||
/**
|
||||
* 9次电流谐波幅值越限次数
|
||||
*/
|
||||
@TableField(value = "iharm_9_overtime")
|
||||
private Integer iharm9Overtime;
|
||||
|
||||
/**
|
||||
* 10次电流谐波幅值越限次数
|
||||
*/
|
||||
@TableField(value = "iharm_10_overtime")
|
||||
private Integer iharm10Overtime;
|
||||
|
||||
/**
|
||||
* 11次电流谐波幅值越限次数
|
||||
*/
|
||||
@TableField(value = "iharm_11_overtime")
|
||||
private Integer iharm11Overtime;
|
||||
|
||||
/**
|
||||
* 12次电流谐波幅值越限次数
|
||||
*/
|
||||
@TableField(value = "iharm_12_overtime")
|
||||
private Integer iharm12Overtime;
|
||||
|
||||
/**
|
||||
* 13次电流谐波幅值越限次数
|
||||
*/
|
||||
@TableField(value = "iharm_13_overtime")
|
||||
private Integer iharm13Overtime;
|
||||
|
||||
/**
|
||||
* 14次电流谐波幅值越限次数
|
||||
*/
|
||||
@TableField(value = "iharm_14_overtime")
|
||||
private Integer iharm14Overtime;
|
||||
|
||||
/**
|
||||
* 15次电流谐波幅值越限次数
|
||||
*/
|
||||
@TableField(value = "iharm_15_overtime")
|
||||
private Integer iharm15Overtime;
|
||||
|
||||
/**
|
||||
* 16次电流谐波幅值越限次数
|
||||
*/
|
||||
@TableField(value = "iharm_16_overtime")
|
||||
private Integer iharm16Overtime;
|
||||
|
||||
/**
|
||||
* 17次电流谐波幅值越限次数
|
||||
*/
|
||||
@TableField(value = "iharm_17_overtime")
|
||||
private Integer iharm17Overtime;
|
||||
|
||||
/**
|
||||
* 18次电流谐波幅值越限次数
|
||||
*/
|
||||
@TableField(value = "iharm_18_overtime")
|
||||
private Integer iharm18Overtime;
|
||||
|
||||
/**
|
||||
* 19次电流谐波幅值越限次数
|
||||
*/
|
||||
@TableField(value = "iharm_19_overtime")
|
||||
private Integer iharm19Overtime;
|
||||
|
||||
/**
|
||||
* 20次电流谐波幅值越限次数
|
||||
*/
|
||||
@TableField(value = "iharm_20_overtime")
|
||||
private Integer iharm20Overtime;
|
||||
|
||||
/**
|
||||
* 21次电流谐波幅值越限次数
|
||||
*/
|
||||
@TableField(value = "iharm_21_overtime")
|
||||
private Integer iharm21Overtime;
|
||||
|
||||
/**
|
||||
* 22次电流谐波幅值越限次数
|
||||
*/
|
||||
@TableField(value = "iharm_22_overtime")
|
||||
private Integer iharm22Overtime;
|
||||
|
||||
/**
|
||||
* 23次电流谐波幅值越限次数
|
||||
*/
|
||||
@TableField(value = "iharm_23_overtime")
|
||||
private Integer iharm23Overtime;
|
||||
|
||||
/**
|
||||
* 24次电流谐波幅值越限次数
|
||||
*/
|
||||
@TableField(value = "iharm_24_overtime")
|
||||
private Integer iharm24Overtime;
|
||||
|
||||
/**
|
||||
* 25次电流谐波幅值越限次数
|
||||
*/
|
||||
@TableField(value = "iharm_25_overtime")
|
||||
private Integer iharm25Overtime;
|
||||
|
||||
/**
|
||||
* 0.5次间谐波电压限值次数
|
||||
*/
|
||||
@TableField(value = "inuharm_1_overtime")
|
||||
private Integer inuharm1Overtime;
|
||||
|
||||
/**
|
||||
* 1.5次间谐波电压限值次数
|
||||
*/
|
||||
@TableField(value = "inuharm_2_overtime")
|
||||
private Integer inuharm2Overtime;
|
||||
|
||||
/**
|
||||
* 2.5次间谐波电压限值次数
|
||||
*/
|
||||
@TableField(value = "inuharm_3_overtime")
|
||||
private Integer inuharm3Overtime;
|
||||
|
||||
/**
|
||||
* 3.5次间谐波电压限值次数
|
||||
*/
|
||||
@TableField(value = "inuharm_4_overtime")
|
||||
private Integer inuharm4Overtime;
|
||||
|
||||
/**
|
||||
* 4.5次间谐波电压限值次数
|
||||
*/
|
||||
@TableField(value = "inuharm_5_overtime")
|
||||
private Integer inuharm5Overtime;
|
||||
|
||||
/**
|
||||
* 5.5次间谐波电压限值次数
|
||||
*/
|
||||
@TableField(value = "inuharm_6_overtime")
|
||||
private Integer inuharm6Overtime;
|
||||
|
||||
/**
|
||||
* 6.5次间谐波电压限值次数
|
||||
*/
|
||||
@TableField(value = "inuharm_7_overtime")
|
||||
private Integer inuharm7Overtime;
|
||||
|
||||
/**
|
||||
* 7.5次间谐波电压限值次数
|
||||
*/
|
||||
@TableField(value = "inuharm_8_overtime")
|
||||
private Integer inuharm8Overtime;
|
||||
|
||||
/**
|
||||
* 8.5次间谐波电压限值次数
|
||||
*/
|
||||
@TableField(value = "inuharm_9_overtime")
|
||||
private Integer inuharm9Overtime;
|
||||
|
||||
/**
|
||||
* 9.5次间谐波电压限值次数
|
||||
*/
|
||||
@TableField(value = "inuharm_10_overtime")
|
||||
private Integer inuharm10Overtime;
|
||||
|
||||
/**
|
||||
* 10.5次间谐波电压限值次数
|
||||
*/
|
||||
@TableField(value = "inuharm_11_overtime")
|
||||
private Integer inuharm11Overtime;
|
||||
|
||||
/**
|
||||
* 11.5次间谐波电压限值次数
|
||||
*/
|
||||
@TableField(value = "inuharm_12_overtime")
|
||||
private Integer inuharm12Overtime;
|
||||
|
||||
/**
|
||||
* 12.5次间谐波电压限值次数
|
||||
*/
|
||||
@TableField(value = "inuharm_13_overtime")
|
||||
private Integer inuharm13Overtime;
|
||||
|
||||
/**
|
||||
* 13.5次间谐波电压限值次数
|
||||
*/
|
||||
@TableField(value = "inuharm_14_overtime")
|
||||
private Integer inuharm14Overtime;
|
||||
|
||||
/**
|
||||
* 14.5次间谐波电压限值次数
|
||||
*/
|
||||
@TableField(value = "inuharm_15_overtime")
|
||||
private Integer inuharm15Overtime;
|
||||
|
||||
/**
|
||||
* 15.5次间谐波电压限值次数
|
||||
*/
|
||||
@TableField(value = "inuharm_16_overtime")
|
||||
private Integer inuharm16Overtime;
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.njcn.dataProcess.util;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
|
||||
import java.time.LocalDate;
|
||||
@@ -84,4 +85,24 @@ public class TimeUtils {
|
||||
LocalDateTimeUtil.parse(time, DatePattern.NORM_DATE_PATTERN)), DatePattern.NORM_DATETIME_PATTERN);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据日期获取当月零点时间
|
||||
* String类型的yyyy-MM-dd转成yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
public static String getBeginOfMonth(String time) {
|
||||
return DateUtil.format(
|
||||
DateUtil.beginOfMonth(
|
||||
DateUtil.parse(time, DatePattern.NORM_DATE_PATTERN)), DatePattern.NORM_DATETIME_PATTERN);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据日期获取当月结束时间
|
||||
* String类型的yyyy-MM-dd转成yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
public static String getEndOfMonth(String time) {
|
||||
return DateUtil.format(
|
||||
DateUtil.endOfMonth(
|
||||
DateUtil.parse(time, DatePattern.NORM_DATE_PATTERN)), DatePattern.NORM_DATETIME_PATTERN);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.dataProcess.annotation.InsertBean;
|
||||
import com.njcn.dataProcess.annotation.QueryBean;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataLimitRateDto;
|
||||
import com.njcn.dataProcess.service.IDataLimitRate;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
@@ -49,5 +50,12 @@ public class DataLimitRateController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||
@PostMapping("/getRawData")
|
||||
@ApiOperation("获取原始数据")
|
||||
public HttpResult<List<DataLimitRateDto>> getRawData(@RequestBody LineCountEvaluateParam lineParam) {
|
||||
String methodDescribe = getMethodDescribe("getRawData");
|
||||
List<DataLimitRateDto> rawData = limitRateInsert.getRawData(lineParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rawData, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.njcn.dataProcess.controller;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.OperateType;
|
||||
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.dataProcess.annotation.InsertBean;
|
||||
import com.njcn.dataProcess.annotation.QueryBean;
|
||||
import com.njcn.dataProcess.pojo.dto.DataLimitTargetDto;
|
||||
import com.njcn.dataProcess.service.IDataLimitTarget;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0
|
||||
* @data 2024/11/6 19:48
|
||||
*/
|
||||
@Validated
|
||||
@Slf4j
|
||||
@Controller
|
||||
@RestController
|
||||
@RequestMapping("/dataLimitTarget")
|
||||
@Api(tags = "监测点稳态指标越限次数获取")
|
||||
public class DataLimitTargetController extends BaseController {
|
||||
|
||||
@QueryBean
|
||||
private IDataLimitTarget limitTargetQuery;
|
||||
|
||||
@InsertBean
|
||||
private IDataLimitTarget limitTargetInsert;
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||
@PostMapping("/batchInsertion")
|
||||
@ApiOperation("批量插入")
|
||||
public HttpResult<String> batchInsertion(@RequestBody List<DataLimitTargetDto> dataVDTOList) {
|
||||
String methodDescribe = getMethodDescribe("batchInsertion");
|
||||
limitTargetInsert.batchInsertion(dataVDTOList);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,6 +8,8 @@ import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.dataProcess.annotation.InsertBean;
|
||||
import com.njcn.dataProcess.annotation.QueryBean;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataLimitRateDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataOnlineRateDto;
|
||||
import com.njcn.dataProcess.service.IDataOnlineRate;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
@@ -52,5 +54,12 @@ public class DataOnlineRateController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||
@PostMapping("/getRawData")
|
||||
@ApiOperation("获取原始数据")
|
||||
public HttpResult<List<DataOnlineRateDto.Detail>> getRawData(@RequestBody LineCountEvaluateParam lineParam) {
|
||||
String methodDescribe = getMethodDescribe("getRawData");
|
||||
List<DataOnlineRateDto.Detail> rawData = onlineRateInsert.getRawData(lineParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rawData, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.njcn.dataProcess.dao.relation.mapper;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.dataProcess.pojo.po.RStatLimitTargetD;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
* @author web2023
|
||||
*/
|
||||
public interface RStatLimitTargetRelationMapper extends MppBaseMapper<RStatLimitTargetD> {
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.njcn.dataProcess.service;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataLimitRateDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatLimitRateD;
|
||||
|
||||
@@ -19,4 +20,11 @@ public interface IDataLimitRate extends IMppService<RStatLimitRateD> {
|
||||
* @param limitRateList
|
||||
*/
|
||||
void batchInsertion(List<DataLimitRateDto> limitRateList);
|
||||
|
||||
|
||||
/**
|
||||
* 获取原始数据
|
||||
* @param lineParam
|
||||
*/
|
||||
List<DataLimitRateDto> getRawData(LineCountEvaluateParam lineParam);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.njcn.dataProcess.service;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
import com.njcn.dataProcess.pojo.dto.DataLimitTargetDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatLimitTargetD;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Author: wr
|
||||
* @Date: 2025/3/6 10:22
|
||||
*/
|
||||
public interface IDataLimitTarget extends IMppService<RStatLimitTargetD> {
|
||||
|
||||
/**
|
||||
* 批量插入数据
|
||||
* @param limitRateList
|
||||
*/
|
||||
void batchInsertion(List<DataLimitTargetDto> limitRateList);
|
||||
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.njcn.dataProcess.service;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataOnlineRateDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatOnlineRateD;
|
||||
|
||||
@@ -21,4 +22,10 @@ public interface IDataOnlineRate extends IMppService<RStatOnlineRateD>{
|
||||
*/
|
||||
void batchInsertion(List<DataOnlineRateDto.Detail> onlineRateList);
|
||||
|
||||
|
||||
/**
|
||||
* 获取原始数据
|
||||
* @param lineParam
|
||||
*/
|
||||
List<DataOnlineRateDto.Detail> getRawData(LineCountEvaluateParam lineParam);
|
||||
}
|
||||
|
||||
@@ -1,13 +1,20 @@
|
||||
package com.njcn.dataProcess.service.impl.influxdb;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.dataProcess.constant.PhaseType;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.RStatLimitRateRelationMapper;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataLimitRateDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatLimitRateD;
|
||||
import com.njcn.dataProcess.service.IDataLimitRate;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -23,4 +30,9 @@ public class InfluxdbDataLimitRateImpl extends MppServiceImpl<RStatLimitRateRela
|
||||
public void batchInsertion(List<DataLimitRateDto> limitRateList) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DataLimitRateDto> getRawData(LineCountEvaluateParam lineParam) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.njcn.dataProcess.service.impl.influxdb;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.RStatLimitTargetRelationMapper;
|
||||
import com.njcn.dataProcess.pojo.dto.DataLimitTargetDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatLimitTargetD;
|
||||
import com.njcn.dataProcess.service.IDataLimitTarget;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Author: wr
|
||||
* @Date: 2025/3/7 10:13
|
||||
*/
|
||||
@Service("InfluxdbDataLimitTargetImpl")
|
||||
@RequiredArgsConstructor
|
||||
public class InfluxdbDataLimitTargetImpl extends MppServiceImpl<RStatLimitTargetRelationMapper, RStatLimitTargetD> implements IDataLimitTarget {
|
||||
|
||||
|
||||
@Override
|
||||
public void batchInsertion(List<DataLimitTargetDto> limitRateList) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,12 +3,14 @@ package com.njcn.dataProcess.service.impl.influxdb;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.RStatOnlineRateDMapper;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataOnlineRateDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatOnlineRateD;
|
||||
import com.njcn.dataProcess.service.IDataOnlineRate;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -26,4 +28,9 @@ public class InfluxdbDataOnlineRateImpl extends MppServiceImpl<RStatOnlineRateDM
|
||||
public void batchInsertion(List<DataOnlineRateDto.Detail> onlineRateList) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DataOnlineRateDto.Detail> getRawData(LineCountEvaluateParam lineParam) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package com.njcn.dataProcess.service.impl.relation;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.dataProcess.constant.PhaseType;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.RStatLimitRateRelationMapper;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataLimitRateDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatLimitRateD;
|
||||
import com.njcn.dataProcess.service.IDataLimitRate;
|
||||
@@ -11,6 +15,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -36,4 +41,22 @@ public class RelationDataLimitRateImpl extends MppServiceImpl<RStatLimitRateRela
|
||||
});
|
||||
this.saveOrUpdateBatchByMultiId(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DataLimitRateDto> getRawData(LineCountEvaluateParam lineParam) {
|
||||
List<DataLimitRateDto> result = new ArrayList<>();
|
||||
LambdaQueryWrapper<RStatLimitRateD> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.in(CollUtil.isNotEmpty(lineParam.getLineId()),RStatLimitRateD::getLineId,lineParam.getLineId())
|
||||
.ge(RStatLimitRateD::getTime,lineParam.getStartTime())
|
||||
.le(RStatLimitRateD::getTime,lineParam.getEndTime())
|
||||
.eq(RStatLimitRateD::getPhasicType, PhaseType.PHASE_T);
|
||||
List<RStatLimitRateD> list = this.list(lambdaQueryWrapper);
|
||||
|
||||
list.forEach(item->{
|
||||
DataLimitRateDto dto = new DataLimitRateDto();
|
||||
BeanUtils.copyProperties(item,dto);
|
||||
result.add(dto);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.njcn.dataProcess.service.impl.relation;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.RStatLimitTargetRelationMapper;
|
||||
import com.njcn.dataProcess.pojo.dto.DataLimitTargetDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatLimitTargetD;
|
||||
import com.njcn.dataProcess.service.IDataLimitRate;
|
||||
import com.njcn.dataProcess.service.IDataLimitTarget;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Author: wr
|
||||
* @Date: 2025/3/7 10:13
|
||||
*/
|
||||
@Service("RelationDataLimitTargetImpl")
|
||||
@RequiredArgsConstructor
|
||||
public class RelationDataLimitTargetImpl extends MppServiceImpl<RStatLimitTargetRelationMapper, RStatLimitTargetD> implements IDataLimitTarget {
|
||||
|
||||
@Resource
|
||||
private IDataLimitTarget limitTarget;
|
||||
|
||||
|
||||
@Override
|
||||
public void batchInsertion(List<DataLimitTargetDto> limitRateList) {
|
||||
List<RStatLimitTargetD> result = new ArrayList<>();
|
||||
limitRateList.forEach(item->{
|
||||
RStatLimitTargetD limitRate = new RStatLimitTargetD();
|
||||
BeanUtils.copyProperties(item, limitRate);
|
||||
result.add(limitRate);
|
||||
});
|
||||
this.saveOrUpdateBatchByMultiId(result);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,15 @@
|
||||
package com.njcn.dataProcess.service.impl.relation;
|
||||
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.dataProcess.constant.PhaseType;
|
||||
import com.njcn.dataProcess.dao.relation.mapper.RStatOnlineRateDMapper;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataLimitRateDto;
|
||||
import com.njcn.dataProcess.pojo.dto.DataOnlineRateDto;
|
||||
import com.njcn.dataProcess.pojo.po.RStatLimitRateD;
|
||||
import com.njcn.dataProcess.pojo.po.RStatOnlineRateD;
|
||||
import com.njcn.dataProcess.service.IDataOnlineRate;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -11,6 +17,7 @@ import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -34,4 +41,21 @@ public class RelationDataOnlineRateImpl extends MppServiceImpl<RStatOnlineRateD
|
||||
});
|
||||
this.saveOrUpdateBatchByMultiId(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DataOnlineRateDto.Detail> getRawData(LineCountEvaluateParam lineParam) {
|
||||
List<DataOnlineRateDto.Detail> result = new ArrayList<>();
|
||||
LambdaQueryWrapper<RStatOnlineRateD> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.in(CollUtil.isNotEmpty(lineParam.getLineId()),RStatOnlineRateD::getDevIndex,lineParam.getLineId())
|
||||
.ge(RStatOnlineRateD::getTimeId,lineParam.getStartTime())
|
||||
.le(RStatOnlineRateD::getTimeId,lineParam.getEndTime());
|
||||
List<RStatOnlineRateD> list = this.list(lambdaQueryWrapper);
|
||||
|
||||
list.forEach(item->{
|
||||
DataOnlineRateDto.Detail dto = new DataOnlineRateDto.Detail();
|
||||
BeanUtils.copyProperties(item,dto);
|
||||
result.add(dto);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user