|
@@ -45,7 +45,7 @@ public class ProtTimer {
|
|
|
String num3 = NumberUtils.getNum(65, 85, 1);//tp
|
|
|
String num4 = NumberUtils.getNum(65, 85, 1);//tn
|
|
|
String num5 = NumberUtils.getNum(90, 210, 0);//flow
|
|
|
- ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
+
|
|
|
|
|
|
ProtData protData = new ProtData();
|
|
|
protData.setLoctionType(i);
|
|
@@ -64,6 +64,7 @@ public class ProtTimer {
|
|
|
queryWrapper.eq("farm_id", 21).eq("prot_type", 1);
|
|
|
ProtThreshold protThreshold = protThresholdMapper.selectOne(queryWrapper);//进污口
|
|
|
if (Double.parseDouble(num) > Double.parseDouble(protThreshold.getPh2())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("进污口ph值为" + num + "达到红色预警");
|
|
|
protWarningInfo.setWarningType(1);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -73,6 +74,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num) > Double.parseDouble(protThreshold.getPh1())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("进污口ph值为" + num + "达到橙色预警");
|
|
|
protWarningInfo.setWarningType(1);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -82,6 +84,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num1) > Double.parseDouble(protThreshold.getCod2())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("进污口cod值为" + num1 + "达到红色预警");
|
|
|
protWarningInfo.setWarningType(0);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -91,6 +94,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num1) > Double.parseDouble(protThreshold.getCod1())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("进污口cod值为" + num1 + "达到橙色预警");
|
|
|
protWarningInfo.setWarningType(0);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -100,6 +104,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num2) > Double.parseDouble(protThreshold.getNh3n2())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("进污口NH3N值为" + num2 + "达到红色预警");
|
|
|
protWarningInfo.setWarningType(2);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -109,6 +114,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num2) > Double.parseDouble(protThreshold.getNh3n1())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("进污口NH3N值为" + num2 + "达到橙色预警");
|
|
|
protWarningInfo.setWarningType(2);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -118,6 +124,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num3) > Double.parseDouble(protThreshold.getTp2())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("进污口TP值为" + num3 + "达到红色预警");
|
|
|
protWarningInfo.setWarningType(3);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -127,6 +134,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num3) > Double.parseDouble(protThreshold.getTp1())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("进污口TP值为" + num3 + "达到橙色预警");
|
|
|
protWarningInfo.setWarningType(3);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -136,6 +144,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num4) > Double.parseDouble(protThreshold.getTn2())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("进污口TN值为" + num4 + "达到红色预警");
|
|
|
protWarningInfo.setWarningType(4);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -145,6 +154,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num4) > Double.parseDouble(protThreshold.getTn1())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("进污口TN值为" + num4 + "达到橙色预警");
|
|
|
protWarningInfo.setWarningType(4);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -154,6 +164,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num5) > Double.parseDouble(protThreshold.getFlow2())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("进污口累计流量值为" + num5 + "达到红色预警");
|
|
|
protWarningInfo.setWarningType(5);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -163,6 +174,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("进污口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num5) > Double.parseDouble(protThreshold.getFlow1())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("进污口累计流量值为" + num5 + "达到橙色预警");
|
|
|
protWarningInfo.setWarningType(5);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -176,6 +188,7 @@ public class ProtTimer {
|
|
|
queryWrapper.eq("farm_id", 21).eq("prot_type", 2);
|
|
|
ProtThreshold protThreshold = protThresholdMapper.selectOne(queryWrapper);//污口
|
|
|
if (Double.parseDouble(num) > Double.parseDouble(protThreshold.getPh2())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("处理口ph值为" + num + "达到红色预警");
|
|
|
protWarningInfo.setWarningType(1);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -186,6 +199,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("处理口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num) > Double.parseDouble(protThreshold.getPh1())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("处理口ph值为" + num + "达到橙色预警");
|
|
|
protWarningInfo.setWarningType(1);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -196,6 +210,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("处理口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num1) > Double.parseDouble(protThreshold.getCod2())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("处理口cod值为" + num1 + "达到红色预警");
|
|
|
protWarningInfo.setWarningType(0);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -206,6 +221,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("处理口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num1) > Double.parseDouble(protThreshold.getCod1())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("处理口cod值为" + num1 + "达到橙色预警");
|
|
|
protWarningInfo.setWarningType(0);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -216,6 +232,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("处理口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num2) > Double.parseDouble(protThreshold.getNh3n2())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("处理口NH3N值为" + num2 + "达到红色预警");
|
|
|
protWarningInfo.setWarningType(2);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -226,6 +243,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("处理口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num2) > Double.parseDouble(protThreshold.getNh3n1())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("处理口NH3N值为" + num2 + "达到橙色预警");
|
|
|
protWarningInfo.setWarningType(2);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -236,6 +254,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("处理口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num3) > Double.parseDouble(protThreshold.getTp2())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("处理口TP值为" + num3 + "达到红色预警");
|
|
|
protWarningInfo.setWarningType(3);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -246,6 +265,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("处理口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num3) > Double.parseDouble(protThreshold.getTp1())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("处理口TP值为" + num3 + "达到橙色预警");
|
|
|
protWarningInfo.setWarningType(3);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -256,6 +276,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("处理口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num4) > Double.parseDouble(protThreshold.getTn2())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("处理口TN值为" + num4 + "达到红色预警");
|
|
|
protWarningInfo.setWarningType(4);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -266,6 +287,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("处理口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num4) > Double.parseDouble(protThreshold.getTn1())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("处理口TN值为" + num4 + "达到橙色预警");
|
|
|
protWarningInfo.setWarningType(4);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -276,6 +298,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("处理口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num5) > Double.parseDouble(protThreshold.getFlow2())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("处理口累计流量值为" + num5 + "达到红色预警");
|
|
|
protWarningInfo.setWarningType(5);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -286,6 +309,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("处理口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num5) > Double.parseDouble(protThreshold.getFlow1())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("处理口累计流量值为" + num5 + "达到橙色预警");
|
|
|
protWarningInfo.setWarningType(5);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -301,6 +325,7 @@ public class ProtTimer {
|
|
|
queryWrapper.eq("farm_id", 21).eq("prot_type", 3);
|
|
|
ProtThreshold protThreshold = protThresholdMapper.selectOne(queryWrapper);//进污口
|
|
|
if (Double.parseDouble(num) > Double.parseDouble(protThreshold.getPh2())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("排污口ph值为" + num + "达到红色预警");
|
|
|
protWarningInfo.setWarningType(1);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -311,6 +336,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num) > Double.parseDouble(protThreshold.getPh1())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("排污口ph值为" + num + "达到橙色预警");
|
|
|
protWarningInfo.setWarningType(1);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -321,6 +347,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num1) > Double.parseDouble(protThreshold.getCod2())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("排污口cod值为" + num1 + "达到红色预警");
|
|
|
protWarningInfo.setWarningType(0);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -331,6 +358,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num1) > Double.parseDouble(protThreshold.getCod1())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("排污口cod值为" + num1 + "达到橙色预警");
|
|
|
protWarningInfo.setWarningType(0);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -341,6 +369,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num2) > Double.parseDouble(protThreshold.getNh3n2())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("排污口NH3N值为" + num2 + "达到红色预警");
|
|
|
protWarningInfo.setWarningType(2);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -351,6 +380,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num2) > Double.parseDouble(protThreshold.getNh3n1())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("排污口NH3N值为" + num2 + "达到橙色预警");
|
|
|
protWarningInfo.setWarningType(2);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -361,6 +391,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num3) > Double.parseDouble(protThreshold.getTp2())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("排污口TP值为" + num3 + "达到红色预警");
|
|
|
protWarningInfo.setWarningType(3);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -371,6 +402,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num3) > Double.parseDouble(protThreshold.getTp1())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("排污口TP值为" + num3 + "达到橙色预警");
|
|
|
protWarningInfo.setWarningType(3);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -381,6 +413,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num4) > Double.parseDouble(protThreshold.getTn2())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("排污口TN值为" + num4 + "达到红色预警");
|
|
|
protWarningInfo.setWarningType(4);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -391,6 +424,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num4) > Double.parseDouble(protThreshold.getTn1())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("排污口TN值为" + num4 + "达到橙色预警");
|
|
|
protWarningInfo.setWarningType(4);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -401,6 +435,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num5) > Double.parseDouble(protThreshold.getFlow2())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("排污口累计流量值为" + num5 + "达到红色预警");
|
|
|
protWarningInfo.setWarningType(5);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|
|
@@ -411,6 +446,7 @@ public class ProtTimer {
|
|
|
protWarningInfo.setBuildLocation("排污口");
|
|
|
warningInfoMapper.insert(protWarningInfo);
|
|
|
} else if (Double.parseDouble(num5) > Double.parseDouble(protThreshold.getFlow1())) {
|
|
|
+ ProtWarningInfo protWarningInfo = new ProtWarningInfo();
|
|
|
protWarningInfo.setWarningContent("排污口累计流量值为" + num5 + "达到橙色预警");
|
|
|
protWarningInfo.setWarningType(5);
|
|
|
protWarningInfo.setFarmId(protThreshold.getFarmId());
|