|
@@ -5,7 +5,6 @@ import cn.hutool.core.date.DateRange;
|
|
|
import cn.hutool.core.date.DateTime;
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
-import com.gyee.power.fitting.common.config.GyeeConfig;
|
|
|
import com.gyee.power.fitting.common.feign.RemoteServiceBuilder;
|
|
|
import com.gyee.power.fitting.model.PhotovoltaicAnalysis;
|
|
|
import com.gyee.power.fitting.model.ProBasicEquipment;
|
|
@@ -16,7 +15,6 @@ import com.gyee.power.fitting.service.IPhotovoltaicAnalysisService;
|
|
|
import com.gyee.power.fitting.service.ProBasicEquipmentPointService;
|
|
|
import com.gyee.power.fitting.service.ProBasicEquipmentService;
|
|
|
import com.gyee.power.fitting.service.ProEconEquipmentmodelService;
|
|
|
-import com.gyee.power.fitting.service.impl.NewIvPvCurveFittingService;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
@@ -46,11 +44,7 @@ public class PhotovoltaicAnalysisTask {
|
|
|
@Resource
|
|
|
private InverterPowerAnalysis2 inverterPowerAnalysis;
|
|
|
@Resource
|
|
|
- private NewIvPvCurveFittingService curveFittingService;
|
|
|
- @Resource
|
|
|
private PhotovoltaicEfficiencyAnalysis2 photovoltaicEfficiencyAnalysis;
|
|
|
- @Resource
|
|
|
- private GyeeConfig gyeeConfig;
|
|
|
|
|
|
//秒 分 时 日 月 周
|
|
|
@Scheduled(cron = "0 22 1 * * ?")
|
|
@@ -137,27 +131,34 @@ public class PhotovoltaicAnalysisTask {
|
|
|
double dxfds = inverterAnalysis.calcEquivalentOperatingHours(rfdl, zjrl);
|
|
|
analysis.setEquivalentGeneratingTime(dxfds);
|
|
|
//有功功率
|
|
|
- String s = ygglPointMap.get(equipmentId);
|
|
|
List<TsDoubleData> ygglInfoList = remoteService.adaptergf().getHistorySnap(ygglPointMap.get(equipmentId), dateTime.getTime(), endTime.getTime(), 60);
|
|
|
//平均功率
|
|
|
double pjGl = ygglInfoList.stream().filter(i -> i.getDoubleValue() > 1).mapToDouble(TsDoubleData::getDoubleValue).average().orElse(0);
|
|
|
+ /*月有功功率
|
|
|
+ long y_time = DateUtil.beginOfMonth(dateTime.toJdkDate()).getTime();
|
|
|
+ List<TsDoubleData> y_ygglInfoList = remoteService.adaptergf().getHistorySnap(ygglPointMap.get(equipmentId), y_time, endTime.getTime(), 5*60);
|
|
|
+ double y_pjGl = y_ygglInfoList.stream().filter(i -> i.getDoubleValue() > 1).mapToDouble(TsDoubleData::getDoubleValue).average().orElse(0);*/
|
|
|
analysis.setAveragePower(pjGl);
|
|
|
|
|
|
//光照强度
|
|
|
- String s1 = gzqdPointMap.get(equipmentId);
|
|
|
List<TsDoubleData> gzqdInfoList = remoteService.adaptergf().getHistorySnap(gzqdPointMap.get(equipmentId), dateTime.getTime(), endTime.getTime(), 60);
|
|
|
double pjGzqd = gzqdInfoList.stream().filter(i -> i.getDoubleValue() > 1).mapToDouble(TsDoubleData::getDoubleValue).average().orElse(0);
|
|
|
+ //月光照强度
|
|
|
+ //List<TsDoubleData> y_gzqdInfoList = remoteService.adaptergf().getHistorySnap(gzqdPointMap.get(equipmentId), y_time, endTime.getTime(), 5*60);
|
|
|
|
|
|
//平均理论功率
|
|
|
- analysis.setAverageTheoryPower(pjGzqd);
|
|
|
+ analysis.setAverageLightIntensity(pjGzqd);
|
|
|
//光伏转换效率
|
|
|
- double zhxl = photovoltaicEfficiencyAnalysis.calculatePhotovoltaicEfficiency(pjGl, pjGzqd, zjrl);
|
|
|
+ double zhxl = photovoltaicEfficiencyAnalysis.calculatePhotovoltaicEfficiency(pjGl, pjGzqd, zjrl, modelId);
|
|
|
analysis.setConversionEfficiency(zhxl);
|
|
|
String zhxlZt = photovoltaicEfficiencyAnalysis.determinePhotovoltaicLevel(zhxl);
|
|
|
analysis.setConversionEfficiencyStatus(zhxlZt);
|
|
|
//离散率
|
|
|
double lsl = inverterPowerAnalysis.calcPowerDeviation(gzqdInfoList, ygglInfoList, pjGl, dateTime.getTime(), endTime.getTime());
|
|
|
+ //月离散率
|
|
|
+ //double y_lsl = inverterPowerAnalysis.calcPowerDeviation(y_gzqdInfoList, y_ygglInfoList, y_pjGl, y_time, endTime.getTime());
|
|
|
analysis.setScatter(lsl);
|
|
|
+ //analysis.setMonthlyScatter(y_lsl);
|
|
|
String lslZt = inverterPowerAnalysis.analyzeInverterStatus(lsl, pjGl);
|
|
|
analysis.setScatterStatus(lslZt);
|
|
|
|