|
@@ -15,12 +15,9 @@ 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 com.gyee.power.fitting.service.ProEconPowerFittingAnalySisService;
|
|
|
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.math.BigDecimal;
|
|
@@ -34,7 +31,7 @@ import java.util.stream.Collectors;
|
|
|
public class FiveLossService {
|
|
|
|
|
|
@Resource
|
|
|
- private PowerfittinganalysisService analysisService;
|
|
|
+ private ProEconPowerFittingAnalySisService analysisService;
|
|
|
|
|
|
@Resource
|
|
|
private RemoteServiceBuilder remoteService;
|
|
@@ -92,19 +89,19 @@ public class FiveLossService {
|
|
|
List<FjjxbVo> result = new ArrayList<>();
|
|
|
Map<String, Map<Double, Double>> zsglmap = InitialRunner.zsllglNewMap;
|
|
|
|
|
|
- List<Powerfittinganalysis> analyses = analysisService.selectListByIds(ids);
|
|
|
+ List<ProEconPowerFittingAnalySis> analyses = analysisService.selectListByIds(ids);
|
|
|
if (analyses.size() == 0){
|
|
|
log.info("======风机榜效帮计算结束,数据为空.............");
|
|
|
throw new CustomException(ResultCode.ERROR);
|
|
|
}
|
|
|
|
|
|
- for (Powerfittinganalysis p : analyses) {
|
|
|
+ for (ProEconPowerFittingAnalySis p : analyses) {
|
|
|
List<String> content = FileUtil.readFile(p.getPath(), true);
|
|
|
- if (content.size() == 0 || zsglmap.size() == 0 || zsglmap.get(p.getWindturbine()) == null){
|
|
|
- log.info("======风机榜效帮计算结束," + p.getWindturbine() + "文件内容或当前风机的自算功率为空.............");
|
|
|
+ if (content.size() == 0 || zsglmap.size() == 0 || zsglmap.get(p.getWindturbineId()) == null){
|
|
|
+ log.info("======风机榜效帮计算结束," + p.getWindturbineId() + "文件内容或当前风机的自算功率为空.............");
|
|
|
continue;
|
|
|
}
|
|
|
- log.info("======风机绩效榜计算:" + p.getWindturbine());
|
|
|
+ log.info("======风机绩效榜计算:" + p.getWindturbineId());
|
|
|
double llfdl = 0.0;
|
|
|
double rfdl = 0.0;
|
|
|
double jhjxssdl = 0.0;
|
|
@@ -118,19 +115,19 @@ public class FiveLossService {
|
|
|
List<List<String>> coll = CollectUtil.groupListByQty(content, count);
|
|
|
for (List<String> ls : coll) {
|
|
|
List<PowerPointData> pdl = ls.stream().map(mp -> new PowerPointData(mp.split(","), false)).collect(Collectors.toList());
|
|
|
- double lldl = generalLoss(pdl, zsglmap.get(p.getWindturbine()), p.getInterp(), -1);
|
|
|
- double dj = generalLoss(pdl, zsglmap.get(p.getWindturbine()), p.getInterp(), 0);
|
|
|
- double sdtj = generalLoss(pdl, zsglmap.get(p.getWindturbine()), p.getInterp(), 1);
|
|
|
- double zcfd = generalLoss(pdl, zsglmap.get(p.getWindturbine()), p.getInterp(), 2);
|
|
|
- double xdss = generalLoss(pdl, zsglmap.get(p.getWindturbine()), p.getInterp(), 5);
|
|
|
- double qxjcl = generalLoss(pdl, zsglmap.get(p.getWindturbine()), p.getInterp(), 3);
|
|
|
- double xdjcl = generalLoss(pdl, zsglmap.get(p.getWindturbine()), p.getInterp(), 4);
|
|
|
- double cnsltj = generalLoss(pdl, zsglmap.get(p.getWindturbine()), p.getInterp(), 7);
|
|
|
- double cnsljx = generalLoss(pdl, zsglmap.get(p.getWindturbine()), p.getInterp(), 9);
|
|
|
- double dwsl = generalLoss(pdl, zsglmap.get(p.getWindturbine()), p.getInterp(), 10);
|
|
|
- double hjsl = generalLoss(pdl, zsglmap.get(p.getWindturbine()), p.getInterp(), 11);
|
|
|
- double gzss = generalLoss(pdl, zsglmap.get(p.getWindturbine()), p.getInterp(), 6);
|
|
|
- double tjjx = generalLoss(pdl, zsglmap.get(p.getWindturbine()), p.getInterp(), 8);
|
|
|
+ double lldl = generalLoss(pdl, zsglmap.get(p.getWindturbineId()), p.getInterp(), -1);
|
|
|
+ double dj = generalLoss(pdl, zsglmap.get(p.getWindturbineId()), p.getInterp(), 0);
|
|
|
+ double sdtj = generalLoss(pdl, zsglmap.get(p.getWindturbineId()), p.getInterp(), 1);
|
|
|
+ double zcfd = generalLoss(pdl, zsglmap.get(p.getWindturbineId()), p.getInterp(), 2);
|
|
|
+ double xdss = generalLoss(pdl, zsglmap.get(p.getWindturbineId()), p.getInterp(), 5);
|
|
|
+ double qxjcl = generalLoss(pdl, zsglmap.get(p.getWindturbineId()), p.getInterp(), 3);
|
|
|
+ double xdjcl = generalLoss(pdl, zsglmap.get(p.getWindturbineId()), p.getInterp(), 4);
|
|
|
+ double cnsltj = generalLoss(pdl, zsglmap.get(p.getWindturbineId()), p.getInterp(), 7);
|
|
|
+ double cnsljx = generalLoss(pdl, zsglmap.get(p.getWindturbineId()), p.getInterp(), 9);
|
|
|
+ double dwsl = generalLoss(pdl, zsglmap.get(p.getWindturbineId()), p.getInterp(), 10);
|
|
|
+ double hjsl = generalLoss(pdl, zsglmap.get(p.getWindturbineId()), p.getInterp(), 11);
|
|
|
+ double gzss = generalLoss(pdl, zsglmap.get(p.getWindturbineId()), p.getInterp(), 6);
|
|
|
+ double tjjx = generalLoss(pdl, zsglmap.get(p.getWindturbineId()), p.getInterp(), 8);
|
|
|
|
|
|
llfdl += lldl;
|
|
|
jhjxssdl += (tjjx + cnsljx);
|
|
@@ -142,8 +139,8 @@ public class FiveLossService {
|
|
|
speed += pdl.stream().mapToDouble(PowerPointData::getSpeed).sum();
|
|
|
}
|
|
|
FjjxbVo vo = new FjjxbVo();
|
|
|
- vo.setId(p.getWindturbine());
|
|
|
- vo.setName(p.getWindturbine());
|
|
|
+ vo.setId(p.getWindturbineId());
|
|
|
+ vo.setName(p.getWindturbineId());
|
|
|
vo.setLlfdl(new BigDecimal(llfdl).setScale(2, RoundingMode.FLOOR).doubleValue());
|
|
|
vo.setSjfdl(new BigDecimal(rfdl).setScale(2, RoundingMode.FLOOR).doubleValue());
|
|
|
vo.setJhjx(new BigDecimal(jhjxssdl).setScale(2, RoundingMode.FLOOR).doubleValue());
|