添加谐波报告功能
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
package com.njcn.harmonic.service;
|
||||
|
||||
import com.njcn.harmonic.pojo.param.ReportQueryParam;
|
||||
import com.njcn.harmonic.pojo.po.report.OverLimitInfo;
|
||||
import com.njcn.harmonic.pojo.vo.ReportValue;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 谐波报告
|
||||
*/
|
||||
public interface ReportService {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
OverLimitInfo getOverLimitData(ReportQueryParam param);
|
||||
|
||||
/**
|
||||
* 基波增幅
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<ReportValue> getVirtualData(ReportQueryParam param);
|
||||
|
||||
/**
|
||||
* 功率
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<ReportValue> getPowerData(ReportQueryParam param);
|
||||
|
||||
/**
|
||||
* 闪变
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<ReportValue> getFlickerData(ReportQueryParam param);
|
||||
|
||||
/**
|
||||
* 电压偏差
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<ReportValue> getVdeviation(ReportQueryParam param);
|
||||
|
||||
/**
|
||||
* 畸变率
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<ReportValue> getDistortionData(ReportQueryParam param);
|
||||
|
||||
/**
|
||||
* 频率
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<ReportValue> getFrequencyData(ReportQueryParam param);
|
||||
|
||||
/**
|
||||
* 三相不平衡
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<ReportValue> getThreephase(ReportQueryParam param);
|
||||
|
||||
/**
|
||||
* 谐波电流
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<ReportValue> getICurrent(ReportQueryParam param);
|
||||
|
||||
/**
|
||||
* 谐波电压
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<ReportValue> getVoltageRate(ReportQueryParam param);
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.njcn.harmonic.service.impl;
|
||||
|
||||
import com.njcn.harmonic.pojo.vo.ReportValue;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class RegroupData {
|
||||
public static void regroupData(List<ReportValue> list, boolean... b) {
|
||||
if (1 == b.length || (2 == b.length && b[1] == false)) {
|
||||
if (0 < list.size()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Float value = null;
|
||||
int length = b[0] ? 3 : 1;
|
||||
|
||||
length = (b.length == 2 && !b[1]) ? 4 : length;
|
||||
|
||||
for (int i = 0; i < length; i++) {
|
||||
String str = null;
|
||||
|
||||
if (b[0]) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
str = "A";
|
||||
break;
|
||||
case 1:
|
||||
str = "B";
|
||||
break;
|
||||
case 2:
|
||||
str = "C";
|
||||
break;
|
||||
case 3:
|
||||
str = "T";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ReportValue reportValue = new ReportValue(str, value, value, value, value);
|
||||
list.add(reportValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,484 @@
|
||||
package com.njcn.harmonic.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.njcn.harmonic.mapper.RStatDataIDMapper;
|
||||
import com.njcn.harmonic.mapper.ReportMapper;
|
||||
import com.njcn.harmonic.pojo.po.RStatDataVD;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataIDPO;
|
||||
import com.njcn.harmonic.pojo.param.ReportQueryParam;
|
||||
import com.njcn.harmonic.pojo.po.report.OverLimitInfo;
|
||||
import com.njcn.harmonic.pojo.vo.ReportValue;
|
||||
import com.njcn.harmonic.service.IRStatDataVDService;
|
||||
import com.njcn.harmonic.service.ReportService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class ReportServiceImpl implements ReportService {
|
||||
|
||||
private final ReportMapper reportMapper;
|
||||
private final IRStatDataVDService statDataVDService;
|
||||
private final RStatDataIDMapper rStatDataIDMapper;
|
||||
|
||||
@Override
|
||||
public OverLimitInfo getOverLimitData(ReportQueryParam param) {
|
||||
|
||||
|
||||
OverLimitInfo overLimitInfo = new OverLimitInfo();
|
||||
|
||||
//查询时间段内共有多少条记录,并*0.95取整处理,用来计算CP95值 降序*0.05进一位计算
|
||||
double count = 0;
|
||||
double pstCount = 0;
|
||||
double pltCount = 0;
|
||||
if (param.getB()) {
|
||||
count = Math.ceil(1);
|
||||
pltCount = Math.ceil(1);
|
||||
pstCount = Math.ceil(1);
|
||||
} else {
|
||||
count = Math.ceil(reportMapper.getTotalCP95Day(param).intValue() * 0.05);
|
||||
pltCount = Math.ceil(reportMapper.getTotalPltCP95Day(param).intValue() * 0.05);
|
||||
pstCount = Math.ceil(reportMapper.getTotalPstCP95Day(param).intValue() * 0.05);
|
||||
}
|
||||
overLimitInfo.setCount(count);
|
||||
overLimitInfo.setPltCount(pltCount);
|
||||
overLimitInfo.setPstCount(pstCount);
|
||||
return overLimitInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ReportValue> getVirtualData(ReportQueryParam param) {
|
||||
List<ReportValue> list = new ArrayList<>();
|
||||
|
||||
// 获取电流有效值
|
||||
List<ReportValue> listI = reportMapper.getVirtualDataI(param);
|
||||
//获取电压有效值
|
||||
List<ReportValue> listV = reportMapper.getVirtualDataV(param);
|
||||
//获取线电压有效值
|
||||
List<ReportValue> listVV = reportMapper.getVVirtualData(param);
|
||||
|
||||
RegroupData.regroupData(listV, true);
|
||||
RegroupData.regroupData(listI, true);
|
||||
RegroupData.regroupData(listVV, true);
|
||||
list.addAll(listV);
|
||||
list.addAll(listI);
|
||||
list.addAll(listVV);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ReportValue> getPowerData(ReportQueryParam param) {
|
||||
List<ReportValue> list = new ArrayList<>();
|
||||
//获取有功功率
|
||||
List<ReportValue> listP = reportMapper.getPowerP(param);
|
||||
//获取无功功率
|
||||
List<ReportValue> listQ = reportMapper.getPowerQ(param);
|
||||
//获取视在功率
|
||||
List<ReportValue> listS = reportMapper.getPowerS(param);
|
||||
//获取功率因数
|
||||
List<ReportValue> listF = reportMapper.getPF(param);
|
||||
|
||||
RegroupData.regroupData(listP, true, false);
|
||||
RegroupData.regroupData(listQ, true, false);
|
||||
RegroupData.regroupData(listS, true, false);
|
||||
RegroupData.regroupData(listF, true, false);
|
||||
list.addAll(listP);
|
||||
list.addAll(listQ);
|
||||
list.addAll(listS);
|
||||
list.addAll(listF);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ReportValue> getFlickerData(ReportQueryParam param) {
|
||||
List<ReportValue> list = new ArrayList<>();
|
||||
|
||||
//短时闪变
|
||||
List<ReportValue> listFlicker = reportMapper.getFlickerData(param);
|
||||
//长时闪变
|
||||
List<ReportValue> listLFlicker = reportMapper.getLFlickerData(param);
|
||||
|
||||
RegroupData.regroupData(listFlicker, true);
|
||||
RegroupData.regroupData(listLFlicker, true);
|
||||
list.addAll(listFlicker);
|
||||
list.addAll(listLFlicker);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ReportValue> getVdeviation(ReportQueryParam param) {
|
||||
List<ReportValue> list = new ArrayList<>();
|
||||
|
||||
//获取电压偏差
|
||||
List<ReportValue> listU = reportMapper.getUVdeviationData(param);
|
||||
List<ReportValue> listL = reportMapper.getLVdeviationData(param);
|
||||
|
||||
RegroupData.regroupData(listU, true);
|
||||
RegroupData.regroupData(listL, true);
|
||||
list.addAll(listU);
|
||||
list.addAll(listL);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ReportValue> getDistortionData(ReportQueryParam param) {
|
||||
List<ReportValue> list = new ArrayList<>();
|
||||
//获取电压畸变率
|
||||
List<ReportValue> listU = reportMapper.getDistortionDataV(param);
|
||||
//获取电流畸变率
|
||||
List<ReportValue> listI = reportMapper.getDistortionDataI(param);
|
||||
|
||||
//添加之前判断数据库是否有数据,如果没有数据模拟数据添加到集合中
|
||||
RegroupData.regroupData(listU, true);
|
||||
RegroupData.regroupData(listI, true);
|
||||
list.addAll(listU);
|
||||
list.addAll(listI);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ReportValue> getFrequencyData(ReportQueryParam param) {
|
||||
List<ReportValue> list = new ArrayList<>();
|
||||
|
||||
List<ReportValue> listFre = reportMapper.getFrequencyData(param);
|
||||
List<ReportValue> listFreDEV = reportMapper.getDEVFrequencyData(param);
|
||||
|
||||
|
||||
RegroupData.regroupData(listFre, true);
|
||||
RegroupData.regroupData(listFreDEV, true);
|
||||
list.addAll(listFre);
|
||||
list.addAll(listFreDEV);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ReportValue> getThreephase(ReportQueryParam param) {
|
||||
List<ReportValue> list = new ArrayList<>();
|
||||
//电压三相不平衡度
|
||||
List<ReportValue> listV = dataV(param, Arrays.asList("T"),1, 5,true,0);
|
||||
//电流三相不平衡度
|
||||
List<ReportValue> listI = dataI(param, Arrays.asList("T"),1, 5,true,0);
|
||||
|
||||
if (CollUtil.isNotEmpty(listV)) {
|
||||
list.addAll(listV);
|
||||
} else {
|
||||
regroupData(list);
|
||||
}
|
||||
|
||||
if (CollUtil.isNotEmpty(listI)) {
|
||||
list.addAll(listI);
|
||||
} else {
|
||||
regroupData(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ReportValue> getICurrent(ReportQueryParam param) {
|
||||
List<ReportValue> list = new ArrayList<>();
|
||||
|
||||
//获取电流幅值,包含基波
|
||||
List<ReportValue> listI = dataI(param, Arrays.asList("A","B","C"),1, 51,false,0);
|
||||
if (CollUtil.isEmpty(listI)) {
|
||||
for (int i = 0; i < 50; i++) {
|
||||
RegroupData.regroupData(list, true, true);
|
||||
}
|
||||
} else {
|
||||
list.addAll(listI);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ReportValue> getVoltageRate(ReportQueryParam param) {
|
||||
List<ReportValue> list = new ArrayList<>();
|
||||
|
||||
//获取基波电压幅值,单位kV
|
||||
List<ReportValue> listV = dataV(param, Arrays.asList("A","B","C"),0, 1,true,5);
|
||||
|
||||
if (CollUtil.isEmpty(listV)) {
|
||||
RegroupData.regroupData(list, true, true);
|
||||
} else {
|
||||
list.addAll(listV);
|
||||
}
|
||||
|
||||
//获取电压含有率,不包含基波
|
||||
List<ReportValue> listRate = dataV(param, Arrays.asList("A","B","C"),2, 51,false,1);
|
||||
|
||||
if (CollUtil.isEmpty(listRate)) {
|
||||
for (int i = 0; i < 49; i++) {
|
||||
RegroupData.regroupData(list, true, true);
|
||||
}
|
||||
} else {
|
||||
list.addAll(listRate);
|
||||
}
|
||||
|
||||
//获取电压畸变率
|
||||
List<ReportValue> listU = reportMapper.getDistortionDataV(param);
|
||||
RegroupData.regroupData(listU, true);
|
||||
list.addAll(listU);
|
||||
return list;
|
||||
}
|
||||
|
||||
private void regroupData(List<ReportValue> list) {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
List<ReportValue> list1 = new ArrayList<>();
|
||||
RegroupData.regroupData(list1, false);
|
||||
list.addAll(list1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 电压信息
|
||||
* @param param 查询条件
|
||||
* @param valueTypes 区分类别 例如"A","B","C"
|
||||
* @param num 循环开始
|
||||
* @param size 循环结束
|
||||
* @param fly 否是启用获取属性电压
|
||||
* @param index 获取属性位置名称
|
||||
* @return
|
||||
*/
|
||||
private List<ReportValue> dataV(ReportQueryParam param,List<String> valueTypes,Integer num,Integer size,Boolean fly,Integer index){
|
||||
List<RStatDataVD> rStatDataVDS = statDataVDService.list(new LambdaQueryWrapper<RStatDataVD>()
|
||||
.eq(RStatDataVD::getLineId, param.getLineId())
|
||||
.in(CollUtil.isNotEmpty(valueTypes),RStatDataVD::getPhasicType,valueTypes)
|
||||
.ge(StrUtil.isNotBlank(param.getStartTime()), RStatDataVD::getTime, DateUtil.beginOfDay(DateUtil.parse(param.getStartTime())))
|
||||
.le(StrUtil.isNotBlank(param.getEndTime()), RStatDataVD::getTime, DateUtil.endOfDay(DateUtil.parse(param.getEndTime())))
|
||||
);
|
||||
String max = "MAX";
|
||||
String avg = "AVG";
|
||||
String min = "MIN";
|
||||
String cp95 = "CP95";
|
||||
List<ReportValue> a = new ArrayList<>();
|
||||
Map<String, List<RStatDataVD>> collect = rStatDataVDS.stream().collect(Collectors.groupingBy(RStatDataVD::getPhasicType));
|
||||
collect.forEach((key, value) -> {
|
||||
Map<String, List<RStatDataVD>> valueTypeMap = value.stream().collect(Collectors.groupingBy(RStatDataVD::getValueType));
|
||||
|
||||
for (int i = num; i < size; i++) {
|
||||
ReportValue reportValue = new ReportValue();
|
||||
String attribute="";
|
||||
if(fly){
|
||||
if (index==0){
|
||||
attribute = attributeV(i);
|
||||
}else{
|
||||
attribute = attributeV(index);
|
||||
}
|
||||
}else{
|
||||
attribute = "v"+i;
|
||||
}
|
||||
|
||||
if (valueTypeMap.containsKey(max)) {
|
||||
List<Float> aa = reflectDataV(valueTypeMap.get(max), max,attribute);
|
||||
reportValue.setPhaseType(key);
|
||||
Float maxNum = aa.stream().distinct().max(Float::compareTo).get();
|
||||
reportValue.setFmaxValue(maxNum);
|
||||
}
|
||||
if (valueTypeMap.containsKey(avg)) {
|
||||
List<Float> aa = reflectDataV(valueTypeMap.get(avg), avg,attribute);
|
||||
reportValue.setPhaseType(key);
|
||||
Double avgNum = aa.stream().distinct().collect(Collectors.averagingDouble(Float::doubleValue));
|
||||
reportValue.setMeanValue(avgNum.floatValue());
|
||||
}
|
||||
if (valueTypeMap.containsKey(min)) {
|
||||
List<Float> aa = reflectDataV(valueTypeMap.get(min), min,attribute);
|
||||
reportValue.setPhaseType(key);
|
||||
double minNum = aa.stream().distinct().min(Float::compareTo).get();
|
||||
reportValue.setMinValue((float) minNum);
|
||||
}
|
||||
if (valueTypeMap.containsKey(cp95)) {
|
||||
List<Float> aa = reflectDataV(valueTypeMap.get(cp95), cp95,attribute);
|
||||
reportValue.setPhaseType(key);
|
||||
List<Float> cp95Num = aa.stream().distinct().sorted(Comparator.comparing(Float::doubleValue).reversed()).collect(Collectors.toList());
|
||||
reportValue.setCp95Value(cp95Num.get(0).floatValue());
|
||||
}
|
||||
a.add(reportValue);
|
||||
}
|
||||
});
|
||||
return a;
|
||||
}
|
||||
|
||||
/**
|
||||
* 电压反射取属性值
|
||||
*
|
||||
* @param value
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
private List<Float> reflectDataV(List<RStatDataVD> value, String name,String attribute) {
|
||||
Field field = null;
|
||||
try {
|
||||
field = RStatDataVD.class.getDeclaredField(attribute);
|
||||
} catch (NoSuchFieldException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
field.setAccessible(true);
|
||||
|
||||
Field finalField = field;
|
||||
return value.stream().filter(x -> x.getValueType().equals(name)).map(temp -> {
|
||||
BigDecimal o = null;
|
||||
try {
|
||||
o = (BigDecimal) finalField.get(temp);
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
return o.floatValue();
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 电流信息
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
private List<ReportValue> dataI(ReportQueryParam param,List<String> valueTypes,Integer num,Integer size,Boolean fly,Integer index){
|
||||
List<RStatDataIDPO> rStatDataVDS = rStatDataIDMapper.selectList(new LambdaQueryWrapper<RStatDataIDPO>()
|
||||
.eq(RStatDataIDPO::getLineId, param.getLineId())
|
||||
.in(CollUtil.isNotEmpty(valueTypes),RStatDataIDPO::getPhaseType,valueTypes)
|
||||
.ge(StrUtil.isNotBlank(param.getStartTime()), RStatDataIDPO::getTime, DateUtil.beginOfDay(DateUtil.parse(param.getStartTime())))
|
||||
.le(StrUtil.isNotBlank(param.getEndTime()), RStatDataIDPO::getTime, DateUtil.endOfDay(DateUtil.parse(param.getEndTime())))
|
||||
);
|
||||
String max = "MAX";
|
||||
String avg = "AVG";
|
||||
String min = "MIN";
|
||||
String cp95 = "CP95";
|
||||
List<ReportValue> a = new ArrayList<>();
|
||||
Map<String, List<RStatDataIDPO>> collect = rStatDataVDS.stream().collect(Collectors.groupingBy(RStatDataIDPO::getPhaseType));
|
||||
collect.forEach((key, value) -> {
|
||||
Map<String, List<RStatDataIDPO>> valueTypeMap = value.stream().collect(Collectors.groupingBy(RStatDataIDPO::getValueType));
|
||||
|
||||
for (int i = num; i < size; i++) {
|
||||
ReportValue reportValue = new ReportValue();
|
||||
String attribute="";
|
||||
if(fly){
|
||||
if (index==0){
|
||||
attribute = attributeI(i);
|
||||
}else{
|
||||
attribute = attributeI(index);
|
||||
}
|
||||
}else{
|
||||
attribute = "i"+i;
|
||||
}
|
||||
if (valueTypeMap.containsKey(max)) {
|
||||
List<Float> aa = reflectDataI(valueTypeMap.get(max), max,attribute);
|
||||
reportValue.setPhaseType(key);
|
||||
Float maxNum = aa.stream().distinct().max(Float::compareTo).get();
|
||||
reportValue.setFmaxValue(maxNum);
|
||||
}
|
||||
if (valueTypeMap.containsKey(avg)) {
|
||||
List<Float> aa = reflectDataI(valueTypeMap.get(avg), avg,attribute);
|
||||
reportValue.setPhaseType(key);
|
||||
Double avgNum = aa.stream().distinct().collect(Collectors.averagingDouble(Float::doubleValue));
|
||||
reportValue.setMeanValue(avgNum.floatValue());
|
||||
}
|
||||
if (valueTypeMap.containsKey(min)) {
|
||||
List<Float> aa = reflectDataI(valueTypeMap.get(min), min,attribute);
|
||||
reportValue.setPhaseType(key);
|
||||
double minNum = aa.stream().distinct().min(Float::compareTo).get();
|
||||
reportValue.setMinValue((float) minNum);
|
||||
}
|
||||
if (valueTypeMap.containsKey(cp95)) {
|
||||
List<Float> aa = reflectDataI(valueTypeMap.get(cp95), cp95,attribute);
|
||||
reportValue.setPhaseType(key);
|
||||
List<Float> cp95Num = aa.stream().distinct().sorted(Comparator.comparing(Float::doubleValue).reversed()).collect(Collectors.toList());
|
||||
reportValue.setCp95Value(cp95Num.get(0).floatValue());
|
||||
}
|
||||
a.add(reportValue);
|
||||
}
|
||||
});
|
||||
return a;
|
||||
}
|
||||
|
||||
/**
|
||||
* 电流反射取属性值
|
||||
*
|
||||
* @param value
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
private List<Float> reflectDataI(List<RStatDataIDPO> value, String name, String attribute) {
|
||||
Field field = null;
|
||||
try {
|
||||
field = RStatDataIDPO.class.getDeclaredField(attribute);
|
||||
} catch (NoSuchFieldException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
field.setAccessible(true);
|
||||
Field finalField = field;
|
||||
return value.stream().filter(x -> x.getValueType().equals(name)).map(temp -> {
|
||||
Double o = null;
|
||||
try {
|
||||
o = (Double) finalField.get(temp);
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
return o.floatValue();
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取属性电压
|
||||
* @param i
|
||||
* @return
|
||||
*/
|
||||
private String attributeV(Integer i) {
|
||||
String str=null;
|
||||
switch (i) {
|
||||
case 1:
|
||||
str = "vUnbalance";
|
||||
break;
|
||||
case 2:
|
||||
str = "vPos";
|
||||
break;
|
||||
case 3:
|
||||
str = "vNeg";
|
||||
break;
|
||||
case 4:
|
||||
str = "vZero";
|
||||
break;
|
||||
case 5:
|
||||
str = "v1";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
/**
|
||||
* 获取属性电流
|
||||
* @param i
|
||||
* @return
|
||||
*/
|
||||
private String attributeI(Integer i) {
|
||||
String str=null;
|
||||
switch (i) {
|
||||
case 1:
|
||||
str = "iUnbalance";
|
||||
break;
|
||||
case 2:
|
||||
str = "iPos";
|
||||
break;
|
||||
case 3:
|
||||
str = "iNeg";
|
||||
break;
|
||||
case 4:
|
||||
str = "iZero";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user