Commit f4fc109a authored by KeYong's avatar KeYong

修改CAFS泡沫罐流量计算问题

parent a30cbf07
......@@ -212,11 +212,11 @@ public class SupervisionConfigureController extends AbstractBaseController {
levelAbsLiter = volume.multiply(new BigDecimal(1000));
}else {
BigDecimal abs = new BigDecimal(String.valueOf(transResult.get("abs")));
levelAbsLiter = volume.multiply(abs.divide(new BigDecimal(100),2, RoundingMode.HALF_UP));
levelAbsLiter = volume.multiply(new BigDecimal(1000)).multiply(abs.divide(new BigDecimal(100),2, RoundingMode.HALF_UP));
}
float outputFlowRate = Float.parseFloat(String.valueOf(m.get("outputFlowRate")));
if (levelAbsLiter.compareTo(new BigDecimal(0)) != 0 && outputFlowRate != 0) {
double availableSeconds = (levelAbsLiter.divide(new BigDecimal(outputFlowRate), 0, RoundingMode.HALF_UP).doubleValue());
double availableSeconds = (levelAbsLiter.divide(BigDecimal.valueOf(outputFlowRate), 0, RoundingMode.HALF_UP).doubleValue());
m.put("availableTime", String.format("%.1fh", availableSeconds / 3600.0));
} else {
m.put("availableTime", "--");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment