|
|
@@ -206,22 +206,22 @@ public class TauvWaterDataServiceImpl extends BaseServiceImpl<TauvWaterDataMappe |
|
|
|
BigDecimal value = BigDecimal.ZERO; |
|
|
|
switch (item.getCode().toLowerCase()) { |
|
|
|
case "cod": |
|
|
|
value = new BigDecimal(waterData.getWaterCod()); |
|
|
|
value = waterData.getWaterCod() != null ? new BigDecimal(waterData.getWaterCod()) : null; |
|
|
|
break; |
|
|
|
case "nh3-n": |
|
|
|
value = new BigDecimal(waterData.getWaterNh3n()); |
|
|
|
value = waterData.getWaterNh3n() != null ? new BigDecimal(waterData.getWaterNh3n()) :null; |
|
|
|
break; |
|
|
|
case "tp": |
|
|
|
value = new BigDecimal(waterData.getWaterTp()); |
|
|
|
value = waterData.getWaterTp() != null ? new BigDecimal(waterData.getWaterTp()) : null; |
|
|
|
break; |
|
|
|
case "tn": |
|
|
|
value = new BigDecimal(waterData.getWaterTn()); |
|
|
|
value = waterData.getWaterTn() != null ? new BigDecimal(waterData.getWaterTn()) : null; |
|
|
|
break; |
|
|
|
case "do": |
|
|
|
value = new BigDecimal(waterData.getWaterDo()); |
|
|
|
value = waterData.getWaterDo() != null ? new BigDecimal(waterData.getWaterDo()) : null; |
|
|
|
break; |
|
|
|
case "tub": |
|
|
|
value = new BigDecimal(waterData.getWaterTub()); |
|
|
|
value = waterData.getWaterTub() != null ? new BigDecimal(waterData.getWaterTub()) : null; |
|
|
|
break; |
|
|
|
default: |
|
|
|
break; |
|
|
@@ -252,6 +252,9 @@ public class TauvWaterDataServiceImpl extends BaseServiceImpl<TauvWaterDataMappe |
|
|
|
if (standardValue.compareTo(BigDecimal.ZERO) == 0) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
if (value == null) { |
|
|
|
continue; |
|
|
|
} |
|
|
|
BigDecimal exceed = value.subtract(standardValue); |
|
|
|
TauvWaterAlarmInfo waterAlarmInfo = new TauvWaterAlarmInfo(); |
|
|
|
waterAlarmInfo.setName(item.getName()); |