|
@@ -1166,9 +1166,31 @@ public class JavaFunctionJobHandler extends IJobHandler {
|
|
|
}
|
|
|
agValue = agValue / listDouble.size();
|
|
|
}
|
|
|
-
|
|
|
System.out.println("wtId:" + wtId + "agValue平均额定风速:"+agValue );
|
|
|
|
|
|
+
|
|
|
+ //存入数据库
|
|
|
+ System.out.println(wtId + " " + start);
|
|
|
+ QueryWrapper<TurbineInfoDay> turbineInfoDayQueryWrapper = new QueryWrapper<>();
|
|
|
+ turbineInfoDayQueryWrapper.eq("turbine_id", wtId);
|
|
|
+ turbineInfoDayQueryWrapper.eq("record_date", start);
|
|
|
+ TurbineInfoDay one = turbineInfoDayService.getOne(turbineInfoDayQueryWrapper);
|
|
|
+ System.out.println(one);
|
|
|
+ if (one == null) {
|
|
|
+ TurbineInfoDay turbineInfoDay = new TurbineInfoDay();
|
|
|
+ turbineInfoDay.setTurbineId(wtId);
|
|
|
+ turbineInfoDay.setRecordDate(start);
|
|
|
+ turbineInfoDay.setEdfs(agValue);
|
|
|
+ System.out.println(turbineInfoDay);
|
|
|
+ turbineInfoDayService.save(turbineInfoDay);
|
|
|
+ } else {
|
|
|
+ one.setEdfs(agValue);
|
|
|
+ System.out.println(one);
|
|
|
+ turbineInfoDayService.updateById(one);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
// stringRedisTemplate.opsForValue().set("glqxnh", JSON.toJSONString(fitMap));
|