Commit 81228345 authored by wujiang's avatar wujiang

修改采集报错

parent eac01e5a
......@@ -347,8 +347,8 @@ public class SunlightServiceImpl implements SunlightService {
String today = DateUtil.today();
String hour = new Date().getHours() + ":00";
HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper
.selectOne(new QueryWrapper<HYGFJPDayPower>().eq("third_station_id", sunlightDto.getPs_id().toString())
HYGFJPDayPower hygfjpDayPower = hygfjpDayPowerMapper.selectOne(
new QueryWrapper<HYGFJPDayPower>().eq("third_station_id", sunlightDto.getPs_id().toString())
.eq("year_month_day", today).eq("hour", hour));
if (ObjectUtils.isEmpty(hygfjpDayPower)) {
hygfjpDayPower = new HYGFJPDayPower();
......@@ -417,9 +417,13 @@ public class SunlightServiceImpl implements SunlightService {
jpStationMapper.insert(jpStation);
}
this.setJpInverte(listd, jpStation, listdtx);
if (listd != null) {
this.setJpInverte(listd, jpStation, listdtx);
}
this.collectorDetail(listd, jpStation);
if (listd != null) {
this.collectorDetail(listd, jpStation);
}
// 电站报表
// 户用场站日发电量
......@@ -1059,10 +1063,12 @@ public class SunlightServiceImpl implements SunlightService {
try {
TimeUnit.MINUTES.sleep(1);
hygfjpInverterWarn.setCreatedTime(System.currentTimeMillis());
hygfjpInverterWarnMapper.insert(hygfjpInverterWarn);
} catch (Exception e) {
e.printStackTrace();
hygfjpInverterWarnMapper.insert(hygfjpInverterWarn);
}
hygfjpInverterWarnMapper.insert(hygfjpInverterWarn);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment