|
@@ -43,6 +43,7 @@ import java.text.ParseException;
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
import java.time.format.DateTimeFormatter;
|
|
import java.time.format.DateTimeFormatter;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
|
+import java.util.concurrent.TimeUnit;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import static com.slibra.common.constant.MyConstants.*;
|
|
import static com.slibra.common.constant.MyConstants.*;
|
|
@@ -850,7 +851,7 @@ public class RyTask
|
|
List<ChartBasic> chartsDataList = new ArrayList<>(9);
|
|
List<ChartBasic> chartsDataList = new ArrayList<>(9);
|
|
//同时调用跃渊的预测接口 保存记录值
|
|
//同时调用跃渊的预测接口 保存记录值
|
|
try {
|
|
try {
|
|
- String result = HttpUtil.get("http://10.0.3.52:10003/system/forecast?type=3&time=" + DateUtil.format(DateUtils.getNowDate(), DateUtils.YYYY_MM_DD_HH), INT_300);
|
|
|
|
|
|
+ String result = HttpUtil.get("http://10.0.3.52:10003/system/forecast?type=3&time=" + DateUtil.format(DateUtils.getNowDate(), DateUtils.YYYY_MM_DD_HH), INT_10000);
|
|
if(!StringUtils.isBlank(result)){
|
|
if(!StringUtils.isBlank(result)){
|
|
JSONArray array = JSON.parseArray(result);
|
|
JSONArray array = JSON.parseArray(result);
|
|
tXinyiForecastComparison.setYyForecastOne(array.getBigDecimal(6));
|
|
tXinyiForecastComparison.setYyForecastOne(array.getBigDecimal(6));
|
|
@@ -933,7 +934,7 @@ public class RyTask
|
|
if("cod".equals(task)){
|
|
if("cod".equals(task)){
|
|
//同时调用跃渊的预测接口 保存记录值
|
|
//同时调用跃渊的预测接口 保存记录值
|
|
try {
|
|
try {
|
|
- String result = HttpUtil.get("http://10.0.3.52:10003/system/forecast?type=2&time=" + DateUtil.format(DateUtils.getNowDate(), DateUtils.YYYY_MM_DD_HH), INT_300);
|
|
|
|
|
|
+ String result = HttpUtil.get("http://10.0.3.52:10003/system/forecast?type=2&time=" + DateUtil.format(DateUtils.getNowDate(), DateUtils.YYYY_MM_DD_HH), INT_10000);
|
|
if(!StringUtils.isBlank(result)){
|
|
if(!StringUtils.isBlank(result)){
|
|
JSONArray array = JSON.parseArray(result);
|
|
JSONArray array = JSON.parseArray(result);
|
|
tXinyiForecastComparison.setYyForecastOne(array.getBigDecimal(6));
|
|
tXinyiForecastComparison.setYyForecastOne(array.getBigDecimal(6));
|
|
@@ -975,7 +976,7 @@ public class RyTask
|
|
}else if("ss".equals(task)){
|
|
}else if("ss".equals(task)){
|
|
//同时调用跃渊的预测接口 保存记录值
|
|
//同时调用跃渊的预测接口 保存记录值
|
|
try {
|
|
try {
|
|
- String result = HttpUtil.get("http://10.0.3.52:10003/system/forecast?type=5&time=" + DateUtil.format(DateUtils.getNowDate(), DateUtils.YYYY_MM_DD_HH), INT_300);
|
|
|
|
|
|
+ String result = HttpUtil.get("http://10.0.3.52:10003/system/forecast?type=5&time=" + DateUtil.format(DateUtils.getNowDate(), DateUtils.YYYY_MM_DD_HH), INT_10000);
|
|
if(!StringUtils.isBlank(result)){
|
|
if(!StringUtils.isBlank(result)){
|
|
JSONArray array = JSON.parseArray(result);
|
|
JSONArray array = JSON.parseArray(result);
|
|
tXinyiForecastComparison.setYyForecastOne(array.getBigDecimal(6));
|
|
tXinyiForecastComparison.setYyForecastOne(array.getBigDecimal(6));
|
|
@@ -1039,7 +1040,7 @@ public class RyTask
|
|
}*/else if("tp".equals(task)){
|
|
}*/else if("tp".equals(task)){
|
|
//同时调用跃渊的预测接口 保存记录值
|
|
//同时调用跃渊的预测接口 保存记录值
|
|
try {
|
|
try {
|
|
- String result = HttpUtil.get("http://10.0.3.52:10003/system/forecast?type=1&time=" + DateUtil.format(DateUtils.getNowDate(), DateUtils.YYYY_MM_DD_HH), INT_300);
|
|
|
|
|
|
+ String result = HttpUtil.get("http://10.0.3.52:10003/system/forecast?type=1&time=" + DateUtil.format(DateUtils.getNowDate(), DateUtils.YYYY_MM_DD_HH), INT_10000);
|
|
if(!StringUtils.isBlank(result)){
|
|
if(!StringUtils.isBlank(result)){
|
|
JSONArray array = JSON.parseArray(result);
|
|
JSONArray array = JSON.parseArray(result);
|
|
tXinyiForecastComparison.setYyForecastOne(array.getBigDecimal(6));
|
|
tXinyiForecastComparison.setYyForecastOne(array.getBigDecimal(6));
|
|
@@ -1071,7 +1072,7 @@ public class RyTask
|
|
}else if("nh3".equals(task)){
|
|
}else if("nh3".equals(task)){
|
|
//同时调用跃渊的预测接口 保存记录值
|
|
//同时调用跃渊的预测接口 保存记录值
|
|
try {
|
|
try {
|
|
- String result = HttpUtil.get("http://10.0.3.52:10003/system/forecast?type=4&time=" + DateUtil.format(DateUtils.getNowDate(), DateUtils.YYYY_MM_DD_HH), INT_300);
|
|
|
|
|
|
+ String result = HttpUtil.get("http://10.0.3.52:10003/system/forecast?type=4&time=" + DateUtil.format(DateUtils.getNowDate(), DateUtils.YYYY_MM_DD_HH), INT_10000);
|
|
if(!StringUtils.isBlank(result)){
|
|
if(!StringUtils.isBlank(result)){
|
|
JSONArray array = JSON.parseArray(result);
|
|
JSONArray array = JSON.parseArray(result);
|
|
tXinyiForecastComparison.setYyForecastOne(array.getBigDecimal(6));
|
|
tXinyiForecastComparison.setYyForecastOne(array.getBigDecimal(6));
|
|
@@ -1620,7 +1621,7 @@ public class RyTask
|
|
return sb;
|
|
return sb;
|
|
}
|
|
}
|
|
|
|
|
|
- public static void main(String[] args) throws ParseException {
|
|
|
|
|
|
+ public static void main(String[] args) throws ParseException, InterruptedException {
|
|
/*LocalDateTime endTime = LocalDateTime.now();
|
|
/*LocalDateTime endTime = LocalDateTime.now();
|
|
System.out.println("endTime = " + endTime);
|
|
System.out.println("endTime = " + endTime);
|
|
endTime = endTime.plusMinutes(60);
|
|
endTime = endTime.plusMinutes(60);
|
|
@@ -1681,8 +1682,11 @@ public class RyTask
|
|
String yesterdayStr = LocalDateTimeUtil.getCurrentDate().plusDays(-1).format(DateTimeFormatter.ofPattern(DateUtils.YYYYMMDD_TS));//昨天
|
|
String yesterdayStr = LocalDateTimeUtil.getCurrentDate().plusDays(-1).format(DateTimeFormatter.ofPattern(DateUtils.YYYYMMDD_TS));//昨天
|
|
System.out.println(yesterdayStr);
|
|
System.out.println(yesterdayStr);
|
|
|
|
|
|
|
|
+ TimeUnit.MILLISECONDS.sleep(INT_10000);
|
|
|
|
|
|
System.out.println("2024/07/07 12".substring(0, 7));
|
|
System.out.println("2024/07/07 12".substring(0, 7));
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|