|
@@ -60,7 +60,7 @@ public class ProtTimer {
|
|
|
protDataMapper.insert(protData);
|
|
|
|
|
|
QueryWrapper<ProtThreshold> queryWrapper = new QueryWrapper<>();
|
|
|
- if (i==1) {
|
|
|
+ if (i == 1) {
|
|
|
queryWrapper.eq("farm_id", 21).eq("prot_type", 1);
|
|
|
ProtThreshold protThreshold = protThresholdMapper.selectOne(queryWrapper);//进污口
|
|
|
if (Double.parseDouble(num) > Double.parseDouble(protThreshold.getPh2())) {
|
|
@@ -184,7 +184,8 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
}
|
|
|
- } else if (i==2) {
|
|
|
+ }
|
|
|
+ if (i == 2) {
|
|
|
queryWrapper.eq("farm_id", 21).eq("prot_type", 2);
|
|
|
ProtThreshold protThreshold = protThresholdMapper.selectOne(queryWrapper);//污口
|
|
|
if (Double.parseDouble(num) > Double.parseDouble(protThreshold.getPh2())) {
|
|
@@ -198,7 +199,8 @@ public class ProtTimer {
|
|
|
protWarningInfo.setDeviceId(i);
|
|
|
protWarningInfo.setBuildLocation("处理口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
- } else if (Double.parseDouble(num) > Double.parseDouble(protThreshold.getPh1())) {
|
|
|
+ }
|
|
|
+ if (Double.parseDouble(num) > Double.parseDouble(protThreshold.getPh1())) {
|
|
|
ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("处理口ph值为" + num + "达到橙色预警");
|
|
|
protWarningInfo.setWarningType(1);
|
|
@@ -209,7 +211,8 @@ public class ProtTimer {
|
|
|
protWarningInfo.setDeviceId(i);
|
|
|
protWarningInfo.setBuildLocation("处理口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
- } else if (Double.parseDouble(num1) > Double.parseDouble(protThreshold.getCod2())) {
|
|
|
+ }
|
|
|
+ if (Double.parseDouble(num1) > Double.parseDouble(protThreshold.getCod2())) {
|
|
|
ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("处理口cod值为" + num1 + "达到红色预警");
|
|
|
protWarningInfo.setWarningType(0);
|
|
@@ -220,7 +223,8 @@ public class ProtTimer {
|
|
|
protWarningInfo.setDeviceId(i);
|
|
|
protWarningInfo.setBuildLocation("处理口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
- } else if (Double.parseDouble(num1) > Double.parseDouble(protThreshold.getCod1())) {
|
|
|
+ }
|
|
|
+ if (Double.parseDouble(num1) > Double.parseDouble(protThreshold.getCod1())) {
|
|
|
ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("处理口cod值为" + num1 + "达到橙色预警");
|
|
|
protWarningInfo.setWarningType(0);
|
|
@@ -231,7 +235,8 @@ public class ProtTimer {
|
|
|
protWarningInfo.setDeviceId(i);
|
|
|
protWarningInfo.setBuildLocation("处理口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
- } else if (Double.parseDouble(num2) > Double.parseDouble(protThreshold.getNh3n2())) {
|
|
|
+ }
|
|
|
+ if (Double.parseDouble(num2) > Double.parseDouble(protThreshold.getNh3n2())) {
|
|
|
ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("处理口NH3N值为" + num2 + "达到红色预警");
|
|
|
protWarningInfo.setWarningType(2);
|
|
@@ -242,7 +247,8 @@ public class ProtTimer {
|
|
|
protWarningInfo.setDeviceId(i);
|
|
|
protWarningInfo.setBuildLocation("处理口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
- } else if (Double.parseDouble(num2) > Double.parseDouble(protThreshold.getNh3n1())) {
|
|
|
+ }
|
|
|
+ if (Double.parseDouble(num2) > Double.parseDouble(protThreshold.getNh3n1())) {
|
|
|
ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("处理口NH3N值为" + num2 + "达到橙色预警");
|
|
|
protWarningInfo.setWarningType(2);
|
|
@@ -253,7 +259,8 @@ public class ProtTimer {
|
|
|
protWarningInfo.setDeviceId(i);
|
|
|
protWarningInfo.setBuildLocation("处理口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
- } else if (Double.parseDouble(num3) > Double.parseDouble(protThreshold.getTp2())) {
|
|
|
+ }
|
|
|
+ if (Double.parseDouble(num3) > Double.parseDouble(protThreshold.getTp2())) {
|
|
|
ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("处理口TP值为" + num3 + "达到红色预警");
|
|
|
protWarningInfo.setWarningType(3);
|
|
@@ -264,7 +271,8 @@ public class ProtTimer {
|
|
|
protWarningInfo.setDeviceId(i);
|
|
|
protWarningInfo.setBuildLocation("处理口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
- } else if (Double.parseDouble(num3) > Double.parseDouble(protThreshold.getTp1())) {
|
|
|
+ }
|
|
|
+ if (Double.parseDouble(num3) > Double.parseDouble(protThreshold.getTp1())) {
|
|
|
ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("处理口TP值为" + num3 + "达到橙色预警");
|
|
|
protWarningInfo.setWarningType(3);
|
|
@@ -275,7 +283,8 @@ public class ProtTimer {
|
|
|
protWarningInfo.setDeviceId(i);
|
|
|
protWarningInfo.setBuildLocation("处理口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
- } else if (Double.parseDouble(num4) > Double.parseDouble(protThreshold.getTn2())) {
|
|
|
+ }
|
|
|
+ if (Double.parseDouble(num4) > Double.parseDouble(protThreshold.getTn2())) {
|
|
|
ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("处理口TN值为" + num4 + "达到红色预警");
|
|
|
protWarningInfo.setWarningType(4);
|
|
@@ -286,7 +295,8 @@ public class ProtTimer {
|
|
|
protWarningInfo.setDeviceId(i);
|
|
|
protWarningInfo.setBuildLocation("处理口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
- } else if (Double.parseDouble(num4) > Double.parseDouble(protThreshold.getTn1())) {
|
|
|
+ }
|
|
|
+ if (Double.parseDouble(num4) > Double.parseDouble(protThreshold.getTn1())) {
|
|
|
ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("处理口TN值为" + num4 + "达到橙色预警");
|
|
|
protWarningInfo.setWarningType(4);
|
|
@@ -297,7 +307,8 @@ public class ProtTimer {
|
|
|
protWarningInfo.setDeviceId(i);
|
|
|
protWarningInfo.setBuildLocation("处理口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
- } else if (Double.parseDouble(num5) > Double.parseDouble(protThreshold.getFlow2())) {
|
|
|
+ }
|
|
|
+ if (Double.parseDouble(num5) > Double.parseDouble(protThreshold.getFlow2())) {
|
|
|
ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("处理口累计流量值为" + num5 + "达到红色预警");
|
|
|
protWarningInfo.setWarningType(5);
|
|
@@ -308,7 +319,8 @@ public class ProtTimer {
|
|
|
protWarningInfo.setDeviceId(i);
|
|
|
protWarningInfo.setBuildLocation("处理口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
- } else if (Double.parseDouble(num5) > Double.parseDouble(protThreshold.getFlow1())) {
|
|
|
+ }
|
|
|
+ if (Double.parseDouble(num5) > Double.parseDouble(protThreshold.getFlow1())) {
|
|
|
ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("处理口累计流量值为" + num5 + "达到橙色预警");
|
|
|
protWarningInfo.setWarningType(5);
|
|
@@ -321,7 +333,8 @@ public class ProtTimer {
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
}
|
|
|
|
|
|
- } else if (i==3) {
|
|
|
+ }
|
|
|
+ if (i == 3) {
|
|
|
queryWrapper.eq("farm_id", 21).eq("prot_type", 3);
|
|
|
ProtThreshold protThreshold = protThresholdMapper.selectOne(queryWrapper);//进污口
|
|
|
if (Double.parseDouble(num) > Double.parseDouble(protThreshold.getPh2())) {
|