|
@@ -855,6 +855,11 @@ public class RyTask
|
|
|
canAdd = true;
|
|
|
}
|
|
|
if(!Objects.isNull(val) && canAdd){
|
|
|
+ //2024年09月20日10:12:43 做个兜底处理,防止计算的结果是负数
|
|
|
+ if(val.compareTo(BigDecimal.ZERO) < 0){
|
|
|
+ log.info("计算得到的碳源投加量是负数,按0处理");
|
|
|
+ val = BigDecimal.ZERO;
|
|
|
+ }
|
|
|
//todo 调用组态接口,实施碳源投加
|
|
|
log.info("开始调用组态接口,实施碳源投加^^^^^^");
|
|
|
|
|
@@ -929,8 +934,11 @@ public class RyTask
|
|
|
//计算二号池的值
|
|
|
BigDecimal twoResult = this.getResultByDiff(hycXsyType, hycXsyTwo, htfksd, qycAdType, qycAdTwo, qycYxyType, qycYxyTwo, xzxs, jzxs, jsLlType, jsLlTwo, slfpxs, kzxs, jsCodType, jsCodTwo, zhxs, tydl, "two", yymd, sxps);
|
|
|
//判断,返回值
|
|
|
- if(0 == type)
|
|
|
- return oneResult.compareTo(twoResult) > 0 ? oneResult : twoResult;
|
|
|
+ if(0 == type){
|
|
|
+ if(!Objects.isNull(oneResult) && !Objects.isNull(twoResult)){
|
|
|
+ return oneResult.compareTo(twoResult) > 0 ? oneResult : twoResult;
|
|
|
+ }
|
|
|
+ }
|
|
|
else if(1 == type) {
|
|
|
return oneResult;
|
|
|
}else if(2 == type)
|
|
@@ -1582,7 +1590,7 @@ public class RyTask
|
|
|
chartBasic.setVal(DecimalUtils.getAbsAndScale(new BigDecimal(val), INT_2));
|
|
|
chartsDataList.add(chartBasic);
|
|
|
}
|
|
|
- handleXinYiWarningsYC(cszzBzz, split, cszzGkz, BusinessEnum.WarningCategoryEnum.QYCXSY_1.getCode(), hour, normConfig, tXinyiRobot.getNo3Hlj2Jqr(), tXinyiIndustry, chartsDataList, date);
|
|
|
+// handleXinYiWarningsYC(cszzBzz, split, cszzGkz, BusinessEnum.WarningCategoryEnum.QYCXSY_1.getCode(), hour, normConfig, tXinyiRobot.getNo3Hlj2Jqr(), tXinyiIndustry, chartsDataList, date);
|
|
|
}else if(BusinessEnum.BigModelForecastEnum.QYXSY2.getCode().equals(task)){
|
|
|
//同时调用跃渊的预测接口 保存记录值
|
|
|
/*try {
|
|
@@ -1617,7 +1625,7 @@ public class RyTask
|
|
|
chartBasic.setVal(DecimalUtils.getAbsAndScale(new BigDecimal(val), INT_2));
|
|
|
chartsDataList.add(chartBasic);
|
|
|
}
|
|
|
- handleXinYiWarningsYC(cszzBzz, split, cszzGkz, BusinessEnum.WarningCategoryEnum.QYCXSY_2.getCode(), hour, normConfig, tXinyiRobot.getNo3Hlj2Jqr(), tXinyiIndustry, chartsDataList, date);
|
|
|
+// handleXinYiWarningsYC(cszzBzz, split, cszzGkz, BusinessEnum.WarningCategoryEnum.QYCXSY_2.getCode(), hour, normConfig, tXinyiRobot.getNo3Hlj2Jqr(), tXinyiIndustry, chartsDataList, date);
|
|
|
}else if(BusinessEnum.BigModelForecastEnum.QYNH31.getCode().equals(task)){
|
|
|
//同时调用跃渊的预测接口 保存记录值
|
|
|
/*try {
|
|
@@ -1652,7 +1660,7 @@ public class RyTask
|
|
|
chartBasic.setVal(DecimalUtils.getAbsAndScale(new BigDecimal(val), INT_2));
|
|
|
chartsDataList.add(chartBasic);
|
|
|
}
|
|
|
- handleXinYiWarningsYC(csadBzz, split, csadGkz, BusinessEnum.WarningCategoryEnum.QYAD_1.getCode(), hour, normConfig, tXinyiRobot.getNo3Hlj2Jqr(), tXinyiIndustry, chartsDataList, date);
|
|
|
+// handleXinYiWarningsYC(csadBzz, split, csadGkz, BusinessEnum.WarningCategoryEnum.QYAD_1.getCode(), hour, normConfig, tXinyiRobot.getNo3Hlj2Jqr(), tXinyiIndustry, chartsDataList, date);
|
|
|
}else if(BusinessEnum.BigModelForecastEnum.QYNH32.getCode().equals(task)){
|
|
|
//同时调用跃渊的预测接口 保存记录值
|
|
|
/*try {
|
|
@@ -1687,7 +1695,7 @@ public class RyTask
|
|
|
chartBasic.setVal(DecimalUtils.getAbsAndScale(new BigDecimal(val), INT_2));
|
|
|
chartsDataList.add(chartBasic);
|
|
|
}
|
|
|
- handleXinYiWarningsYC(csadBzz, split, csadGkz, BusinessEnum.WarningCategoryEnum.QYAD_2.getCode(), hour, normConfig, tXinyiRobot.getNo3Hlj2Jqr(), tXinyiIndustry, chartsDataList, date);
|
|
|
+// handleXinYiWarningsYC(csadBzz, split, csadGkz, BusinessEnum.WarningCategoryEnum.QYAD_2.getCode(), hour, normConfig, tXinyiRobot.getNo3Hlj2Jqr(), tXinyiIndustry, chartsDataList, date);
|
|
|
}else {
|
|
|
log.error("暂未支持的类型{}", task);
|
|
|
}
|