|
@@ -1,60 +1,345 @@
|
|
|
package com.gyee.power.fitting.service.custom.fiveloss;
|
|
|
|
|
|
-
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.gyee.power.fitting.common.constants.Constants;
|
|
|
+import com.gyee.power.fitting.common.feign.RemoteServiceBuilder;
|
|
|
import com.gyee.power.fitting.common.spring.InitialRunner;
|
|
|
+import com.gyee.power.fitting.common.util.CollectUtil;
|
|
|
import com.gyee.power.fitting.common.util.DateUtil;
|
|
|
import com.gyee.power.fitting.common.util.FileUtil;
|
|
|
import com.gyee.power.fitting.model.*;
|
|
|
+import com.gyee.power.fitting.model.anno.AnnotationTool;
|
|
|
+import com.gyee.power.fitting.model.anno.FixedVo;
|
|
|
+import com.gyee.power.fitting.model.custom.FjjxbVo;
|
|
|
+import com.gyee.power.fitting.model.custom.PowerPointData;
|
|
|
+import com.gyee.power.fitting.model.custom.TableTitle;
|
|
|
+import com.gyee.power.fitting.model.custom.TsDoubleData;
|
|
|
import com.gyee.power.fitting.service.PowerfittinganalysisService;
|
|
|
-import lombok.val;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import com.gyee.power.fitting.service.PowerlossinfoService;
|
|
|
+import com.gyee.power.fitting.service.Windturbinetestingpointai2Service;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.scheduling.annotation.Async;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.math.BigDecimal;
|
|
|
+import java.math.RoundingMode;
|
|
|
+import java.util.*;
|
|
|
+import java.util.concurrent.atomic.AtomicReference;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
+@Slf4j
|
|
|
@Service
|
|
|
public class FiveLossService {
|
|
|
|
|
|
@Resource
|
|
|
private PowerfittinganalysisService analysisService;
|
|
|
+ @Resource
|
|
|
+ private PowerlossinfoService lossInfoService;
|
|
|
+ @Resource
|
|
|
+ private RemoteServiceBuilder remoteService;
|
|
|
|
|
|
-// @Autowired
|
|
|
-// private
|
|
|
-//
|
|
|
-// public void fiveLoss(List<String> ids){
|
|
|
-//
|
|
|
-// }
|
|
|
+ /**
|
|
|
+ * 五项损失
|
|
|
+ *
|
|
|
+ * @param station 场站
|
|
|
+ * @param project 期次
|
|
|
+ * @param line 线路
|
|
|
+ * @param type 1:场站 2:期次 3:线路
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<String, Object> fiveLoss(String station, List<String> project, List<String> line, Date st, Date et, String type) {
|
|
|
+ Map<String, Object> promise = new HashMap<>();
|
|
|
+ Map<String, String> stationMap = InitialRunner.stationMap;
|
|
|
+ Map<String, Windturbine> wtMap = InitialRunner.wtMap;
|
|
|
+ Map<String, Project> pMap = InitialRunner.projectMap;
|
|
|
+ Map<String, Line> lMap = InitialRunner.lineMap;
|
|
|
|
|
|
+ List<Powerlossinfo> list = lossInfoService.selectList(station, project, line, st, et);
|
|
|
+ if (list == null || list.size() == 0)
|
|
|
+ return promise;
|
|
|
|
|
|
- //明细状态
|
|
|
- // 0-待机 1-手动停机 2-正常发电 3-缺陷降出力 4-限电降出力 5-限电停机 6-故障停机
|
|
|
- // 7-场内受累停机 8-检修停机 9-场内受累检修 10-电网受累 11-环境受累 12-风机离线
|
|
|
- @Transactional
|
|
|
- public void fiveLossCal(){
|
|
|
- Date currentDate = DateUtil.getNowDate();
|
|
|
- Date date = DateUtil.addSeconds(currentDate, -1);
|
|
|
- Date date15age = DateUtil.addMinutes(currentDate, -15);
|
|
|
+ Map<String, List<Powerlossinfo>> collect = null;
|
|
|
+ if (type.equals("1"))
|
|
|
+ collect = list.stream().collect(Collectors.groupingBy(Powerlossinfo::getStationid));
|
|
|
+ else if (type.equals("2"))
|
|
|
+ collect = list.stream().collect(Collectors.groupingBy(Powerlossinfo::getProjectid));
|
|
|
+ else if (type.equals("3"))
|
|
|
+ collect = list.stream().collect(Collectors.groupingBy(Powerlossinfo::getLineid));
|
|
|
+ else if (line.size() > 0)
|
|
|
+ collect = list.stream().collect(Collectors.groupingBy(Powerlossinfo::getLineid));
|
|
|
+ else if (project.size() > 0)
|
|
|
+ collect = list.stream().collect(Collectors.groupingBy(Powerlossinfo::getProjectid));
|
|
|
+ else
|
|
|
+ collect = list.stream().collect(Collectors.groupingBy(Powerlossinfo::getWindturbineid));
|
|
|
+
|
|
|
+ List<FjjxbVo> result = collect.entrySet()
|
|
|
+ .stream()
|
|
|
+ .map(entry -> {
|
|
|
+ String key = entry.getKey();
|
|
|
+ List<Powerlossinfo> value = entry.getValue();
|
|
|
+ FjjxbVo vo = new FjjxbVo().toData(value);
|
|
|
+ vo.setId(key);
|
|
|
+ if (type.equals("1"))
|
|
|
+ vo.setName(stationMap.get(key));
|
|
|
+ else if (type.equals("2"))
|
|
|
+ vo.setName(pMap.get(key).getName());
|
|
|
+ else if (type.equals("3"))
|
|
|
+ vo.setName(lMap.get(key).getName());
|
|
|
+ else if (line.size() > 0)
|
|
|
+ vo.setName(lMap.get(key).getName());
|
|
|
+ else if (project.size() > 0)
|
|
|
+ vo.setName(pMap.get(key).getName());
|
|
|
+ else
|
|
|
+ vo.setName(wtMap.get(key).getName());
|
|
|
+ return vo;
|
|
|
+ }).sorted(Comparator.comparing(FjjxbVo::getId)).collect(Collectors.toList());
|
|
|
|
|
|
- List<Windpowerstation> wpls = InitialRunner.wpList;
|
|
|
- List<Windturbine> wtls = InitialRunner.wtList;
|
|
|
- List<Project> pjls = InitialRunner.projectList;
|
|
|
- List<Line> lnls = InitialRunner.lineList;
|
|
|
+ /** 添加标题 **/
|
|
|
+ List<FixedVo> fxList = AnnotationTool.getFixedVoList(FjjxbVo.class);
|
|
|
+ List<TableTitle> lt = fxList.stream().map(d -> new TableTitle(d.getName(), d.getDes())).collect(Collectors.toList());
|
|
|
|
|
|
+ promise.put("title", lt);
|
|
|
+ promise.put("data", result);
|
|
|
+
|
|
|
+ return promise;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /** 根据已缓存的文件计算损失电量
|
|
|
+ * 明细状态
|
|
|
+ * 0-待机 1-手动停机 2-正常发电 3-缺陷降出力 4-限电降出力 5-限电停机 6-故障停机
|
|
|
+ * 7-场内受累停机 8-检修停机 9-场内受累检修 10-电网受累 11-环境受累 12-风机离线
|
|
|
+ */
|
|
|
+ @Async
|
|
|
+ @Transactional
|
|
|
+ public void fiveLossCal() {
|
|
|
+ log.info("======风机绩效榜计算开始.............");
|
|
|
Map<String, Windturbine> wtmap = InitialRunner.wtMap;
|
|
|
- List<Powerfittinganalysis> analyses = analysisService.selectListByIsCal(1);
|
|
|
+ Map<String, List<Modelpowerdetails>> modelmap = InitialRunner.modelPowerDetailMap;
|
|
|
|
|
|
- wtls.forEach(item -> {
|
|
|
- Windturbine wt = wtmap.get(item.getId());
|
|
|
- List<Powerfittinganalysis> collect = analyses.stream().filter(f -> f.getWindturbine().equals(wt.getId())).collect(Collectors.toList());
|
|
|
- collect.forEach(p -> {
|
|
|
- List<String> content = FileUtil.readFile(p.getPath(), true);
|
|
|
+ List<Powerfittinganalysis> analyses = analysisService.selectListByIsCal(Constants.DATA_PREPARE, 0);
|
|
|
+ if (analyses.size() == 0)
|
|
|
+ return;
|
|
|
+
|
|
|
+ for (Powerfittinganalysis p : analyses) {
|
|
|
+ List<Powerlossinfo> result = new ArrayList<>();
|
|
|
+ Windturbine wt = wtmap.get(p.getWindturbine());
|
|
|
+ List<String> content = FileUtil.readFile(p.getPath(), true);
|
|
|
+ if (content.size() == 0)
|
|
|
+ continue;
|
|
|
+
|
|
|
+ log.info("======风机绩效榜计算:" + p.getWindturbine());
|
|
|
+ content.remove(0); //去掉标题栏
|
|
|
+ int count = 86400 / p.getInterp(); //一天86400s 一天的条数
|
|
|
+ List<List<String>> coll = CollectUtil.groupListByQty(content, count);
|
|
|
+ coll.forEach(ls -> {
|
|
|
+ double rfdl = 0; //日发电量
|
|
|
+ double gzssdl = 0;//故障损失电量
|
|
|
+ double jhjxssdl = 0;//计划检修损失电量
|
|
|
+ double fjhjxssdl = 0;//非计划检修电量
|
|
|
+ double xdssdl = 0;//限电损失电量
|
|
|
+ double slssdl = 0;//受累损失电量
|
|
|
+ double xnssdl = 0;//性能损失电量
|
|
|
+
|
|
|
+ List<PowerPointData> pdl = ls.stream().map(mp -> new PowerPointData(mp.split(","), false)).collect(Collectors.toList());
|
|
|
+ double zcfd = generalLoss(pdl, modelmap.get(wt.getModelid()), p.getInterp(), 2); //正常发电
|
|
|
+ xdssdl = generalLoss(pdl, modelmap.get(wt.getModelid()), p.getInterp(), 5); //限电损失电量
|
|
|
+ double qxjcl = generalLoss(pdl, modelmap.get(wt.getModelid()), p.getInterp(), 3); //缺陷降出力损失电量
|
|
|
+ double xdjcl = generalLoss(pdl, modelmap.get(wt.getModelid()), p.getInterp(), 4); //限电降出力损失电量
|
|
|
+ double cnsltj = generalLoss(pdl, modelmap.get(wt.getModelid()), p.getInterp(), 7); //场内受累停机损失电量
|
|
|
+ double cnsljx = generalLoss(pdl, modelmap.get(wt.getModelid()), p.getInterp(), 9); //场内受累检修损失电量
|
|
|
+ double dwsl = generalLoss(pdl, modelmap.get(wt.getModelid()), p.getInterp(), 10); //电网受累损失电量
|
|
|
+ double hjsl = generalLoss(pdl, modelmap.get(wt.getModelid()), p.getInterp(), 11); //环境受累损失电量
|
|
|
+
|
|
|
+ gzssdl = generalLoss(pdl, modelmap.get(wt.getModelid()), p.getInterp(), 6);
|
|
|
+ jhjxssdl = generalLoss(pdl, modelmap.get(wt.getModelid()), p.getInterp(), 8);
|
|
|
+ fjhjxssdl = gzssdl;
|
|
|
+ xdssdl = xdssdl + xdjcl;
|
|
|
+ slssdl = cnsltj + dwsl + hjsl + cnsljx + cnsljx;
|
|
|
+ xnssdl = qxjcl + zcfd;
|
|
|
+ rfdl = pdl.get(pdl.size() - 1).getDl();
|
|
|
+ double llgdl = rfdl + gzssdl + jhjxssdl + fjhjxssdl + xdssdl + slssdl + xnssdl;
|
|
|
+
|
|
|
+ Powerlossinfo loss = new Powerlossinfo();
|
|
|
+ loss.setLineid(wt.getLineid());
|
|
|
+ loss.setProjectid(wt.getProjectid());
|
|
|
+ loss.setRecorddate(DateUtil.parseStrtoDate(pdl.get(0).getTime(), DateUtil.DATE_PATTERN));
|
|
|
+ loss.setStationid(wt.getWindpowerstationid());
|
|
|
+ loss.setWindturbineid(wt.getId());
|
|
|
+ loss.setGenecapacity(rfdl);
|
|
|
+ loss.setTherogenecapacity(llgdl);
|
|
|
+ loss.setDayjhjxssdl(jhjxssdl);
|
|
|
+ loss.setDayfjhjxssdl(fjhjxssdl);
|
|
|
+ loss.setDaygzssdl(gzssdl);
|
|
|
+ loss.setDayxdssdl(xdssdl);
|
|
|
+ loss.setDayxnssdl(xnssdl);
|
|
|
+ loss.setDayslssdl(slssdl);
|
|
|
+ loss.setSpeed(pdl.stream().mapToDouble(PowerPointData::getSpeed).average().getAsDouble());
|
|
|
+ result.add(loss);
|
|
|
});
|
|
|
+
|
|
|
+ //保存之前删除已有的五损数据
|
|
|
+ lossInfoService.deleteBatch(wt.getId(), result.stream().map(m -> m.getRecorddate()).collect(Collectors.toList()));
|
|
|
+ lossInfoService.insertBatch(result);
|
|
|
+ }
|
|
|
+ //更新已经计算过的文件数据
|
|
|
+ analyses.forEach((entity) -> entity.setIscal(1));
|
|
|
+ analysisService.updateBatchById(analyses);
|
|
|
+ log.info("======风机榜效帮计算结束.............");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 损失电量计算 eg: 1.5MW 一小时发电:1500kWh 一分钟发电:1500/60 == 25kW
|
|
|
+ *
|
|
|
+ * @param ztmxData 状态明细
|
|
|
+ * @param zsglData 设备的理论功率
|
|
|
+ * @param interval 原始数据的间隔
|
|
|
+ * @param status 风机当前状态
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ private double generalLoss(List<PowerPointData> ztmxData, List<Modelpowerdetails> zsglData, int interval, double status) {
|
|
|
+ double ssdl = 0.0;
|
|
|
+ List<PowerPointData> pointData = ztmxData.stream().filter(zt -> zt.getMxzt() == status).collect(Collectors.toList());
|
|
|
+ List<Modelpowerdetails> theoryData = zsglData.stream().filter(f -> f.getTheorypower() > 0).collect(Collectors.toList());
|
|
|
+ if (status == 2.0 || status == 3.0 || status == 4.0 || status == 9.0 || status == 10.0 || status == 11.0) {
|
|
|
+ for (PowerPointData obj : pointData) {
|
|
|
+ for (int i = 0; i < theoryData.size(); i++) {
|
|
|
+ if (String.format("%.2f", obj.getSpeed()).equals(String.format("%.2f", theoryData.get(i).getSpeed()))) {
|
|
|
+ double zsgl = theoryData.get(i).getTheorypower();
|
|
|
+ double power = obj.getPower();
|
|
|
+ double temp = (zsgl - power) > 0 ? zsgl - power : 0;
|
|
|
+ ssdl = ssdl + (temp / 60) * (interval / 60);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ for (PowerPointData obj : pointData) {
|
|
|
+ for (int i = 0; i < theoryData.size(); i++) {
|
|
|
+ if (String.format("%.2f", obj.getSpeed()).equals(String.format("%.2f", theoryData.get(i).getSpeed()))) {
|
|
|
+ double zsgl = theoryData.get(i).getTheorypower();
|
|
|
+ ssdl = ssdl + (zsgl / 60) * (interval / 60);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return ssdl > 0 ? ssdl : 0;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 通过线上实时计算五损数据
|
|
|
+ * @param st 开始时间
|
|
|
+ * @param et 结束时间
|
|
|
+ * @param interval 等间隔时间
|
|
|
+ */
|
|
|
+ @Async
|
|
|
+ @Transactional
|
|
|
+ public void fiveLossCalByLine(long st, long et, int interval){
|
|
|
+ List<Windpowerstation> wpList = InitialRunner.wpList;
|
|
|
+ Map<String, Windturbine> wtmap = InitialRunner.wtMap;
|
|
|
+ Map<String, List<Windturbinetestingpointai2>> pointMap = InitialRunner.pointMap;
|
|
|
+ Map<String, List<Modelpowerdetails>> modelmap = InitialRunner.modelPowerDetailMap;
|
|
|
+
|
|
|
+ List<Powerlossinfo> result = new ArrayList<>();
|
|
|
+ pointMap.forEach((k, v) -> {
|
|
|
+ Windturbine wt = wtmap.get(k);
|
|
|
+ String speed = v.stream().filter(f -> f.getUniformcode().equals(Constants.CODE_POINT_SPEED)).findFirst().get().getId();
|
|
|
+ String power = v.stream().filter(f -> f.getUniformcode().equals(Constants.CODE_POINT_POWER)).findFirst().get().getId();
|
|
|
+ String fdl = v.stream().filter(f -> f.getUniformcode().equals(Constants.CODE_POINT_RFDL)).findFirst().get().getId();
|
|
|
+ String status = v.stream().filter(f -> f.getUniformcode().equals(Constants.CODE_POINT_MXZT)).findFirst().get().getId();
|
|
|
+
|
|
|
+ List<TsDoubleData> speedLS = remoteService.adapter().getHistorySnap(speed, st, et, interval);
|
|
|
+ List<TsDoubleData> powerLS = remoteService.adapter().getHistorySnap(power, st, et, interval);
|
|
|
+ JSONObject rfdlObj = remoteService.adapter().getHistorySection(fdl, et);
|
|
|
+ List<TsDoubleData> statusLS = remoteService.adapter().getHistorySnap(status, st, et, interval);
|
|
|
+
|
|
|
+ double rfdl = 0; //日发电量
|
|
|
+ double gzssdl = 0;//故障损失电量
|
|
|
+ double jhjxssdl = 0;//计划检修损失电量
|
|
|
+ double fjhjxssdl = 0;//非计划检修电量
|
|
|
+ double xdssdl = 0;//限电损失电量
|
|
|
+ double slssdl = 0;//受累损失电量
|
|
|
+ double xnssdl = 0;//性能损失电量
|
|
|
+
|
|
|
+ double zcfd = generalLossLine(statusLS, speedLS, powerLS, modelmap.get(wt.getModelid()), interval, 2); //正常发电
|
|
|
+ xdssdl = generalLossLine(statusLS, speedLS, powerLS, modelmap.get(wt.getModelid()), interval, 5); //限电损失电量
|
|
|
+ double qxjcl = generalLossLine(statusLS, speedLS, powerLS, modelmap.get(wt.getModelid()),interval, 3); //缺陷降出力损失电量
|
|
|
+ double xdjcl = generalLossLine(statusLS, speedLS, powerLS, modelmap.get(wt.getModelid()), interval, 4); //限电降出力损失电量
|
|
|
+ double cnsltj = generalLossLine(statusLS, speedLS, powerLS, modelmap.get(wt.getModelid()), interval, 7); //场内受累停机损失电量
|
|
|
+ double cnsljx = generalLossLine(statusLS, speedLS, powerLS, modelmap.get(wt.getModelid()), interval, 9); //场内受累检修损失电量
|
|
|
+ double dwsl = generalLossLine(statusLS, speedLS, powerLS, modelmap.get(wt.getModelid()), interval, 10); //电网受累损失电量
|
|
|
+ double hjsl = generalLossLine(statusLS, speedLS, powerLS, modelmap.get(wt.getModelid()), interval, 11); //环境受累损失电量
|
|
|
+
|
|
|
+ gzssdl = generalLossLine(statusLS, speedLS, powerLS, modelmap.get(wt.getModelid()), interval, 6);
|
|
|
+ jhjxssdl = generalLossLine(statusLS, speedLS, powerLS, modelmap.get(wt.getModelid()), interval, 8);
|
|
|
+ fjhjxssdl = gzssdl;
|
|
|
+ xdssdl = xdssdl + xdjcl;
|
|
|
+ slssdl = cnsltj + dwsl + hjsl + cnsljx + cnsljx;
|
|
|
+ xnssdl = qxjcl + zcfd;
|
|
|
+ rfdl = rfdlObj.getJSONObject(fdl).getDoubleValue("doubleValue");
|
|
|
+
|
|
|
+ double llgdl = rfdl + gzssdl + jhjxssdl + fjhjxssdl + xdssdl + slssdl + xnssdl;
|
|
|
+
|
|
|
+ Powerlossinfo loss = new Powerlossinfo();
|
|
|
+ loss.setLineid(wt.getLineid());
|
|
|
+ loss.setProjectid(wt.getProjectid());
|
|
|
+ loss.setRecorddate(DateUtil.parseStrtoDate(DateUtil.format(st, DateUtil.DATE_PATTERN), DateUtil.DATE_PATTERN));
|
|
|
+ loss.setStationid(wt.getWindpowerstationid());
|
|
|
+ loss.setWindturbineid(wt.getId());
|
|
|
+ loss.setGenecapacity(rfdl);
|
|
|
+ loss.setTherogenecapacity(llgdl);
|
|
|
+ loss.setDayjhjxssdl(jhjxssdl);
|
|
|
+ loss.setDayfjhjxssdl(fjhjxssdl);
|
|
|
+ loss.setDaygzssdl(gzssdl);
|
|
|
+ loss.setDayxdssdl(xdssdl);
|
|
|
+ loss.setDayxnssdl(xnssdl);
|
|
|
+ loss.setDayslssdl(slssdl);
|
|
|
+ loss.setSpeed(speedLS.stream().mapToDouble(TsDoubleData::getDoubleValue).average().getAsDouble());
|
|
|
+ result.add(loss);
|
|
|
+
|
|
|
+ //保存之前删除已有的五损数据
|
|
|
+ lossInfoService.deleteByWtIdAndDate(wt.getId(), loss.getRecorddate());
|
|
|
});
|
|
|
+
|
|
|
+ lossInfoService.insertBatch(result);
|
|
|
+ }
|
|
|
+
|
|
|
+ private double generalLossLine(List<TsDoubleData> ztmxData, List<TsDoubleData> speedData, List<TsDoubleData> powerData, List<Modelpowerdetails> zsglData, int interval, double status) {
|
|
|
+ double ssdl = 0.0;
|
|
|
+ List<Modelpowerdetails> theoryData = zsglData.stream().filter(f -> f.getTheorypower() > 0).collect(Collectors.toList());
|
|
|
+ if (ztmxData.size() == powerData.size()){
|
|
|
+ if (status == 2.0 || status == 3.0 || status == 4.0 || status == 9.0 || status == 10.0 || status == 11.0) {
|
|
|
+ for (int i = 0; i < ztmxData.size(); i++) {
|
|
|
+ for (int j = 0; j < theoryData.size(); j++) {
|
|
|
+ if (String.format("%.2f", speedData.get(i).getDoubleValue()).equals(String.format("%.2f", theoryData.get(j).getSpeed()))) {
|
|
|
+ double zsgl = theoryData.get(j).getTheorypower();
|
|
|
+ double power = powerData.get(i).getDoubleValue();
|
|
|
+ double temp = (zsgl - power) > 0 ? zsgl - power : 0;
|
|
|
+ ssdl = ssdl + (temp / 60) * (interval / 60);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ for (int i = 0; i < ztmxData.size(); i++) {
|
|
|
+ for (int j = 0; j < theoryData.size(); j++) {
|
|
|
+ if (String.format("%.2f", speedData.get(i).getDoubleValue()).equals(String.format("%.2f", theoryData.get(j).getSpeed()))) {
|
|
|
+ double zsgl = theoryData.get(j).getTheorypower();
|
|
|
+ ssdl = ssdl + (zsgl / 60) * (interval / 60);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return ssdl > 0 ? ssdl : 0;
|
|
|
}
|
|
|
}
|