稳态word报告,基波电流基波电压错误,长闪短闪错乱,2-25电压含有率,电流幅值错乱修改
This commit is contained in:
@@ -229,6 +229,9 @@ public class ExportModelController extends BaseController {
|
||||
} catch (Exception e1) {
|
||||
log.info("获取报表发生异常,异常是" + e1.getMessage());
|
||||
}
|
||||
//上移提前塞入基波电压基波电流
|
||||
getCurrentRate(param, overLimit);
|
||||
getVoltageRate(param, overLimit);
|
||||
|
||||
// 报告Map
|
||||
Map<String, Object> reportmap = new HashMap<>(16);
|
||||
@@ -334,14 +337,14 @@ public class ExportModelController extends BaseController {
|
||||
**** 三张大表基础数据幅值
|
||||
***************************************************************/
|
||||
// 基波电压最大值
|
||||
reportmap.put("$C" + "V0" + "X" + "_A$", judgeNull(voltage1.getFmaxValue()));
|
||||
reportmap.put("$C" + "V0" + "X" + "_B$", judgeNull(voltage2.getFmaxValue()));
|
||||
reportmap.put("$C" + "V0" + "X" + "_C$", judgeNull(voltage3.getFmaxValue()));
|
||||
reportmap.put("$C" + "V0" + "X" + "_A$", judgeNull(this.listVoltageRate.get(0).getList().get(0).getFmaxValue()));
|
||||
reportmap.put("$C" + "V0" + "X" + "_B$", judgeNull(this.listVoltageRate.get(0).getList().get(1).getFmaxValue()));
|
||||
reportmap.put("$C" + "V0" + "X" + "_C$", judgeNull(this.listVoltageRate.get(0).getList().get(2).getFmaxValue()));
|
||||
|
||||
// 基波电流最大值
|
||||
reportmap.put("$C" + "I0" + "X" + "_A$", judgeNull(current1.getFmaxValue()));
|
||||
reportmap.put("$C" + "I0" + "X" + "_B$", judgeNull(current2.getFmaxValue()));
|
||||
reportmap.put("$C" + "I0" + "X" + "_C$", judgeNull(current3.getFmaxValue()));
|
||||
reportmap.put("$C" + "I0" + "X" + "_A$", judgeNull(this.listICurrent.get(0).getList().get(0).getFmaxValue()));
|
||||
reportmap.put("$C" + "I0" + "X" + "_B$", judgeNull(this.listICurrent.get(0).getList().get(1).getFmaxValue()));
|
||||
reportmap.put("$C" + "I0" + "X" + "_C$", judgeNull(this.listICurrent.get(0).getList().get(2).getFmaxValue()));
|
||||
|
||||
// 基波电压最小值
|
||||
reportmap.put("$B" + "V0" + "N" + "_A$", judgeNull(voltage1.getMinValue()));
|
||||
@@ -357,14 +360,14 @@ public class ExportModelController extends BaseController {
|
||||
**** 三张大表基础数据幅值
|
||||
***************************************************************/
|
||||
// 基波电压最小值
|
||||
reportmap.put("$C" + "V0" + "N" + "_A$", judgeNull(voltage1.getMinValue()));
|
||||
reportmap.put("$C" + "V0" + "N" + "_B$", judgeNull(voltage2.getMinValue()));
|
||||
reportmap.put("$C" + "V0" + "N" + "_C$", judgeNull(voltage3.getMinValue()));
|
||||
reportmap.put("$C" + "V0" + "N" + "_A$", judgeNull(this.listVoltageRate.get(0).getList().get(0).getMinValue()));
|
||||
reportmap.put("$C" + "V0" + "N" + "_B$", judgeNull(this.listVoltageRate.get(0).getList().get(1).getMinValue()));
|
||||
reportmap.put("$C" + "V0" + "N" + "_C$", judgeNull(this.listVoltageRate.get(0).getList().get(2).getMinValue()));
|
||||
|
||||
// 基波电流最小值
|
||||
reportmap.put("$C" + "I0" + "N" + "_A$", judgeNull(current1.getMinValue()));
|
||||
reportmap.put("$C" + "I0" + "N" + "_B$", judgeNull(current2.getMinValue()));
|
||||
reportmap.put("$C" + "I0" + "N" + "_C$", judgeNull(current3.getMinValue()));
|
||||
reportmap.put("$C" + "I0" + "N" + "_A$", judgeNull(this.listICurrent.get(0).getList().get(0).getMinValue()));
|
||||
reportmap.put("$C" + "I0" + "N" + "_B$", judgeNull(this.listICurrent.get(0).getList().get(1).getMinValue()));
|
||||
reportmap.put("$C" + "I0" + "N" + "_C$", judgeNull(this.listICurrent.get(0).getList().get(2).getMinValue()));
|
||||
|
||||
// 基波电压平均值
|
||||
reportmap.put("$B" + "V0" + "E" + "_A$", judgeNull(voltage1.getMeanValue()));
|
||||
@@ -380,14 +383,14 @@ public class ExportModelController extends BaseController {
|
||||
**** 三张大表基础数据幅值
|
||||
***************************************************************/
|
||||
// 基波电压平均值
|
||||
reportmap.put("$C" + "V0" + "E" + "_A$", judgeNull(voltage1.getMeanValue()));
|
||||
reportmap.put("$C" + "V0" + "E" + "_B$", judgeNull(voltage2.getMeanValue()));
|
||||
reportmap.put("$C" + "V0" + "E" + "_C$", judgeNull(voltage3.getMeanValue()));
|
||||
reportmap.put("$C" + "V0" + "E" + "_A$", judgeNull(this.listVoltageRate.get(0).getList().get(0).getMeanValue()));
|
||||
reportmap.put("$C" + "V0" + "E" + "_B$", judgeNull(this.listVoltageRate.get(0).getList().get(1).getMeanValue()));
|
||||
reportmap.put("$C" + "V0" + "E" + "_C$", judgeNull(this.listVoltageRate.get(0).getList().get(2).getMeanValue()));
|
||||
|
||||
// 基波电流平均值
|
||||
reportmap.put("$C" + "I0" + "E" + "_A$", judgeNull(current1.getMeanValue()));
|
||||
reportmap.put("$C" + "I0" + "E" + "_B$", judgeNull(current2.getMeanValue()));
|
||||
reportmap.put("$C" + "I0" + "E" + "_C$", judgeNull(current3.getMeanValue()));
|
||||
reportmap.put("$C" + "I0" + "E" + "_A$", judgeNull(this.listICurrent.get(0).getList().get(0).getMeanValue()));
|
||||
reportmap.put("$C" + "I0" + "E" + "_B$", judgeNull(this.listICurrent.get(0).getList().get(1).getMeanValue()));
|
||||
reportmap.put("$C" + "I0" + "E" + "_C$", judgeNull(this.listICurrent.get(0).getList().get(2).getMeanValue()));
|
||||
|
||||
// 基波电压cp95值
|
||||
reportmap.put("$B" + "V0" + "%" + "_A$", judgeNull(voltage1.getCp95Value()));
|
||||
@@ -403,14 +406,14 @@ public class ExportModelController extends BaseController {
|
||||
**** 三张大表基础数据幅值
|
||||
***************************************************************/
|
||||
// 基波电压cp95值
|
||||
reportmap.put("$C" + "V0" + "%" + "_A$", judgeNull(voltage1.getCp95Value()));
|
||||
reportmap.put("$C" + "V0" + "%" + "_B$", judgeNull(voltage2.getCp95Value()));
|
||||
reportmap.put("$C" + "V0" + "%" + "_C$", judgeNull(voltage3.getCp95Value()));
|
||||
reportmap.put("$C" + "V0" + "%" + "_A$", judgeNull(this.listVoltageRate.get(0).getList().get(0).getCp95Value()));
|
||||
reportmap.put("$C" + "V0" + "%" + "_B$", judgeNull(this.listVoltageRate.get(0).getList().get(1).getCp95Value()));
|
||||
reportmap.put("$C" + "V0" + "%" + "_C$", judgeNull(this.listVoltageRate.get(0).getList().get(2).getCp95Value()));
|
||||
|
||||
// 基波电流cp95值
|
||||
reportmap.put("$C" + "I0" + "%" + "_A$", judgeNull(current1.getCp95Value()));
|
||||
reportmap.put("$C" + "I0" + "%" + "_B$", judgeNull(current2.getCp95Value()));
|
||||
reportmap.put("$C" + "I0" + "%" + "_C$", judgeNull(current3.getCp95Value()));
|
||||
reportmap.put("$C" + "I0" + "%" + "_A$", judgeNull(this.listICurrent.get(0).getList().get(0).getCp95Value()));
|
||||
reportmap.put("$C" + "I0" + "%" + "_B$", judgeNull(this.listICurrent.get(0).getList().get(1).getCp95Value()));
|
||||
reportmap.put("$C" + "I0" + "%" + "_C$", judgeNull(this.listICurrent.get(0).getList().get(2).getCp95Value()));
|
||||
|
||||
// 遍历map中的值
|
||||
int iCount = 0;
|
||||
@@ -549,8 +552,8 @@ public class ExportModelController extends BaseController {
|
||||
getDistortion(param, overLimit);
|
||||
getFre(param, overLimit);
|
||||
getThreePhase(param, overLimit);
|
||||
getVoltageRate(param, overLimit);
|
||||
getCurrentRate(param, overLimit);
|
||||
// getVoltageRate(param, overLimit);
|
||||
// getCurrentRate(param, overLimit);
|
||||
// 短闪
|
||||
ReportValue pst1 = this.listFlicker.get(0).getList().get(0);
|
||||
// 短闪
|
||||
|
||||
@@ -236,13 +236,14 @@
|
||||
GROUP BY
|
||||
phasic_type
|
||||
</select>
|
||||
<!-- 短闪字段错了-->
|
||||
<select id="getFlickerData" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
|
||||
SELECT
|
||||
phasic_type AS phaseType,
|
||||
AVG( CASE WHEN value_type = 'AVG' THEN plt END ) AS meanValue,
|
||||
MIN( CASE WHEN value_type = 'MIN' THEN plt END ) AS minValue,
|
||||
MAX( CASE WHEN value_type = 'MAX' THEN plt END ) AS fmaxValue,
|
||||
MAX( CASE WHEN value_type = 'CP95' THEN plt END ) AS cp95Value
|
||||
AVG( CASE WHEN value_type = 'AVG' THEN pst END ) AS meanValue,
|
||||
MIN( CASE WHEN value_type = 'MIN' THEN pst END ) AS minValue,
|
||||
MAX( CASE WHEN value_type = 'MAX' THEN pst END ) AS fmaxValue,
|
||||
MAX( CASE WHEN value_type = 'CP95' THEN pst END ) AS cp95Value
|
||||
FROM
|
||||
r_stat_data_flicker_d
|
||||
<where>
|
||||
@@ -261,15 +262,16 @@
|
||||
GROUP BY
|
||||
phasic_type
|
||||
</select>
|
||||
<!-- 长闪表查错了-->
|
||||
<select id="getLFlickerData" resultType="com.njcn.harmonic.pojo.vo.ReportValue">
|
||||
SELECT
|
||||
phasic_type AS phaseType,
|
||||
AVG( CASE WHEN value_type = 'AVG' THEN pst END ) AS meanValue,
|
||||
MIN( CASE WHEN value_type = 'MIN' THEN pst END ) AS minValue,
|
||||
MAX( CASE WHEN value_type = 'MAX' THEN pst END ) AS fmaxValue,
|
||||
MAX( CASE WHEN value_type = 'CP95' THEN pst END ) AS cp95Value
|
||||
AVG( CASE WHEN value_type = 'AVG' THEN plt END ) AS meanValue,
|
||||
MIN( CASE WHEN value_type = 'MIN' THEN plt END ) AS minValue,
|
||||
MAX( CASE WHEN value_type = 'MAX' THEN plt END ) AS fmaxValue,
|
||||
MAX( CASE WHEN value_type = 'CP95' THEN plt END ) AS cp95Value
|
||||
FROM
|
||||
r_stat_data_flicker_d
|
||||
r_stat_data_plt_d
|
||||
<where>
|
||||
phasic_type IN ( 'A', 'B', 'C')
|
||||
and quality_flag = 0
|
||||
|
||||
@@ -212,9 +212,9 @@ public class ReportServiceImpl implements ReportService {
|
||||
@Override
|
||||
public List<ReportValue> getVoltageRate(ReportQueryParam param) {
|
||||
List<ReportValue> list = new ArrayList<>();
|
||||
|
||||
//这里获取的是电压有效值,不是V1
|
||||
//获取基波电压幅值,单位kV
|
||||
List<ReportValue> listV = dataV(param, Arrays.asList("A", "B", "C"), 0, 1, true, 5);
|
||||
List<ReportValue> listV = dataV(param, Arrays.asList("A", "B", "C"), 1, 2, false, 5);
|
||||
|
||||
if (CollUtil.isEmpty(listV)) {
|
||||
RegroupData.regroupData(list, true, true);
|
||||
@@ -409,20 +409,23 @@ public class ReportServiceImpl implements ReportService {
|
||||
String cp95 = "CP95";
|
||||
List<ReportValue> a = new ArrayList<>();
|
||||
Map<String, List<RStatDataHarmrateVDPO>> collect = harmRateVDPOS.stream().collect(Collectors.groupingBy(RStatDataHarmrateVDPO::getPhaseType));
|
||||
collect.forEach((key, value) -> {
|
||||
//格式错误,之前数据50A,50B,50C,应该是50A,B,C
|
||||
for (int i = num; i < size; i++) {
|
||||
int finalI = i;
|
||||
collect.forEach((key, value) -> {
|
||||
Map<String, List<RStatDataHarmrateVDPO>> valueTypeMap = value.stream().collect(Collectors.groupingBy(RStatDataHarmrateVDPO::getValueType));
|
||||
|
||||
for (int i = num; i < size; i++) {
|
||||
|
||||
ReportValue reportValue = new ReportValue();
|
||||
String attribute = "";
|
||||
if (fly) {
|
||||
if (index == 0) {
|
||||
attribute = attributeV(i);
|
||||
attribute = attributeV(finalI);
|
||||
} else {
|
||||
attribute = attributeV(index);
|
||||
}
|
||||
} else {
|
||||
attribute = "v" + i;
|
||||
attribute = "v" + finalI;
|
||||
}
|
||||
|
||||
if (valueTypeMap.containsKey(max)) {
|
||||
@@ -450,8 +453,9 @@ public class ReportServiceImpl implements ReportService {
|
||||
reportValue.setCp95Value(cp95Num.get(0).floatValue());
|
||||
}
|
||||
a.add(reportValue);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
@@ -553,20 +557,23 @@ public class ReportServiceImpl implements ReportService {
|
||||
String cp95 = "CP95";
|
||||
List<ReportValue> a = new ArrayList<>();
|
||||
Map<String, List<RStatDataIDPO>> collect = rStatDataVDS.stream().collect(Collectors.groupingBy(RStatDataIDPO::getPhaseType));
|
||||
collect.forEach((key, value) -> {
|
||||
//格式错误,之前数据50A,50B,50C,应该是50A,B,C
|
||||
for (int i = num; i < size; i++) {
|
||||
int finalI = i;
|
||||
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);
|
||||
attribute = attributeI(finalI);
|
||||
} else {
|
||||
attribute = attributeI(index);
|
||||
}
|
||||
} else {
|
||||
attribute = "i" + i;
|
||||
attribute = "i" + finalI;
|
||||
}
|
||||
if (valueTypeMap.containsKey(max)) {
|
||||
List<Float> aa = reflectDataI(valueTypeMap.get(max), max, attribute);
|
||||
@@ -593,8 +600,9 @@ public class ReportServiceImpl implements ReportService {
|
||||
reportValue.setCp95Value(cp95Num.get(0).floatValue());
|
||||
}
|
||||
a.add(reportValue);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user