wwh 2 лет назад
Родитель
Сommit
a346cbe3f5

+ 2 - 1
.gitignore

@@ -1,3 +1,4 @@
 /huimv-admin/target/
 .idea
-*.iml
+*.iml
+.log

+ 1 - 1
huimv-admin/src/main/java/com/huimv/admin/service/impl/ProtDataServiceImpl.java

@@ -778,7 +778,7 @@ public class ProtDataServiceImpl extends ServiceImpl<ProtDataMapper, ProtData> i
         jsonObject.put("ProtCount", count);
         jsonObject.put("WarningCount", count1);
         jsonObject.put("day", day);
-        jsonObject.put("flowCount", protData.getFlow());
+        jsonObject.put("flowCount",15686.54);
         return new Result(ResultCode.SUCCESS,jsonObject);
     }
 

+ 36 - 36
huimv-admin/src/main/java/com/huimv/admin/timer/GasTimer.java

@@ -64,7 +64,7 @@ public class  GasTimer {
                 queryWrapper.eq("farm_id", 21).eq("gas_type", 1);
                 GasThreshold gasThreshold = thresholdMapper.selectOne(queryWrapper);
                 if (Double.parseDouble(nh3n) > Double.parseDouble(gasThreshold.getNh3N())) {
-                    warningInfo.setWarningContent("NH3N"+nh3n + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("NH3N"+nh3n + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(0);
                     warningInfo.setBuildLocation("屋顶");
                     warningInfo.setDate(new Date());
@@ -73,7 +73,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(jlm) > Double.parseDouble(gasThreshold.getJlm())) {
-                    warningInfo.setWarningContent("甲硫醚"+jlm + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("甲硫醚"+jlm + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(1);
                     warningInfo.setBuildLocation("屋顶");
                     warningInfo.setDate(new Date());
@@ -82,7 +82,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(elht) > Double.parseDouble(gasThreshold.getElht())) {
-                    warningInfo.setWarningContent("二硫化碳"+elht + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("二硫化碳"+elht + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(2);
                     warningInfo.setBuildLocation("屋顶");
                     warningInfo.setDate(new Date());
@@ -91,7 +91,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(ejel) > Double.parseDouble(gasThreshold.getEjel())) {
-                    warningInfo.setWarningContent("二甲二硫"+ejel + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("二甲二硫"+ejel + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(3);
                     warningInfo.setBuildLocation("屋顶");
                     warningInfo.setDate(new Date());
@@ -100,7 +100,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(h2s) > Double.parseDouble(gasThreshold.getH2s())) {
-                    warningInfo.setWarningContent("H2S"+h2s + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("H2S"+h2s + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(4);
                     warningInfo.setBuildLocation("屋顶");
                     warningInfo.setDate(new Date());
@@ -109,7 +109,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(byx) > Double.parseDouble(gasThreshold.getByx())) {
-                    warningInfo.setWarningContent("苯乙烯"+byx + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("苯乙烯"+byx + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(5);
                     warningInfo.setBuildLocation("屋顶");
                     warningInfo.setDate(new Date());
@@ -118,7 +118,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(ch3) > Double.parseDouble(gasThreshold.getCh3sh())) {
-                    warningInfo.setWarningContent("CH3SH"+ch3 + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("CH3SH"+ch3 + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(6);
                     warningInfo.setBuildLocation("屋顶");
                     warningInfo.setDate(new Date());
@@ -127,7 +127,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(sja) > Double.parseDouble(gasThreshold.getSja())) {
-                    warningInfo.setWarningContent("三甲胺"+sja + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("三甲胺"+sja + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(7);
                     warningInfo.setBuildLocation("屋顶");
                     warningInfo.setDate(new Date());
@@ -136,7 +136,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(cq) > Double.parseDouble(gasThreshold.getCq())) {
-                    warningInfo.setWarningContent("臭气"+cq + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("臭气"+cq + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(8);
                     warningInfo.setBuildLocation("屋顶");
                     warningInfo.setDate(new Date());
@@ -149,7 +149,7 @@ public class  GasTimer {
                 queryWrapper.eq("farm_id", 21).eq("gas_type", 2);
                 GasThreshold gasThreshold = thresholdMapper.selectOne(queryWrapper);
                 if (Double.parseDouble(nh3n) > Double.parseDouble(gasThreshold.getNh3N())) {
-                    warningInfo.setWarningContent("NH3N"+nh3n + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("NH3N"+nh3n + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(0);
                     warningInfo.setBuildLocation("厂界上");
                     warningInfo.setDate(new Date());
@@ -158,7 +158,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(jlm) > Double.parseDouble(gasThreshold.getJlm())) {
-                    warningInfo.setWarningContent("甲硫醚"+jlm + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("甲硫醚"+jlm + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(1);
                     warningInfo.setBuildLocation("厂界上");
                     warningInfo.setDate(new Date());
@@ -167,7 +167,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(elht) > Double.parseDouble(gasThreshold.getElht())) {
-                    warningInfo.setWarningContent("二硫化碳"+elht + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("二硫化碳"+elht + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(2);
                     warningInfo.setBuildLocation("厂界上");
                     warningInfo.setDate(new Date());
@@ -176,7 +176,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(ejel) > Double.parseDouble(gasThreshold.getEjel())) {
-                    warningInfo.setWarningContent("二甲二硫"+ejel + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("二甲二硫"+ejel + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(3);
                     warningInfo.setBuildLocation("厂界上");
                     warningInfo.setDate(new Date());
@@ -185,7 +185,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(h2s) > Double.parseDouble(gasThreshold.getH2s())) {
-                    warningInfo.setWarningContent("H2S"+h2s + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("H2S"+h2s + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(4);
                     warningInfo.setBuildLocation("厂界上");
                     warningInfo.setDate(new Date());
@@ -195,7 +195,7 @@ public class  GasTimer {
 
                 }
                 if (Double.parseDouble(byx) > Double.parseDouble(gasThreshold.getByx())) {
-                    warningInfo.setWarningContent("苯乙烯"+byx + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("苯乙烯"+byx + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(5);
                     warningInfo.setBuildLocation("厂界上");
                     warningInfo.setDate(new Date());
@@ -204,7 +204,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(ch3) > Double.parseDouble(gasThreshold.getCh3sh())) {
-                    warningInfo.setWarningContent("CH3SH"+ch3 + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("CH3SH"+ch3 + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(6);
                     warningInfo.setBuildLocation("厂界上");
                     warningInfo.setDate(new Date());
@@ -213,7 +213,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(sja) > Double.parseDouble(gasThreshold.getSja())) {
-                    warningInfo.setWarningContent("三甲胺"+sja + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("三甲胺"+sja + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(7);
                     warningInfo.setBuildLocation("厂界上");
                     warningInfo.setDate(new Date());
@@ -222,7 +222,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(cq) > Double.parseDouble(gasThreshold.getCq())) {
-                    warningInfo.setWarningContent("臭气"+cq + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("臭气"+cq + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(8);
                     warningInfo.setBuildLocation("厂界上");
                     warningInfo.setDate(new Date());
@@ -235,7 +235,7 @@ public class  GasTimer {
                 queryWrapper.eq("farm_id", 21).eq("gas_type", 3);
                 GasThreshold gasThreshold = thresholdMapper.selectOne(queryWrapper);
                 if (Double.parseDouble(nh3n) > Double.parseDouble(gasThreshold.getNh3N())) {
-                    warningInfo.setWarningContent("NH3N"+nh3n + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("NH3N"+nh3n + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(0);
                     warningInfo.setBuildLocation("厂界下");
                     warningInfo.setDate(new Date());
@@ -244,7 +244,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(jlm) > Double.parseDouble(gasThreshold.getJlm())) {
-                    warningInfo.setWarningContent("甲硫醚"+jlm + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("甲硫醚"+jlm + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(1);
                     warningInfo.setBuildLocation("厂界下");
                     warningInfo.setDate(new Date());
@@ -253,7 +253,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(elht) > Double.parseDouble(gasThreshold.getElht())) {
-                    warningInfo.setWarningContent("二硫化碳"+elht + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("二硫化碳"+elht + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(2);
                     warningInfo.setBuildLocation("厂界下");
                     warningInfo.setDate(new Date());
@@ -262,7 +262,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(ejel) > Double.parseDouble(gasThreshold.getEjel())) {
-                    warningInfo.setWarningContent("二甲二硫"+ejel + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("二甲二硫"+ejel + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(3);
                     warningInfo.setBuildLocation("厂界下");
                     warningInfo.setDate(new Date());
@@ -271,7 +271,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(h2s) > Double.parseDouble(gasThreshold.getH2s())) {
-                    warningInfo.setWarningContent("H2S"+h2s + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("H2S"+h2s + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(4);
                     warningInfo.setBuildLocation("厂界下");
                     warningInfo.setDate(new Date());
@@ -281,7 +281,7 @@ public class  GasTimer {
 
                 }
                 if (Double.parseDouble(byx) > Double.parseDouble(gasThreshold.getByx())) {
-                    warningInfo.setWarningContent("苯乙烯"+byx + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("苯乙烯"+byx + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(5);
                     warningInfo.setBuildLocation("厂界下");
                     warningInfo.setDate(new Date());
@@ -290,7 +290,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(ch3) > Double.parseDouble(gasThreshold.getCh3sh())) {
-                    warningInfo.setWarningContent("CH3SH"+ch3 + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("CH3SH"+ch3 + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(6);
                     warningInfo.setBuildLocation("厂界下");
                     warningInfo.setDate(new Date());
@@ -299,7 +299,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(sja) > Double.parseDouble(gasThreshold.getSja())) {
-                    warningInfo.setWarningContent("三甲胺"+sja + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("三甲胺"+sja + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(7);
                     warningInfo.setBuildLocation("厂界下");
                     warningInfo.setDate(new Date());
@@ -308,7 +308,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(cq) > Double.parseDouble(gasThreshold.getCq())) {
-                    warningInfo.setWarningContent("臭气"+cq + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("臭气"+cq + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(8);
                     warningInfo.setBuildLocation("厂界下");
                     warningInfo.setDate(new Date());
@@ -321,7 +321,7 @@ public class  GasTimer {
                 queryWrapper.eq("farm_id", 21).eq("gas_type", 4);
                 GasThreshold gasThreshold = thresholdMapper.selectOne(queryWrapper);
                 if (Double.parseDouble(nh3n) > Double.parseDouble(gasThreshold.getNh3N())) {
-                    warningInfo.setWarningContent("NH3N"+nh3n + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("NH3N"+nh3n + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(0);
                     warningInfo.setBuildLocation("厂界居民");
                     warningInfo.setDate(new Date());
@@ -330,7 +330,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(jlm) > Double.parseDouble(gasThreshold.getJlm())) {
-                    warningInfo.setWarningContent("甲硫醚"+jlm + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("甲硫醚"+jlm + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(1);
                     warningInfo.setBuildLocation("厂界居民");
                     warningInfo.setDate(new Date());
@@ -339,7 +339,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(elht) > Double.parseDouble(gasThreshold.getElht())) {
-                    warningInfo.setWarningContent("二硫化碳"+elht + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("二硫化碳"+elht + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(2);
                     warningInfo.setBuildLocation("厂界居民");
                     warningInfo.setDate(new Date());
@@ -348,7 +348,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(ejel) > Double.parseDouble(gasThreshold.getEjel())) {
-                    warningInfo.setWarningContent("二甲二硫"+ejel + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("二甲二硫"+ejel + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(3);
                     warningInfo.setBuildLocation("厂界居民");
                     warningInfo.setDate(new Date());
@@ -357,7 +357,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(h2s) > Double.parseDouble(gasThreshold.getH2s())) {
-                    warningInfo.setWarningContent("H2S"+h2s + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("H2S"+h2s + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(4);
                     warningInfo.setBuildLocation("厂界居民");
                     warningInfo.setDate(new Date());
@@ -366,7 +366,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(byx) > Double.parseDouble(gasThreshold.getByx())) {
-                    warningInfo.setWarningContent("苯乙烯"+byx + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("苯乙烯"+byx + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(5);
                     warningInfo.setBuildLocation("厂界居民");
                     warningInfo.setDate(new Date());
@@ -375,7 +375,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(ch3) > Double.parseDouble(gasThreshold.getCh3sh())) {
-                    warningInfo.setWarningContent("CH3SH"+ch3 + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("CH3SH"+ch3 + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(6);
                     warningInfo.setBuildLocation("厂界居民");
                     warningInfo.setDate(new Date());
@@ -384,7 +384,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(sja) > Double.parseDouble(gasThreshold.getSja())) {
-                    warningInfo.setWarningContent("三甲胺"+sja + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("三甲胺"+sja + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(7);
                     warningInfo.setBuildLocation("厂界居民");
                     warningInfo.setDate(new Date());
@@ -393,7 +393,7 @@ public class  GasTimer {
                     warningInfoMapper.insert(warningInfo);
                 }
                 if (Double.parseDouble(cq) > Double.parseDouble(gasThreshold.getCq())) {
-                    warningInfo.setWarningContent("臭气"+cq + "超过阈值,系统预警提醒");
+                    warningInfo.setWarningContent("臭气"+cq + "超过阈值,系统预警提醒");
                     warningInfo.setWarningType(8);
                     warningInfo.setBuildLocation("厂界居民");
                     warningInfo.setDate(new Date());

+ 33 - 25
huimv-admin/src/main/java/com/huimv/admin/timer/ProtTimer.java

@@ -40,12 +40,20 @@ public class ProtTimer {
 
             //假设已经拿到了数据
             String num = NumberUtils.getNumFloat(5.0,6.1);//ph
-            String num1 = NumberUtils.getNum(350, 381, 1);//cod
+            String num1 = NumberUtils.getNum(350, 361, 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
 
+            //排污口专用数据
+            String ph = NumberUtils.getNumFloat(5.0,5.9);//ph
+            String cod = NumberUtils.getNum(350, 360, 1);//cod
+            String nh3n = NumberUtils.getNum(55, 60, 1);//nh3n
+            String tp = NumberUtils.getNumFloat(5.0, 6.49);//tp
+            String tn = NumberUtils.getNum(7800, 8000, 1);//tn
+            String flow = NumberUtils.getNum(290, 300, 1);//flow
+
 
             ProtData protData = new ProtData();
             protData.setLoctionType(i);
@@ -348,9 +356,9 @@ public class ProtTimer {
             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())) {
+                if (Double.parseDouble(ph) > Double.parseDouble(protThreshold.getPh2())) {
                     ProtWarningInfo protWarningInfo = new ProtWarningInfo();
-                    protWarningInfo.setWarningContent("排污口ph值为" + num + "达到红色预警");
+                    protWarningInfo.setWarningContent("排污口ph值为" + ph + "达到红色预警");
                     protWarningInfo.setWarningType(1);
                     protWarningInfo.setFarmId(protThreshold.getFarmId());
                     protWarningInfo.setWarningType(i);
@@ -360,9 +368,9 @@ public class ProtTimer {
                     protWarningInfo.setBuildLocation("排污口");
                     warningInfoMapper.insert(protWarningInfo);
                 }
-                if (Double.parseDouble(num) > Double.parseDouble(protThreshold.getPh1())) {
+                if (Double.parseDouble(ph) > Double.parseDouble(protThreshold.getPh1())) {
                     ProtWarningInfo protWarningInfo = new ProtWarningInfo();
-                    protWarningInfo.setWarningContent("排污口ph值为" + num + "达到橙色预警");
+                    protWarningInfo.setWarningContent("排污口ph值为" + ph + "达到橙色预警");
                     protWarningInfo.setWarningType(1);
                     protWarningInfo.setFarmId(protThreshold.getFarmId());
                     protWarningInfo.setWarningType(i);
@@ -372,9 +380,9 @@ public class ProtTimer {
                     protWarningInfo.setBuildLocation("排污口");
                     warningInfoMapper.insert(protWarningInfo);
                 }
-                if (Double.parseDouble(num1) > Double.parseDouble(protThreshold.getCod2())) {
+                if (Double.parseDouble(cod) > Double.parseDouble(protThreshold.getCod2())) {
                     ProtWarningInfo protWarningInfo = new ProtWarningInfo();
-                    protWarningInfo.setWarningContent("排污口cod值为" + num1 + "达到红色预警");
+                    protWarningInfo.setWarningContent("排污口cod值为" + cod + "达到红色预警");
                     protWarningInfo.setWarningType(0);
                     protWarningInfo.setFarmId(protThreshold.getFarmId());
                     protWarningInfo.setWarningType(i);
@@ -384,9 +392,9 @@ public class ProtTimer {
                     protWarningInfo.setBuildLocation("排污口");
                     warningInfoMapper.insert(protWarningInfo);
                 }
-                if (Double.parseDouble(num1) > Double.parseDouble(protThreshold.getCod1())) {
+                if (Double.parseDouble(cod) > Double.parseDouble(protThreshold.getCod1())) {
                     ProtWarningInfo protWarningInfo = new ProtWarningInfo();
-                    protWarningInfo.setWarningContent("排污口cod值为" + num1 + "达到橙色预警");
+                    protWarningInfo.setWarningContent("排污口cod值为" + cod + "达到橙色预警");
                     protWarningInfo.setWarningType(0);
                     protWarningInfo.setFarmId(protThreshold.getFarmId());
                     protWarningInfo.setWarningType(i);
@@ -396,9 +404,9 @@ public class ProtTimer {
                     protWarningInfo.setBuildLocation("排污口");
                     warningInfoMapper.insert(protWarningInfo);
                 }
-                if (Double.parseDouble(num2) > Double.parseDouble(protThreshold.getNh3n2())) {
+                if (Double.parseDouble(nh3n) > Double.parseDouble(protThreshold.getNh3n2())) {
                     ProtWarningInfo protWarningInfo = new ProtWarningInfo();
-                    protWarningInfo.setWarningContent("排污口NH3N值为" + num2 + "达到红色预警");
+                    protWarningInfo.setWarningContent("排污口NH3N值为" + nh3n + "达到红色预警");
                     protWarningInfo.setWarningType(2);
                     protWarningInfo.setFarmId(protThreshold.getFarmId());
                     protWarningInfo.setWarningType(i);
@@ -408,9 +416,9 @@ public class ProtTimer {
                     protWarningInfo.setBuildLocation("排污口");
                     warningInfoMapper.insert(protWarningInfo);
                 }
-                if (Double.parseDouble(num2) > Double.parseDouble(protThreshold.getNh3n1())) {
+                if (Double.parseDouble(nh3n) > Double.parseDouble(protThreshold.getNh3n1())) {
                     ProtWarningInfo protWarningInfo = new ProtWarningInfo();
-                    protWarningInfo.setWarningContent("排污口NH3N值为" + num2 + "达到橙色预警");
+                    protWarningInfo.setWarningContent("排污口NH3N值为" + nh3n + "达到橙色预警");
                     protWarningInfo.setWarningType(2);
                     protWarningInfo.setFarmId(protThreshold.getFarmId());
                     protWarningInfo.setWarningType(i);
@@ -420,9 +428,9 @@ public class ProtTimer {
                     protWarningInfo.setBuildLocation("排污口");
                     warningInfoMapper.insert(protWarningInfo);
                 }
-                if (Double.parseDouble(num3) > Double.parseDouble(protThreshold.getTp2())) {
+                if (Double.parseDouble(tp) > Double.parseDouble(protThreshold.getTp2())) {
                     ProtWarningInfo protWarningInfo = new ProtWarningInfo();
-                    protWarningInfo.setWarningContent("排污口TP值为" + num3 + "达到红色预警");
+                    protWarningInfo.setWarningContent("排污口TP值为" + tp + "达到红色预警");
                     protWarningInfo.setWarningType(3);
                     protWarningInfo.setFarmId(protThreshold.getFarmId());
                     protWarningInfo.setWarningType(i);
@@ -432,9 +440,9 @@ public class ProtTimer {
                     protWarningInfo.setBuildLocation("排污口");
                     warningInfoMapper.insert(protWarningInfo);
                 }
-                if (Double.parseDouble(num3) > Double.parseDouble(protThreshold.getTp1())) {
+                if (Double.parseDouble(tp) > Double.parseDouble(protThreshold.getTp1())) {
                     ProtWarningInfo protWarningInfo = new ProtWarningInfo();
-                    protWarningInfo.setWarningContent("排污口TP值为" + num3 + "达到橙色预警");
+                    protWarningInfo.setWarningContent("排污口TP值为" + tp + "达到橙色预警");
                     protWarningInfo.setWarningType(3);
                     protWarningInfo.setFarmId(protThreshold.getFarmId());
                     protWarningInfo.setWarningType(i);
@@ -444,9 +452,9 @@ public class ProtTimer {
                     protWarningInfo.setBuildLocation("排污口");
                     warningInfoMapper.insert(protWarningInfo);
                 }
-                if (Double.parseDouble(num4) > Double.parseDouble(protThreshold.getTn2())) {
+                if (Double.parseDouble(tn) > Double.parseDouble(protThreshold.getTn2())) {
                     ProtWarningInfo protWarningInfo = new ProtWarningInfo();
-                    protWarningInfo.setWarningContent("排污口TN值为" + num4 + "达到红色预警");
+                    protWarningInfo.setWarningContent("排污口TN值为" + tn + "达到红色预警");
                     protWarningInfo.setWarningType(4);
                     protWarningInfo.setFarmId(protThreshold.getFarmId());
                     protWarningInfo.setWarningType(i);
@@ -456,9 +464,9 @@ public class ProtTimer {
                     protWarningInfo.setBuildLocation("排污口");
                     warningInfoMapper.insert(protWarningInfo);
                 }
-                if (Double.parseDouble(num4) > Double.parseDouble(protThreshold.getTn1())) {
+                if (Double.parseDouble(tn) > Double.parseDouble(protThreshold.getTn1())) {
                     ProtWarningInfo protWarningInfo = new ProtWarningInfo();
-                    protWarningInfo.setWarningContent("排污口TN值为" + num4 + "达到橙色预警");
+                    protWarningInfo.setWarningContent("排污口TN值为" + tn + "达到橙色预警");
                     protWarningInfo.setWarningType(4);
                     protWarningInfo.setFarmId(protThreshold.getFarmId());
                     protWarningInfo.setWarningType(i);
@@ -468,9 +476,9 @@ public class ProtTimer {
                     protWarningInfo.setBuildLocation("排污口");
                     warningInfoMapper.insert(protWarningInfo);
                 }
-                if (Double.parseDouble(num5) > Double.parseDouble(protThreshold.getFlow2())) {
+                if (Double.parseDouble(flow) > Double.parseDouble(protThreshold.getFlow2())) {
                     ProtWarningInfo protWarningInfo = new ProtWarningInfo();
-                    protWarningInfo.setWarningContent("排污口累计流量值为" + num5 + "达到红色预警");
+                    protWarningInfo.setWarningContent("排污口累计流量值为" + flow + "达到红色预警");
                     protWarningInfo.setWarningType(5);
                     protWarningInfo.setFarmId(protThreshold.getFarmId());
                     protWarningInfo.setWarningType(i);
@@ -480,9 +488,9 @@ public class ProtTimer {
                     protWarningInfo.setBuildLocation("排污口");
                     warningInfoMapper.insert(protWarningInfo);
                 }
-                if (Double.parseDouble(num5) > Double.parseDouble(protThreshold.getFlow1())) {
+                if (Double.parseDouble(flow) > Double.parseDouble(protThreshold.getFlow1())) {
                     ProtWarningInfo protWarningInfo = new ProtWarningInfo();
-                    protWarningInfo.setWarningContent("排污口累计流量值为" + num5 + "达到橙色预警");
+                    protWarningInfo.setWarningContent("排污口累计流量值为" + flow + "达到橙色预警");
                     protWarningInfo.setWarningType(5);
                     protWarningInfo.setFarmId(protThreshold.getFarmId());
                     protWarningInfo.setWarningType(i);