|
@@ -360,18 +360,18 @@ public class BasePigpenServiceImpl extends ServiceImpl<BasePigpenMapper, BasePig
|
|
|
BigDecimal hum1 =BigDecimal.ZERO;
|
|
|
if (!ObjectUtil.isNull(envDeviceRecentlyData.get(11).getChipValue())){
|
|
|
hum1 = new BigDecimal(envDeviceRecentlyData.get(11).getChipValue());
|
|
|
- pressureList.add(hum1);
|
|
|
}
|
|
|
BigDecimal hum2 =BigDecimal.ZERO;
|
|
|
if (!ObjectUtil.isNull(envDeviceRecentlyData.get(12).getChipValue())){
|
|
|
hum2 = new BigDecimal(envDeviceRecentlyData.get(12).getChipValue());
|
|
|
- pressureList.add(hum2);
|
|
|
}
|
|
|
BigDecimal hum3 =BigDecimal.ZERO;
|
|
|
if (!ObjectUtil.isNull(envDeviceRecentlyData.get(13).getChipValue())){
|
|
|
hum3 = new BigDecimal(envDeviceRecentlyData.get(13).getChipValue());
|
|
|
- pressureList.add(hum3);
|
|
|
}
|
|
|
+ pressureList.add(hum1);
|
|
|
+ pressureList.add(hum2);
|
|
|
+ pressureList.add(hum3);
|
|
|
BigDecimal totalHum = hum1.add(hum2).add(hum3);
|
|
|
|
|
|
unitDetailVo.setAvgHum(totalHum.divide(new BigDecimal(pressureList.size()), 1, BigDecimal.ROUND_HALF_UP).toString());
|