|
@@ -55,7 +55,6 @@ public class WarningController extends BaseController {
|
|
|
|
|
|
/**
|
|
|
* 处理报警规则
|
|
|
- * //todo 如果日报和工业都能获取数据,两者都报
|
|
|
* @return
|
|
|
*/
|
|
|
@GetMapping(value = "/handle/rule")
|
|
@@ -84,7 +83,6 @@ public class WarningController extends BaseController {
|
|
|
List<TXinyiDaily> tXinyiDailies = this.dailyMapper.selectTXinyiDailyList(TXinyiDaily.builder().testDate(currentDateStr).build());
|
|
|
List<TXinyiIndustry> tXinyiIndustries = this.industryMapper.selectTXinyiIndustryList(TXinyiIndustry.builder().testHour(currentHourStr).build());
|
|
|
//获取整点的那条数据,也就是第一条
|
|
|
- TXinyiDaily tXinyiDaily = CollectionUtils.isEmpty(tXinyiDailies) ? null : tXinyiDailies.get(0);
|
|
|
TXinyiIndustry tXinyiIndustry = CollectionUtils.isEmpty(tXinyiIndustries) ? null : tXinyiIndustries.get(0);
|
|
|
//开始核对各个指标 并打印
|
|
|
if(!Objects.isNull(tXinyiIndustry)){
|
|
@@ -220,12 +218,273 @@ public class WarningController extends BaseController {
|
|
|
System.out.println("出水SS超标报警数据正常~~~");
|
|
|
System.out.println("--------------10");
|
|
|
}
|
|
|
+ //12 厌氧区停留时间告警 厌氧区停留时间=2*[V_yan]/[Q_in]=[HRT_yan]he
|
|
|
+ BigDecimal yyqyxcr = normConfig.getYYQYXCR();
|
|
|
+ BigDecimal jsSlq = tXinyiIndustry.getJsSlq();
|
|
|
+ BigDecimal yyytlsjGkz = normConfig.getYyqtlsjGkz();
|
|
|
+ if(!Objects.isNull(jsSlq) && !Objects.isNull(yyqyxcr) && !Objects.isNull(yyytlsjGkz)){
|
|
|
+ BigDecimal yyHrt = new BigDecimal("2").multiply(yyqyxcr).divide(jsSlq, 4, RoundingMode.HALF_UP);
|
|
|
+ if(yyHrt.compareTo(yyytlsjGkz) < 0)
|
|
|
+ System.out.println("厌氧区停留时间报警级别为 一级");
|
|
|
+ BigDecimal yyqtlsjSjz = normConfig.getYyqtlsjSjz();
|
|
|
+ if(!Objects.isNull(yyqtlsjSjz)){
|
|
|
+ if(yyHrt.compareTo(yyytlsjGkz) >= 0 && yyHrt.compareTo(yyqtlsjSjz) < 0)
|
|
|
+ System.out.println("厌氧区停留时间报警级别为 二级");
|
|
|
+ }
|
|
|
+ System.out.println("厌氧区停留时间报警数据正常~~~");
|
|
|
+ System.out.println("--------------12");
|
|
|
+ }
|
|
|
+ //13 内回流比报警
|
|
|
+ BigDecimal nhlbSjz = normConfig.getNhlbSjz();
|
|
|
+ BigDecimal nhlbnkSxz = normConfig.getNhlbnkSxz();
|
|
|
+ BigDecimal nhlbqdsl = normConfig.getNHLBQDSL();
|
|
|
+ BigDecimal nhlbdsjll = normConfig.getNHLBDSJLL();
|
|
|
+ BigDecimal nhlbgzxl = normConfig.getNHLBGZXL();
|
|
|
+ if(!Objects.isNull(jsSlq) && !Objects.isNull(nhlbSjz) && !Objects.isNull(nhlbnkSxz) && !Objects.isNull(nhlbqdsl)
|
|
|
+ && !Objects.isNull(nhlbdsjll) && !Objects.isNull(nhlbgzxl)){
|
|
|
+ BigDecimal divide = nhlbqdsl.multiply(nhlbdsjll).multiply(nhlbgzxl).divide(jsSlq, 4, RoundingMode.HALF_UP);
|
|
|
+ if(divide.compareTo(nhlbnkSxz) > 0 && divide.compareTo(nhlbSjz) <=0)
|
|
|
+ System.out.println("内回流比报警级别为 二级");
|
|
|
+ if(divide.compareTo(nhlbSjz) > 0)
|
|
|
+ System.out.println("内回流比报警级别为 一级");
|
|
|
+ BigDecimal nhlbnkXxz = normConfig.getNhlbnkXxz();
|
|
|
+ if(!Objects.isNull(nhlbnkXxz) && divide.compareTo(nhlbnkXxz) < 0)
|
|
|
+ System.out.println("内回流比报警级别为 一级");
|
|
|
+ System.out.println("内回流比报警数据正常~~~");
|
|
|
+ System.out.println("--------------13");
|
|
|
+ }
|
|
|
+ //14 外回流比报警
|
|
|
+ BigDecimal whlbqdsl = normConfig.getWHLBQDSL();
|
|
|
+ BigDecimal whlbdsjll = normConfig.getWHLBDSJLL();
|
|
|
+ BigDecimal whlbgzxl = normConfig.getWHLBGZXL();
|
|
|
+ BigDecimal whlbnkXxz = normConfig.getWhlbnkXxz();
|
|
|
+ BigDecimal whlbSjz = normConfig.getWhlbSjz();
|
|
|
+ if(!Objects.isNull(whlbqdsl) && !Objects.isNull(whlbdsjll) && !Objects.isNull(whlbgzxl)){
|
|
|
+ BigDecimal divide = whlbqdsl.multiply(whlbdsjll).multiply(whlbgzxl).divide(jsSlq, 4, RoundingMode.HALF_UP);
|
|
|
+ if(!Objects.isNull(whlbnkXxz) && divide.compareTo(whlbnkXxz) < 0)
|
|
|
+ System.out.println("外回流比报警级别为 一级");
|
|
|
+ if(!Objects.isNull(whlbSjz) && divide.compareTo(whlbSjz) > 0)
|
|
|
+ System.out.println("外回流比报警级别为 一级");
|
|
|
+ System.out.println("外回流比报警数据正常~~~");
|
|
|
+ System.out.println("--------------14");
|
|
|
+ }
|
|
|
+ //25.1 好氧池溶解氧报警(一池)
|
|
|
+ BigDecimal shcHyOneDo = tXinyiIndustry.getOneHymdDo();
|
|
|
+ BigDecimal hycrjysjzSxz = normConfig.getHycrjysjzSxz();
|
|
|
+ BigDecimal hycrjyNkz = normConfig.getHycrjyNkz();
|
|
|
+ if(!Objects.isNull(shcHyOneDo) && !Objects.isNull(hycrjysjzSxz)){
|
|
|
+ if(shcHyOneDo.compareTo(hycrjysjzSxz) > 0)
|
|
|
+ System.out.println("好氧池溶解氧报警(一池)报警别为 一级");
|
|
|
+ if(!Objects.isNull(hycrjyNkz) && shcHyOneDo.compareTo(hycrjyNkz) > 0 && shcHyOneDo.compareTo(hycrjysjzSxz) <= 0)
|
|
|
+ System.out.println("好氧池溶解氧报警(一池)报警别为 二级");
|
|
|
+ System.out.println("好氧池溶解氧报警(一池)报警级别为数据正常~~~");
|
|
|
+ System.out.println("--------------25.1");
|
|
|
+ }
|
|
|
+ //25.2 好氧池溶解氧报警(二池)
|
|
|
+ BigDecimal shcHyTwoDo = tXinyiIndustry.getTwoHymdDo();
|
|
|
+ if(!Objects.isNull(shcHyTwoDo) && !Objects.isNull(hycrjysjzSxz)){
|
|
|
+ if(shcHyTwoDo.compareTo(hycrjysjzSxz) > 0)
|
|
|
+ System.out.println("好氧池溶解氧报警(二池)报警别为 一级");
|
|
|
+ if(!Objects.isNull(hycrjyNkz) && shcHyTwoDo.compareTo(hycrjyNkz) > 0 && shcHyTwoDo.compareTo(hycrjysjzSxz) <= 0)
|
|
|
+ System.out.println("好氧池溶解氧报警(二池)报警别为 二级");
|
|
|
+ System.out.println("好氧池溶解氧报警(二池)报警级别为数据正常~~~");
|
|
|
+ System.out.println("--------------25.2");
|
|
|
+ }
|
|
|
+ //26 生化池气水比报警 生化池气水比=[g:w]m³/m³=[n_gu]*[Q_gu]:[Q_in]m³/m³
|
|
|
+ BigDecimal gfjgzts = normConfig.getGFJGZTS();
|
|
|
+ BigDecimal gfjckll = normConfig.getGFJCKLL();
|
|
|
+ BigDecimal shcqbSjz = normConfig.getShcqbSjz();
|
|
|
+ if(!Objects.isNull(gfjgzts) && !Objects.isNull(gfjckll) && !Objects.isNull(shcqbSjz) && !Objects.isNull(jsSlq)){
|
|
|
+ BigDecimal qsb = gfjgzts.multiply(gfjckll).divide(jsSlq, 4, RoundingMode.HALF_UP);
|
|
|
+ BigDecimal shcqbNkz = normConfig.getShcqbNkz();
|
|
|
+ if(qsb.compareTo(shcqbSjz) > 0)
|
|
|
+ System.out.println("生化池气水比报警别为 一级");
|
|
|
+ if(!Objects.isNull(shcqbNkz) && qsb.compareTo(shcqbNkz) > 0 && qsb.compareTo(shcqbSjz) <= 0)
|
|
|
+ System.out.println("生化池气水比报警别为 二级");
|
|
|
+ System.out.println("生化池气水比报警级别为数据正常~~~");
|
|
|
+ System.out.println("--------------26");
|
|
|
+ }
|
|
|
+ //29 二沉池表面负荷报警 二沉池表面负荷=[e]=[Q_in]/([n_er]*[A_er])m³/(m²·h)
|
|
|
+ BigDecimal eccsl = normConfig.getECCSL();
|
|
|
+ BigDecimal eccsjzzj = normConfig.getECCSJZZJ();
|
|
|
+ BigDecimal eccbmfhznkzSxz = normConfig.getEccbmfhznkzSxz();
|
|
|
+ if(!Objects.isNull(eccbmfhznkzSxz) && !Objects.isNull(jsSlq) && !Objects.isNull(eccsl) && !Objects.isNull(eccsjzzj)){
|
|
|
+ BigDecimal eccArea = new BigDecimal(Math.PI).multiply(eccsjzzj).multiply(eccsjzzj).divide(new BigDecimal("4"), 4, RoundingMode.HALF_UP);
|
|
|
+ BigDecimal multiply = jsSlq.divide(eccsl, 4, RoundingMode.HALF_UP).divide(new BigDecimal("24").multiply(eccArea), 4, RoundingMode.HALF_UP);
|
|
|
+ if(multiply.compareTo(eccbmfhznkzSxz) > 0)
|
|
|
+ System.out.println("二沉池表面负荷报警别为 一级");
|
|
|
+ System.out.println("二沉池表面负荷报警级别为数据正常~~~");
|
|
|
+ System.out.println("--------------29");
|
|
|
+ }
|
|
|
+ //31 深度处理反冲洗水量比例报警 深度处理反冲洗水量=[j]=[Q_fan]*[n_fan]*[η_fan]/[Q_in]*100%
|
|
|
+ BigDecimal fcxbsjll = normConfig.getFCXBSJLL();
|
|
|
+ BigDecimal fclbsl = normConfig.getFCLBSL();
|
|
|
+ BigDecimal fcxbgzxl = normConfig.getFCXBGZXL();
|
|
|
+ if(!Objects.isNull(jsSlq) && !Objects.isNull(fcxbsjll) && !Objects.isNull(fclbsl) && !Objects.isNull(fcxbgzxl)){
|
|
|
+ //如果是日报 乘以24, 工业库乘以1 乘以100是·单位是百分之多少
|
|
|
+ BigDecimal divide = fcxbsjll.multiply(fclbsl).multiply(fcxbgzxl).divide(jsSlq, 4, RoundingMode.HALF_UP).multiply(new BigDecimal("1").multiply(new BigDecimal("100")));
|
|
|
+ BigDecimal fcxslblsjzXxz = normConfig.getFcxslblsjzXxz();
|
|
|
+ if(!Objects.isNull(fcxslblsjzXxz) && divide.compareTo(fcxslblsjzXxz) < 0)
|
|
|
+ System.out.println("深度处理反冲洗水量比例报警别为 一级");
|
|
|
+ BigDecimal fcxslblsjzSxz = normConfig.getFcxslblsjzSxz();
|
|
|
+ if(!Objects.isNull(fcxslblsjzSxz) && divide.compareTo(fcxslblsjzSxz) > 0)
|
|
|
+ System.out.println("深度处理反冲洗水量比例报警别为 一级");
|
|
|
+ System.out.println("深度处理反冲洗水量比例报警级别为数据正常~~~");
|
|
|
+ System.out.println("--------------31");
|
|
|
+ }
|
|
|
+ //32 深度处理峰值过滤速度报警 深度处理峰值过滤速度=[q]=[Q_in]/[n_sha]/[A_sha]m/h
|
|
|
+ BigDecimal hxslcsl = normConfig.getHXSLCSL();
|
|
|
+ BigDecimal hxslcglmj = normConfig.getHXSLCGLMJ();
|
|
|
+ BigDecimal sdclfzglsdSjz = normConfig.getSdclfzglsdSjz();
|
|
|
+ if(!Objects.isNull(hxslcsl) && !Objects.isNull(hxslcglmj) && !Objects.isNull(jsSlq) && !Objects.isNull(sdclfzglsdSjz)){
|
|
|
+ //除以24是单位转换
|
|
|
+ BigDecimal divide = jsSlq.divide(hxslcsl, 4, RoundingMode.HALF_UP).divide(hxslcglmj, 4, RoundingMode.HALF_UP).divide(new BigDecimal("24"), 4, RoundingMode.HALF_UP);
|
|
|
+ if(divide.compareTo(sdclfzglsdSjz) >0 )
|
|
|
+ System.out.println("深度处理峰值过滤速度报警别为 一级");
|
|
|
+ System.out.println("深度处理峰值过滤速度报警级别为数据正常~~~");
|
|
|
+ System.out.println("--------------32");
|
|
|
+ }
|
|
|
|
|
|
+ }
|
|
|
|
|
|
+ System.out.println("--------------------------下面的是日报相关的报警--------------------------");
|
|
|
+ TXinyiDaily tXinyiDaily = CollectionUtils.isEmpty(tXinyiDailies) ? null : tXinyiDailies.get(0);
|
|
|
|
|
|
- }
|
|
|
//日报相关的
|
|
|
if(!Objects.isNull(tXinyiDaily)){
|
|
|
+ //1 进水总磷超标报警
|
|
|
+ BigDecimal jsTp = tXinyiDaily.getJsTp();
|
|
|
+ BigDecimal jszlSjz = normConfig.getJszlSjz();
|
|
|
+ if(!Objects.isNull(jsTp) && !Objects.isNull(jszlSjz)){
|
|
|
+ BigDecimal jszlSjzMax = jszlSjz.multiply(new BigDecimal(MyConstants.SCALE_VALUE));
|
|
|
+ if(jsTp.compareTo(jszlSjz) > 0 && jsTp.compareTo(jszlSjzMax) <= 0)
|
|
|
+ System.out.println("进水总磷超标报警级别为 二级");
|
|
|
+ else if (jsTp.compareTo(jszlSjzMax) > 0)
|
|
|
+ System.out.println("进水总磷超标报警级别为 一级");
|
|
|
+ else
|
|
|
+ System.out.println("进水总磷超标报警数据正常~~~");
|
|
|
+ System.out.println("--------------1");
|
|
|
+ }
|
|
|
+ //2 出水总磷超标报警
|
|
|
+ BigDecimal csTp = tXinyiDaily.getCsTp();
|
|
|
+ BigDecimal cszlGkz = normConfig.getCszlGkz();
|
|
|
+ BigDecimal cszlBzz = normConfig.getCszlBzz();
|
|
|
+ if(!Objects.isNull(csTp) && !Objects.isNull(cszlBzz)){
|
|
|
+ if(csTp.compareTo(cszlBzz) >= 0)
|
|
|
+ System.out.println("出水总磷超标报警级别为 一级");
|
|
|
+ if(!Objects.isNull(cszlGkz)){
|
|
|
+ if(csTp.compareTo(cszlGkz) > 0 && csTp.compareTo(cszlBzz) <0)
|
|
|
+ System.out.println("出水总磷超标报警级别为 二级");
|
|
|
+ }
|
|
|
+ System.out.println("出水总磷超标报警数据正常~~~");
|
|
|
+ System.out.println("--------------2");
|
|
|
+ }
|
|
|
+ //3 进水COD超标报警
|
|
|
+ BigDecimal jsCod = tXinyiDaily.getJsCod();
|
|
|
+ BigDecimal jscodSjz = normConfig.getJscodSjz();
|
|
|
+ if(!Objects.isNull(jsCod) && !Objects.isNull(jscodSjz)){
|
|
|
+ BigDecimal jscodMax = jscodSjz.multiply(new BigDecimal(MyConstants.SCALE_VALUE));
|
|
|
+ if(jsCod.compareTo(jscodSjz) > 0 && jsCod.compareTo(jscodMax) <= 0)
|
|
|
+ System.out.println("进水COD超标报警级别为 二级");
|
|
|
+ else if (jsCod.compareTo(jscodMax) > 0)
|
|
|
+ System.out.println("进水COD超标报警级别为 一级");
|
|
|
+ else
|
|
|
+ System.out.println("进水COD超标报警数据正常~~~");
|
|
|
+ System.out.println("--------------3");
|
|
|
+ }
|
|
|
+ //4 出水COD超标报警
|
|
|
+ BigDecimal csCod = tXinyiDaily.getCsCod();
|
|
|
+ BigDecimal cscodGkz = normConfig.getCscodGkz();
|
|
|
+ BigDecimal cscodBzz = normConfig.getCscodBzz();
|
|
|
+ if(!Objects.isNull(csCod) && !Objects.isNull(cscodBzz)){
|
|
|
+ if(csCod.compareTo(cscodBzz) >= 0)
|
|
|
+ System.out.println("出水COD超标报警级别为 一级");
|
|
|
+ if(!Objects.isNull(cscodGkz)){
|
|
|
+ if(csCod.compareTo(cscodGkz) > 0 && csCod.compareTo(cscodBzz) <0)
|
|
|
+ System.out.println("出水COD超标报警级别为 二级");
|
|
|
+ }
|
|
|
+ System.out.println("出水COD超标报警级别正常~~~");
|
|
|
+ System.out.println("--------------4");
|
|
|
+ }
|
|
|
+ //5 进水总氮超标报警
|
|
|
+ BigDecimal jsTn = tXinyiDaily.getJsTn();
|
|
|
+ BigDecimal jszdSjz = normConfig.getJszdSjz();
|
|
|
+ if(!Objects.isNull(jsTn) && !Objects.isNull(jszdSjz)){
|
|
|
+ BigDecimal jszdMax = jszdSjz.multiply(new BigDecimal(MyConstants.SCALE_VALUE));
|
|
|
+ if(jsTn.compareTo(jszdSjz) > 0 && jsTn.compareTo(jszdMax) <= 0)
|
|
|
+ System.out.println("进水总氮超标报警级别为 二级");
|
|
|
+ else if (jsTn.compareTo(jszdMax) > 0)
|
|
|
+ System.out.println("进水总氮超标报警级别为 一级");
|
|
|
+ System.out.println("进水总氮超标报警数据正常~~~");
|
|
|
+ System.out.println("--------------5");
|
|
|
+ }
|
|
|
+ //6 出水总氮超标报警
|
|
|
+ BigDecimal csTn = tXinyiDaily.getCsTn();
|
|
|
+ BigDecimal cszzBzz = normConfig.getCszzBzz();
|
|
|
+ if(!Objects.isNull(csTn) && !Objects.isNull(cszzBzz)){
|
|
|
+ if(csTp.compareTo(cszzBzz) >= 0)
|
|
|
+ System.out.println("出水总氮超标报警级别为 一级");
|
|
|
+ BigDecimal cszzGkz = normConfig.getCszzGkz();
|
|
|
+ if(!Objects.isNull(cszzGkz)){
|
|
|
+ if(csTn.compareTo(cszzGkz) > 0 && csTn.compareTo(cszzBzz) <0)
|
|
|
+ System.out.println("出水总氮超标报警级别为 二级");
|
|
|
+ }
|
|
|
+ System.out.println("出水总氮超标报警数据正常~~~");
|
|
|
+ System.out.println("--------------6");
|
|
|
+ }
|
|
|
+ //7 进水氨氮超标报警
|
|
|
+ BigDecimal jsNh3 = tXinyiDaily.getJsNh3();
|
|
|
+ BigDecimal jsadSjz = normConfig.getJsadSjz();
|
|
|
+ if(!Objects.isNull(jsNh3) && !Objects.isNull(jsadSjz)){
|
|
|
+ BigDecimal jsadMax = jsadSjz.multiply(new BigDecimal(MyConstants.SCALE_VALUE));
|
|
|
+ if(jsNh3.compareTo(jsadSjz) > 0 && jsNh3.compareTo(jsadMax) <= 0)
|
|
|
+ System.out.println("进水氨氮超标报警级别为 二级");
|
|
|
+ else if (jsNh3.compareTo(jsadMax) > 0)
|
|
|
+ System.out.println("进水氨氮超标报警级别为 一级");
|
|
|
+ System.out.println("进水氨氮超标报警数据正常~~~");
|
|
|
+ System.out.println("--------------7");
|
|
|
+ }
|
|
|
+ //8 出水氨氮超标报警
|
|
|
+ BigDecimal csNh3 = tXinyiDaily.getCsNh3();
|
|
|
+ BigDecimal csadBzz = normConfig.getCsadBzz();
|
|
|
+ if(!Objects.isNull(csNh3) && !Objects.isNull(csadBzz)){
|
|
|
+ if(csNh3.compareTo(csadBzz) >= 0)
|
|
|
+ System.out.println("出水氨氮超标报警级别为 一级");
|
|
|
+ BigDecimal csadGkz = normConfig.getCsadGkz();
|
|
|
+ if(!Objects.isNull(csadGkz)){
|
|
|
+ if(csNh3.compareTo(csadGkz) > 0 && csNh3.compareTo(csadBzz) <0)
|
|
|
+ System.out.println("出水氨氮超标报警级别为 二级");
|
|
|
+ }
|
|
|
+ System.out.println("出水氨氮超标报警数据正常~~~");
|
|
|
+ System.out.println("--------------8");
|
|
|
+ }
|
|
|
+ //9 进水SS超标报警
|
|
|
+ BigDecimal jsSS = tXinyiDaily.getJsSs();
|
|
|
+ BigDecimal jsSSSjz = normConfig.getJsssSjz();
|
|
|
+ if(!Objects.isNull(jsSS) && !Objects.isNull(jsSSSjz)){
|
|
|
+ BigDecimal jsssMax = jsSSSjz.multiply(new BigDecimal(MyConstants.SCALE_VALUE));
|
|
|
+ if(jsSS.compareTo(jsSSSjz) > 0 && jsSS.compareTo(jsssMax) <= 0)
|
|
|
+ System.out.println("进水SS超标报警级别为 二级");
|
|
|
+ else if (jsSS.compareTo(jsssMax) > 0)
|
|
|
+ System.out.println("进水SS超标报警级别为 一级");
|
|
|
+ System.out.println("进水SS超标报警数据正常~~~");
|
|
|
+ System.out.println("--------------9");
|
|
|
+ }
|
|
|
+ //10 出水SS超标报警
|
|
|
+ BigDecimal csSS = tXinyiDaily.getCsSs();
|
|
|
+ BigDecimal csSSBzz = normConfig.getCsssBzz();
|
|
|
+ if(!Objects.isNull(csSS) && !Objects.isNull(csSSBzz)){
|
|
|
+ if(csSS.compareTo(csSSBzz) >= 0)
|
|
|
+ System.out.println("出水SS超标报警级别为 一级");
|
|
|
+ BigDecimal csSSGkz = normConfig.getCsssGkz();
|
|
|
+ if(!Objects.isNull(csSSGkz)){
|
|
|
+ if(csSS.compareTo(csSSGkz) > 0 && csSS.compareTo(csSSBzz) <0)
|
|
|
+ System.out.println("出水SS超标报警级别为 二级");
|
|
|
+ }
|
|
|
+ System.out.println("出水SS超标报警数据正常~~~");
|
|
|
+ System.out.println("--------------10");
|
|
|
+ }
|
|
|
+
|
|
|
//11 出水大肠杆菌
|
|
|
BigDecimal csDcgj = tXinyiDaily.getCsDcgj();
|
|
|
BigDecimal csdcgjBzz = normConfig.getCsdcgjBzz();
|
|
@@ -236,7 +495,6 @@ public class WarningController extends BaseController {
|
|
|
System.out.println("--------------11");
|
|
|
}
|
|
|
//12 厌氧区停留时间
|
|
|
- //todo 用工业路,不用日报,日报数据不对,工业库计算
|
|
|
BigDecimal yyHrt = tXinyiDaily.getYyHrt();
|
|
|
BigDecimal yyytlsjGkz = normConfig.getYyqtlsjGkz();
|
|
|
if(!Objects.isNull(yyHrt) && !Objects.isNull(yyytlsjGkz)){
|
|
@@ -410,7 +668,6 @@ public class WarningController extends BaseController {
|
|
|
|
|
|
//20 进水碳氮比报警 进水碳氮比=[b]=[BOD_in]/[TN_in]
|
|
|
BigDecimal jsBod5 = tXinyiDaily.getJsBod5();
|
|
|
- BigDecimal jsTn = tXinyiDaily.getJsTn();
|
|
|
if(!Objects.isNull(jsBod5) && !Objects.isNull(jsTn)){
|
|
|
BigDecimal divide = jsBod5.divide(jsTn, 4, RoundingMode.HALF_UP);
|
|
|
BigDecimal jstdbnkzXxz = normConfig.getJstdbnkzXxz();
|
|
@@ -425,7 +682,6 @@ public class WarningController extends BaseController {
|
|
|
}
|
|
|
|
|
|
//21 进水碳磷比报警 进水碳磷比=[c]=[BOD_in]/[TP_in]
|
|
|
- BigDecimal jsTp = tXinyiDaily.getJsTp();
|
|
|
if(!Objects.isNull(jsBod5) && !Objects.isNull(jsTp)){
|
|
|
BigDecimal divide = jsBod5.divide(jsTp, 4, RoundingMode.HALF_UP);
|
|
|
BigDecimal jstlbNkz = normConfig.getJstlbNkz();
|
|
@@ -442,7 +698,6 @@ public class WarningController extends BaseController {
|
|
|
}
|
|
|
|
|
|
//22 进水BOD与COD比值报警 进水BOD与COD比值数据=[d]=[BOD_in]/[COD_in]
|
|
|
- BigDecimal jsCod = tXinyiDaily.getJsCod();
|
|
|
if(!Objects.isNull(jsBod5) && !Objects.isNull(jsCod)){
|
|
|
BigDecimal jsbodycodbzSzj = normConfig.getJsbodycodbzSzj();
|
|
|
BigDecimal divide = jsBod5.divide(jsCod, 4, RoundingMode.HALF_UP);
|
|
@@ -587,8 +842,6 @@ public class WarningController extends BaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
- //todo 放到工业库
|
|
|
- //下面的有疑问 R是计算出来的 单位怎么算
|
|
|
//29 二沉池表面负荷报警 二沉池表面负荷=[e]=[Q_in]/([n_er]*[A_er])m³/(m²·h)
|
|
|
BigDecimal eccsl = normConfig.getECCSL();
|
|
|
BigDecimal eccsjzzj = normConfig.getECCSJZZJ();
|
|
@@ -611,7 +864,7 @@ public class WarningController extends BaseController {
|
|
|
&& !Objects.isNull(shcHyOneMlss) && !Objects.isNull(shcHyTwoMlss) && !Objects.isNull(eccsl) && !Objects.isNull(eccsjzzj)){
|
|
|
BigDecimal avgMlss = shcHyOneMlss.add(shcHyTwoMlss).divide(new BigDecimal("2"), 4, RoundingMode.HALF_UP);
|
|
|
BigDecimal eccArea = new BigDecimal(Math.PI).multiply(eccsjzzj).multiply(eccsjzzj).divide(new BigDecimal("4"), 4, RoundingMode.HALF_UP);
|
|
|
- //如果是日报 乘以1 如果是工业库,乘以24 外回流R 是百分数,要再除以100
|
|
|
+ //如果是日报 乘以1 如果是工业库,乘以24 外回流R 是百分数,要再除以100 (工业库获取不到)
|
|
|
BigDecimal divide = (whlR.divide(new BigDecimal("100"), 4, RoundingMode.HALF_UP).add(new BigDecimal("1"))).multiply(jsl).multiply(new BigDecimal("1")).multiply(avgMlss).divide(eccsl, 4, RoundingMode.HALF_UP).divide(eccArea, 4, RoundingMode.HALF_UP).divide(new BigDecimal("1000"), 4, RoundingMode.HALF_UP);
|
|
|
if(divide.compareTo(eccglfhnkzSxz) > 0)
|
|
|
System.out.println("二沉池固体负荷报警别为 一级");
|