|
@@ -31,7 +31,7 @@ public class GasTimer {
|
|
private void getShenChan() throws Exception {
|
|
private void getShenChan() throws Exception {
|
|
|
|
|
|
String type = NumberUtils.getNum(1, 5, 0);//loc_type
|
|
String type = NumberUtils.getNum(1, 5, 0);//loc_type
|
|
- for (int i = 1; i < 17; i++) {
|
|
|
|
|
|
+ for (int i = 1; i < 21; i++) {
|
|
|
|
|
|
String nh3n = NumberUtils.getNumFloat(0.0, 10.5);//NH3N
|
|
String nh3n = NumberUtils.getNumFloat(0.0, 10.5);//NH3N
|
|
String jlm = NumberUtils.getNumFloat(0.0, 10.5);//jlm
|
|
String jlm = NumberUtils.getNumFloat(0.0, 10.5);//jlm
|
|
@@ -52,7 +52,10 @@ public class GasTimer {
|
|
gasData.setByx(byx);
|
|
gasData.setByx(byx);
|
|
gasData.setCh3sh(ch3);
|
|
gasData.setCh3sh(ch3);
|
|
gasData.setSja(sja);
|
|
gasData.setSja(sja);
|
|
- if (i > 12) {
|
|
|
|
|
|
+ if (i > 16) {
|
|
|
|
+ gasData.setLoctionType(i - 16);//天台
|
|
|
|
+ gasData.setFarmId(27);
|
|
|
|
+ } else if (i > 12) {
|
|
gasData.setLoctionType(i - 12);//横路
|
|
gasData.setLoctionType(i - 12);//横路
|
|
gasData.setFarmId(26);
|
|
gasData.setFarmId(26);
|
|
} else if (i > 8) {
|
|
} else if (i > 8) {
|
|
@@ -70,7 +73,7 @@ public class GasTimer {
|
|
|
|
|
|
QueryWrapper<GasThreshold> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<GasThreshold> queryWrapper = new QueryWrapper<>();
|
|
GasWarningInfo warningInfo = new GasWarningInfo();
|
|
GasWarningInfo warningInfo = new GasWarningInfo();
|
|
- if (i==1||i==5||i==9||i==13) {
|
|
|
|
|
|
+ if (i==1||i==5||i==9||i==13||i==17) {
|
|
String cq = NumberUtils.getNumFloat(0.0, 1000.5);//cq
|
|
String cq = NumberUtils.getNumFloat(0.0, 1000.5);//cq
|
|
gasData.setCq(cq);
|
|
gasData.setCq(cq);
|
|
if (i == 1) {
|
|
if (i == 1) {
|
|
@@ -79,8 +82,10 @@ public class GasTimer {
|
|
queryWrapper.eq("farm_id", 24).eq("gas_type", 1);
|
|
queryWrapper.eq("farm_id", 24).eq("gas_type", 1);
|
|
} else if (i == 9) {
|
|
} else if (i == 9) {
|
|
queryWrapper.eq("farm_id", 23).eq("gas_type", 1);
|
|
queryWrapper.eq("farm_id", 23).eq("gas_type", 1);
|
|
- } else {
|
|
|
|
|
|
+ } else if (i == 13) {
|
|
queryWrapper.eq("farm_id", 26).eq("gas_type", 1);
|
|
queryWrapper.eq("farm_id", 26).eq("gas_type", 1);
|
|
|
|
+ } else {
|
|
|
|
+ queryWrapper.eq("farm_id", 27).eq("gas_type", 1);
|
|
}
|
|
}
|
|
GasThreshold gasThreshold = thresholdMapper.selectOne(queryWrapper);
|
|
GasThreshold gasThreshold = thresholdMapper.selectOne(queryWrapper);
|
|
if (Double.parseDouble(nh3n) > Double.parseDouble(gasThreshold.getNh3N())) {
|
|
if (Double.parseDouble(nh3n) > Double.parseDouble(gasThreshold.getNh3N())) {
|
|
@@ -165,7 +170,7 @@ public class GasTimer {
|
|
warningInfoMapper.insert(warningInfo);
|
|
warningInfoMapper.insert(warningInfo);
|
|
}
|
|
}
|
|
|
|
|
|
- } else if (i==2||i==6||i==10||i==14) {
|
|
|
|
|
|
+ } else if (i==2||i==6||i==10||i==14||i==18) {
|
|
String cq = NumberUtils.getNumFloat(0.0, 5000.5);//cq
|
|
String cq = NumberUtils.getNumFloat(0.0, 5000.5);//cq
|
|
gasData.setCq(cq);
|
|
gasData.setCq(cq);
|
|
if (i == 2) {
|
|
if (i == 2) {
|
|
@@ -174,8 +179,10 @@ public class GasTimer {
|
|
queryWrapper.eq("farm_id", 24).eq("gas_type", 2);
|
|
queryWrapper.eq("farm_id", 24).eq("gas_type", 2);
|
|
} else if (i == 10) {
|
|
} else if (i == 10) {
|
|
queryWrapper.eq("farm_id", 23).eq("gas_type", 2);
|
|
queryWrapper.eq("farm_id", 23).eq("gas_type", 2);
|
|
- } else {
|
|
|
|
|
|
+ } else if (i == 14) {
|
|
queryWrapper.eq("farm_id", 26).eq("gas_type", 2);
|
|
queryWrapper.eq("farm_id", 26).eq("gas_type", 2);
|
|
|
|
+ } else {
|
|
|
|
+ queryWrapper.eq("farm_id", 27).eq("gas_type", 2);
|
|
}
|
|
}
|
|
GasThreshold gasThreshold = thresholdMapper.selectOne(queryWrapper);
|
|
GasThreshold gasThreshold = thresholdMapper.selectOne(queryWrapper);
|
|
if (Double.parseDouble(nh3n) > Double.parseDouble(gasThreshold.getNh3N())) {
|
|
if (Double.parseDouble(nh3n) > Double.parseDouble(gasThreshold.getNh3N())) {
|
|
@@ -261,7 +268,7 @@ public class GasTimer {
|
|
warningInfoMapper.insert(warningInfo);
|
|
warningInfoMapper.insert(warningInfo);
|
|
}
|
|
}
|
|
|
|
|
|
- } else if (i==3||i==7||i==11||i==15) {
|
|
|
|
|
|
+ } else if (i==3||i==7||i==11||i==15||i==19) {
|
|
String cq = NumberUtils.getNumFloat(0.0, 1000.5);//cq
|
|
String cq = NumberUtils.getNumFloat(0.0, 1000.5);//cq
|
|
gasData.setCq(cq);
|
|
gasData.setCq(cq);
|
|
if (i == 3) {
|
|
if (i == 3) {
|
|
@@ -270,9 +277,10 @@ public class GasTimer {
|
|
queryWrapper.eq("farm_id", 24).eq("gas_type", 3);
|
|
queryWrapper.eq("farm_id", 24).eq("gas_type", 3);
|
|
} else if (i == 11) {
|
|
} else if (i == 11) {
|
|
queryWrapper.eq("farm_id", 23).eq("gas_type", 3);
|
|
queryWrapper.eq("farm_id", 23).eq("gas_type", 3);
|
|
- } else {
|
|
|
|
|
|
+ } else if (i == 15) {
|
|
queryWrapper.eq("farm_id", 26).eq("gas_type", 3);
|
|
queryWrapper.eq("farm_id", 26).eq("gas_type", 3);
|
|
-
|
|
|
|
|
|
+ } else {
|
|
|
|
+ queryWrapper.eq("farm_id", 27).eq("gas_type", 3);
|
|
}
|
|
}
|
|
GasThreshold gasThreshold = thresholdMapper.selectOne(queryWrapper);
|
|
GasThreshold gasThreshold = thresholdMapper.selectOne(queryWrapper);
|
|
if (Double.parseDouble(nh3n) > Double.parseDouble(gasThreshold.getNh3N())) {
|
|
if (Double.parseDouble(nh3n) > Double.parseDouble(gasThreshold.getNh3N())) {
|
|
@@ -358,7 +366,7 @@ public class GasTimer {
|
|
warningInfoMapper.insert(warningInfo);
|
|
warningInfoMapper.insert(warningInfo);
|
|
}
|
|
}
|
|
|
|
|
|
- } else if (i==4||i==8||i==12||i==16) {
|
|
|
|
|
|
+ } else if (i==4||i==8||i==12||i==16||i==20) {
|
|
String cq = NumberUtils.getNumFloat(0.0, 10000.5);//cq
|
|
String cq = NumberUtils.getNumFloat(0.0, 10000.5);//cq
|
|
gasData.setCq(cq);
|
|
gasData.setCq(cq);
|
|
if (i == 4) {
|
|
if (i == 4) {
|
|
@@ -367,8 +375,10 @@ public class GasTimer {
|
|
queryWrapper.eq("farm_id", 24).eq("gas_type", 4);
|
|
queryWrapper.eq("farm_id", 24).eq("gas_type", 4);
|
|
} else if (i == 12) {
|
|
} else if (i == 12) {
|
|
queryWrapper.eq("farm_id", 23).eq("gas_type", 4);
|
|
queryWrapper.eq("farm_id", 23).eq("gas_type", 4);
|
|
- } else {
|
|
|
|
|
|
+ } else if (i == 16) {
|
|
queryWrapper.eq("farm_id", 26).eq("gas_type", 4);
|
|
queryWrapper.eq("farm_id", 26).eq("gas_type", 4);
|
|
|
|
+ } else {
|
|
|
|
+ queryWrapper.eq("farm_id", 27).eq("gas_type", 4);
|
|
}
|
|
}
|
|
GasThreshold gasThreshold = thresholdMapper.selectOne(queryWrapper);
|
|
GasThreshold gasThreshold = thresholdMapper.selectOne(queryWrapper);
|
|
if (Double.parseDouble(nh3n) > Double.parseDouble(gasThreshold.getNh3N())) {
|
|
if (Double.parseDouble(nh3n) > Double.parseDouble(gasThreshold.getNh3N())) {
|