稳态合格率报告bug
This commit is contained in:
@@ -194,7 +194,7 @@ public class QualifiedReportServiceImpl implements QualifiedReportService {
|
|||||||
//计算组装谐波含电压有率
|
//计算组装谐波含电压有率
|
||||||
int flagV = 0;
|
int flagV = 0;
|
||||||
for (int i = HARMONIC_START; i < HARMONIC_END; i++) {
|
for (int i = HARMONIC_START; i < HARMONIC_END; i++) {
|
||||||
BigDecimal v = new BigDecimal(getUharmOvertime(i));
|
BigDecimal v = new BigDecimal(getUharmOvertime(i,map));
|
||||||
BigDecimal hegeRate = alltime.subtract(v).divide(alltime, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100));
|
BigDecimal hegeRate = alltime.subtract(v).divide(alltime, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100));
|
||||||
if (hegeRate.floatValue() < 95) {
|
if (hegeRate.floatValue() < 95) {
|
||||||
content.append(String.valueOf(i)).append("次谐波电压含有率合格率").append(String.valueOf(hegeRate.floatValue())).append("%;");
|
content.append(String.valueOf(i)).append("次谐波电压含有率合格率").append(String.valueOf(hegeRate.floatValue())).append("%;");
|
||||||
@@ -206,7 +206,7 @@ public class QualifiedReportServiceImpl implements QualifiedReportService {
|
|||||||
int flagI = 0;
|
int flagI = 0;
|
||||||
for (int i = HARMONIC_START; i < HARMONIC_END; i++) {
|
for (int i = HARMONIC_START; i < HARMONIC_END; i++) {
|
||||||
String key = "IHARM_" + i + "_OVERTIME";
|
String key = "IHARM_" + i + "_OVERTIME";
|
||||||
BigDecimal ih = new BigDecimal(getIharmOvertime(i));
|
BigDecimal ih = new BigDecimal(getIharmOvertime(i,map));
|
||||||
BigDecimal hegeRate = alltime.subtract(ih).divide(alltime, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100));
|
BigDecimal hegeRate = alltime.subtract(ih).divide(alltime, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100));
|
||||||
if (hegeRate.floatValue() < 95) {
|
if (hegeRate.floatValue() < 95) {
|
||||||
BigDecimal maxI = (BigDecimal) lineIhMap.get(key);
|
BigDecimal maxI = (BigDecimal) lineIhMap.get(key);
|
||||||
@@ -239,22 +239,22 @@ public class QualifiedReportServiceImpl implements QualifiedReportService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Integer getUharmOvertime(int harmonicOrder) {
|
public Integer getUharmOvertime(int harmonicOrder, RStatLimitTargetDPO map) {
|
||||||
try {
|
try {
|
||||||
Field field = this.getClass().getDeclaredField("uharm" + harmonicOrder + "Overtime");
|
Field field = map.getClass().getDeclaredField("uharm" + harmonicOrder + "Overtime");
|
||||||
field.setAccessible(true);
|
field.setAccessible(true);
|
||||||
return (Integer) field.get(this);
|
return (Integer) field.get(map);
|
||||||
} catch (NoSuchFieldException | IllegalAccessException e) {
|
} catch (NoSuchFieldException | IllegalAccessException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getIharmOvertime(int harmonicOrder) {
|
public Integer getIharmOvertime(int harmonicOrder, RStatLimitTargetDPO map) {
|
||||||
try {
|
try {
|
||||||
Field field = this.getClass().getDeclaredField("iharm" + harmonicOrder + "Overtime");
|
Field field = map.getClass().getDeclaredField("iharm" + harmonicOrder + "Overtime");
|
||||||
field.setAccessible(true);
|
field.setAccessible(true);
|
||||||
return (Integer) field.get(this);
|
return (Integer) field.get(map);
|
||||||
} catch (NoSuchFieldException | IllegalAccessException e) {
|
} catch (NoSuchFieldException | IllegalAccessException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user