|
@@ -1279,7 +1279,13 @@ public class RyTask
|
|
|
log.info("预测数据返回结果不符合解析条件,返回结果为{}", result);
|
|
|
continue;
|
|
|
}
|
|
|
- JSONObject jsonObject = JSON.parseObject(result);
|
|
|
+ JSONObject jsonObject = null;
|
|
|
+ try {
|
|
|
+ jsonObject = JSON.parseObject(result);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("[转JSON的时候]预测数据返回结果不符合解析条件,返回结果为{}", result);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
String task = jsonObject.getString("task");
|
|
|
String hour = jsonObject.getString("hour");
|
|
|
String pred = jsonObject.getString("pred");
|
|
@@ -1543,7 +1549,12 @@ public class RyTask
|
|
|
log.error("暂未支持的类型{}", task);
|
|
|
}
|
|
|
//插入到数据库
|
|
|
- this.xinyiForecastComparisonService.insertTXinyiForecastComparison(tXinyiForecastComparison);
|
|
|
+ //2024年6月21日14:18:55 如果红杉预测和跃渊预测都有数据再保存
|
|
|
+ if(Objects.isNull(tXinyiForecastComparison.getHsForecastOne()) || Objects.isNull(tXinyiForecastComparison.getHsForecastTwo()) ||Objects.isNull(tXinyiForecastComparison.getHsForecastThree())
|
|
|
+ || Objects.isNull(tXinyiForecastComparison.getYyForecastOne()) || Objects.isNull(tXinyiForecastComparison.getYyForecastTwo()) || Objects.isNull(tXinyiForecastComparison.getYyForecastThree())){
|
|
|
+ log.error("保存预测对比数据时,有存在不满足条件的数据,不再保存数据,数据为{}", JSON.toJSONString(tXinyiForecastComparison));
|
|
|
+ }else
|
|
|
+ this.xinyiForecastComparisonService.insertTXinyiForecastComparison(tXinyiForecastComparison);
|
|
|
}
|
|
|
|
|
|
private void handleXinYiWarningsYC(BigDecimal csBzz, String[] split, BigDecimal csGkz, String category, String hour, TXinyiNormConfig normConfig, BigDecimal currentVal, TXinyiIndustry tXinyiIndustry, List<ChartBasic> chartsDataList, String date) {
|