|
@@ -32,7 +32,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 < 29; i++) {
|
|
|
|
|
|
+ for (int i = 1; i < 33; 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
|
|
@@ -53,7 +53,10 @@ public class GasTimer {
|
|
gasData.setByx(byx);
|
|
gasData.setByx(byx);
|
|
gasData.setCh3sh(ch3);
|
|
gasData.setCh3sh(ch3);
|
|
gasData.setSja(sja);
|
|
gasData.setSja(sja);
|
|
- if (i > 24) {
|
|
|
|
|
|
+ if (i > 28) {
|
|
|
|
+ gasData.setLoctionType(i - 28);//下水碓
|
|
|
|
+ gasData.setFarmId(39);
|
|
|
|
+ } else if (i > 24) {
|
|
gasData.setLoctionType(i - 24);//下水碓
|
|
gasData.setLoctionType(i - 24);//下水碓
|
|
gasData.setFarmId(22);
|
|
gasData.setFarmId(22);
|
|
} else if (i > 20) {
|
|
} else if (i > 20) {
|
|
@@ -80,7 +83,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 || i == 17 || i == 21 || i == 25) {
|
|
|
|
|
|
+ if (i == 1 || i == 5 || i == 9 || i == 13 || i == 17 || i == 21 || i == 25|| i == 29) {
|
|
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) {
|
|
@@ -95,8 +98,10 @@ public class GasTimer {
|
|
queryWrapper.eq("farm_id", 27).eq("gas_type", 1);
|
|
queryWrapper.eq("farm_id", 27).eq("gas_type", 1);
|
|
} else if (i == 21) {
|
|
} else if (i == 21) {
|
|
queryWrapper.eq("farm_id", 28).eq("gas_type", 1);
|
|
queryWrapper.eq("farm_id", 28).eq("gas_type", 1);
|
|
- } else {
|
|
|
|
|
|
+ }else if (i == 25) {
|
|
queryWrapper.eq("farm_id", 22).eq("gas_type", 1);
|
|
queryWrapper.eq("farm_id", 22).eq("gas_type", 1);
|
|
|
|
+ } else {
|
|
|
|
+ queryWrapper.eq("farm_id", 39).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())) {
|
|
@@ -283,7 +288,7 @@ public class GasTimer {
|
|
warningInfoMapper.insert(warningInfo);
|
|
warningInfoMapper.insert(warningInfo);
|
|
}
|
|
}
|
|
|
|
|
|
- } else if (i == 3 || i == 7 || i == 11 || i == 15 || i == 19||i==23||i==27) {
|
|
|
|
|
|
+ } else if (i == 3 || i == 7 || i == 11 || i == 15 || i == 19 || i == 23 || i == 27) {
|
|
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) {
|
|
@@ -294,11 +299,11 @@ public class GasTimer {
|
|
queryWrapper.eq("farm_id", 23).eq("gas_type", 3);
|
|
queryWrapper.eq("farm_id", 23).eq("gas_type", 3);
|
|
} else if (i == 15) {
|
|
} else if (i == 15) {
|
|
queryWrapper.eq("farm_id", 26).eq("gas_type", 3);
|
|
queryWrapper.eq("farm_id", 26).eq("gas_type", 3);
|
|
- } else if (i==19){
|
|
|
|
|
|
+ } else if (i == 19) {
|
|
queryWrapper.eq("farm_id", 27).eq("gas_type", 3);
|
|
queryWrapper.eq("farm_id", 27).eq("gas_type", 3);
|
|
- }else if (i==23){
|
|
|
|
|
|
+ } else if (i == 23) {
|
|
queryWrapper.eq("farm_id", 28).eq("gas_type", 3);
|
|
queryWrapper.eq("farm_id", 28).eq("gas_type", 3);
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
queryWrapper.eq("farm_id", 22).eq("gas_type", 3);
|
|
queryWrapper.eq("farm_id", 22).eq("gas_type", 3);
|
|
}
|
|
}
|
|
GasThreshold gasThreshold = thresholdMapper.selectOne(queryWrapper);
|
|
GasThreshold gasThreshold = thresholdMapper.selectOne(queryWrapper);
|
|
@@ -385,7 +390,7 @@ public class GasTimer {
|
|
warningInfoMapper.insert(warningInfo);
|
|
warningInfoMapper.insert(warningInfo);
|
|
}
|
|
}
|
|
|
|
|
|
- } else if (i == 4 || i == 8 || i == 12 || i == 16 || i == 20||i==24||i==28) {
|
|
|
|
|
|
+ } else if (i == 4 || i == 8 || i == 12 || i == 16 || i == 20 || i == 24 || i == 28) {
|
|
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) {
|
|
@@ -396,9 +401,9 @@ public class GasTimer {
|
|
queryWrapper.eq("farm_id", 23).eq("gas_type", 4);
|
|
queryWrapper.eq("farm_id", 23).eq("gas_type", 4);
|
|
} else if (i == 16) {
|
|
} else if (i == 16) {
|
|
queryWrapper.eq("farm_id", 26).eq("gas_type", 4);
|
|
queryWrapper.eq("farm_id", 26).eq("gas_type", 4);
|
|
- } else if (i==20){
|
|
|
|
|
|
+ } else if (i == 20) {
|
|
queryWrapper.eq("farm_id", 27).eq("gas_type", 4);
|
|
queryWrapper.eq("farm_id", 27).eq("gas_type", 4);
|
|
- } else if (i==24){
|
|
|
|
|
|
+ } else if (i == 24) {
|
|
queryWrapper.eq("farm_id", 28).eq("gas_type", 4);
|
|
queryWrapper.eq("farm_id", 28).eq("gas_type", 4);
|
|
} else {
|
|
} else {
|
|
queryWrapper.eq("farm_id", 22).eq("gas_type", 4);
|
|
queryWrapper.eq("farm_id", 22).eq("gas_type", 4);
|