This commit is contained in:
2023-11-07 21:10:09 +08:00
parent 5f2a1581e7
commit 30475d5cc8

View File

@@ -131,13 +131,23 @@ public class CoalWashingDailyAnalysisEntity extends OrgCommonEntity {
avgSum1 += ObjectUtils.defaultIfNull(inputItem.getAvgDdp1(), 0.0) * currWeight;
}
try {
inputItem.setRollingAvgDdp1(avgSum1 / totalWeight1);
} catch (Exception e) {
}
if (inputItem.getAvgDdp2() != null) {
totalWeight2 += currWeight;
avgSum2 += ObjectUtils.defaultIfNull(inputItem.getAvgDdp2(), 0.0) * currWeight;
}
try {
inputItem.setRollingAvgDdp2(avgSum2 / totalWeight2);
} catch (Exception e) {
}
}
for (int i = 0; i < inputItems.size(); i++) {