|
@@ -0,0 +1,707 @@
|
|
|
+package com.gyee.healthmanagementhistroy.service.healthreport;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
+import com.gyee.common.model.StringUtils;
|
|
|
+import com.gyee.common.util.DateUtils;
|
|
|
+import com.gyee.common.util.DoubleUtils;
|
|
|
+import com.gyee.common.util.JSONUtils;
|
|
|
+import com.gyee.common.util.SortUtils;
|
|
|
+import com.gyee.healthmanagementhistroy.init.CacheContext;
|
|
|
+import com.gyee.healthmanagementhistroy.model.auto.*;
|
|
|
+import com.gyee.healthmanagementhistroy.service.auto.*;
|
|
|
+import com.gyee.healthmanagementhistroy.vo.*;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import java.io.UnsupportedEncodingException;
|
|
|
+import java.util.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ClassName : ReportService
|
|
|
+ * @Author : xieshengjie
|
|
|
+ * @Date: 2022/6/4 12:35
|
|
|
+ * @Description :
|
|
|
+ */
|
|
|
+@Service
|
|
|
+public class ReportService {
|
|
|
+ @Resource
|
|
|
+ private IWttragetreportmain3Service wttragetreportmain3Service;
|
|
|
+ @Resource
|
|
|
+ private ICurvefittingsubService curvefittingsubService;
|
|
|
+ @Resource
|
|
|
+ private IWindturbinewindyawService windturbinewindyawService;
|
|
|
+ @Resource
|
|
|
+ private IWindturbinepoweryawService windturbinepoweryawService;
|
|
|
+ @Resource
|
|
|
+ private IInputoroutputspeedtotalService inputoroutputspeedtotalService;
|
|
|
+ @Resource
|
|
|
+ private IWttragetreportchartService wttragetreportchartService;
|
|
|
+ @Resource
|
|
|
+ private IEquipmentdayinfoService equipmentdayinfoService;
|
|
|
+ @Resource
|
|
|
+ private IWindturbineinfodayService windturbineinfodayService;
|
|
|
+ @Resource
|
|
|
+ private IWindturbineinfodaytop2Service windturbineinfodaytop2Service;
|
|
|
+ @Resource
|
|
|
+ private IRecommenmainService recommenmainService;
|
|
|
+ @Resource
|
|
|
+ private IWtreportmainService wtreportmainService;
|
|
|
+ @Resource
|
|
|
+ private IHealthreportService healthreportService;
|
|
|
+ @Resource
|
|
|
+ private IFaultstatisticwindturbineService faultstatisticwindturbineService;
|
|
|
+ @Resource
|
|
|
+ private IReportpowerfittingService reportpowerfittingService;
|
|
|
+ @Resource
|
|
|
+ private IReportdeviationService reportdeviationService;
|
|
|
+ @Resource
|
|
|
+ private IWindpowerdeviationrateService windpowerdeviationrateService;
|
|
|
+ @Resource
|
|
|
+ private IWinddeviationrateService winddeviationrateService;
|
|
|
+ @Resource
|
|
|
+ private IReportdangerService reportdangerService;
|
|
|
+ @Resource
|
|
|
+ private IReportpowerpartweatherService reportpowerpartweatherService;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 保存风机报告
|
|
|
+ * @param beginDate
|
|
|
+ * @param endDate
|
|
|
+ */
|
|
|
+ public void saveHealthReport(String beginDate,String endDate,String wpid) throws UnsupportedEncodingException, JsonProcessingException {
|
|
|
+// List<Windturbine> wtls = CacheContext.wtls;
|
|
|
+ List<Windturbine> wtls = CacheContext.wtmap.get(wpid);
|
|
|
+ List<String> days = getDays(beginDate, endDate);
|
|
|
+ for (String day : days) {
|
|
|
+ Date date = DateUtils.parseDate(day);
|
|
|
+ int year = DateUtils.getYear(date);
|
|
|
+ int month = DateUtils.getMonth(date);
|
|
|
+ Date monthFirst = DateUtils.getMonthFirst(date);
|
|
|
+ Date yestday = DateUtils.getYestday(date);
|
|
|
+ for (Windturbine wt : wtls) {
|
|
|
+ QueryWrapper<Healthreport> healthreportQueryWrapper = new QueryWrapper<>();
|
|
|
+ healthreportQueryWrapper.eq("wtid",wt.getId());
|
|
|
+ healthreportQueryWrapper.eq("year",year);
|
|
|
+ healthreportQueryWrapper.eq("month",month);
|
|
|
+ List<Healthreport> healthreports = healthreportService.list(healthreportQueryWrapper);
|
|
|
+ Healthreport healthreport;
|
|
|
+ if (healthreports!=null && healthreports.size()>0){
|
|
|
+ healthreport=healthreports.get(0);
|
|
|
+ }else{
|
|
|
+ healthreport = new Healthreport();
|
|
|
+ healthreport.setId(StringUtils.getUUID());
|
|
|
+ }
|
|
|
+
|
|
|
+ HealthReportVo healthReportVo = new HealthReportVo();
|
|
|
+ setHealthReport(healthReportVo,day, date, year, month, monthFirst, yestday, wt);
|
|
|
+ String s = JSONUtils.javaToJson(healthReportVo);
|
|
|
+// byte[] bytes = ByteArrayUtil.toByteArray(healthReportVo);
|
|
|
+// String s = new String(bytes,"UTF-8");
|
|
|
+ healthreport.setWtid(wt.getId());
|
|
|
+ healthreport.setWtname(wt.getName());
|
|
|
+ healthreport.setWpname(CacheContext.wpmap.get(wt.getWindpowerstationid()).getName());
|
|
|
+ healthreport.setYear(year);
|
|
|
+ healthreport.setMonth(month);
|
|
|
+ healthreport.setHealthreport(s);
|
|
|
+
|
|
|
+
|
|
|
+// QueryWrapper<Recommenmain> qw = new QueryWrapper<>();
|
|
|
+// qw.like("createdate",DateUtils.parseDate(day));
|
|
|
+// qw.eq("wtid",wt.getId());
|
|
|
+ List<Recommenmain> recommenmains = recommenmainService.getrecommens(wt.getId(),day);
|
|
|
+ if (recommenmains!=null && recommenmains.size()>0){
|
|
|
+ healthreport.setRecommenddate(date);
|
|
|
+ healthreport.setRecommendreport(s);
|
|
|
+ healthreport.setIsrecommend(1);
|
|
|
+ QueryWrapper<Wtreportmain> wtreportmainQueryWrapper = new QueryWrapper<>();
|
|
|
+ wtreportmainQueryWrapper.eq("recodedate",date);
|
|
|
+ wtreportmainQueryWrapper.eq("wtid",wt.getId());
|
|
|
+ List<Wtreportmain> wtreportmains = wtreportmainService.list(wtreportmainQueryWrapper);
|
|
|
+ if (wtreportmains!=null && wtreportmains.size()>0){
|
|
|
+ Wtreportmain wtreportmain = wtreportmains.get(0);
|
|
|
+ healthreport.setHighfrequency(wtreportmain.getTop1type());
|
|
|
+ healthreport.setMediatefrequency(wtreportmain.getTop2type());
|
|
|
+ healthreport.setFowfrequency(wtreportmain.getTop3type());
|
|
|
+ healthreport.setReason(wtreportmain.getMainreason());
|
|
|
+ healthreport.setMaindate(wtreportmain.getMaindate());
|
|
|
+ healthreport.setTroublemethods(wtreportmain.getMainmethod());
|
|
|
+ healthreport.setProcessingmethod(wtreportmain.getApproach());
|
|
|
+ healthreport.setTools(wtreportmain.getTools());
|
|
|
+ healthreport.setAveragetime(wtreportmain.getMainhour());
|
|
|
+ healthreport.setMainspeed(wtreportmain.getSpeed());
|
|
|
+ }
|
|
|
+
|
|
|
+// healthreport.setHighfrequency();
|
|
|
+ }else {
|
|
|
+ healthreport.setIsrecommend(0);
|
|
|
+ }
|
|
|
+ healthreportService.saveOrUpdate(healthreport);
|
|
|
+ }
|
|
|
+// wt = wtls.stream().filter(i->i.getId().equals("MG01_01")).findFirst().get();
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 设置报告内容
|
|
|
+ * @param healthReportVo
|
|
|
+ * @param day
|
|
|
+ * @param date
|
|
|
+ * @param year
|
|
|
+ * @param month
|
|
|
+ * @param monthFirst
|
|
|
+ * @param yestday
|
|
|
+ * @param wt
|
|
|
+ */
|
|
|
+ private void setHealthReport(HealthReportVo healthReportVo,String day, Date date, int year, int month, Date monthFirst, Date yestday, Windturbine wt) {
|
|
|
+
|
|
|
+ healthReportVo.setWtid(wt.getId());
|
|
|
+
|
|
|
+ QueryWrapper<Wttragetreportmain3> wttragetreportmainQueryWrapper = new QueryWrapper<>();
|
|
|
+ wttragetreportmainQueryWrapper.eq("recodedate",date).eq("wtid",wt.getId());
|
|
|
+ List<Wttragetreportmain3> wttragetreportmainlist = wttragetreportmain3Service.list(wttragetreportmainQueryWrapper);
|
|
|
+ if (wttragetreportmainlist!=null && wttragetreportmainlist.size()>0){
|
|
|
+ Wttragetreportmain3 wttragetreportmain = wttragetreportmainlist.get(0);
|
|
|
+ healthReportVo.setPjjg(wttragetreportmain.getPjdj());
|
|
|
+ healthReportVo.setPjzw(wttragetreportmain.getPjjg());
|
|
|
+ healthReportVo.setPjyxq("一个月");
|
|
|
+ healthReportVo.setBgqrr(wttragetreportmain.getBgscry());
|
|
|
+ healthReportVo.setBgcjrq(wttragetreportmain.getBgsj());
|
|
|
+ healthReportVo.setBwsj(wttragetreportmain.getBwsj());
|
|
|
+ healthReportVo.setFyts(DateUtils.daysDiff(healthReportVo.getBwsj(),date));
|
|
|
+ healthReportVo.setYfdl(wttragetreportmain.getYfdl());
|
|
|
+ healthReportVo.setHbzj(wttragetreportmain.getYfdlhb());
|
|
|
+ healthReportVo.setSbklyl(wttragetreportmain.getSbklyl());
|
|
|
+ healthReportVo.setHbxj(0.2);
|
|
|
+ double mttr = wttragetreportmain.getYgzcs()!=0?wttragetreportmain.getYgzsc()/wttragetreportmain.getYgzcs():0.0;
|
|
|
+ int hours = DateUtils.hoursDiff(DateUtils.getMonthFirst(date), date);
|
|
|
+ healthReportVo.setMtbf(wttragetreportmain.getYgzcs()!=0?hours/wttragetreportmain.getYgzcs():0);
|
|
|
+ healthReportVo.setMttf(healthReportVo.getMtbf()-mttr);
|
|
|
+ }
|
|
|
+
|
|
|
+ //曲线拟合及偏差率
|
|
|
+ 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<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<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));
|
|
|
+ }
|
|
|
+
|
|
|
+ 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<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);
|
|
|
+ if (winddeviationrates!=null){
|
|
|
+ List<NippleVo> nippleVos = new ArrayList<>();
|
|
|
+ winddeviationrates.stream().forEach(i->{
|
|
|
+ NippleVo vo = new NippleVo();
|
|
|
+ vo.setPcl(Integer.parseInt(i.getType().substring(i.getType().indexOf("R")+1)));
|
|
|
+ vo.setCount(i.getCount());
|
|
|
+ nippleVos.add(vo);
|
|
|
+ });
|
|
|
+ SortUtils.sort(nippleVos,"pcl",SortUtils.ASC);
|
|
|
+ healthReportVo.setNipples(nippleVos);
|
|
|
+
|
|
|
+ }
|
|
|
+// List<Windturbinewindyaw> nzs =windturbinewindyawService.getnzt(wt.getId(),day);
|
|
|
+// if(nzs.get(0)!=null){
|
|
|
+// Windturbinewindyaw windturbinewindyaw = nzs.get(0);
|
|
|
+// Field[] field = windturbinewindyaw.getClass().getDeclaredFields(); // 获取实体类的所有属性,返回Field数组
|
|
|
+// List<NippleVo> nippleVos = new ArrayList<>();
|
|
|
+// try {
|
|
|
+// for (int j = 7; j < field.length; j++) { // 遍历所有属性
|
|
|
+// String name = field[j].getName(); // 获取属性的名字
|
|
|
+// name = name.substring(0, 1).toUpperCase() + name.substring(1); // 将属性的首字符大写,方便构造get,set方法
|
|
|
+// Method m = windturbinewindyaw.getClass().getMethod("get" + name);
|
|
|
+// Integer value = (Integer) m.invoke(windturbinewindyaw);
|
|
|
+// NippleVo vo = new NippleVo();
|
|
|
+// vo.setPcl(Integer.parseInt(name.substring(1).replace("f","-")));
|
|
|
+// vo.setCount(value);
|
|
|
+// nippleVos.add(vo);
|
|
|
+// // 如果有需要,可以仿照上面继续进行扩充,再增加对其它类型的判断
|
|
|
+// }
|
|
|
+// SortUtils.sort(nippleVos,"pcl",SortUtils.ASC);
|
|
|
+// healthReportVo.setNipples(nippleVos);
|
|
|
+// } catch (NoSuchMethodException e) {
|
|
|
+// e.printStackTrace();
|
|
|
+// } catch (SecurityException e) {
|
|
|
+// e.printStackTrace();
|
|
|
+// } catch (IllegalAccessException e) {
|
|
|
+// e.printStackTrace();
|
|
|
+// } catch (IllegalArgumentException e) {
|
|
|
+// e.printStackTrace();
|
|
|
+// } catch (InvocationTargetException e) {
|
|
|
+// e.printStackTrace();
|
|
|
+// }
|
|
|
+// }
|
|
|
+ //切入切出整合
|
|
|
+ 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);
|
|
|
+ List<Reportdanger> jkbgbjyhs = reportdangerService.getBjyhdb(wt.getId());
|
|
|
+ List<BjyhdbVo> bjyhdbs = new ArrayList<>();
|
|
|
+ if (jkbgbjyhs!=null && jkbgbjyhs.size()>0){
|
|
|
+ List<String> types = jkbgbjyhs.stream().map(i -> i.getPart()).collect(Collectors.toList());
|
|
|
+ BjyhdbVo sj = new BjyhdbVo();
|
|
|
+ sj.setForeignkeyid(wt.getId());
|
|
|
+ for (Reportdanger reportdanger: jkbgbjyhs){
|
|
|
+ String part = reportdanger.getPart();
|
|
|
+ if (part == null){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if (part.contains("传动链")){
|
|
|
+ sj.setCdlcount(reportdanger.getCount());
|
|
|
+ sj.setCdltimes(DoubleUtils.getRoundingNum(reportdanger.getTimes(),0));
|
|
|
+ }
|
|
|
+ if (part.contains("测风系统")){
|
|
|
+ sj.setCfxtcount(reportdanger.getCount());
|
|
|
+ sj.setCfxttimes(DoubleUtils.getRoundingNum(reportdanger.getTimes(),0));
|
|
|
+ }
|
|
|
+ if (part.contains("齿轮箱")){
|
|
|
+ sj.setClxcount(reportdanger.getCount());
|
|
|
+ sj.setClxtimes(DoubleUtils.getRoundingNum(reportdanger.getTimes(),0));
|
|
|
+ }
|
|
|
+ if (part.contains("发电机")){
|
|
|
+ sj.setFdjcount(reportdanger.getCount());
|
|
|
+ sj.setFdjtimes(DoubleUtils.getRoundingNum(reportdanger.getTimes(),0));
|
|
|
+ }
|
|
|
+ if (part.contains("变桨")){
|
|
|
+ sj.setBjcount(reportdanger.getCount());
|
|
|
+ sj.setBjtimes(DoubleUtils.getRoundingNum(reportdanger.getTimes(),0));
|
|
|
+ }
|
|
|
+ if (part.contains("机舱")){
|
|
|
+ sj.setJccount(reportdanger.getCount());
|
|
|
+ sj.setJctimes(DoubleUtils.getRoundingNum(reportdanger.getTimes(),0));
|
|
|
+ }
|
|
|
+ if (part.contains("偏航")){
|
|
|
+ sj.setPhcount(reportdanger.getCount());
|
|
|
+ sj.setPhtimes(DoubleUtils.getRoundingNum(reportdanger.getTimes(),0));
|
|
|
+ }
|
|
|
+ if (part.contains("塔底柜")){
|
|
|
+ sj.setTdgcount(reportdanger.getCount());
|
|
|
+ sj.setTdgtimes(DoubleUtils.getRoundingNum(reportdanger.getTimes(),0));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ bjyhdbs.add(sj);
|
|
|
+ }else{
|
|
|
+ BjyhdbVo sj = new BjyhdbVo();
|
|
|
+ sj.setForeignkeyid(wt.getId());
|
|
|
+ sj.setCdlcount(0);
|
|
|
+ sj.setCdltimes(DoubleUtils.getRoundingNum(0.0,0));
|
|
|
+ sj.setCfxtcount(0);
|
|
|
+ sj.setCfxttimes(DoubleUtils.getRoundingNum(0.0,0));
|
|
|
+
|
|
|
+ sj.setClxcount(0);
|
|
|
+ sj.setClxtimes(DoubleUtils.getRoundingNum(0.0,0));
|
|
|
+ sj.setFdjcount(0);
|
|
|
+ sj.setFdjtimes(DoubleUtils.getRoundingNum(0.0,0));
|
|
|
+ sj.setBjcount(0);
|
|
|
+ sj.setBjtimes(DoubleUtils.getRoundingNum(0.0,0));
|
|
|
+ sj.setJccount(0);
|
|
|
+ sj.setJctimes(DoubleUtils.getRoundingNum(0.0,0));
|
|
|
+ sj.setPhcount(0);
|
|
|
+ sj.setPhtimes(DoubleUtils.getRoundingNum(0.0,0));
|
|
|
+ sj.setTdgcount(0);
|
|
|
+ sj.setTdgtimes(DoubleUtils.getRoundingNum(0.0,0));
|
|
|
+ bjyhdbs.add(sj);
|
|
|
+ }
|
|
|
+// List<Jkbgbjyh> jkbgbjyhsjz = jkbgbjyhService.getBjyhdbjz(wt.getWindpowerstationid(),day);
|
|
|
+ if (jkbgbjyhs!=null && jkbgbjyhs.size()>0){
|
|
|
+ List<String> types = jkbgbjyhs.stream().map(i -> i.getPart()).collect(Collectors.toList());
|
|
|
+ BjyhdbVo sj = new BjyhdbVo();
|
|
|
+ sj.setForeignkeyid("平均值");
|
|
|
+ for (Reportdanger reportdanger: jkbgbjyhs){
|
|
|
+ String part = reportdanger.getPart();
|
|
|
+ if (part == null){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if (part.contains("传动链")){
|
|
|
+ sj.setCdlcount(reportdanger.getCountavg());
|
|
|
+ sj.setCdltimes(DoubleUtils.getRoundingNum(reportdanger.getTimesavg(),0));
|
|
|
+ }
|
|
|
+ if (part.contains("测风系统")){
|
|
|
+ sj.setCfxtcount(reportdanger.getCountavg());
|
|
|
+ sj.setCfxttimes(DoubleUtils.getRoundingNum(reportdanger.getTimesavg(),0));
|
|
|
+ }
|
|
|
+ if (part.contains("齿轮箱")){
|
|
|
+ sj.setClxcount(reportdanger.getCountavg());
|
|
|
+ sj.setClxtimes(DoubleUtils.getRoundingNum(reportdanger.getTimesavg(),0));
|
|
|
+ }
|
|
|
+ if (part.contains("发电机")){
|
|
|
+ sj.setFdjcount(reportdanger.getCountavg());
|
|
|
+ sj.setFdjtimes(DoubleUtils.getRoundingNum(reportdanger.getTimesavg(),0));
|
|
|
+ }
|
|
|
+ if (part.contains("变桨")){
|
|
|
+ sj.setBjcount(reportdanger.getCountavg());
|
|
|
+ sj.setBjtimes(DoubleUtils.getRoundingNum(reportdanger.getTimesavg(),0));
|
|
|
+ }
|
|
|
+ if (part.contains("机舱")){
|
|
|
+ sj.setJccount(reportdanger.getCountavg());
|
|
|
+ sj.setJctimes(DoubleUtils.getRoundingNum(reportdanger.getTimesavg(),0));
|
|
|
+ }
|
|
|
+ if (part.contains("偏航")){
|
|
|
+ sj.setPhcount(reportdanger.getCountavg());
|
|
|
+ sj.setPhtimes(DoubleUtils.getRoundingNum(reportdanger.getTimesavg(),0));
|
|
|
+ }
|
|
|
+ if (part.contains("塔底柜")){
|
|
|
+ sj.setTdgcount(reportdanger.getCountavg());
|
|
|
+ sj.setTdgtimes(DoubleUtils.getRoundingNum(reportdanger.getTimesavg(),0));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ bjyhdbs.add(sj);
|
|
|
+ }else{
|
|
|
+ BjyhdbVo sj = new BjyhdbVo();
|
|
|
+ sj.setForeignkeyid("平均值");
|
|
|
+ sj.setCdlcount(0);
|
|
|
+ sj.setCdltimes(DoubleUtils.getRoundingNum(0.0,0));
|
|
|
+ sj.setCfxtcount(0);
|
|
|
+ sj.setCfxttimes(DoubleUtils.getRoundingNum(0.0,0));
|
|
|
+ sj.setClxcount(0);
|
|
|
+ sj.setClxtimes(DoubleUtils.getRoundingNum(0.0,0));
|
|
|
+ sj.setFdjcount(0);
|
|
|
+ sj.setFdjtimes(DoubleUtils.getRoundingNum(0.0,0));
|
|
|
+ sj.setBjcount(0);
|
|
|
+ sj.setBjtimes(DoubleUtils.getRoundingNum(0.0,0));
|
|
|
+
|
|
|
+ sj.setJccount(0);
|
|
|
+ sj.setJctimes(DoubleUtils.getRoundingNum(0.0,0));
|
|
|
+
|
|
|
+ sj.setPhcount(0);
|
|
|
+ sj.setPhtimes(DoubleUtils.getRoundingNum(0.0,0));
|
|
|
+
|
|
|
+ sj.setTdgcount(0);
|
|
|
+ sj.setTdgtimes(DoubleUtils.getRoundingNum(0.0,0));
|
|
|
+ bjyhdbs.add(sj);
|
|
|
+ }
|
|
|
+ healthReportVo.setBjyhdbs(bjyhdbs);
|
|
|
+ List<Reportdanger> yht2sj = reportdangerService.getBjyhdbBywt(wt.getId());
|
|
|
+// List<Jkbgbjyh> yht2sj = jkbgbjyhService.getBjyhdbBywt(wt.getId(),day);
|
|
|
+// List<Jkbgbjyh> yht2jz = jkbgbjyhService.getBjyhdbBywp(wt.getWindpowerstationid(),day);
|
|
|
+ List<YhmxdbVo> yhmxdbs = new ArrayList<>();
|
|
|
+ if (yht2sj!=null & yht2sj.size()>0){
|
|
|
+ yht2sj.stream().forEach(i->{
|
|
|
+ YhmxdbVo vo = new YhmxdbVo();
|
|
|
+ vo.setPart(i.getPart());
|
|
|
+ vo.setYhmx(i.getDanger());
|
|
|
+ vo.setCount(i.getCount());
|
|
|
+ vo.setTimes(DoubleUtils.getRoundingNum(i.getTimes(),0));
|
|
|
+ vo.setMeantimes(DoubleUtils.getRoundingNum(i.getTimesavg(),0));
|
|
|
+ vo.setMeancount(i.getCountavg());
|
|
|
+ yhmxdbs.add(vo);
|
|
|
+ });
|
|
|
+// yhmxdbs.stream().forEach(i->{
|
|
|
+// i.setMeancount(yht2jz.stream().filter(j->j.getAlerttext().equals(i.getYhmx())).findFirst().get().getCount());
|
|
|
+// i.setMeantimes(DoubleUtils.getRoundingNum(yht2jz.stream().filter(j->j.getAlerttext().equals(i.getYhmx())).findFirst().get().getTime(),2));
|
|
|
+// });
|
|
|
+ SortUtils.sort(yhmxdbs,"part",SortUtils.ASC);
|
|
|
+
|
|
|
+ }
|
|
|
+ healthReportVo.setYhmxdbs(yhmxdbs);
|
|
|
+ //故障分类
|
|
|
+ QueryWrapper<Faultstatisticwindturbine> faultstatisticwindturbineQueryWrapper = new QueryWrapper<>();
|
|
|
+ faultstatisticwindturbineQueryWrapper.eq("windturbineid",wt.getId());
|
|
|
+ faultstatisticwindturbineQueryWrapper.eq("year",String.valueOf(year));
|
|
|
+ faultstatisticwindturbineQueryWrapper.eq("month",String.valueOf(month));
|
|
|
+ List<Faultstatisticwindturbine> faultstatisticwindturbines = faultstatisticwindturbineService.list(faultstatisticwindturbineQueryWrapper);
|
|
|
+ SortUtils.sort(faultstatisticwindturbines,"monthwarningnum",SortUtils.DESC);
|
|
|
+ healthReportVo.setFaultclass(faultstatisticwindturbines);
|
|
|
+ //功率对部件温度影响
|
|
|
+
|
|
|
+ QueryWrapper<Reportpowerpartweather> reportpowerpartweatherQueryWrapper = new QueryWrapper<>();
|
|
|
+ reportpowerpartweatherQueryWrapper.eq("wtid",wt.getId());
|
|
|
+ List<Reportpowerpartweather> bjgltjbs = reportpowerpartweatherService.list(reportpowerpartweatherQueryWrapper);
|
|
|
+// List<Bjgltjb> bjgltjbs = bjgltjbService.getpartwds(wt.getId(),day);
|
|
|
+ List<PartwdVo> partwds = new ArrayList<>();
|
|
|
+ if (bjgltjbs!=null && bjgltjbs.size()>0){
|
|
|
+ bjgltjbs.stream().forEach(i->{
|
|
|
+ PartwdVo vo = new PartwdVo();
|
|
|
+ //(部件,温度分类,温度,实际值,平均值)
|
|
|
+ vo.setPart(i.getPartname());
|
|
|
+ vo.setType(i.getName());
|
|
|
+ vo.setPower(i.getPower());
|
|
|
+ vo.setValue(i.getDatavalue());
|
|
|
+ vo.setMeanvalue(i.getEarlywarningvalue());
|
|
|
+ partwds.add(vo);
|
|
|
+ });
|
|
|
+ SortUtils.sort(partwds,"part",SortUtils.DESC);
|
|
|
+
|
|
|
+ healthReportVo.setPartwds(partwds);
|
|
|
+ }
|
|
|
+
|
|
|
+ //部件劣化状态
|
|
|
+ //总览没做
|
|
|
+ //发电机,变桨。。。。。
|
|
|
+ List<Wttragetreportchart> wttragetreportcharts = wttragetreportchartService.listByWtAndDate(wt.getId(),day);
|
|
|
+ healthReportVo.setWttragetreportcharts(wttragetreportcharts);
|
|
|
+
|
|
|
+ //全生命周期管理
|
|
|
+
|
|
|
+ //指标
|
|
|
+ //风能利用率
|
|
|
+ List<Equipmentdayinfo> equipmentdayinfos =equipmentdayinfoService.getFjjxb(wt.getId());
|
|
|
+ List<FnlylVo> fnlyls = new ArrayList<>();
|
|
|
+ if (equipmentdayinfos!=null && equipmentdayinfos.size()>0){
|
|
|
+ for(int i=0;i<equipmentdayinfos.size();i++){
|
|
|
+ if (i<3){
|
|
|
+ Equipmentdayinfo equipmentdayinfo = equipmentdayinfos.get(i);
|
|
|
+ FnlylVo vo = new FnlylVo();
|
|
|
+ //(时间,发电量,理论,五损,风速,风能利用率)
|
|
|
+ vo.setDate(DateUtils.toDate1(equipmentdayinfo.getRecorddate()));
|
|
|
+ vo.setFdl(equipmentdayinfo.getGenecapacity());
|
|
|
+ vo.setGzdl(equipmentdayinfo.getDaynhgzssdl());
|
|
|
+ vo.setWhdl(equipmentdayinfo.getDaynhwhssdl());
|
|
|
+ vo.setXddl(equipmentdayinfo.getDaynhxdssdl());
|
|
|
+ vo.setXndl(equipmentdayinfo.getDaynhqfdl());
|
|
|
+ vo.setSldl(equipmentdayinfo.getDaynhcfdl());
|
|
|
+ vo.setLlfdl(equipmentdayinfo.getTherogenecapacity());
|
|
|
+ vo.setSpeed(equipmentdayinfo.getSpeed());
|
|
|
+ vo.setFnlyl(vo.getLlfdl()!=0?vo.getFdl()/vo.getLlfdl()*100:0.0);
|
|
|
+ fnlyls.add(vo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ healthReportVo.setFnlyls(fnlyls);
|
|
|
+ }
|
|
|
+ //设备可利用率
|
|
|
+ List<Windturbineinfoday> windturbineinfodays = windturbineinfodayService.getSbklyl(wt.getId());
|
|
|
+ List<SbklylVo> sbklyls = new ArrayList<>();
|
|
|
+ if (windturbineinfodays!=null && windturbineinfodays.size()>0){
|
|
|
+ for(int i=0;i<windturbineinfodays.size();i++){
|
|
|
+ if (i<3){
|
|
|
+ Windturbineinfoday windturbineinfoday = windturbineinfodays.get(i);
|
|
|
+ SbklylVo vo = new SbklylVo();
|
|
|
+ vo.setDate(DateUtils.toDate1(windturbineinfoday.getRecorddate()));
|
|
|
+ vo.setYxxs(windturbineinfoday.getRuntime());
|
|
|
+ vo.setDjxs(windturbineinfoday.getStoptime());
|
|
|
+ vo.setFjhjxxs(windturbineinfoday.getFaulttime());
|
|
|
+ vo.setJhjxxs(windturbineinfoday.getMaintaintime());
|
|
|
+ vo.setSlxs(0.0);
|
|
|
+ vo.setSbklyl(windturbineinfoday.getDaysbklyl());
|
|
|
+ sbklyls.add(vo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ healthReportVo.setSbklyls(sbklyls);
|
|
|
+ }
|
|
|
+ //性能对比
|
|
|
+ List<PjjgVo> pjjgs = new ArrayList<>();
|
|
|
+ List<Windturbineinfodaytop2> dydjpgs =windturbineinfodaytop2Service.findDjpgs(wt.getId(),day);
|
|
|
+ if (dydjpgs!=null && dydjpgs.size()>0){
|
|
|
+ Windturbineinfodaytop2 dy = dydjpgs.get(0);
|
|
|
+ PjjgVo vo = new PjjgVo();
|
|
|
+ vo.setDate(DateUtils.parseDate3(DateUtils.toDate(dy.getRecordDate())));
|
|
|
+ vo.setLevel(dy.getLevel());
|
|
|
+ vo.setScore(dy.getYearfs()+dy.getYearxnssdl()+dy.getYearLYXS()+dy.getYearNHYD()+dy.getYearSBKLYL()+dy.getYearDXKYXS()+dy.getYearyxfss()+dy.getYearxfqr()+dy.getYearjfpl()+dy.getYearglyzxxs());
|
|
|
+ vo.setRank(dy.getRank());
|
|
|
+ pjjgs.add(vo);
|
|
|
+ //(日期i,级别,得分,排行)
|
|
|
+ }
|
|
|
+ Date date1 = DateUtils.addMonths(date, -1);
|
|
|
+ List<Windturbineinfodaytop2> sydjpgs =windturbineinfodaytop2Service.findDjpgs(wt.getId(),DateUtils.toDate1(date1));
|
|
|
+ if (sydjpgs!=null && sydjpgs.size()>0){
|
|
|
+ Windturbineinfodaytop2 dy = sydjpgs.get(0);
|
|
|
+ PjjgVo vo = new PjjgVo();
|
|
|
+ vo.setDate(DateUtils.parseDate3(DateUtils.toDate(dy.getRecordDate())));
|
|
|
+ vo.setLevel(dy.getLevel());
|
|
|
+ vo.setScore(dy.getYearfs()+dy.getYearxnssdl()+dy.getYearLYXS()+dy.getYearNHYD()+dy.getYearSBKLYL()+dy.getYearDXKYXS()+dy.getYearyxfss()+dy.getYearxfqr()+dy.getYearjfpl()+dy.getYearglyzxxs());
|
|
|
+ vo.setRank(dy.getRank());
|
|
|
+ pjjgs.add(vo);
|
|
|
+ //(日期i,级别,得分,排行)
|
|
|
+ }
|
|
|
+ Date date2 = DateUtils.addMonths(date, -2);
|
|
|
+ List<Windturbineinfodaytop2> ssydjpgs =windturbineinfodaytop2Service.findDjpgs(wt.getId(),DateUtils.toDate1(date2));
|
|
|
+ if (ssydjpgs!=null && ssydjpgs.size()>0){
|
|
|
+ Windturbineinfodaytop2 dy = ssydjpgs.get(0);
|
|
|
+ PjjgVo vo = new PjjgVo();
|
|
|
+ vo.setDate(DateUtils.parseDate3(DateUtils.toDate(dy.getRecordDate())));
|
|
|
+ vo.setLevel(dy.getLevel());
|
|
|
+ vo.setScore(dy.getYearfs()+dy.getYearxnssdl()+dy.getYearLYXS()+dy.getYearNHYD()+dy.getYearSBKLYL()+dy.getYearDXKYXS()+dy.getYearyxfss()+dy.getYearxfqr()+dy.getYearjfpl()+dy.getYearglyzxxs());
|
|
|
+ vo.setRank(dy.getRank());
|
|
|
+ pjjgs.add(vo);
|
|
|
+ //(日期i,级别,得分,排行)
|
|
|
+ }
|
|
|
+ healthReportVo.setPjjgs(pjjgs);
|
|
|
+
|
|
|
+ //等级评估图
|
|
|
+ healthReportVo.setPjmxs(dydjpgs);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取两日期间日期list
|
|
|
+ *
|
|
|
+ * @param beginDate
|
|
|
+ * @param endDate
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public static List<String> getDays(String beginDate, String endDate) {
|
|
|
+ List<String> days = null;
|
|
|
+ if (StringUtils.isNotEmpty(beginDate) && StringUtils.isNotEmpty(endDate)) {
|
|
|
+ days = DateUtils.getDays(beginDate, endDate);
|
|
|
+ } else {
|
|
|
+ days = new ArrayList<>();
|
|
|
+ days.add(DateUtils.getYesterdayStr("yyyy-MM-dd"));
|
|
|
+ }
|
|
|
+ return days;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|