|
@@ -34,17 +34,17 @@ public class ProtTimer {
|
|
@Scheduled(cron = "0 0 */1 * * ? ")
|
|
@Scheduled(cron = "0 0 */1 * * ? ")
|
|
private void getShenChan() throws Exception {
|
|
private void getShenChan() throws Exception {
|
|
|
|
|
|
- String num6 = NumberUtils.getNum(1, 4, 0);//loc_type
|
|
|
|
|
|
+
|
|
|
|
|
|
for (int i = 1; i < 4; i++) {
|
|
for (int i = 1; i < 4; i++) {
|
|
|
|
|
|
//假设已经拿到了数据
|
|
//假设已经拿到了数据
|
|
- String num = NumberUtils.getNum(1, 14, 1);//ph
|
|
|
|
- String num1 = NumberUtils.getNum(30, 60, 1);//cod
|
|
|
|
- String num2 = NumberUtils.getNum(15, 35, 1);//nh3n
|
|
|
|
- String num3 = NumberUtils.getNum(65, 85, 1);//tp
|
|
|
|
- String num4 = NumberUtils.getNum(65, 85, 1);//tn
|
|
|
|
- String num5 = NumberUtils.getNum(90, 210, 0);//flow
|
|
|
|
|
|
+ String num = NumberUtils.getNumFloat(5.0,6.1);//ph
|
|
|
|
+ String num1 = NumberUtils.getNum(350, 381, 1);//cod
|
|
|
|
+ String num2 = NumberUtils.getNum(55, 61, 1);//nh3n
|
|
|
|
+ String num3 = NumberUtils.getNumFloat(5.0, 6.51);//tp
|
|
|
|
+ String num4 = NumberUtils.getNum(7800, 8001, 1);//tn
|
|
|
|
+ String num5 = NumberUtils.getNum(290, 301, 1);//flow
|
|
|
|
|
|
|
|
|
|
ProtData protData = new ProtData();
|
|
ProtData protData = new ProtData();
|
|
@@ -73,7 +73,8 @@ public class ProtTimer {
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
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 protWarningInfo = new ProtWarningInfo();
|
|
protWarningInfo.setWarningContent("进污口ph值为" + num + "达到橙色预警");
|
|
protWarningInfo.setWarningContent("进污口ph值为" + num + "达到橙色预警");
|
|
protWarningInfo.setWarningType(1);
|
|
protWarningInfo.setWarningType(1);
|
|
@@ -83,7 +84,8 @@ public class ProtTimer {
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
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 protWarningInfo = new ProtWarningInfo();
|
|
protWarningInfo.setWarningContent("进污口cod值为" + num1 + "达到红色预警");
|
|
protWarningInfo.setWarningContent("进污口cod值为" + num1 + "达到红色预警");
|
|
protWarningInfo.setWarningType(0);
|
|
protWarningInfo.setWarningType(0);
|
|
@@ -93,7 +95,8 @@ public class ProtTimer {
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
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 protWarningInfo = new ProtWarningInfo();
|
|
protWarningInfo.setWarningContent("进污口cod值为" + num1 + "达到橙色预警");
|
|
protWarningInfo.setWarningContent("进污口cod值为" + num1 + "达到橙色预警");
|
|
protWarningInfo.setWarningType(0);
|
|
protWarningInfo.setWarningType(0);
|
|
@@ -103,7 +106,8 @@ public class ProtTimer {
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
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 protWarningInfo = new ProtWarningInfo();
|
|
protWarningInfo.setWarningContent("进污口NH3N值为" + num2 + "达到红色预警");
|
|
protWarningInfo.setWarningContent("进污口NH3N值为" + num2 + "达到红色预警");
|
|
protWarningInfo.setWarningType(2);
|
|
protWarningInfo.setWarningType(2);
|
|
@@ -113,7 +117,8 @@ public class ProtTimer {
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
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 protWarningInfo = new ProtWarningInfo();
|
|
protWarningInfo.setWarningContent("进污口NH3N值为" + num2 + "达到橙色预警");
|
|
protWarningInfo.setWarningContent("进污口NH3N值为" + num2 + "达到橙色预警");
|
|
protWarningInfo.setWarningType(2);
|
|
protWarningInfo.setWarningType(2);
|
|
@@ -123,7 +128,8 @@ public class ProtTimer {
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
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 protWarningInfo = new ProtWarningInfo();
|
|
protWarningInfo.setWarningContent("进污口TP值为" + num3 + "达到红色预警");
|
|
protWarningInfo.setWarningContent("进污口TP值为" + num3 + "达到红色预警");
|
|
protWarningInfo.setWarningType(3);
|
|
protWarningInfo.setWarningType(3);
|
|
@@ -133,7 +139,8 @@ public class ProtTimer {
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
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 protWarningInfo = new ProtWarningInfo();
|
|
protWarningInfo.setWarningContent("进污口TP值为" + num3 + "达到橙色预警");
|
|
protWarningInfo.setWarningContent("进污口TP值为" + num3 + "达到橙色预警");
|
|
protWarningInfo.setWarningType(3);
|
|
protWarningInfo.setWarningType(3);
|
|
@@ -143,7 +150,8 @@ public class ProtTimer {
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
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 protWarningInfo = new ProtWarningInfo();
|
|
protWarningInfo.setWarningContent("进污口TN值为" + num4 + "达到红色预警");
|
|
protWarningInfo.setWarningContent("进污口TN值为" + num4 + "达到红色预警");
|
|
protWarningInfo.setWarningType(4);
|
|
protWarningInfo.setWarningType(4);
|
|
@@ -153,7 +161,8 @@ public class ProtTimer {
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
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 protWarningInfo = new ProtWarningInfo();
|
|
protWarningInfo.setWarningContent("进污口TN值为" + num4 + "达到橙色预警");
|
|
protWarningInfo.setWarningContent("进污口TN值为" + num4 + "达到橙色预警");
|
|
protWarningInfo.setWarningType(4);
|
|
protWarningInfo.setWarningType(4);
|
|
@@ -163,7 +172,8 @@ public class ProtTimer {
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
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 protWarningInfo = new ProtWarningInfo();
|
|
protWarningInfo.setWarningContent("进污口累计流量值为" + num5 + "达到红色预警");
|
|
protWarningInfo.setWarningContent("进污口累计流量值为" + num5 + "达到红色预警");
|
|
protWarningInfo.setWarningType(5);
|
|
protWarningInfo.setWarningType(5);
|
|
@@ -173,7 +183,8 @@ public class ProtTimer {
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
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 protWarningInfo = new ProtWarningInfo();
|
|
protWarningInfo.setWarningContent("进污口累计流量值为" + num5 + "达到橙色预警");
|
|
protWarningInfo.setWarningContent("进污口累计流量值为" + num5 + "达到橙色预警");
|
|
protWarningInfo.setWarningType(5);
|
|
protWarningInfo.setWarningType(5);
|
|
@@ -348,7 +359,8 @@ public class ProtTimer {
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
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 protWarningInfo = new ProtWarningInfo();
|
|
protWarningInfo.setWarningContent("排污口ph值为" + num + "达到橙色预警");
|
|
protWarningInfo.setWarningContent("排污口ph值为" + num + "达到橙色预警");
|
|
protWarningInfo.setWarningType(1);
|
|
protWarningInfo.setWarningType(1);
|
|
@@ -359,7 +371,8 @@ public class ProtTimer {
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
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 protWarningInfo = new ProtWarningInfo();
|
|
protWarningInfo.setWarningContent("排污口cod值为" + num1 + "达到红色预警");
|
|
protWarningInfo.setWarningContent("排污口cod值为" + num1 + "达到红色预警");
|
|
protWarningInfo.setWarningType(0);
|
|
protWarningInfo.setWarningType(0);
|
|
@@ -370,7 +383,8 @@ public class ProtTimer {
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
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 protWarningInfo = new ProtWarningInfo();
|
|
protWarningInfo.setWarningContent("排污口cod值为" + num1 + "达到橙色预警");
|
|
protWarningInfo.setWarningContent("排污口cod值为" + num1 + "达到橙色预警");
|
|
protWarningInfo.setWarningType(0);
|
|
protWarningInfo.setWarningType(0);
|
|
@@ -381,7 +395,8 @@ public class ProtTimer {
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
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 protWarningInfo = new ProtWarningInfo();
|
|
protWarningInfo.setWarningContent("排污口NH3N值为" + num2 + "达到红色预警");
|
|
protWarningInfo.setWarningContent("排污口NH3N值为" + num2 + "达到红色预警");
|
|
protWarningInfo.setWarningType(2);
|
|
protWarningInfo.setWarningType(2);
|
|
@@ -392,7 +407,8 @@ public class ProtTimer {
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
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 protWarningInfo = new ProtWarningInfo();
|
|
protWarningInfo.setWarningContent("排污口NH3N值为" + num2 + "达到橙色预警");
|
|
protWarningInfo.setWarningContent("排污口NH3N值为" + num2 + "达到橙色预警");
|
|
protWarningInfo.setWarningType(2);
|
|
protWarningInfo.setWarningType(2);
|
|
@@ -403,7 +419,8 @@ public class ProtTimer {
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
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 protWarningInfo = new ProtWarningInfo();
|
|
protWarningInfo.setWarningContent("排污口TP值为" + num3 + "达到红色预警");
|
|
protWarningInfo.setWarningContent("排污口TP值为" + num3 + "达到红色预警");
|
|
protWarningInfo.setWarningType(3);
|
|
protWarningInfo.setWarningType(3);
|
|
@@ -414,7 +431,8 @@ public class ProtTimer {
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
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 protWarningInfo = new ProtWarningInfo();
|
|
protWarningInfo.setWarningContent("排污口TP值为" + num3 + "达到橙色预警");
|
|
protWarningInfo.setWarningContent("排污口TP值为" + num3 + "达到橙色预警");
|
|
protWarningInfo.setWarningType(3);
|
|
protWarningInfo.setWarningType(3);
|
|
@@ -425,7 +443,8 @@ public class ProtTimer {
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
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 protWarningInfo = new ProtWarningInfo();
|
|
protWarningInfo.setWarningContent("排污口TN值为" + num4 + "达到红色预警");
|
|
protWarningInfo.setWarningContent("排污口TN值为" + num4 + "达到红色预警");
|
|
protWarningInfo.setWarningType(4);
|
|
protWarningInfo.setWarningType(4);
|
|
@@ -436,7 +455,8 @@ public class ProtTimer {
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
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 protWarningInfo = new ProtWarningInfo();
|
|
protWarningInfo.setWarningContent("排污口TN值为" + num4 + "达到橙色预警");
|
|
protWarningInfo.setWarningContent("排污口TN值为" + num4 + "达到橙色预警");
|
|
protWarningInfo.setWarningType(4);
|
|
protWarningInfo.setWarningType(4);
|
|
@@ -447,7 +467,8 @@ public class ProtTimer {
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
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 protWarningInfo = new ProtWarningInfo();
|
|
protWarningInfo.setWarningContent("排污口累计流量值为" + num5 + "达到红色预警");
|
|
protWarningInfo.setWarningContent("排污口累计流量值为" + num5 + "达到红色预警");
|
|
protWarningInfo.setWarningType(5);
|
|
protWarningInfo.setWarningType(5);
|
|
@@ -458,7 +479,8 @@ public class ProtTimer {
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setDeviceId(i);
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
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 protWarningInfo = new ProtWarningInfo();
|
|
protWarningInfo.setWarningContent("排污口累计流量值为" + num5 + "达到橙色预警");
|
|
protWarningInfo.setWarningContent("排污口累计流量值为" + num5 + "达到橙色预警");
|
|
protWarningInfo.setWarningType(5);
|
|
protWarningInfo.setWarningType(5);
|