|
@@ -25,7 +25,6 @@ import org.apache.commons.math3.fitting.WeightedObservedPoints;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.lang.reflect.Field;
|
|
@@ -38,7 +37,7 @@ import java.util.function.Function;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
//@Service
|
|
|
-@Service
|
|
|
+//@Service
|
|
|
public class JavaFunctionJobHandler extends IJobHandler {
|
|
|
private static final Logger logger = LoggerFactory.getLogger(JavaFunctionJobHandler.class);
|
|
|
|
|
@@ -221,16 +220,17 @@ public class JavaFunctionJobHandler extends IJobHandler {
|
|
|
}
|
|
|
|
|
|
public MeterInfoDay getMeterinfoByDate(Date date, PointInfo entity) {
|
|
|
+ String[] split = entity.getUniformCode().split("-");
|
|
|
+ String mtId = split[split.length - 1];
|
|
|
QueryWrapper<MeterInfoDay> wrapper = new QueryWrapper<>();
|
|
|
wrapper.eq("record_date", date);
|
|
|
- wrapper.eq("meter_id", entity.getUniformCode());
|
|
|
+ wrapper.eq("meter_id", mtId);
|
|
|
List<MeterInfoDay> list = meterInfoDayService.list(wrapper);
|
|
|
if (CollUtil.isEmpty(list)) {
|
|
|
MeterInfoDay day = new MeterInfoDay();
|
|
|
day.setStationId(entity.getStationId());
|
|
|
day.setBoosterId(entity.getBoosterId());
|
|
|
- String[] split = entity.getUniformCode().split("-");
|
|
|
- day.setMeterId(split[split.length - 1]);
|
|
|
+ day.setMeterId(mtId);
|
|
|
day.setRecordDate(date);
|
|
|
list.add(day);
|
|
|
}
|
|
@@ -1164,11 +1164,12 @@ public class JavaFunctionJobHandler extends IJobHandler {
|
|
|
fsData = fsData.stream().peek(pd -> pd.setDoubleValue(NumberUtil.round(pd.getValue() > 25 ? 25.0 : pd.getValue(), 2).doubleValue())).collect(Collectors.toList());
|
|
|
Map<String, Double> loss = getTurbinePowerLoss(infoDay.getRfdl(), ztInfo, fsData, glpi.getPointDatas());
|
|
|
infoDay.setJhjxss(loss.get("jxss") + loss.get("sdtj"));
|
|
|
- infoDay.setFjhjxss(loss.get("gzss") + loss.get("djss") + loss.get("fdjcl"));
|
|
|
+ infoDay.setFjhjxss(loss.get("gzss") + loss.get("fdjcl"));
|
|
|
infoDay.setXdss(loss.get("xdjcl") + loss.get("xdtj"));
|
|
|
infoDay.setSlss(0.0);
|
|
|
infoDay.setDjss(loss.get("djss"));
|
|
|
infoDay.setGzss(loss.get("gzss"));
|
|
|
+ infoDay.setXnss(loss.get("xnss") + loss.get("djss"));
|
|
|
//if (infoDay.getRfdl() == 0) {
|
|
|
// infoDay.setXnss(0.0);
|
|
|
//} else {
|
|
@@ -1643,12 +1644,12 @@ public class JavaFunctionJobHandler extends IJobHandler {
|
|
|
TurbineInfoDay infoDay = dayMap.get(wtId);
|
|
|
Map<String, Double> loss = getTurbinePowerLoss(infoDay.getRfdl(), ztMapMapInfos.get(stId).get(wtId), fsMapMap.get(stId).get(wtId), glMapMap.get(stId).get(wtId));
|
|
|
infoDay.setJhjxss(loss.get("jxss") + loss.get("sdtj"));
|
|
|
- infoDay.setFjhjxss(loss.get("gzss") + loss.get("djss") + loss.get("fdjcl"));
|
|
|
+ infoDay.setFjhjxss(loss.get("gzss") + loss.get("fdjcl"));
|
|
|
infoDay.setXdss(loss.get("xdjcl") + loss.get("xdtj"));
|
|
|
infoDay.setSlss(0.0);
|
|
|
infoDay.setDjss(loss.get("djss"));
|
|
|
infoDay.setGzss(loss.get("gzss"));
|
|
|
- infoDay.setXnss(loss.get("xnss"));
|
|
|
+ infoDay.setXnss(loss.get("xnss") + loss.get("djss"));
|
|
|
//if (infoDay.getRfdl() == 0) {
|
|
|
// infoDay.setXnss(0.0);
|
|
|
//} else {
|
|
@@ -2119,8 +2120,7 @@ public class JavaFunctionJobHandler extends IJobHandler {
|
|
|
List<StateAi> list = stateAiService.list();
|
|
|
Map<String, Map<Integer, Integer>> collectAi = list.stream().collect(Collectors.groupingBy(StateAi::getModel, Collectors.toMap(StateAi::getOriginalState, StateAi::getMappingState)));
|
|
|
|
|
|
- // Map<String, Map<Double,Double>> fitMap = new HashMap<>();
|
|
|
- // entityFs = entityFs.stream().filter(ef -> !CalcCache.keys.contains(ef.getTurbineId())).collect(Collectors.toList());
|
|
|
+ entityFs = entityFs.stream().filter(ef -> !CalcCache.keys.contains(ef.getTurbineId())).collect(Collectors.toList());
|
|
|
for (PointInfo ef : entityFs) {
|
|
|
String wtId = ef.getTurbineId();
|
|
|
PointInfo glInfo = glMap.get(wtId);
|
|
@@ -2135,23 +2135,60 @@ public class JavaFunctionJobHandler extends IJobHandler {
|
|
|
if (turbineZt != null) {
|
|
|
double capacity = map.get(turbineZt.getSpare()).getPowerProduction();
|
|
|
fit = dataProcessAndFit(ef, glInfo, turbineZt, CalcCache.bzgl.get(turbineZt.getSpare()), capacity);
|
|
|
- // fitMap.put(wtId, fit);
|
|
|
turbineZt.setPointDatas(null);
|
|
|
}
|
|
|
if (turbineAizt != null) {
|
|
|
double capacity = map.get(turbineAizt.getSpare()).getPowerProduction();
|
|
|
fit = dataProcessAndFit(ef, glInfo, turbineAizt, CalcCache.bzgl.get(turbineAizt.getSpare()), capacity);
|
|
|
- // fitMap.put(wtId, fit);
|
|
|
turbineAizt.setPointDatas(null);
|
|
|
}
|
|
|
ef.setPointDatas(null);
|
|
|
glInfo.setPointDatas(null);
|
|
|
- String key = "glqxnh:" + (end.getMonth() + 1) + ":" + wtId;
|
|
|
+ String key = "glqxnh:" + end.getMonth() + ":" + wtId;
|
|
|
+ stringRedisTemplate.opsForValue().set(key, JSON.toJSONString(fit));
|
|
|
+ CalcCache.fitcoef.put(key, new ConcurrentHashMap<>(fit));
|
|
|
+ }
|
|
|
+ System.out.println("苹果天涯");
|
|
|
+ }
|
|
|
+
|
|
|
+ public void calcGlqxnh_ha(Date start, Date end) {
|
|
|
+ //风速
|
|
|
+ List<PointInfo> entityFs = getEntity("AI066", "turbine");
|
|
|
+ //功率
|
|
|
+ List<PointInfo> entityGl = getEntity("AI114", "turbine");
|
|
|
+ Map<String, PointInfo> glMap = entityGl.stream().collect(Collectors.toMap(PointInfo::getTurbineId, Function.identity()));
|
|
|
+
|
|
|
+ Map<String, EquipmentModel> map = equipmentModelService.map();
|
|
|
+
|
|
|
+ List<PointInfo> entityAiZt = getEntity("AI422", "state");
|
|
|
+ Map<String, PointInfo> aiztMap = entityAiZt.stream().collect(Collectors.toMap(PointInfo::getTurbineId, Function.identity()));
|
|
|
+ List<StateAi> list = stateAiService.list();
|
|
|
+ Map<String, Map<Integer, Integer>> collectAi = list.stream().collect(Collectors.groupingBy(StateAi::getModel, Collectors.toMap(StateAi::getOriginalState, StateAi::getMappingState)));
|
|
|
+
|
|
|
+ entityFs = entityFs.stream().filter(ef -> !CalcCache.keys.contains(ef.getTurbineId())).collect(Collectors.toList());
|
|
|
+ for (PointInfo ef : entityFs) {
|
|
|
+ String wtId = ef.getTurbineId();
|
|
|
+ PointInfo glInfo = glMap.get(wtId);
|
|
|
+ getSnapDataByEntity(ef, start, end, 60);
|
|
|
+ getSnapDataByEntity(glInfo, start, end, 60);
|
|
|
+ List<PointData> peek = ef.getPointDatas().stream().peek(pd -> pd.setDoubleValue(NumberUtil.round(pd.getValue(), 2).doubleValue())).collect(Collectors.toList());
|
|
|
+ ef.setPointDatas(peek);
|
|
|
+
|
|
|
+ PointInfo turbineAizt = calcTurbineAizt2(aiztMap.get(wtId), collectAi, start, end, 60);
|
|
|
+ Map<Double, Double> fit = new TreeMap<>();
|
|
|
+ if (turbineAizt != null) {
|
|
|
+ double capacity = map.get(turbineAizt.getSpare()).getPowerProduction();
|
|
|
+ fit = dataProcessAndFit(ef, glInfo, turbineAizt, CalcCache.bzgl.get(turbineAizt.getSpare()), capacity);
|
|
|
+ turbineAizt.setPointDatas(null);
|
|
|
+ }
|
|
|
+ ef.setPointDatas(null);
|
|
|
+ glInfo.setPointDatas(null);
|
|
|
+ String key = "glqxnh:" + end.getMonth() + ":" + wtId;
|
|
|
+ //String key = "glqxnh:0:" + wtId;
|
|
|
stringRedisTemplate.opsForValue().set(key, JSON.toJSONString(fit));
|
|
|
CalcCache.fitcoef.put(key, new ConcurrentHashMap<>(fit));
|
|
|
}
|
|
|
System.out.println("苹果天涯");
|
|
|
- // stringRedisTemplate.opsForValue().set("glqxnh", JSON.toJSONString(fitMap));
|
|
|
}
|
|
|
|
|
|
public void calcGlqxnhSurplus(Date start, Date end) {
|
|
@@ -4007,7 +4044,10 @@ public class JavaFunctionJobHandler extends IJobHandler {
|
|
|
//date昨天零点
|
|
|
DateTime time0 = DateUtil.offsetDay(time, -1);
|
|
|
//1号主变高压侧正向有功
|
|
|
- MeterInfoDay zbgyc1Day = calcMeterSimple("B-FXYG-ZBGYC1", time0, time, "ZB");
|
|
|
+ PointInfo zbgyc1Et = new PointInfo();
|
|
|
+ zbgyc1Et.setUniformCode("B-ZXYG-ZBGYC1");
|
|
|
+ zbgyc1Et.setStationId("NX_FGS_HA_FDC_STA");
|
|
|
+ MeterInfoDay zbgyc1Day = getMeterinfoByDate(time0, zbgyc1Et);
|
|
|
zbgyc1Day.setHdl(0d);
|
|
|
//1号主变低压侧正向有功
|
|
|
MeterInfoDay zbdyc1Day = calcMeterSimple("B-ZXYG-ZBDYC1", time0, time, "ZB");
|
|
@@ -4038,7 +4078,7 @@ public class JavaFunctionJobHandler extends IJobHandler {
|
|
|
meterInfoDayService.saveOrUpdateBatch(save);
|
|
|
}
|
|
|
|
|
|
- public void calcStationKqmd(Date date, String uniform_code) {
|
|
|
+ public void calcStationKqmd(Date date) {
|
|
|
//date当天零点
|
|
|
DateTime time = DateUtil.beginOfDay(date);
|
|
|
//date昨天零点
|
|
@@ -4142,11 +4182,12 @@ public class JavaFunctionJobHandler extends IJobHandler {
|
|
|
Map<DateTime, List<Double>> dtlMap = czztMapMap.get(stId);
|
|
|
PointInfo kyfdlPi = kyfdlMap.get(stId);
|
|
|
List<PointData> kyfdlDatas = Optional.ofNullable(kyfdlPi).map(PointInfo::getPointDatas).orElse(Collections.emptyList());
|
|
|
- Map<Long, List<PointData>> kydlMap = kyfdlDatas.stream().collect(Collectors.groupingBy(pd -> pd.getTs() % (15 * 60 * 1000)));
|
|
|
+ Map<Long, List<PointData>> kydlMap = kyfdlDatas.stream().collect(Collectors.groupingBy(pd -> (pd.getTs() - pd.getTs() % (15 * 60 * 1000))));
|
|
|
double actualPower = 0, availablePower = 0;
|
|
|
for (StationInfoMin min : mins) {
|
|
|
List<Double> doubles = dtlMap.get(min.getRecordDate());
|
|
|
List<PointData> kypd = kydlMap.get(min.getRecordDate().getTime());
|
|
|
+ if (CollUtil.isEmpty(kypd)) continue;
|
|
|
//限电
|
|
|
if (calcXdRate(doubles) > 0.6) continue;
|
|
|
actualPower += min.getRfdl();
|
|
@@ -4206,8 +4247,8 @@ public class JavaFunctionJobHandler extends IJobHandler {
|
|
|
double klyl = (24 * 60 - day.getGzMin()) / (24 * 60);
|
|
|
double fnlyl = day.getRfdl() / day.getLlfdl();
|
|
|
day.setLyxs(lyxs);
|
|
|
- day.setKlyl(klyl);
|
|
|
- day.setFnlyl(fnlyl);
|
|
|
+ day.setKlyl(klyl * 100);
|
|
|
+ day.setFnlyl(fnlyl * 100);
|
|
|
}
|
|
|
turbineInfoDayService.saveOrUpdateBatch(byDate);
|
|
|
}
|
|
@@ -6908,8 +6949,81 @@ public class JavaFunctionJobHandler extends IJobHandler {
|
|
|
}
|
|
|
|
|
|
//计算惠安报表汇总
|
|
|
- public void calcHaBbHzSs(Date date) {
|
|
|
-
|
|
|
+ public void calcHaBbHzSs() {
|
|
|
+ DateTime date = DateUtil.date();
|
|
|
+ DateTime begin = DateUtil.beginOfDay(date);
|
|
|
+ //计算指标配置
|
|
|
+ QueryWrapper<ProBaseBackfill> fillWrapper = new QueryWrapper<>();
|
|
|
+ fillWrapper.lambda().eq(ProBaseBackfill::getPushTime, "12");
|
|
|
+ List<ProBaseBackfill> fills = proBaseBackfillService.list(fillWrapper);
|
|
|
+ Map<String, Map<String, Map<String, ProBaseBackfill>>> fillMapMap = fills.stream().collect(Collectors.groupingBy(ProBaseBackfill::getType,
|
|
|
+ Collectors.groupingBy(ProBaseBackfill::getTaskDescription, Collectors.toMap(ProBaseBackfill::getOperatingMode, Function.identity()))));
|
|
|
+ //指标保存表
|
|
|
+ QueryWrapper<ProEconEquipmentInfoJs> eijWrapper = new QueryWrapper<>();
|
|
|
+ eijWrapper.lambda().eq(ProEconEquipmentInfoJs::getRecordDate, begin);
|
|
|
+ List<ProEconEquipmentInfoJs> eijs = proEconEquipmentInfoJsService.list(eijWrapper);
|
|
|
+ Map<String, ProEconEquipmentInfoJs> eijMap = eijs.stream().collect(Collectors.toMap(ProEconEquipmentInfoJs::getMeterId, Function.identity(), (k1, k2) -> k1));
|
|
|
+ Map<String, ProBaseBackfill> fillMapBq01 = fillMapMap.get("SJFDL").get("本期");
|
|
|
+ Map<String, ProBaseBackfill> fillMapBq02 = fillMapMap.get("SWDL").get("本期");
|
|
|
+ Map<String, ProBaseBackfill> fillMapBq03 = fillMapMap.get("GWDL").get("本期");
|
|
|
+ Map<String, ProBaseBackfill> fillMapBq04 = fillMapMap.get("CYDL").get("本期");
|
|
|
+ Map<String, ProBaseBackfill> fillMapBq05 = fillMapMap.get("CYDLV").get("本期");
|
|
|
+ Map<String, ProBaseBackfill> fillMapBq06 = fillMapMap.get("ZHCYDL").get("本期");
|
|
|
+ Map<String, ProBaseBackfill> fillMapBq07 = fillMapMap.get("ZHCYDLV").get("本期");
|
|
|
+ Map<String, ProBaseBackfill> fillMapBq08 = fillMapMap.get("PJFS").get("本期");
|
|
|
+ Map<String, ProBaseBackfill> fillMapBq09 = fillMapMap.get("DJWHDL").get("本期");
|
|
|
+ Map<String, ProBaseBackfill> fillMapBq10 = fillMapMap.get("GZSSDL").get("本期");
|
|
|
+ Map<String, ProBaseBackfill> fillMapBq11 = fillMapMap.get("JHFDL").get("本期");
|
|
|
+ Map<String, ProBaseBackfill> fillMapBq12 = fillMapMap.get("LYXSS").get("本期");
|
|
|
+ Map<String, ProBaseBackfill> fillMapBq13 = fillMapMap.get("SBKLYL").get("本期");
|
|
|
+ Map<String, ProBaseBackfill> fillMapBq14 = fillMapMap.get("SLSSDL").get("本期");
|
|
|
+ Map<String, ProBaseBackfill> fillMapBq15 = fillMapMap.get("XDL").get("本期");
|
|
|
+ Map<String, ProBaseBackfill> fillMapBq16 = fillMapMap.get("XDLV").get("本期");
|
|
|
+ String select1 = SqlUtil.getSelectSum("swdl,gwdl,cydl,rfdl,hdl");
|
|
|
+ String select2 = SqlUtil.getSelectAvg("pjfs,klyl,fnlyl,bll") + SqlUtil.getSelectSum("gzss,xdss,xnss,lyxs,gzcs,gz_min,tj_min,dj_min,yx_min,llfdl,yxfss");
|
|
|
+ List<LineInfoDay> lidsBqQc = lineInfoDayService.getDatasByPartSelects(date, DatePart.CURRENT, select1, "project_id");
|
|
|
+ List<TurbineInfoDay> tidsBqQc = turbineInfoDayService.getDatasByPartSelects(date, DatePart.CURRENT, select2, "project_id");
|
|
|
+ List<ProBasicProjectPlan> plantsBqQc = proBasicProjectPlanService.getDatasByPartSelect(date, DatePart.CURRENT, "project_id");
|
|
|
+ List<LineInfoDay> lidsBqCz = lineInfoDayService.getDatasByPartSelects(date, DatePart.CURRENT, select1, "station_id");
|
|
|
+ List<TurbineInfoDay> tidsBqCz = turbineInfoDayService.getDatasByPartSelects(date, DatePart.CURRENT, select2, "station_id");
|
|
|
+ List<ProBasicProjectPlan> plantsBqCz = proBasicProjectPlanService.getDatasByPartSelect(date, DatePart.CURRENT, "windpowerstation_id");
|
|
|
+
|
|
|
+ lineCalcHz(lidsBqQc, fillMapBq01, LineInfoDay::getProjectId, lid -> Double.valueOf(lid.getRfdl()), eijMap, begin);
|
|
|
+ lineCalcHz(lidsBqQc, fillMapBq02, LineInfoDay::getProjectId, LineInfoDay::getSwdl, eijMap, begin);
|
|
|
+ lineCalcHz(lidsBqQc, fillMapBq03, LineInfoDay::getProjectId, LineInfoDay::getGwdl, eijMap, begin);
|
|
|
+ lineCalcHz(lidsBqQc, fillMapBq04, LineInfoDay::getProjectId, LineInfoDay::getCydl, eijMap, begin);
|
|
|
+ lineCalcHz(lidsBqQc, fillMapBq05, LineInfoDay::getProjectId, lid -> lid.getCydl() / lid.getRfdl() * 100, eijMap, begin);
|
|
|
+ lineCalcHz(lidsBqQc, fillMapBq06, LineInfoDay::getProjectId, lid -> lid.getRfdl() - lid.getSwdl() + lid.getGwdl(), eijMap, begin);
|
|
|
+ lineCalcHz(lidsBqQc, fillMapBq07, LineInfoDay::getProjectId, lid -> (lid.getRfdl() - lid.getSwdl() + lid.getGwdl()) / lid.getRfdl(), eijMap, begin);
|
|
|
+ lineCalcHz(tidsBqQc, fillMapBq08, TurbineInfoDay::getProjectId, TurbineInfoDay::getPjfs, eijMap, begin);
|
|
|
+ lineCalcHz(lidsBqQc, fillMapBq09, LineInfoDay::getProjectId, lid -> 0d, eijMap, begin);
|
|
|
+ lineCalcHz(tidsBqQc, fillMapBq10, TurbineInfoDay::getProjectId, TurbineInfoDay::getGzss, eijMap, begin);
|
|
|
+ lineCalcHz(plantsBqQc, fillMapBq11, ProBasicProjectPlan::getProjectId, pbpp -> pbpp.getGeneratingCapacity() / plantsBqQc.size(), eijMap, begin);
|
|
|
+ lineCalcHz(tidsBqQc, fillMapBq12, TurbineInfoDay::getProjectId, TurbineInfoDay::getLyxs, eijMap, begin);
|
|
|
+ lineCalcHz(tidsBqQc, fillMapBq13, TurbineInfoDay::getProjectId, TurbineInfoDay::getKlyl, eijMap, begin);
|
|
|
+ lineCalcHz(lidsBqQc, fillMapBq14, LineInfoDay::getProjectId, lid -> 0d, eijMap, begin);
|
|
|
+ lineCalcHz(tidsBqQc, fillMapBq15, TurbineInfoDay::getProjectId, TurbineInfoDay::getXdss, eijMap, begin);
|
|
|
+ lineCalcHz(tidsBqQc, fillMapBq16, TurbineInfoDay::getProjectId, TurbineInfoDay::getXdss, eijMap, begin);
|
|
|
+ lineCalcHz2(lidsBqQc, fillMapBq16, LineInfoDay::getProjectId, lid -> Double.valueOf(lid.getRfdl()), eijMap, begin);
|
|
|
+
|
|
|
+ lineCalcHz(lidsBqCz, fillMapBq01, LineInfoDay::getStationId, lid -> Double.valueOf(lid.getRfdl()), eijMap, begin);
|
|
|
+ lineCalcHz(lidsBqCz, fillMapBq02, LineInfoDay::getStationId, LineInfoDay::getSwdl, eijMap, begin);
|
|
|
+ lineCalcHz(lidsBqCz, fillMapBq03, LineInfoDay::getStationId, LineInfoDay::getGwdl, eijMap, begin);
|
|
|
+ lineCalcHz(lidsBqCz, fillMapBq04, LineInfoDay::getStationId, LineInfoDay::getCydl, eijMap, begin);
|
|
|
+ lineCalcHz(lidsBqCz, fillMapBq05, LineInfoDay::getStationId, lid -> lid.getCydl() / lid.getRfdl() * 100, eijMap, begin);
|
|
|
+ lineCalcHz(lidsBqCz, fillMapBq06, LineInfoDay::getStationId, lid -> lid.getRfdl() - lid.getSwdl() + lid.getGwdl(), eijMap, begin);
|
|
|
+ lineCalcHz(lidsBqCz, fillMapBq07, LineInfoDay::getStationId, lid -> (lid.getRfdl() - lid.getSwdl() + lid.getGwdl()) / lid.getRfdl(), eijMap, begin);
|
|
|
+ lineCalcHz(tidsBqCz, fillMapBq08, TurbineInfoDay::getStationId, TurbineInfoDay::getPjfs, eijMap, begin);
|
|
|
+ lineCalcHz(lidsBqCz, fillMapBq09, LineInfoDay::getStationId, lid -> 0d, eijMap, begin);
|
|
|
+ lineCalcHz(tidsBqCz, fillMapBq10, TurbineInfoDay::getStationId, TurbineInfoDay::getGzss, eijMap, begin);
|
|
|
+ lineCalcHz(plantsBqCz, fillMapBq11, ProBasicProjectPlan::getWindpowerstationId, pbpp -> pbpp.getGeneratingCapacity() / plantsBqCz.size(), eijMap, begin);
|
|
|
+ lineCalcHz(tidsBqCz, fillMapBq12, TurbineInfoDay::getStationId, TurbineInfoDay::getLyxs, eijMap, begin);
|
|
|
+ lineCalcHz(tidsBqCz, fillMapBq13, TurbineInfoDay::getStationId, TurbineInfoDay::getKlyl, eijMap, begin);
|
|
|
+ lineCalcHz(lidsBqCz, fillMapBq14, LineInfoDay::getStationId, lid -> 0d, eijMap, begin);
|
|
|
+ lineCalcHz(tidsBqCz, fillMapBq15, TurbineInfoDay::getStationId, TurbineInfoDay::getXdss, eijMap, begin);
|
|
|
+ lineCalcHz(tidsBqCz, fillMapBq16, TurbineInfoDay::getStationId, TurbineInfoDay::getXdss, eijMap, begin);
|
|
|
+ lineCalcHz2(lidsBqCz, fillMapBq16, LineInfoDay::getStationId, lid -> Double.valueOf(lid.getRfdl()), eijMap, begin);
|
|
|
+ proEconEquipmentInfoJsService.saveOrUpdateBatch(eijMap.values());
|
|
|
}
|
|
|
|
|
|
//计算惠安报表汇总实时
|
|
@@ -6926,7 +7040,7 @@ public class JavaFunctionJobHandler extends IJobHandler {
|
|
|
QueryWrapper<ProEconEquipmentInfoJs> eijWrapper = new QueryWrapper<>();
|
|
|
eijWrapper.lambda().eq(ProEconEquipmentInfoJs::getRecordDate, yesterday);
|
|
|
List<ProEconEquipmentInfoJs> eijs = proEconEquipmentInfoJsService.list(eijWrapper);
|
|
|
- Map<String, ProEconEquipmentInfoJs> eijMap = eijs.stream().collect(Collectors.toMap(ProEconEquipmentInfoJs::getMeterId, Function.identity()));
|
|
|
+ Map<String, ProEconEquipmentInfoJs> eijMap = eijs.stream().collect(Collectors.toMap(ProEconEquipmentInfoJs::getMeterId, Function.identity(), (k1, k2) -> k1));
|
|
|
//风机日月发电量
|
|
|
Map<String, ProBaseBackfill> fillMapFdlR = fillMapMap.get("FDL").get("日");
|
|
|
Map<String, ProBaseBackfill> fillMapFdlY = fillMapMap.get("FDL").get("月");
|
|
@@ -6934,24 +7048,18 @@ public class JavaFunctionJobHandler extends IJobHandler {
|
|
|
Map<String, ProBaseBackfill> fillMapFdlR2 = fillMapMap.get("FDLFJ").get("日");
|
|
|
Map<String, ProBaseBackfill> fillMapFdlY2 = fillMapMap.get("FDLFJ").get("月");
|
|
|
Map<String, ProBaseBackfill> fillMapFdlN2 = fillMapMap.get("FDLFJ").get("年");
|
|
|
- List<TurbineInfoDay> tidsR = turbineInfoDayService.getDatasByPartSelects(date, DatePart.DAY, "rfdl", TurbineInfoDay::getTurbineId);
|
|
|
- for (TurbineInfoDay day : tidsR) {
|
|
|
- String tbId = day.getTurbineId();
|
|
|
- ProBaseBackfill fill = fillMapFdlR.get(tbId);
|
|
|
- ProEconEquipmentInfoJs js = getPeeijs(fill, eijMap, yesterday);
|
|
|
- js.setStopCode(day.getRfdl());
|
|
|
- }
|
|
|
- List<TurbineInfoDay> tidsY = turbineInfoDayService.getDatasByPartSelects(date, DatePart.MONTH, "rfdl", TurbineInfoDay::getTurbineId);
|
|
|
- for (TurbineInfoDay day : tidsY) {
|
|
|
- String tbId = day.getTurbineId();
|
|
|
- ProBaseBackfill fill = fillMapFdlY.get(tbId);
|
|
|
- ProEconEquipmentInfoJs js = getPeeijs(fill, eijMap, yesterday);
|
|
|
- js.setStopCode(day.getRfdl());
|
|
|
- }
|
|
|
+
|
|
|
+ List<TurbineInfoDay> tidsR = turbineInfoDayService.getDatasByPartSelects(yesterday, DatePart.DAY, SqlUtil.getSelectSum("rfdl"), "turbine_id");
|
|
|
+ List<TurbineInfoDay> tidsY = turbineInfoDayService.getDatasByPartSelects(yesterday, DatePart.MONTH, SqlUtil.getSelectSum("rfdl"), "turbine_id");
|
|
|
+ lineCalcHz(tidsR, fillMapFdlR, TurbineInfoDay::getTurbineId, tid -> Double.valueOf(tid.getRfdl()), eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsY, fillMapFdlY, TurbineInfoDay::getTurbineId, tid -> Double.valueOf(tid.getRfdl()), eijMap, yesterday);
|
|
|
//实际发电量 SJFDL,上网电量 SWDL,购网电量 GWDL,场用电量 CYDL,场用电率 CYDL,综合场用电量 ZHCYDL
|
|
|
//综合场用电率 ZHCYDL,平均风速 PJFS,定检维护电量 DJWHDL,故障损失电量 GZSSDL,计划发电量 JHFDL
|
|
|
//利用小时数 LYXSS,设备可利用率 SBKLYL,受累损失电量 SLSSDL,限电量 XDL,限电率 XDL
|
|
|
+ Map<String, ProBaseBackfill> fillMapR02 = fillMapMap.get("SWDL").get("日");
|
|
|
+ Map<String, ProBaseBackfill> fillMapR03 = fillMapMap.get("GWDL").get("日");
|
|
|
Map<String, ProBaseBackfill> fillMapR17 = fillMapMap.get("HDL").get("日");
|
|
|
+ Map<String, ProBaseBackfill> fillMapR18 = fillMapMap.get("FNLYL").get("日");
|
|
|
Map<String, ProBaseBackfill> fillMapY01 = fillMapMap.get("SJFDL").get("月");
|
|
|
Map<String, ProBaseBackfill> fillMapY02 = fillMapMap.get("SWDL").get("月");
|
|
|
Map<String, ProBaseBackfill> fillMapY03 = fillMapMap.get("GWDL").get("月");
|
|
@@ -6969,6 +7077,7 @@ public class JavaFunctionJobHandler extends IJobHandler {
|
|
|
Map<String, ProBaseBackfill> fillMapY15 = fillMapMap.get("XDL").get("月");
|
|
|
Map<String, ProBaseBackfill> fillMapY16 = fillMapMap.get("XDLV").get("月");
|
|
|
Map<String, ProBaseBackfill> fillMapY17 = fillMapMap.get("HDL").get("月");
|
|
|
+ Map<String, ProBaseBackfill> fillMapY18 = fillMapMap.get("FNLYL").get("月");
|
|
|
Map<String, ProBaseBackfill> fillMapN01 = fillMapMap.get("SJFDL").get("年");
|
|
|
Map<String, ProBaseBackfill> fillMapN02 = fillMapMap.get("SWDL").get("年");
|
|
|
Map<String, ProBaseBackfill> fillMapN03 = fillMapMap.get("GWDL").get("年");
|
|
@@ -6985,54 +7094,163 @@ public class JavaFunctionJobHandler extends IJobHandler {
|
|
|
Map<String, ProBaseBackfill> fillMapN14 = fillMapMap.get("SLSSDL").get("年");
|
|
|
Map<String, ProBaseBackfill> fillMapN15 = fillMapMap.get("XDL").get("年");
|
|
|
Map<String, ProBaseBackfill> fillMapN16 = fillMapMap.get("XDLV").get("年");
|
|
|
+ Map<String, ProBaseBackfill> fillMapN18 = fillMapMap.get("FNLYL").get("年");
|
|
|
+ Map<String, ProBaseBackfill> fillMapR19 = fillMapMap.get("GZCS").get("日");
|
|
|
+ Map<String, ProBaseBackfill> fillMapY19 = fillMapMap.get("GZCS").get("月");
|
|
|
+ Map<String, ProBaseBackfill> fillMapN19 = fillMapMap.get("GZCS").get("年");
|
|
|
+ Map<String, ProBaseBackfill> fillMapR20 = fillMapMap.get("GZSC").get("日");
|
|
|
+ Map<String, ProBaseBackfill> fillMapY20 = fillMapMap.get("GZSC").get("月");
|
|
|
+ Map<String, ProBaseBackfill> fillMapN20 = fillMapMap.get("GZSC").get("年");
|
|
|
+ Map<String, ProBaseBackfill> fillMapR21 = fillMapMap.get("JHTJSC").get("日");
|
|
|
+ Map<String, ProBaseBackfill> fillMapY21 = fillMapMap.get("JHTJSC").get("月");
|
|
|
+ Map<String, ProBaseBackfill> fillMapN21 = fillMapMap.get("JHTJSC").get("年");
|
|
|
+ Map<String, ProBaseBackfill> fillMapR22 = fillMapMap.get("JSDJSC").get("日");
|
|
|
+ Map<String, ProBaseBackfill> fillMapY22 = fillMapMap.get("JSDJSC").get("月");
|
|
|
+ Map<String, ProBaseBackfill> fillMapN22 = fillMapMap.get("JSDJSC").get("年");
|
|
|
+ Map<String, ProBaseBackfill> fillMapR23 = fillMapMap.get("KQMD").get("日");
|
|
|
+ Map<String, ProBaseBackfill> fillMapY23 = fillMapMap.get("KQMD").get("月");
|
|
|
+ Map<String, ProBaseBackfill> fillMapN23 = fillMapMap.get("KQMD").get("年");
|
|
|
+ Map<String, ProBaseBackfill> fillMapR24 = fillMapMap.get("KYDLZQL").get("日");
|
|
|
+ Map<String, ProBaseBackfill> fillMapY24 = fillMapMap.get("KYDLZQL").get("月");
|
|
|
+ Map<String, ProBaseBackfill> fillMapN24 = fillMapMap.get("KYDLZQL").get("年");
|
|
|
+ Map<String, ProBaseBackfill> fillMapR25 = fillMapMap.get("LLFDL").get("日");
|
|
|
+ Map<String, ProBaseBackfill> fillMapY25 = fillMapMap.get("LLFDL").get("月");
|
|
|
+ Map<String, ProBaseBackfill> fillMapN25 = fillMapMap.get("LLFDL").get("年");
|
|
|
+ Map<String, ProBaseBackfill> fillMapR26 = fillMapMap.get("PJQW").get("日");
|
|
|
+ Map<String, ProBaseBackfill> fillMapY26 = fillMapMap.get("PJQW").get("月");
|
|
|
+ Map<String, ProBaseBackfill> fillMapN26 = fillMapMap.get("PJQW").get("年");
|
|
|
+ Map<String, ProBaseBackfill> fillMapR27 = fillMapMap.get("PJTJSC").get("日");
|
|
|
+ Map<String, ProBaseBackfill> fillMapY27 = fillMapMap.get("PJTJSC").get("月");
|
|
|
+ Map<String, ProBaseBackfill> fillMapN27 = fillMapMap.get("PJTJSC").get("年");
|
|
|
+ Map<String, ProBaseBackfill> fillMapR28 = fillMapMap.get("QFXDLV").get("日");
|
|
|
+ Map<String, ProBaseBackfill> fillMapY28 = fillMapMap.get("QFXDLV").get("月");
|
|
|
+ Map<String, ProBaseBackfill> fillMapN28 = fillMapMap.get("QFXDLV").get("年");
|
|
|
+ Map<String, ProBaseBackfill> fillMapR29 = fillMapMap.get("XNSSDL").get("日");
|
|
|
+ Map<String, ProBaseBackfill> fillMapY29 = fillMapMap.get("XNSSDL").get("月");
|
|
|
+ Map<String, ProBaseBackfill> fillMapN29 = fillMapMap.get("XNSSDL").get("年");
|
|
|
+ Map<String, ProBaseBackfill> fillMapR30 = fillMapMap.get("XNSSL").get("日");
|
|
|
+ Map<String, ProBaseBackfill> fillMapY30 = fillMapMap.get("XNSSL").get("月");
|
|
|
+ Map<String, ProBaseBackfill> fillMapN30 = fillMapMap.get("XNSSL").get("年");
|
|
|
+ Map<String, ProBaseBackfill> fillMapR31 = fillMapMap.get("YXBLL").get("日");
|
|
|
+ Map<String, ProBaseBackfill> fillMapY31 = fillMapMap.get("YXBLL").get("月");
|
|
|
+ Map<String, ProBaseBackfill> fillMapN31 = fillMapMap.get("YXBLL").get("年");
|
|
|
+ Map<String, ProBaseBackfill> fillMapR32 = fillMapMap.get("YXFSS").get("日");
|
|
|
+ Map<String, ProBaseBackfill> fillMapY32 = fillMapMap.get("YXFSS").get("月");
|
|
|
+ Map<String, ProBaseBackfill> fillMapN32 = fillMapMap.get("YXFSS").get("年");
|
|
|
+ Map<String, ProBaseBackfill> fillMapR33 = fillMapMap.get("YXXS").get("日");
|
|
|
+ Map<String, ProBaseBackfill> fillMapY33 = fillMapMap.get("YXXS").get("月");
|
|
|
+ Map<String, ProBaseBackfill> fillMapN33 = fillMapMap.get("YXXS").get("年");
|
|
|
+ Map<String, ProBaseBackfill> fillMapR34 = fillMapMap.get("ZRYSTJSC").get("日");
|
|
|
+ Map<String, ProBaseBackfill> fillMapY34 = fillMapMap.get("ZRYSTJSC").get("月");
|
|
|
+ Map<String, ProBaseBackfill> fillMapN34 = fillMapMap.get("ZRYSTJSC").get("年");
|
|
|
String select1 = SqlUtil.getSelectSum("swdl,gwdl,cydl,rfdl,hdl");
|
|
|
- String select2 = SqlUtil.getSelectAvg("pjfs,klyl") + "," + SqlUtil.getSelectSum("gzss,xdss,lyxs");
|
|
|
+ String select2 = SqlUtil.getSelectAvg("pjfs,klyl,fnlyl,bll") + SqlUtil.getSelectSum("gzss,xdss,xnss,lyxs,gzcs,gz_min,tj_min,dj_min,yx_min,llfdl,yxfss");
|
|
|
String select3 = SqlUtil.getSelectSum("fdl,hdl");
|
|
|
- String select4 = SqlUtil.getSelectSum("rfdl_fj");
|
|
|
+ String select4 = SqlUtil.getSelectAvg("qfxdl") + SqlUtil.getSelectSum("rfdl,rfdl_fj,kqmd,hjwd");
|
|
|
//线路
|
|
|
- List<LineInfoDay> lidsRXl = lineInfoDayService.getDatasByPartSelects(date, DatePart.DAY, select1, LineInfoDay::getLineId);
|
|
|
- List<LineInfoDay> lidsYXl = lineInfoDayService.getDatasByPartSelects(date, DatePart.MONTH, select1, LineInfoDay::getLineId);
|
|
|
- List<LineInfoDay> lidsYQc = lineInfoDayService.getDatasByPartSelects(date, DatePart.MONTH, select1, LineInfoDay::getProjectId);
|
|
|
- List<LineInfoDay> lidsRCz = lineInfoDayService.getDatasByPartSelects(date, DatePart.DAY, select1, LineInfoDay::getStationId);
|
|
|
- List<LineInfoDay> lidsYCz = lineInfoDayService.getDatasByPartSelects(date, DatePart.MONTH, select1, LineInfoDay::getStationId);
|
|
|
- List<LineInfoDay> lidsNQc = lineInfoDayService.getDatasByPartSelects(date, DatePart.YEAR, select1, LineInfoDay::getProjectId);
|
|
|
- List<LineInfoDay> lidsNCz = lineInfoDayService.getDatasByPartSelects(date, DatePart.YEAR, select1, LineInfoDay::getStationId);
|
|
|
+ List<LineInfoDay> lidsRXl = lineInfoDayService.getDatasByPartSelects(yesterday, DatePart.DAY, select1, "line_id");
|
|
|
+ List<LineInfoDay> lidsYXl = lineInfoDayService.getDatasByPartSelects(yesterday, DatePart.MONTH, select1, "line_id");
|
|
|
+ List<LineInfoDay> lidsYQc = lineInfoDayService.getDatasByPartSelects(yesterday, DatePart.MONTH, select1, "project_id");
|
|
|
+ List<LineInfoDay> lidsRCz = lineInfoDayService.getDatasByPartSelects(yesterday, DatePart.DAY, select1, "station_id");
|
|
|
+ List<LineInfoDay> lidsYCz = lineInfoDayService.getDatasByPartSelects(yesterday, DatePart.MONTH, select1, "station_id");
|
|
|
+ List<LineInfoDay> lidsNQc = lineInfoDayService.getDatasByPartSelects(yesterday, DatePart.YEAR, select1, "project_id");
|
|
|
+ List<LineInfoDay> lidsNCz = lineInfoDayService.getDatasByPartSelects(yesterday, DatePart.YEAR, select1, "station_id");
|
|
|
//风机
|
|
|
- List<TurbineInfoDay> tidsRXl = turbineInfoDayService.getDatasByPartSelects(date, DatePart.DAY, select2, TurbineInfoDay::getLineId);
|
|
|
- List<TurbineInfoDay> tidsYXl = turbineInfoDayService.getDatasByPartSelects(date, DatePart.MONTH, select2, TurbineInfoDay::getLineId);
|
|
|
- List<TurbineInfoDay> tidsYQc = turbineInfoDayService.getDatasByPartSelects(date, DatePart.MONTH, select2, TurbineInfoDay::getProjectId);
|
|
|
- List<TurbineInfoDay> tidsYCz = turbineInfoDayService.getDatasByPartSelects(date, DatePart.MONTH, select2, TurbineInfoDay::getStationId);
|
|
|
- List<TurbineInfoDay> tidsNQc = turbineInfoDayService.getDatasByPartSelects(date, DatePart.YEAR, select2, TurbineInfoDay::getProjectId);
|
|
|
- List<TurbineInfoDay> tidsNCz = turbineInfoDayService.getDatasByPartSelects(date, DatePart.YEAR, select2, TurbineInfoDay::getStationId);
|
|
|
+ List<TurbineInfoDay> tidsRXl = turbineInfoDayService.getDatasByPartSelects(yesterday, DatePart.DAY, select2, "line_id");
|
|
|
+ List<TurbineInfoDay> tidsRCz = turbineInfoDayService.getDatasByPartSelects(yesterday, DatePart.DAY, select2, "station_id");
|
|
|
+ List<TurbineInfoDay> tidsYXl = turbineInfoDayService.getDatasByPartSelects(yesterday, DatePart.MONTH, select2, "line_id");
|
|
|
+ List<TurbineInfoDay> tidsYQc = turbineInfoDayService.getDatasByPartSelects(yesterday, DatePart.MONTH, select2, "project_id");
|
|
|
+ List<TurbineInfoDay> tidsYCz = turbineInfoDayService.getDatasByPartSelects(yesterday, DatePart.MONTH, select2, "station_id");
|
|
|
+ List<TurbineInfoDay> tidsNQc = turbineInfoDayService.getDatasByPartSelects(yesterday, DatePart.YEAR, select2, "project_id");
|
|
|
+ List<TurbineInfoDay> tidsNCz = turbineInfoDayService.getDatasByPartSelects(yesterday, DatePart.YEAR, select2, "station_id");
|
|
|
//场站
|
|
|
- List<StationInfoDay> sidR = stationInfoDayService.getDatasByPartSelects(date, DatePart.DAY, select4, StationInfoDay::getStationId);
|
|
|
- List<StationInfoDay> sidY = stationInfoDayService.getDatasByPartSelects(date, DatePart.MONTH, select4, StationInfoDay::getStationId);
|
|
|
- List<StationInfoDay> sidN = stationInfoDayService.getDatasByPartSelects(date, DatePart.YEAR, select4, StationInfoDay::getStationId);
|
|
|
+ List<StationInfoDay> sidR = stationInfoDayService.getDatasByPartSelects(yesterday, DatePart.DAY, select4, "station_id");
|
|
|
+ List<StationInfoDay> sidY = stationInfoDayService.getDatasByPartSelects(yesterday, DatePart.MONTH, select4, "station_id");
|
|
|
+ List<StationInfoDay> sidN = stationInfoDayService.getDatasByPartSelects(yesterday, DatePart.YEAR, select4, "station_id");
|
|
|
//电计量
|
|
|
- List<MeterInfoDay> midsRMt = meterInfoDayService.getDatasByPartSelects(date, DatePart.DAY, select3, MeterInfoDay::getMeterId);
|
|
|
- List<MeterInfoDay> midsYMt = meterInfoDayService.getDatasByPartSelects(date, DatePart.MONTH, select3, MeterInfoDay::getMeterId);
|
|
|
- List<MeterInfoDay> midsRPrt = meterInfoDayService.getDatasByPartSelects(date, DatePart.DAY, select3, MeterInfoDay::getParentId);
|
|
|
- List<MeterInfoDay> midsYPrt = meterInfoDayService.getDatasByPartSelects(date, DatePart.MONTH, select3, MeterInfoDay::getParentId);
|
|
|
+ List<MeterInfoDay> midsRMt = meterInfoDayService.getDatasByPartSelects(yesterday, DatePart.DAY, select3, "meter_id");
|
|
|
+ List<MeterInfoDay> midsYMt = meterInfoDayService.getDatasByPartSelects(yesterday, DatePart.MONTH, select3, "meter_id");
|
|
|
+ List<MeterInfoDay> midsRPrt = meterInfoDayService.getDatasByPartSelects(yesterday, DatePart.DAY, select3, "meter_id");
|
|
|
+ List<MeterInfoDay> midsYPrt = meterInfoDayService.getDatasByPartSelects(yesterday, DatePart.MONTH, select3, "meter_id");
|
|
|
//计划电量
|
|
|
- List<ProBasicProjectPlan> plantsYQc = proBasicProjectPlanService.getDatasByPartSelect(date, DatePart.MONTH, "projectid");
|
|
|
- List<ProBasicProjectPlan> plantsYCz = proBasicProjectPlanService.getDatasByPartSelect(date, DatePart.MONTH, "station");
|
|
|
- List<ProBasicProjectPlan> plantsNQc = proBasicProjectPlanService.getDatasByPartSelect(date, DatePart.YEAR, "projectid");
|
|
|
- List<ProBasicProjectPlan> plantsNCz = proBasicProjectPlanService.getDatasByPartSelect(date, DatePart.YEAR, "station");
|
|
|
+ List<ProBasicProjectPlan> plantsYQc = proBasicProjectPlanService.getDatasByPartSelect(yesterday, DatePart.MONTH, "project_id");
|
|
|
+ List<ProBasicProjectPlan> plantsYCz = proBasicProjectPlanService.getDatasByPartSelect(yesterday, DatePart.MONTH, "windpowerstation_id");
|
|
|
+ List<ProBasicProjectPlan> plantsNQc = proBasicProjectPlanService.getDatasByPartSelect(yesterday, DatePart.YEAR, "project_id");
|
|
|
+ List<ProBasicProjectPlan> plantsNCz = proBasicProjectPlanService.getDatasByPartSelect(yesterday, DatePart.YEAR, "windpowerstation_id");
|
|
|
+
|
|
|
+ //故障次数、时长。。。
|
|
|
+ lineCalcHz(tidsRCz, fillMapR19, TurbineInfoDay::getStationId, tid -> Double.valueOf(tid.getGzcs()), eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsYCz, fillMapY19, TurbineInfoDay::getStationId, tid -> Double.valueOf(tid.getGzcs()), eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsNCz, fillMapN19, TurbineInfoDay::getStationId, tid -> Double.valueOf(tid.getGzcs()), eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsRCz, fillMapR20, TurbineInfoDay::getStationId, tid -> tid.getGzMin() / 60, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsYCz, fillMapY20, TurbineInfoDay::getStationId, tid -> tid.getGzMin() / 60, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsNCz, fillMapN20, TurbineInfoDay::getStationId, tid -> tid.getGzMin() / 60, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsRCz, fillMapR21, TurbineInfoDay::getStationId, tid -> tid.getTjMin() / 60, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsYCz, fillMapY21, TurbineInfoDay::getStationId, tid -> tid.getTjMin() / 60, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsNCz, fillMapN21, TurbineInfoDay::getStationId, tid -> tid.getTjMin() / 60, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsRCz, fillMapR22, TurbineInfoDay::getStationId, tid -> tid.getDjMin() / 60, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsYCz, fillMapY22, TurbineInfoDay::getStationId, tid -> tid.getDjMin() / 60, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsNCz, fillMapN22, TurbineInfoDay::getStationId, tid -> tid.getDjMin() / 60, eijMap, yesterday);
|
|
|
+ lineCalcHz(sidR, fillMapR23, StationInfoDay::getStationId, StationInfoDay::getKqmd, eijMap, yesterday);
|
|
|
+ lineCalcHz(sidY, fillMapY23, StationInfoDay::getStationId, StationInfoDay::getKqmd, eijMap, yesterday);
|
|
|
+ lineCalcHz(sidN, fillMapN23, StationInfoDay::getStationId, StationInfoDay::getKqmd, eijMap, yesterday);
|
|
|
+ lineCalcHz(sidR, fillMapR24, StationInfoDay::getStationId, StationInfoDay::getKydlzql, eijMap, yesterday);
|
|
|
+ lineCalcHz(sidY, fillMapY24, StationInfoDay::getStationId, StationInfoDay::getKydlzql, eijMap, yesterday);
|
|
|
+ lineCalcHz(sidN, fillMapN24, StationInfoDay::getStationId, StationInfoDay::getKydlzql, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsRCz, fillMapR25, TurbineInfoDay::getStationId, tid -> tid.getLlfdl() / 1000, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsYCz, fillMapY25, TurbineInfoDay::getStationId, tid -> tid.getLlfdl() / 1000, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsNCz, fillMapN25, TurbineInfoDay::getStationId, tid -> tid.getLlfdl() / 1000, eijMap, yesterday);
|
|
|
+ lineCalcHz(sidR, fillMapR26, StationInfoDay::getStationId, StationInfoDay::getHjwd, eijMap, yesterday);
|
|
|
+ lineCalcHz(sidY, fillMapY26, StationInfoDay::getStationId, StationInfoDay::getHjwd, eijMap, yesterday);
|
|
|
+ lineCalcHz(sidN, fillMapN26, StationInfoDay::getStationId, StationInfoDay::getHjwd, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsRCz, fillMapR27, TurbineInfoDay::getStationId, tid -> tid.getTjMin() / 60, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsYCz, fillMapY27, TurbineInfoDay::getStationId, tid -> tid.getTjMin() / 60, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsNCz, fillMapN27, TurbineInfoDay::getStationId, tid -> tid.getTjMin() / 60, eijMap, yesterday);
|
|
|
+ lineCalcHz(sidR, fillMapR28, StationInfoDay::getStationId, StationInfoDay::getQfxdl, eijMap, yesterday);
|
|
|
+ lineCalcHz(sidY, fillMapY28, StationInfoDay::getStationId, StationInfoDay::getQfxdl, eijMap, yesterday);
|
|
|
+ lineCalcHz(sidN, fillMapN28, StationInfoDay::getStationId, StationInfoDay::getQfxdl, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsRCz, fillMapR29, TurbineInfoDay::getStationId, tid -> tid.getXnss() / 1000, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsYCz, fillMapY29, TurbineInfoDay::getStationId, tid -> tid.getXnss() / 1000, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsNCz, fillMapN29, TurbineInfoDay::getStationId, tid -> tid.getXnss() / 1000, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsRCz, fillMapR30, TurbineInfoDay::getStationId, TurbineInfoDay::getXnss, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsYCz, fillMapY30, TurbineInfoDay::getStationId, TurbineInfoDay::getXnss, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsNCz, fillMapN30, TurbineInfoDay::getStationId, TurbineInfoDay::getXnss, eijMap, yesterday);
|
|
|
+ lineCalcHz2(sidR, fillMapR30, StationInfoDay::getStationId, sid -> Double.valueOf(sid.getRfdl()), eijMap, yesterday);
|
|
|
+ lineCalcHz2(sidY, fillMapY30, StationInfoDay::getStationId, sid -> Double.valueOf(sid.getRfdl()), eijMap, yesterday);
|
|
|
+ lineCalcHz2(sidN, fillMapN30, StationInfoDay::getStationId, sid -> Double.valueOf(sid.getRfdl()), eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsRCz, fillMapR31, TurbineInfoDay::getStationId, TurbineInfoDay::getBll, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsYCz, fillMapY31, TurbineInfoDay::getStationId, TurbineInfoDay::getBll, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsNCz, fillMapN31, TurbineInfoDay::getStationId, TurbineInfoDay::getBll, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsRCz, fillMapR32, TurbineInfoDay::getStationId, TurbineInfoDay::getYxfss, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsYCz, fillMapY32, TurbineInfoDay::getStationId, TurbineInfoDay::getYxfss, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsNCz, fillMapN32, TurbineInfoDay::getStationId, TurbineInfoDay::getYxfss, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsRCz, fillMapR33, TurbineInfoDay::getStationId, tid -> tid.getYxMin() / 60, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsYCz, fillMapY33, TurbineInfoDay::getStationId, tid -> tid.getYxMin() / 60, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsNCz, fillMapN33, TurbineInfoDay::getStationId, tid -> tid.getYxMin() / 60, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsRCz, fillMapR34, TurbineInfoDay::getStationId, tid -> 0d, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsYCz, fillMapY34, TurbineInfoDay::getStationId, tid -> 0d, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsNCz, fillMapN34, TurbineInfoDay::getStationId, tid -> 0d, eijMap, yesterday);
|
|
|
+ //风能利用率
|
|
|
+ lineCalcHz(tidsRCz, fillMapR18, TurbineInfoDay::getStationId, TurbineInfoDay::getFnlyl, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsYCz, fillMapY18, TurbineInfoDay::getStationId, TurbineInfoDay::getFnlyl, eijMap, yesterday);
|
|
|
+ lineCalcHz(tidsNCz, fillMapN18, TurbineInfoDay::getStationId, TurbineInfoDay::getFnlyl, eijMap, yesterday);
|
|
|
//发电量日
|
|
|
lineCalcHz(midsRMt, fillMapFdlR, MeterInfoDay::getMeterId, MeterInfoDay::getFdl, eijMap, yesterday);
|
|
|
lineCalcHz(sidR, fillMapFdlR2, StationInfoDay::getStationId, StationInfoDay::getRfdlFj, eijMap, yesterday);
|
|
|
- lineCalcHz(sidR, fillMapFdlR, StationInfoDay::getStationId, sid-> Double.valueOf(sid.getRfdl()), eijMap, yesterday);
|
|
|
- lineCalcHz(lidsRXl, fillMapFdlR, LineInfoDay::getLineId, lid-> Double.valueOf(lid.getRfdl()), eijMap, yesterday);
|
|
|
+ lineCalcHz(sidR, fillMapFdlR, StationInfoDay::getStationId, sid -> Double.valueOf(sid.getRfdl()), eijMap, yesterday);
|
|
|
+ lineCalcHz(lidsRXl, fillMapFdlR, LineInfoDay::getLineId, lid -> Double.valueOf(lid.getRfdl()), eijMap, yesterday);
|
|
|
lineCalcHz(tidsRXl, fillMapFdlR2, TurbineInfoDay::getLineId, TurbineInfoDay::getRfdl, eijMap, yesterday);
|
|
|
+ lineCalcHz(lidsRCz, fillMapR03, LineInfoDay::getStationId, LineInfoDay::getGwdl, eijMap, yesterday);
|
|
|
+ lineCalcHz(lidsRCz, fillMapR02, LineInfoDay::getStationId, LineInfoDay::getSwdl, eijMap, yesterday);
|
|
|
//发电量月
|
|
|
lineCalcHz(midsYMt, fillMapFdlY, MeterInfoDay::getMeterId, MeterInfoDay::getFdl, eijMap, yesterday);
|
|
|
lineCalcHz(sidY, fillMapFdlY2, StationInfoDay::getStationId, StationInfoDay::getRfdlFj, eijMap, yesterday);
|
|
|
- lineCalcHz(sidY, fillMapFdlY, StationInfoDay::getStationId, sid-> Double.valueOf(sid.getRfdl()), eijMap, yesterday);
|
|
|
- lineCalcHz(lidsYXl, fillMapFdlY, LineInfoDay::getLineId, lid-> Double.valueOf(lid.getRfdl()), eijMap, yesterday);
|
|
|
+ lineCalcHz(sidY, fillMapFdlY, StationInfoDay::getStationId, sid -> Double.valueOf(sid.getRfdl()), eijMap, yesterday);
|
|
|
+ lineCalcHz(lidsYXl, fillMapFdlY, LineInfoDay::getLineId, lid -> Double.valueOf(lid.getRfdl()), eijMap, yesterday);
|
|
|
lineCalcHz(tidsYXl, fillMapFdlY2, TurbineInfoDay::getLineId, TurbineInfoDay::getRfdl, eijMap, yesterday);
|
|
|
//发电量年
|
|
|
lineCalcHz(sidN, fillMapFdlN2, StationInfoDay::getStationId, StationInfoDay::getRfdlFj, eijMap, yesterday);
|
|
|
- lineCalcHz(sidN, fillMapFdlN, StationInfoDay::getStationId, sid-> Double.valueOf(sid.getRfdl()), eijMap, yesterday);
|
|
|
+ lineCalcHz(sidN, fillMapFdlN, StationInfoDay::getStationId, sid -> Double.valueOf(sid.getRfdl()), eijMap, yesterday);
|
|
|
//耗电量日
|
|
|
lineCalcHz(midsRMt, fillMapR17, MeterInfoDay::getMeterId, MeterInfoDay::getHdl, eijMap, yesterday);
|
|
|
lineCalcHz(lidsRXl, fillMapR17, LineInfoDay::getLineId, LineInfoDay::getHdl, eijMap, yesterday);
|
|
@@ -7115,7 +7333,7 @@ public class JavaFunctionJobHandler extends IJobHandler {
|
|
|
lineCalcHz(tidsNCz, fillMapN15, TurbineInfoDay::getStationId, TurbineInfoDay::getXdss, eijMap, yesterday);
|
|
|
lineCalcHz(tidsNCz, fillMapN16, TurbineInfoDay::getStationId, TurbineInfoDay::getXdss, eijMap, yesterday);
|
|
|
lineCalcHz2(lidsNCz, fillMapN16, LineInfoDay::getStationId, lid -> Double.valueOf(lid.getRfdl()), eijMap, yesterday);
|
|
|
-
|
|
|
+ proEconEquipmentInfoJsService.saveOrUpdateBatch(eijMap.values());
|
|
|
}
|
|
|
|
|
|
public <T> void lineCalcHz(List<T> items, Map<String, ProBaseBackfill> fillMap, Function<T, String> type, Function<T, Double> algorithm, Map<String, ProEconEquipmentInfoJs> eijMap, DateTime yesterday) {
|
|
@@ -7134,7 +7352,15 @@ public class JavaFunctionJobHandler extends IJobHandler {
|
|
|
ProBaseBackfill fill = fillMap.get(id);
|
|
|
if (fill == null) continue;
|
|
|
ProEconEquipmentInfoJs js = getPeeijs(fill, eijMap, yesterday);
|
|
|
- js.setStopCode(js.getStopCode() / algorithm.apply(item));
|
|
|
+ double apply = algorithm.apply(item);
|
|
|
+ double v;
|
|
|
+ if (apply == 0) {
|
|
|
+ v = 100d;
|
|
|
+ } else {
|
|
|
+ v = js.getStopCode() / apply * 100;
|
|
|
+ if (v > 100) v = 100d;
|
|
|
+ }
|
|
|
+ js.setStopCode(v);
|
|
|
}
|
|
|
}
|
|
|
|