|
@@ -11,6 +11,7 @@ import com.slibra.business.mapper.TXinyiNormConfigMapper;
|
|
|
import com.slibra.business.mapper.TXinyiRobotMapper;
|
|
|
import com.slibra.business.service.ITXinyiNormConfigService;
|
|
|
import com.slibra.business.service.impl.TXinyiNormConfigServiceImpl;
|
|
|
+import com.slibra.common.constant.MyConstants;
|
|
|
import com.slibra.common.core.controller.BaseController;
|
|
|
import com.slibra.common.core.domain.AjaxResult;
|
|
|
import com.slibra.common.utils.DateUtils;
|
|
@@ -91,8 +92,7 @@ public class WarningController extends BaseController {
|
|
|
BigDecimal jsTp = tXinyiIndustry.getJsTp();
|
|
|
BigDecimal jszlSjz = normConfig.getJszlSjz();
|
|
|
if(!Objects.isNull(jsTp) && !Objects.isNull(jszlSjz)){
|
|
|
- //todo 写到枚举中
|
|
|
- BigDecimal jszlSjzMax = jszlSjz.multiply(new BigDecimal("1.1"));
|
|
|
+ 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)
|
|
@@ -119,8 +119,7 @@ public class WarningController extends BaseController {
|
|
|
BigDecimal jsCod = tXinyiIndustry.getJsCod();
|
|
|
BigDecimal jscodSjz = normConfig.getJscodSjz();
|
|
|
if(!Objects.isNull(jsCod) && !Objects.isNull(jscodSjz)){
|
|
|
- //todo 写到枚举中
|
|
|
- BigDecimal jscodMax = jscodSjz.multiply(new BigDecimal("1.1"));
|
|
|
+ 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)
|
|
@@ -147,8 +146,7 @@ public class WarningController extends BaseController {
|
|
|
BigDecimal jsTn = tXinyiIndustry.getJsTn();
|
|
|
BigDecimal jszdSjz = normConfig.getJszdSjz();
|
|
|
if(!Objects.isNull(jsTn) && !Objects.isNull(jszdSjz)){
|
|
|
- //todo 写到枚举中
|
|
|
- BigDecimal jszdMax = jszdSjz.multiply(new BigDecimal("1.1"));
|
|
|
+ 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)
|
|
@@ -174,8 +172,7 @@ public class WarningController extends BaseController {
|
|
|
BigDecimal jsNh3 = tXinyiIndustry.getJsNh3();
|
|
|
BigDecimal jsadSjz = normConfig.getJsadSjz();
|
|
|
if(!Objects.isNull(jsNh3) && !Objects.isNull(jsadSjz)){
|
|
|
- //todo 写到枚举中
|
|
|
- BigDecimal jsadMax = jsadSjz.multiply(new BigDecimal("1.1"));
|
|
|
+ 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)
|
|
@@ -201,8 +198,7 @@ public class WarningController extends BaseController {
|
|
|
BigDecimal jsSS = tXinyiIndustry.getJsSs();
|
|
|
BigDecimal jsSSSjz = normConfig.getJsssSjz();
|
|
|
if(!Objects.isNull(jsSS) && !Objects.isNull(jsSSSjz)){
|
|
|
- //todo 写到枚举中
|
|
|
- BigDecimal jsssMax = jsSSSjz.multiply(new BigDecimal("1.1"));
|
|
|
+ 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)
|
|
@@ -382,9 +378,8 @@ public class WarningController extends BaseController {
|
|
|
BigDecimal djwnndXxz = normConfig.getDjwnndXxz();
|
|
|
BigDecimal djwnndSxz = normConfig.getDjwnndSxz();
|
|
|
if(!Objects.isNull(jsSw)){
|
|
|
- //todo 配置到常量池中
|
|
|
//一池
|
|
|
- if(jsSw.compareTo(new BigDecimal("12")) > 0){//按夏季计算
|
|
|
+ if(jsSw.compareTo(new BigDecimal(MyConstants.TEMPERATURE_VALUE)) > 0){//按夏季计算
|
|
|
if(!Objects.isNull(xjwnndXxz)){
|
|
|
if(!Objects.isNull(shcHyOneMlss) && shcHyOneMlss.compareTo(xjwnndXxz) < 0)
|
|
|
System.out.println("污泥浓度(一池)报警级别为 一级");
|
|
@@ -621,8 +616,9 @@ public class WarningController extends BaseController {
|
|
|
if(divide.compareTo(eccglfhnkzSxz) > 0)
|
|
|
System.out.println("二沉池固体负荷报警别为 一级");
|
|
|
BigDecimal eccgtfhSjz = normConfig.getEccgtfhSjz();
|
|
|
- //todo 这里的eccglfhnkzSxz要改成下限值 并且新增字段
|
|
|
- if(!Objects.isNull(eccgtfhSjz) && divide.compareTo(eccgtfhSjz) > 0 && divide.compareTo(eccglfhnkzSxz) <= 0)
|
|
|
+ BigDecimal eccgtfhnkxxz = normConfig.getECCGTFHNKXXZ();
|
|
|
+ // 这里的eccglfhnkzSxz要改成下限值 并且新增字段
|
|
|
+ if(!Objects.isNull(eccgtfhSjz) && !Objects.isNull(eccgtfhnkxxz) && divide.compareTo(eccgtfhSjz) > 0 && divide.compareTo(eccgtfhnkxxz) <= 0)
|
|
|
System.out.println("二沉池固体负荷报警别为 二级");
|
|
|
System.out.println("二沉池固体负荷报警级别为数据正常~~~");
|
|
|
System.out.println("--------------30");
|