|
@@ -64,6 +64,20 @@ public class ReportService {
|
|
|
private IReportdangerService reportdangerService;
|
|
|
@Resource
|
|
|
private IReportpowerpartweatherService reportpowerpartweatherService;
|
|
|
+ @Resource
|
|
|
+ private IHealthwtreport1Service healthwtreport1Service;
|
|
|
+ @Resource
|
|
|
+ private IHealthwtreport2Service healthwtreport2Service;
|
|
|
+ @Resource
|
|
|
+ private IHealthwtreport3Service healthwtreport3Service;
|
|
|
+ @Resource
|
|
|
+ private IHealthwtreport4Service healthwtreport4Service;
|
|
|
+ @Resource
|
|
|
+ private IHealthwtreport5Service healthwtreport5Service;
|
|
|
+ @Resource
|
|
|
+ private IHealthwtreport6Service healthwtreport6Service;
|
|
|
+ @Resource
|
|
|
+ private IHealthwtreport7Service healthwtreport7Service;
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -184,146 +198,225 @@ public class ReportService {
|
|
|
}
|
|
|
|
|
|
//曲线拟合及偏差率
|
|
|
- List<Curvefittingsub> curvefittingsubs = curvefittingsubService.listMonth(day,wt.getId());
|
|
|
- if (curvefittingsubs!=null && curvefittingsubs.size()>0){
|
|
|
- healthReportVo.setQxpcl(curvefittingsubs.stream().mapToDouble(Curvefittingsub::getDeviationrate2).average().getAsDouble());
|
|
|
- healthReportVo.setThreeqxpcl(curvefittingsubs.stream().filter(i->i.getSpeed()>=3 && i.getSpeed()<5).mapToDouble(Curvefittingsub::getDeviationrate2).average().getAsDouble());
|
|
|
- healthReportVo.setFiveqxpcl(curvefittingsubs.stream().filter(i->i.getSpeed()>=5 && i.getSpeed()<8).mapToDouble(Curvefittingsub::getDeviationrate2).average().getAsDouble());
|
|
|
- healthReportVo.setElevenqxpcl(curvefittingsubs.stream().filter(i->i.getSpeed()>=11 && i.getSpeed()<25).mapToDouble(Curvefittingsub::getDeviationrate2).average().getAsDouble());
|
|
|
- healthReportVo.setCompareqxpcl(curvefittingsubs.stream().filter(i->i.getSpeed()>=11 && i.getSpeed()<25).mapToDouble(Curvefittingsub::getStandarddeviationrate).average().getAsDouble());
|
|
|
-
|
|
|
+ Map<String,Object> queryMap = new HashMap<>();
|
|
|
+ queryMap.put("wtid",wt.getId());
|
|
|
+ List<Healthwtreport1> healthwtreport1s = healthwtreport1Service.listByMap(queryMap);
|
|
|
+ if (StringUtils.isNotEmpty(healthwtreport1s)){
|
|
|
+ Healthwtreport1 healthwtreport1 = healthwtreport1s.get(0);
|
|
|
+ healthReportVo.setQxpcl(healthwtreport1.getQxpcl());
|
|
|
+ healthReportVo.setThreeqxpcl(healthwtreport1.getThreeqxpcl());
|
|
|
+ healthReportVo.setFiveqxpcl(healthwtreport1.getFiveqxpcl());
|
|
|
+ healthReportVo.setElevenqxpcl(healthwtreport1.getElevenqxpcl());
|
|
|
+ healthReportVo.setCompareqxpclname(healthwtreport1.getCompareqxpclname());
|
|
|
+ healthReportVo.setCompareqxpcl(healthwtreport1.getCompareqxpcl());
|
|
|
}
|
|
|
+// List<Curvefittingsub> curvefittingsubs = curvefittingsubService.listMonth(day,wt.getId());
|
|
|
+// if (curvefittingsubs!=null && curvefittingsubs.size()>0){
|
|
|
+// healthReportVo.setQxpcl(curvefittingsubs.stream().mapToDouble(Curvefittingsub::getDeviationrate2).average().getAsDouble());
|
|
|
+// healthReportVo.setThreeqxpcl(curvefittingsubs.stream().filter(i->i.getSpeed()>=3 && i.getSpeed()<5).mapToDouble(Curvefittingsub::getDeviationrate2).average().getAsDouble());
|
|
|
+// healthReportVo.setFiveqxpcl(curvefittingsubs.stream().filter(i->i.getSpeed()>=5 && i.getSpeed()<8).mapToDouble(Curvefittingsub::getDeviationrate2).average().getAsDouble());
|
|
|
+// healthReportVo.setElevenqxpcl(curvefittingsubs.stream().filter(i->i.getSpeed()>=11 && i.getSpeed()<25).mapToDouble(Curvefittingsub::getDeviationrate2).average().getAsDouble());
|
|
|
+// healthReportVo.setCompareqxpcl(curvefittingsubs.stream().filter(i->i.getSpeed()>=11 && i.getSpeed()<25).mapToDouble(Curvefittingsub::getStandarddeviationrate).average().getAsDouble());
|
|
|
+//
|
|
|
+// }
|
|
|
//功率曲线拟合
|
|
|
- QueryWrapper<Reportpowerfitting> reportpowerfittingQueryWrapper = new QueryWrapper<>();
|
|
|
- reportpowerfittingQueryWrapper.eq("month",month);
|
|
|
- reportpowerfittingQueryWrapper.eq("year",year);
|
|
|
- reportpowerfittingQueryWrapper.eq("wtid",wt.getId());
|
|
|
- List<Reportpowerfitting> glqxnhlist = reportpowerfittingService.list(reportpowerfittingQueryWrapper);
|
|
|
-// List<Windturbinecurvefittingmonth> glqxnhlist = windturbinecurvefittingmonthService.glqxnhlist(wt.getId(),year,month);
|
|
|
- if (glqxnhlist!=null && glqxnhlist.size()>0){
|
|
|
+ List<Healthwtreport2> healthwtreport2s = healthwtreport2Service.listByMap(queryMap);
|
|
|
+ if (StringUtils.isNotEmpty(healthwtreport2s)){
|
|
|
List<NhglVo> list = new ArrayList<>();
|
|
|
- glqxnhlist.stream().forEach(i->{
|
|
|
+ healthwtreport2s.stream().forEach(i->{
|
|
|
NhglVo vo = new NhglVo();
|
|
|
vo.setSpeed(i.getSpeed());
|
|
|
-// vo.setNhgl(i.getActualpower());
|
|
|
-// vo.setBzgl(i.getOptimalpower());
|
|
|
vo.setNhgl(i.getNhgl());
|
|
|
vo.setBzgl(i.getBzgl());
|
|
|
list.add(vo);
|
|
|
});
|
|
|
SortUtils.sort(list,"speed",SortUtils.ASC);
|
|
|
healthReportVo.setNhglqxs(list);
|
|
|
+
|
|
|
}
|
|
|
+// QueryWrapper<Reportpowerfitting> reportpowerfittingQueryWrapper = new QueryWrapper<>();
|
|
|
+// reportpowerfittingQueryWrapper.eq("month",month);
|
|
|
+// reportpowerfittingQueryWrapper.eq("year",year);
|
|
|
+// reportpowerfittingQueryWrapper.eq("wtid",wt.getId());
|
|
|
+// List<Reportpowerfitting> glqxnhlist = reportpowerfittingService.list(reportpowerfittingQueryWrapper);
|
|
|
+//// List<Windturbinecurvefittingmonth> glqxnhlist = windturbinecurvefittingmonthService.glqxnhlist(wt.getId(),year,month);
|
|
|
+// if (glqxnhlist!=null && glqxnhlist.size()>0){
|
|
|
+// List<NhglVo> list = new ArrayList<>();
|
|
|
+// glqxnhlist.stream().forEach(i->{
|
|
|
+// NhglVo vo = new NhglVo();
|
|
|
+// vo.setSpeed(i.getSpeed());
|
|
|
+//// vo.setNhgl(i.getActualpower());
|
|
|
+//// vo.setBzgl(i.getOptimalpower());
|
|
|
+// vo.setNhgl(i.getNhgl());
|
|
|
+// vo.setBzgl(i.getBzgl());
|
|
|
+// list.add(vo);
|
|
|
+// });
|
|
|
+// SortUtils.sort(list,"speed",SortUtils.ASC);
|
|
|
+// healthReportVo.setNhglqxs(list);
|
|
|
+// }
|
|
|
|
|
|
//曲线偏差率
|
|
|
- QueryWrapper<Reportdeviation> reportdeviationQueryWrapper = new QueryWrapper<>();
|
|
|
- reportdeviationQueryWrapper.eq("wtid",wt.getId());
|
|
|
- reportdeviationQueryWrapper.ge("recorddate",monthFirst).le("recorddate",date);
|
|
|
- List<Reportdeviation> wtreportsub = reportdeviationService.list(reportdeviationQueryWrapper);
|
|
|
-// List<Wtreportsub> wtreportsub = wtreportsubService.qxpcllist(wt.getId(),day);
|
|
|
- if (wtreportsub!=null && wtreportsub.size()>0){
|
|
|
+ List<Healthwtreport3> healthwtreport3s = healthwtreport3Service.listByMap(queryMap);
|
|
|
+ if (StringUtils.isNotEmpty(healthwtreport3s)){
|
|
|
List<QxpclVo> list = new ArrayList<>();
|
|
|
- wtreportsub.stream().forEach(i->{
|
|
|
+ healthwtreport3s.stream().forEach(i->{
|
|
|
QxpclVo vo = new QxpclVo();
|
|
|
-// vo.setDate(i.getRecodedate());
|
|
|
-// vo.setQxpcl(i.getQxpcl());
|
|
|
-// vo.setJzz(i.getQxpcljzz());
|
|
|
+
|
|
|
vo.setDate(i.getRecorddate());
|
|
|
- vo.setQxpcl(i.getPcl());
|
|
|
+ vo.setQxpcl(i.getQxpcl());
|
|
|
vo.setJzz(i.getJzz());
|
|
|
list.add(vo);
|
|
|
});
|
|
|
+ SortUtils.sort(list,"recorddate",SortUtils.ASC);
|
|
|
healthReportVo.setQxpcls(list);
|
|
|
}
|
|
|
+// QueryWrapper<Reportdeviation> reportdeviationQueryWrapper = new QueryWrapper<>();
|
|
|
+// reportdeviationQueryWrapper.eq("wtid",wt.getId());
|
|
|
+// reportdeviationQueryWrapper.ge("recorddate",monthFirst).le("recorddate",date);
|
|
|
+// List<Reportdeviation> wtreportsub = reportdeviationService.list(reportdeviationQueryWrapper);
|
|
|
+//// List<Wtreportsub> wtreportsub = wtreportsubService.qxpcllist(wt.getId(),day);
|
|
|
+// if (wtreportsub!=null && wtreportsub.size()>0){
|
|
|
+// List<QxpclVo> list = new ArrayList<>();
|
|
|
+// wtreportsub.stream().forEach(i->{
|
|
|
+// QxpclVo vo = new QxpclVo();
|
|
|
+//// vo.setDate(i.getRecodedate());
|
|
|
+//// vo.setQxpcl(i.getQxpcl());
|
|
|
+//// vo.setJzz(i.getQxpcljzz());
|
|
|
+// vo.setDate(i.getRecorddate());
|
|
|
+// vo.setQxpcl(i.getPcl());
|
|
|
+// vo.setJzz(i.getJzz());
|
|
|
+// list.add(vo);
|
|
|
+// });
|
|
|
+// healthReportVo.setQxpcls(list);
|
|
|
+// }
|
|
|
|
|
|
- //对风偏差前两段
|
|
|
- List<Windturbinewindyaw> windturbinewindyaws = windturbinewindyawService.listmonth(wt.getId(),day);
|
|
|
- if (windturbinewindyaws!=null && windturbinewindyaws.size()>0){
|
|
|
- healthReportVo.setWithincount(windturbinewindyaws.stream().mapToInt(Windturbinewindyaw::getQualified).sum());
|
|
|
- healthReportVo.setBeyondcount(windturbinewindyaws.stream().mapToInt(Windturbinewindyaw::getUnqualified).sum());
|
|
|
- int sum = healthReportVo.getWithincount() + healthReportVo.getBeyondcount();
|
|
|
- healthReportVo.setDfpcl((double) (sum!=0? healthReportVo.getBeyondcount()/sum*100:0));
|
|
|
- int threehg = windturbinewindyaws.stream().filter(i -> i.getSpeed() >= 3 && i.getSpeed() < 5).mapToInt(Windturbinewindyaw::getQualified).sum();
|
|
|
- int threebhg = windturbinewindyaws.stream().filter(i -> i.getSpeed() >= 3 && i.getSpeed() < 5).mapToInt(Windturbinewindyaw::getUnqualified).sum();
|
|
|
- healthReportVo.setThreedfpcl((double) ((threehg+threebhg)!=0?threebhg/(threehg+threebhg)*100:0));
|
|
|
- int fivehg = windturbinewindyaws.stream().filter(i -> i.getSpeed() >= 5 && i.getSpeed() < 11).mapToInt(Windturbinewindyaw::getQualified).sum();
|
|
|
- int fivebhg = windturbinewindyaws.stream().filter(i -> i.getSpeed() >= 5 && i.getSpeed() < 11).mapToInt(Windturbinewindyaw::getUnqualified).sum();
|
|
|
- healthReportVo.setFivedfpcl((double) ((fivehg+fivebhg)!=0?fivebhg/(fivehg+fivebhg)*100:0));
|
|
|
- int elehg = windturbinewindyaws.stream().filter(i -> i.getSpeed() >= 11 && i.getSpeed() < 25).mapToInt(Windturbinewindyaw::getQualified).sum();
|
|
|
- int elebhg = windturbinewindyaws.stream().filter(i -> i.getSpeed() >= 11 && i.getSpeed() < 25).mapToInt(Windturbinewindyaw::getUnqualified).sum();
|
|
|
- healthReportVo.setElevendfpcl((double) ((elehg+elebhg)!=0?elebhg/(elehg+elebhg)*100:0));
|
|
|
+ //对风偏差前三段
|
|
|
+ List<Healthwtreport4> healthwtreport4s = healthwtreport4Service.listByMap(queryMap);
|
|
|
+ if (StringUtils.isNotEmpty(healthwtreport4s)){
|
|
|
+ Healthwtreport4 healthwtreport4 = healthwtreport4s.get(0);
|
|
|
+ healthReportVo.setWithincount(healthwtreport4.getWithincount());
|
|
|
+ healthReportVo.setBeyondcount(healthwtreport4.getBeyondcount());
|
|
|
+ healthReportVo.setDfpcl(healthwtreport4.getDfpcl());
|
|
|
+ healthReportVo.setThreedfpcl(healthwtreport4.getThreedfpcl());
|
|
|
+ healthReportVo.setFivedfpcl(healthwtreport4.getFivedfpcl());
|
|
|
+ healthReportVo.setElevendfpcl(healthwtreport4.getElevendfpcl());
|
|
|
+ healthReportVo.setGlfw(healthwtreport4.getGlfw());
|
|
|
+ healthReportVo.setDescriptiondfpcl(healthwtreport4.getDescriptiondfpcl());
|
|
|
}
|
|
|
|
|
|
- if (wt.getModelid().contains("2000")){
|
|
|
- healthReportVo.setGlfw("2000");
|
|
|
- }else{
|
|
|
- healthReportVo.setGlfw("1500");
|
|
|
- }
|
|
|
+// List<Windturbinewindyaw> windturbinewindyaws = windturbinewindyawService.listmonth(wt.getId(),day);
|
|
|
+// if (windturbinewindyaws!=null && windturbinewindyaws.size()>0){
|
|
|
+// healthReportVo.setWithincount(windturbinewindyaws.stream().mapToInt(Windturbinewindyaw::getQualified).sum());
|
|
|
+// healthReportVo.setBeyondcount(windturbinewindyaws.stream().mapToInt(Windturbinewindyaw::getUnqualified).sum());
|
|
|
+// int sum = healthReportVo.getWithincount() + healthReportVo.getBeyondcount();
|
|
|
+// healthReportVo.setDfpcl((double) (sum!=0? healthReportVo.getBeyondcount()/sum*100:0));
|
|
|
+// int threehg = windturbinewindyaws.stream().filter(i -> i.getSpeed() >= 3 && i.getSpeed() < 5).mapToInt(Windturbinewindyaw::getQualified).sum();
|
|
|
+// int threebhg = windturbinewindyaws.stream().filter(i -> i.getSpeed() >= 3 && i.getSpeed() < 5).mapToInt(Windturbinewindyaw::getUnqualified).sum();
|
|
|
+// healthReportVo.setThreedfpcl((double) ((threehg+threebhg)!=0?threebhg/(threehg+threebhg)*100:0));
|
|
|
+// int fivehg = windturbinewindyaws.stream().filter(i -> i.getSpeed() >= 5 && i.getSpeed() < 11).mapToInt(Windturbinewindyaw::getQualified).sum();
|
|
|
+// int fivebhg = windturbinewindyaws.stream().filter(i -> i.getSpeed() >= 5 && i.getSpeed() < 11).mapToInt(Windturbinewindyaw::getUnqualified).sum();
|
|
|
+// healthReportVo.setFivedfpcl((double) ((fivehg+fivebhg)!=0?fivebhg/(fivehg+fivebhg)*100:0));
|
|
|
+// int elehg = windturbinewindyaws.stream().filter(i -> i.getSpeed() >= 11 && i.getSpeed() < 25).mapToInt(Windturbinewindyaw::getQualified).sum();
|
|
|
+// int elebhg = windturbinewindyaws.stream().filter(i -> i.getSpeed() >= 11 && i.getSpeed() < 25).mapToInt(Windturbinewindyaw::getUnqualified).sum();
|
|
|
+// healthReportVo.setElevendfpcl((double) ((elehg+elebhg)!=0?elebhg/(elehg+elebhg)*100:0));
|
|
|
+// }
|
|
|
+//
|
|
|
+// if (wt.getModelid().contains("2000")){
|
|
|
+// healthReportVo.setGlfw("2000");
|
|
|
+// }else{
|
|
|
+// healthReportVo.setGlfw("1500");
|
|
|
+// }
|
|
|
//对风偏差第三段
|
|
|
- QueryWrapper<Windturbinepoweryaw> windturbinepoweryawQueryWrapper = new QueryWrapper<>();
|
|
|
- windturbinepoweryawQueryWrapper.eq("windturbineid",wt.getId());
|
|
|
- windturbinepoweryawQueryWrapper.ge("recorddate",monthFirst).le("recorddate",date);
|
|
|
- List<Windturbinepoweryaw> windturbinepoweryaws = windturbinepoweryawService.list(windturbinepoweryawQueryWrapper);
|
|
|
- if (windturbinepoweryaws!=null && windturbinepoweryaws.size()>0){
|
|
|
- List<Double> collect = windturbinepoweryaws.stream().map(i -> i.getPower()).distinct().collect(Collectors.toList());
|
|
|
- Collections.sort(collect);
|
|
|
- String descriptiondfpcl="";
|
|
|
- for (Double aDouble : collect) {
|
|
|
- int hg = windturbinepoweryaws.stream().filter(i->i.getPower()==aDouble).mapToInt(Windturbinepoweryaw::getQualified).sum();
|
|
|
- int bhg= windturbinepoweryaws.stream().filter(i->i.getPower()==aDouble).mapToInt(Windturbinepoweryaw::getUnqualified).sum();
|
|
|
- int sum = hg + bhg;
|
|
|
- descriptiondfpcl += ((sum!=0?bhg/sum*100:0)+"%,");
|
|
|
- }
|
|
|
- healthReportVo.setDescriptiondfpcl(descriptiondfpcl);
|
|
|
- }
|
|
|
+// QueryWrapper<Windturbinepoweryaw> windturbinepoweryawQueryWrapper = new QueryWrapper<>();
|
|
|
+// windturbinepoweryawQueryWrapper.eq("windturbineid",wt.getId());
|
|
|
+// windturbinepoweryawQueryWrapper.ge("recorddate",monthFirst).le("recorddate",date);
|
|
|
+// List<Windturbinepoweryaw> windturbinepoweryaws = windturbinepoweryawService.list(windturbinepoweryawQueryWrapper);
|
|
|
+// if (windturbinepoweryaws!=null && windturbinepoweryaws.size()>0){
|
|
|
+// List<Double> collect = windturbinepoweryaws.stream().map(i -> i.getPower()).distinct().collect(Collectors.toList());
|
|
|
+// Collections.sort(collect);
|
|
|
+// String descriptiondfpcl="";
|
|
|
+// for (Double aDouble : collect) {
|
|
|
+// int hg = windturbinepoweryaws.stream().filter(i->i.getPower()==aDouble).mapToInt(Windturbinepoweryaw::getQualified).sum();
|
|
|
+// int bhg= windturbinepoweryaws.stream().filter(i->i.getPower()==aDouble).mapToInt(Windturbinepoweryaw::getUnqualified).sum();
|
|
|
+// int sum = hg + bhg;
|
|
|
+// descriptiondfpcl += ((sum!=0?bhg/sum*100:0)+"%,");
|
|
|
+// }
|
|
|
+// healthReportVo.setDescriptiondfpcl(descriptiondfpcl);
|
|
|
+// }
|
|
|
|
|
|
//对风偏差图
|
|
|
- QueryWrapper<Windpowerdeviationrate> windpowerdeviationrateQueryWrapper = new QueryWrapper<>();
|
|
|
- windpowerdeviationrateQueryWrapper.eq("wtid",wt.getId());
|
|
|
- List<Windpowerdeviationrate> windpowerdeviationrates = windpowerdeviationrateService.list(windpowerdeviationrateQueryWrapper);
|
|
|
- List<Windpowerdeviationrate> glqxts = windpowerdeviationrates.stream().filter(deviationrate-> deviationrate.getType() == 2).collect(Collectors.toList());
|
|
|
-// List<Windturbinepoweryaw> glqxts =windturbinepoweryawService.getPowerDraw(wt.getId(),day);
|
|
|
- List<DfpclPowerVo> dfpclpowers = new ArrayList<>();
|
|
|
- if (glqxts!=null && glqxts.size()>0){
|
|
|
- glqxts.stream().forEach(i->{
|
|
|
+ List<Healthwtreport6> healthwtreport6s = healthwtreport6Service.listByMap(queryMap);
|
|
|
+ if(StringUtils.isNotEmpty(healthwtreport6s)){
|
|
|
+ List<DfpclPowerVo> dfpclpowers = new ArrayList<>();
|
|
|
+ healthwtreport6s.stream().forEach(i->{
|
|
|
DfpclPowerVo vo = new DfpclPowerVo();
|
|
|
-// vo.setPower(i.getPower());
|
|
|
-// int sum = i.getQualified() + i.getUnqualified();
|
|
|
-// if (i.getUnqualified()!=0){
|
|
|
-// BigDecimal divide = BigDecimalUtils.divide(String.valueOf(i.getUnqualified()), String.valueOf(sum), 2);
|
|
|
-// vo.setDfpcl(divide.doubleValue()*100);
|
|
|
-// }else{
|
|
|
-// vo.setDfpcl(0.0);
|
|
|
-// }
|
|
|
- vo.setPower(i.getTypevalue());
|
|
|
- vo.setDfpcl(i.getValue());
|
|
|
+
|
|
|
+ vo.setPower(i.getPower());
|
|
|
+ vo.setDfpcl(i.getDfpcl());
|
|
|
dfpclpowers.add(vo);
|
|
|
});
|
|
|
SortUtils.sort(dfpclpowers,"power",SortUtils.ASC);
|
|
|
healthReportVo.setDfpclpowers(dfpclpowers);
|
|
|
}
|
|
|
- List<Windpowerdeviationrate> fsqxts = windpowerdeviationrates.stream().filter(deviationrate-> deviationrate.getType() == 1).collect(Collectors.toList());
|
|
|
-// List<Windturbinewindyaw> fsqxts =windturbinewindyawService.getPowerDraw(wt.getId(),day);
|
|
|
- List<DfpclSpeedVo> dfpclSpeeds = new ArrayList<>();
|
|
|
- if (fsqxts!=null && fsqxts.size()>0){
|
|
|
- fsqxts.stream().forEach(i->{
|
|
|
+
|
|
|
+ List<Healthwtreport5> healthwtreport5s = healthwtreport5Service.listByMap(queryMap);
|
|
|
+ if(StringUtils.isNotEmpty(healthwtreport5s)){
|
|
|
+ List<DfpclSpeedVo> dfpclSpeeds = new ArrayList<>();
|
|
|
+ healthwtreport5s.stream().forEach(i->{
|
|
|
DfpclSpeedVo vo = new DfpclSpeedVo();
|
|
|
-// vo.setSpeed(i.getSpeed());
|
|
|
-// int sum = i.getQualified() + i.getUnqualified();
|
|
|
-// if (i.getUnqualified()!=0){
|
|
|
-// BigDecimal divide = BigDecimalUtils.divide(String.valueOf(i.getUnqualified()), String.valueOf(sum), 2);
|
|
|
-// vo.setDfpcl(divide.doubleValue()*100);
|
|
|
-// }else{
|
|
|
-// vo.setDfpcl(0.0);
|
|
|
-// }
|
|
|
-// vo.setDfpcl(sum != 0 ? (i.getUnqualified())/sum*100 : 0.0);
|
|
|
- vo.setSpeed(DoubleUtils.getRoundingNum(i.getTypevalue(),0));
|
|
|
- vo.setDfpcl(i.getValue());
|
|
|
+ vo.setSpeed(i.getSpeed());
|
|
|
+ vo.setDfpcl(i.getDfpcl());
|
|
|
dfpclSpeeds.add(vo);
|
|
|
});
|
|
|
SortUtils.sort(dfpclSpeeds,"speed",SortUtils.ASC);
|
|
|
healthReportVo.setDfpclSpeeds(dfpclSpeeds);
|
|
|
}
|
|
|
+// QueryWrapper<Windpowerdeviationrate> windpowerdeviationrateQueryWrapper = new QueryWrapper<>();
|
|
|
+// windpowerdeviationrateQueryWrapper.eq("wtid",wt.getId());
|
|
|
+// List<Windpowerdeviationrate> windpowerdeviationrates = windpowerdeviationrateService.list(windpowerdeviationrateQueryWrapper);
|
|
|
+// List<Windpowerdeviationrate> glqxts = windpowerdeviationrates.stream().filter(deviationrate-> deviationrate.getType() == 2).collect(Collectors.toList());
|
|
|
+//// List<Windturbinepoweryaw> glqxts =windturbinepoweryawService.getPowerDraw(wt.getId(),day);
|
|
|
+// List<DfpclPowerVo> dfpclpowers = new ArrayList<>();
|
|
|
+// if (glqxts!=null && glqxts.size()>0){
|
|
|
+// glqxts.stream().forEach(i->{
|
|
|
+// DfpclPowerVo vo = new DfpclPowerVo();
|
|
|
+//// vo.setPower(i.getPower());
|
|
|
+//// int sum = i.getQualified() + i.getUnqualified();
|
|
|
+//// if (i.getUnqualified()!=0){
|
|
|
+//// BigDecimal divide = BigDecimalUtils.divide(String.valueOf(i.getUnqualified()), String.valueOf(sum), 2);
|
|
|
+//// vo.setDfpcl(divide.doubleValue()*100);
|
|
|
+//// }else{
|
|
|
+//// vo.setDfpcl(0.0);
|
|
|
+//// }
|
|
|
+// vo.setPower(i.getTypevalue());
|
|
|
+// vo.setDfpcl(i.getValue());
|
|
|
+// dfpclpowers.add(vo);
|
|
|
+// });
|
|
|
+// SortUtils.sort(dfpclpowers,"power",SortUtils.ASC);
|
|
|
+// healthReportVo.setDfpclpowers(dfpclpowers);
|
|
|
+// }
|
|
|
+// List<Windpowerdeviationrate> fsqxts = windpowerdeviationrates.stream().filter(deviationrate-> deviationrate.getType() == 1).collect(Collectors.toList());
|
|
|
+//// List<Windturbinewindyaw> fsqxts =windturbinewindyawService.getPowerDraw(wt.getId(),day);
|
|
|
+// List<DfpclSpeedVo> dfpclSpeeds = new ArrayList<>();
|
|
|
+// if (fsqxts!=null && fsqxts.size()>0){
|
|
|
+// fsqxts.stream().forEach(i->{
|
|
|
+// DfpclSpeedVo vo = new DfpclSpeedVo();
|
|
|
+//// vo.setSpeed(i.getSpeed());
|
|
|
+//// int sum = i.getQualified() + i.getUnqualified();
|
|
|
+//// if (i.getUnqualified()!=0){
|
|
|
+//// BigDecimal divide = BigDecimalUtils.divide(String.valueOf(i.getUnqualified()), String.valueOf(sum), 2);
|
|
|
+//// vo.setDfpcl(divide.doubleValue()*100);
|
|
|
+//// }else{
|
|
|
+//// vo.setDfpcl(0.0);
|
|
|
+//// }
|
|
|
+//// vo.setDfpcl(sum != 0 ? (i.getUnqualified())/sum*100 : 0.0);
|
|
|
+// vo.setSpeed(DoubleUtils.getRoundingNum(i.getTypevalue(),0));
|
|
|
+// vo.setDfpcl(i.getValue());
|
|
|
+// dfpclSpeeds.add(vo);
|
|
|
+// });
|
|
|
+// SortUtils.sort(dfpclSpeeds,"speed",SortUtils.ASC);
|
|
|
+// healthReportVo.setDfpclSpeeds(dfpclSpeeds);
|
|
|
+// }
|
|
|
QueryWrapper<Winddeviationrate> winddeviationrateQueryWrapper = new QueryWrapper<>();
|
|
|
winddeviationrateQueryWrapper.eq("wtid",wt.getId());
|
|
|
List<Winddeviationrate> winddeviationrates = winddeviationrateService.list(winddeviationrateQueryWrapper);
|
|
@@ -371,30 +464,55 @@ public class ReportService {
|
|
|
// }
|
|
|
// }
|
|
|
//切入切出整合
|
|
|
- List<QrqcVo> qrqcVos = new ArrayList<>();
|
|
|
- List<Inputoroutputspeedtotal> inputoroutputspeedtotals =inputoroutputspeedtotalService.getQrqc(wt.getId(),day);
|
|
|
- if (inputoroutputspeedtotals!=null && inputoroutputspeedtotals.size()>0){
|
|
|
- Inputoroutputspeedtotal inputoroutputspeedtotal = inputoroutputspeedtotals.get(0);
|
|
|
- QrqcVo vo = new QrqcVo();
|
|
|
- vo.setForeignkeyid(inputoroutputspeedtotal.getWindturbineid());
|
|
|
- vo.setXfqr(inputoroutputspeedtotal.getDayinputsmall());
|
|
|
- vo.setXfqc(inputoroutputspeedtotal.getDayoutputsmall());
|
|
|
- vo.setDfqr(inputoroutputspeedtotal.getDayinputbig());
|
|
|
- vo.setDfqc(inputoroutputspeedtotal.getDayoutputbig());
|
|
|
- qrqcVos.add(vo);
|
|
|
- }
|
|
|
- List<Inputoroutputspeedtotal> inputoroutputspeedtotaljzs =inputoroutputspeedtotalService.getQrqcjzz(wt.getWindpowerstationid(),day);
|
|
|
- if (inputoroutputspeedtotaljzs!=null && inputoroutputspeedtotaljzs.size()>0){
|
|
|
- Inputoroutputspeedtotal inputoroutputspeedtotal = inputoroutputspeedtotaljzs.get(0);
|
|
|
- QrqcVo vo = new QrqcVo();
|
|
|
- vo.setForeignkeyid("机型平均值");
|
|
|
- vo.setXfqr(inputoroutputspeedtotal.getDayinputsmall());
|
|
|
- vo.setXfqc(inputoroutputspeedtotal.getDayoutputsmall());
|
|
|
- vo.setDfqr(inputoroutputspeedtotal.getDayinputbig());
|
|
|
- vo.setDfqc(inputoroutputspeedtotal.getDayoutputbig());
|
|
|
- qrqcVos.add(vo);
|
|
|
+ List<Healthwtreport7> healthwtreport7s = healthwtreport7Service.listByMap(queryMap);
|
|
|
+ if (StringUtils.isNotEmpty(healthwtreport7s)){
|
|
|
+ Healthwtreport7 healthwtreport7 = healthwtreport7s.get(0);
|
|
|
+ healthReportVo.setXfqr(healthwtreport7.getXfqr());
|
|
|
+ healthReportVo.setXfqc(healthwtreport7.getXfqc());
|
|
|
+ healthReportVo.setDfqr(healthwtreport7.getDfqr());
|
|
|
+ healthReportVo.setDfqc(healthwtreport7.getDfqc());
|
|
|
+ List<QrqcVo> qrqcVos = new ArrayList<>();
|
|
|
+ QrqcVo vo1 = new QrqcVo();
|
|
|
+ vo1.setForeignkeyid(healthwtreport7.getWtid());
|
|
|
+ vo1.setXfqr(healthwtreport7.getXfqr());
|
|
|
+ vo1.setXfqc(healthwtreport7.getXfqc());
|
|
|
+ vo1.setDfqr(healthwtreport7.getDfqr());
|
|
|
+ vo1.setDfqc(healthwtreport7.getDfqc());
|
|
|
+ qrqcVos.add(vo1);
|
|
|
+ QrqcVo vo2 = new QrqcVo();
|
|
|
+ vo2.setForeignkeyid("机型平均值");
|
|
|
+ vo2.setXfqr(healthwtreport7.getXfqr2());
|
|
|
+ vo2.setXfqc(healthwtreport7.getXfqc2());
|
|
|
+ vo2.setDfqr(healthwtreport7.getDfqr2());
|
|
|
+ vo2.setDfqc(healthwtreport7.getDfqc2());
|
|
|
+ qrqcVos.add(vo2);
|
|
|
+
|
|
|
+ healthReportVo.setQrqcs(qrqcVos);
|
|
|
}
|
|
|
- healthReportVo.setQrqcs(qrqcVos);
|
|
|
+// List<QrqcVo> qrqcVos = new ArrayList<>();
|
|
|
+// List<Inputoroutputspeedtotal> inputoroutputspeedtotals =inputoroutputspeedtotalService.getQrqc(wt.getId(),day);
|
|
|
+// if (inputoroutputspeedtotals!=null && inputoroutputspeedtotals.size()>0){
|
|
|
+// Inputoroutputspeedtotal inputoroutputspeedtotal = inputoroutputspeedtotals.get(0);
|
|
|
+// QrqcVo vo = new QrqcVo();
|
|
|
+// vo.setForeignkeyid(inputoroutputspeedtotal.getWindturbineid());
|
|
|
+// vo.setXfqr(inputoroutputspeedtotal.getDayinputsmall());
|
|
|
+// vo.setXfqc(inputoroutputspeedtotal.getDayoutputsmall());
|
|
|
+// vo.setDfqr(inputoroutputspeedtotal.getDayinputbig());
|
|
|
+// vo.setDfqc(inputoroutputspeedtotal.getDayoutputbig());
|
|
|
+// qrqcVos.add(vo);
|
|
|
+// }
|
|
|
+// List<Inputoroutputspeedtotal> inputoroutputspeedtotaljzs =inputoroutputspeedtotalService.getQrqcjzz(wt.getWindpowerstationid(),day);
|
|
|
+// if (inputoroutputspeedtotaljzs!=null && inputoroutputspeedtotaljzs.size()>0){
|
|
|
+// Inputoroutputspeedtotal inputoroutputspeedtotal = inputoroutputspeedtotaljzs.get(0);
|
|
|
+// QrqcVo vo = new QrqcVo();
|
|
|
+// vo.setForeignkeyid("机型平均值");
|
|
|
+// vo.setXfqr(inputoroutputspeedtotal.getDayinputsmall());
|
|
|
+// vo.setXfqc(inputoroutputspeedtotal.getDayoutputsmall());
|
|
|
+// vo.setDfqr(inputoroutputspeedtotal.getDayinputbig());
|
|
|
+// vo.setDfqc(inputoroutputspeedtotal.getDayoutputbig());
|
|
|
+// qrqcVos.add(vo);
|
|
|
+// }
|
|
|
+// healthReportVo.setQrqcs(qrqcVos);
|
|
|
|
|
|
//可靠性
|
|
|
// List<Jkbgbjyh> jkbgbjyhs = jkbgbjyhService.getBjyhdb(wt.getId(),day);
|