Przeglądaj źródła

机理模型预测 获取Y1相关的时间调整

王苗苗 1 miesiąc temu
rodzic
commit
fbcd157768

+ 6 - 6
slibra-quartz/src/main/java/com/slibra/quartz/task/RyTask.java

@@ -1765,9 +1765,9 @@ public class RyTask
         //计算第一个值逻辑处理
         //计算X的值
         Date nowDate = DateUtils.getNowDate();
-        BigDecimal x = this.xinyiIndustryMapper.getAvgJSCodByDate(DateUtil.format(DateUtils.plusDate(-xMax, nowDate), DateUtils.YYYYMMDDHH_TS), DateUtil.format(DateUtils.plusDate(-xMin, nowDate), DateUtils.YYYYMMDDHH_TS));
+        BigDecimal x = this.xinyiIndustryMapper.getAvgJSCodByDate(DateUtil.format(DateUtils.plusHour(-xMax, nowDate), DateUtils.YYYYMMDDHH_TS), DateUtil.format(DateUtils.plusHour(-xMin, nowDate), DateUtils.YYYYMMDDHH_TS));
         //计算y1
-        BigDecimal y1 = this.xinyiIndustryMapper.getAvgCSCodByDate(DateUtil.format(DateUtils.plusDate(-y1Max, nowDate), DateUtils.YYYYMMDDHH_TS), DateUtil.format(DateUtils.plusDate(-y1Min, nowDate), DateUtils.YYYYMMDDHH_TS));
+        BigDecimal y1 = this.xinyiIndustryMapper.getAvgCSCodByDate(DateUtil.format(DateUtils.plusHour(-y1Max, nowDate), DateUtils.YYYYMMDDHH_TS), DateUtil.format(DateUtils.plusHour(-y1Min, nowDate), DateUtils.YYYYMMDDHH_TS));
         if(x.compareTo(x1) <= 0){//直接用  当前时间前12小时-6小时的出水COD均值 (时间段位配置的值)
             tXinyiForecastComparison.setJlForecastOne(y1);
         }else{//按照公式计算
@@ -1777,9 +1777,9 @@ public class RyTask
         //计算第二个值逻辑处理
         //计算X的值
         nowDate = DateUtils.plusHour(1, nowDate);
-        x = this.xinyiIndustryMapper.getAvgJSCodByDate(DateUtil.format(DateUtils.plusDate(-xMax, nowDate), DateUtils.YYYYMMDDHH_TS), DateUtil.format(DateUtils.plusDate(-xMin, nowDate), DateUtils.YYYYMMDDHH_TS));
+        x = this.xinyiIndustryMapper.getAvgJSCodByDate(DateUtil.format(DateUtils.plusHour(-xMax, nowDate), DateUtils.YYYYMMDDHH_TS), DateUtil.format(DateUtils.plusHour(-xMin, nowDate), DateUtils.YYYYMMDDHH_TS));
         //计算y1
-        y1 = this.xinyiIndustryMapper.getAvgCSCodByDate(DateUtil.format(DateUtils.plusDate(-y1Max, nowDate), DateUtils.YYYYMMDDHH_TS), DateUtil.format(DateUtils.plusDate(-y1Min, nowDate), DateUtils.YYYYMMDDHH_TS));
+        y1 = this.xinyiIndustryMapper.getAvgCSCodByDate(DateUtil.format(DateUtils.plusHour(-y1Max, nowDate), DateUtils.YYYYMMDDHH_TS), DateUtil.format(DateUtils.plusHour(-y1Min, nowDate), DateUtils.YYYYMMDDHH_TS));
         if(x.compareTo(x1) <= 0){//直接用  当前时间前12小时-6小时的出水COD均值 (时间段位配置的值)
             tXinyiForecastComparison.setJlForecastTwo(y1);
         }else{//按照公式计算
@@ -1790,9 +1790,9 @@ public class RyTask
         //计算第三个值逻辑处理
         //计算X的值
         nowDate = DateUtils.plusHour(1, nowDate);
-        x = this.xinyiIndustryMapper.getAvgJSCodByDate(DateUtil.format(DateUtils.plusDate(-xMax, nowDate), DateUtils.YYYYMMDDHH_TS), DateUtil.format(DateUtils.plusDate(-xMin, nowDate), DateUtils.YYYYMMDDHH_TS));
+        x = this.xinyiIndustryMapper.getAvgJSCodByDate(DateUtil.format(DateUtils.plusHour(-xMax, nowDate), DateUtils.YYYYMMDDHH_TS), DateUtil.format(DateUtils.plusHour(-xMin, nowDate), DateUtils.YYYYMMDDHH_TS));
         //计算y1
-        y1 = this.xinyiIndustryMapper.getAvgCSCodByDate(DateUtil.format(DateUtils.plusDate(-y1Max, nowDate), DateUtils.YYYYMMDDHH_TS), DateUtil.format(DateUtils.plusDate(-y1Min, nowDate), DateUtils.YYYYMMDDHH_TS));
+        y1 = this.xinyiIndustryMapper.getAvgCSCodByDate(DateUtil.format(DateUtils.plusHour(-y1Max, nowDate), DateUtils.YYYYMMDDHH_TS), DateUtil.format(DateUtils.plusHour(-y1Min, nowDate), DateUtils.YYYYMMDDHH_TS));
         if(x.compareTo(x1) <= 0){//直接用  当前时间前12小时-6小时的出水COD均值 (时间段位配置的值)
             tXinyiForecastComparison.setJlForecastThree(y1);
         }else{//按照公式计算