mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 23:57:12 +08:00
添加翻大堆平均
This commit is contained in:
@@ -112,6 +112,57 @@ public class CoalWashingDailyAnalysisEntity extends OrgCommonEntity {
|
||||
inputItem.setRollingAvgDdp1(avgSum1 / totalWeight);
|
||||
inputItem.setRollingAvgDdp2(avgSum2 / totalWeight);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < inputItems.size(); i++) {
|
||||
|
||||
CoalWashingDailyAnalysisItemVo item = inputItems.get(i);
|
||||
if (i == 0) {
|
||||
item.setFddAvgP1(item.getFddp1());
|
||||
} else {
|
||||
int nullCount = 0;
|
||||
for (int j = 0; j < i; j++) {
|
||||
if (item.getFddp1() == null) {
|
||||
nullCount++;
|
||||
} else {
|
||||
|
||||
item.setFddAvgP1(
|
||||
ObjectUtils.defaultIfNull(item.getFddp1(), 0.0)
|
||||
+ inputItems.get(j).getFddAvgP1());
|
||||
}
|
||||
}
|
||||
if (i - nullCount > 0) {
|
||||
|
||||
item.setFddAvgP1(item.getFddAvgP1() / (i - nullCount));
|
||||
} else {
|
||||
item.setFddAvgP1(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < inputItems.size(); i++) {
|
||||
|
||||
CoalWashingDailyAnalysisItemVo item = inputItems.get(i);
|
||||
if (i == 0) {
|
||||
item.setFddAvgP2(item.getFddp2());
|
||||
} else {
|
||||
int nullCount = 0;
|
||||
for (int j = 0; j < i; j++) {
|
||||
if (item.getFddp2() == null) {
|
||||
nullCount++;
|
||||
} else {
|
||||
|
||||
item.setFddAvgP2(
|
||||
ObjectUtils.defaultIfNull(item.getFddp2(), 0.0)
|
||||
+ inputItems.get(j).getFddAvgP2());
|
||||
}
|
||||
}
|
||||
if (i - nullCount > 0) {
|
||||
|
||||
item.setFddAvgP2(item.getFddAvgP2() / (i - nullCount));
|
||||
} else {
|
||||
item.setFddAvgP2(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,6 +150,21 @@ public class CoalWashingDailyAnalysisItemVo {
|
||||
@Comment("用户输入 翻大堆 备用")
|
||||
private Double fddp5;
|
||||
|
||||
@Comment("用户输入 翻大堆 灰")
|
||||
private Double fddAvgP1;
|
||||
|
||||
@Comment("用户输入 翻大堆 硫")
|
||||
private Double fddAvgP2;
|
||||
|
||||
@Comment("用户输入 翻大堆 挥发")
|
||||
private Double fddAvgP3;
|
||||
|
||||
@Comment("用户输入 翻大堆 粘结")
|
||||
private Double fddAvgP4;
|
||||
|
||||
@Comment("用户输入 翻大堆 备用")
|
||||
private Double fddAvgP5;
|
||||
|
||||
@Comment("系统计算 大堆 灰")
|
||||
private Double sysDdp1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user