package com.gyee.generation.service;//package com.gyee.generation.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.gyee.common.model.StringUtils;
import com.gyee.generation.init.CacheContext;
import com.gyee.generation.model.auto.*;
import com.gyee.generation.service.auto.*;
import com.gyee.generation.util.DateUtils;
import com.gyee.generation.util.realtimesource.IEdosUtil;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;

@Service
public class ProEconEqOriginalService {

    //    private static final Logger logger = LoggerFactory.getLogger(EquipmentInfo1Service.class);
    @Resource
    private IEdosUtil edosUtil;

    @Resource
    private IProEconEquipmentInfoDay1Service proEconEquipmentInfoDay1Service;
    @Resource
    private IProEconEquipmentInfoDay2Service proEconEquipmentInfoDay2Service;
    @Resource
    private IProEconEquipmentInfoDay3Service proEconEquipmentInfoDay3Service;
    @Resource
    private IProEconEquipmentInfoDay4Service proEconEquipmentInfoDay4Service;

    //    @Resource
    //    private IProEconStaOriginalDayService proEconStaOriginalDayService;
    //    @Resource
    //    private IProEconStaOriginalMonthService proEconStaOriginalMonthService;
    //    @Resource
    //    private IProEconStaOriginalYearService proEconStaOriginalYearService;
    //    @Resource
    //    private IProEconStaTargetService proEconStaTargetService;
    //    @Resource
    //    private IProEconStaOriginalIndexService proEconStaOriginalIndexService;

    @Resource
    private IProEconEqOriginalDayService proEconEqOriginalDayService;
    @Resource
    private IProEconEqOriginalMonthService proEconEqOriginalMonthService;
    @Resource
    private IProEconEqOriginalYearService proEconEqOriginalYearService;
    @Resource
    private IProEconEqTargetService proEconEqTargetService;
    @Resource
    private IProEconEqOriginalIndexService proEconEqOriginalIndexService;
    @Resource
    private IProEconInputOrOutputSpeedService proEconInputOrOutputSpeedService;
    @Resource
    private IProEconShutdownEventService proEconShutdownEventService;

    /**
     * 计算设备日信息
     */
    public void calEquipmentInfoDay(Date recordDate) throws Exception {
        Calendar c = Calendar.getInstance();
        c.setTime(recordDate);

        Date end = c.getTime();

        Date begin = DateUtils.truncate(c.getTime());

        QueryWrapper<ProEconEqOriginalDay> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("record_date", recordDate);

        proEconEqOriginalDayService.remove(queryWrapper);

        QueryWrapper<ProEconEqOriginalMonth> queryWrappermonth = new QueryWrapper<>();
        queryWrappermonth.eq("record_date", recordDate);

        proEconEqOriginalMonthService.remove(queryWrappermonth);

        QueryWrapper<ProEconEqOriginalYear> queryWrapperyear = new QueryWrapper<>();
        queryWrapperyear.eq("record_date", recordDate);

        proEconEqOriginalYearService.remove(queryWrapperyear);


        //        QueryWrapper<ProEconEqOriginalIndex> queryWrapper0 = new QueryWrapper<>();
        //        queryWrapper0.eq("record_date", recordDate);
        //
        //
        //        proEconEqOriginalIndexService.remove(queryWrapper0);


        List<ProEconEqTarget> targetList = proEconEqTargetService.list();


        List<ProEconEqOriginalDay> dayls = new ArrayList<>();
        List<ProEconEqOriginalMonth> monthls = new ArrayList<>();
        List<ProEconEqOriginalYear> yearls = new ArrayList<>();

        for (ProBasicEquipment wt : CacheContext.wtls) {


            ProEconEqOriginalDay pewp = new ProEconEqOriginalDay();
            ProEconEqOriginalMonth pewpmonth = new ProEconEqOriginalMonth();
            ProEconEqOriginalYear pewpyear = new ProEconEqOriginalYear();

            initial(pewp);
            initial(pewpmonth);
            initial(pewpyear);

            pewp.setTypes(wt.getStatus());
            pewp.setWindturbineName(wt.getName());
            pewp.setRecordDate(DateUtils.truncate(recordDate));
            pewp.setWindturbineId(wt.getId());
            pewp.setWindpowerstationId(wt.getWindpowerstationId());
            pewp.setProjectId(wt.getProjectId());
            pewp.setLineId(wt.getLineId());

            int month = c.get(Calendar.MONTH) + 1;
            int year = c.get(Calendar.YEAR);
            pewpmonth.setYear(year);
            pewpmonth.setMonth(month);
            pewpmonth.setTypes(wt.getStatus());
            pewpmonth.setWindturbineName(wt.getName());
            pewpmonth.setRecordDate(DateUtils.truncate(recordDate));
            pewpmonth.setWindturbineId(wt.getId());
            pewpmonth.setWindpowerstationId(wt.getWindpowerstationId());
            pewpmonth.setProjectId(wt.getProjectId());
            pewpmonth.setLineId(wt.getLineId());

            pewpyear.setYear(year);
            pewpyear.setTypes(wt.getStatus());
            pewpyear.setWindturbineName(wt.getName());
            pewpyear.setRecordDate(DateUtils.truncate(recordDate));
            pewpyear.setWindturbineId(wt.getId());
            pewpyear.setWindpowerstationId(wt.getWindpowerstationId());
            pewpyear.setProjectId(wt.getProjectId());
            pewpyear.setLineId(wt.getLineId());

            List<ProEconEquipmentInfoDay1> pepid1ls = new ArrayList<>();
            List<ProEconEquipmentInfoDay2> pepid2ls = new ArrayList<>();
            List<ProEconEquipmentInfoDay3> pepid3ls = new ArrayList<>();
            List<ProEconEquipmentInfoDay4> pepid4ls = new ArrayList<>();
            List<ProEconInputOrOutputSpeed> pepid5ls = new ArrayList<>();
            List<ProEconShutdownEvent> pepid6ls = new ArrayList<>();


            Calendar cl = Calendar.getInstance();
            cl.setTime(DateUtils.truncate(recordDate));

            QueryWrapper<ProEconEquipmentInfoDay1> queryWrapper1 = new QueryWrapper<>();
            queryWrapper1.eq("record_date", cl.getTime())
                    .eq("windturbine_Id", wt.getId());
            pepid1ls = proEconEquipmentInfoDay1Service.list(queryWrapper1);

            QueryWrapper<ProEconEquipmentInfoDay2> queryWrapper2 = new QueryWrapper<>();
            queryWrapper2.eq("record_date", cl.getTime())
                    .eq("windturbine_Id", wt.getId());
            pepid2ls = proEconEquipmentInfoDay2Service.list(queryWrapper2);

            QueryWrapper<ProEconEquipmentInfoDay3> queryWrapper3 = new QueryWrapper<>();
            queryWrapper3.eq("record_date", cl.getTime())
                    .eq("windturbine_Id", wt.getId());
            pepid3ls = proEconEquipmentInfoDay3Service.list(queryWrapper3);

            QueryWrapper<ProEconEquipmentInfoDay4> queryWrapper4 = new QueryWrapper<>();
            queryWrapper4.eq("record_date", cl.getTime())
                    .eq("windturbine_Id", wt.getId());
            pepid4ls = proEconEquipmentInfoDay4Service.list(queryWrapper4);


            Calendar cal = Calendar.getInstance();
            cal.setTime(DateUtils.truncate(recordDate));
            Date beginTime = cal.getTime();
            cal.add(Calendar.DAY_OF_MONTH, 1);
            Date endTime = cal.getTime();

            QueryWrapper<ProEconInputOrOutputSpeed> queryWrapper5 = new QueryWrapper<>();
            queryWrapper5.ge("record_date", beginTime).le("record_date", endTime)
                    .eq("windturbine_Id", wt.getId());
            pepid5ls = proEconInputOrOutputSpeedService.list(queryWrapper5);

            QueryWrapper<ProEconShutdownEvent> queryWrapper6 = new QueryWrapper<>();


            queryWrapper6.ge("stop_Time", beginTime).le("stop_Time", endTime)
                    .isNotNull("start_Time")
                    .eq("windturbine_Id", wt.getId());
            pepid6ls = proEconShutdownEventService.list(queryWrapper6);


            calDay(wt, pewp, pepid1ls, pepid2ls, pepid3ls, pepid4ls, pepid5ls, pepid6ls);
            /***********************************************************************************************************/

            cal = Calendar.getInstance();
            cal.setTime(DateUtils.truncate(recordDate));
            cal.set(Calendar.DAY_OF_MONTH, 1);
            beginTime = cal.getTime();
            cal.setTime(DateUtils.truncate(recordDate));
            cal.add(Calendar.DAY_OF_MONTH, 1);
            endTime = cal.getTime();

            queryWrapper5 = new QueryWrapper<>();
            queryWrapper5.ge("record_date", beginTime).le("record_date", endTime)
                    .eq("windturbine_Id", wt.getId());
            pepid5ls = proEconInputOrOutputSpeedService.list(queryWrapper5);

            queryWrapper6 = new QueryWrapper<>();


            queryWrapper6.ge("stop_Time", beginTime).le("stop_Time", endTime)
                    .isNotNull("start_Time")
                    .eq("windturbine_Id", wt.getId());
            pepid6ls = proEconShutdownEventService.list(queryWrapper6);

            calMonth(wt, pewpmonth, pepid1ls, pepid2ls, pepid3ls, pepid4ls, pepid5ls, pepid6ls);
            /***********************************************************************************************************/

            cal = Calendar.getInstance();
            cal.setTime(DateUtils.truncate(recordDate));
            cal.set(Calendar.DAY_OF_YEAR, 1);
            beginTime = cal.getTime();
            cal.setTime(DateUtils.truncate(recordDate));
            cal.add(Calendar.DAY_OF_MONTH, 1);
            endTime = cal.getTime();

            queryWrapper5 = new QueryWrapper<>();
            queryWrapper5.ge("record_date", beginTime).le("record_date", endTime)
                    .eq("windturbine_Id", wt.getId());
            pepid5ls = proEconInputOrOutputSpeedService.list(queryWrapper5);

            queryWrapper6 = new QueryWrapper<>();


            queryWrapper6.ge("stop_Time", beginTime).le("stop_Time", endTime)
                    .isNotNull("start_Time")
                    .eq("windturbine_Id", wt.getId());
            pepid6ls = proEconShutdownEventService.list(queryWrapper6);

            calYear(wt, pewpyear, pepid1ls, pepid2ls, pepid3ls, pepid4ls, pepid5ls, pepid6ls);


            //            List<ProEconEqOriginalIndex> indexls = new ArrayList<>();
            //
            //            if (!targetList.isEmpty()) {
            //
            //                Field[] fields = pewp.getClass().getDeclaredFields();
            //                HashMap<String, String> daymap = new HashMap<>();
            //                for (Field field : fields) {
            //                    field.setAccessible(true);
            //                    try {
            //                        // 把对象的属性做k，值做v
            //                        // 当然中间还可做其他的业务操作，比如跳过某些属性什么的
            //                        String name = field.getName();
            //
            //
            //                        if(null !=field.get(pewp))
            //                        {
            //                            String s = String.valueOf(field.get(pewp));
            //                            daymap.put(name, s);
            //                        }
            //                    } catch (Exception e) {
            //                        e.printStackTrace();
            //                    }
            //                }
            //
            //                fields = pewpmonth.getClass().getDeclaredFields();
            //                HashMap<String, String> monthmap = new HashMap<>();
            //                for (Field field : fields) {
            //                    field.setAccessible(true);
            //                    try {
            //                        // 把对象的属性做k，值做v
            //                        // 当然中间还可做其他的业务操作，比如跳过某些属性什么的
            //                        String name = field.getName();
            //
            //                        if(null !=field.get(pewpmonth))
            //                        {
            //                            String s = String.valueOf(field.get(pewpmonth));
            //                            monthmap.put(name, s);
            //                        }
            //                    } catch (Exception e) {
            //                        e.printStackTrace();
            //                    }
            //                }
            //
            //                fields = pewpyear.getClass().getDeclaredFields();
            //                HashMap<String, String> yearmap = new HashMap<>();
            //                for (Field field : fields) {
            //                    field.setAccessible(true);
            //                    try {
            //                        // 把对象的属性做k，值做v
            //                        // 当然中间还可做其他的业务操作，比如跳过某些属性什么的
            //                        String name = field.getName();
            //                        if(null !=field.get(pewpyear))
            //                        {
            //                            String s = field.get(pewpyear).toString();
            //                            yearmap.put(name, s);
            //                        }
            //
            //
            //                    } catch (Exception e) {
            //                        e.printStackTrace();
            //                    }
            //                }
            //
            //
            //                for (ProEconEqTarget tar : targetList) {
            //
            //                    ProEconEqOriginalIndex index = new ProEconEqOriginalIndex();
            //                    index.setTargetid(tar.getId());
            //                    index.setTargetname(tar.getTargetname());
            //                    index.setTargettype(tar.getTargettype());
            //                    index.setWindturbineName(wt.getName());
            //                    index.setRecordDate(DateUtils.truncate(recordDate));
            //                    index.setWindturbineId(wt.getId());
            //                    if (tar.getTablename().equals("pro_econ_eq_original_day")) {
            //                        if (daymap.containsKey(tar.getTablefiled())) {
            //                            String value = daymap.get(tar.getTablefiled());
            //                            index.setTargetvalue(Double.valueOf(value));
            //                            index.setTargetvaluemod(Double.valueOf(value));
            //                        }
            //                    } else if (tar.getTablename().equals("pro_econ_eq_original_month")) {
            //                        if (monthmap.containsKey(tar.getTablefiled())) {
            //                            String value = monthmap.get(tar.getTablefiled());
            //                            index.setTargetvalue(Double.valueOf(value));
            //                            index.setTargetvaluemod(Double.valueOf(value));
            //                        }
            //                    } else if (tar.getTablename().equals("pro_econ_eq_original_year")) {
            //                        if (yearmap.containsKey(tar.getTablefiled())) {
            //                            String value = yearmap.get(tar.getTablefiled());
            //                            index.setTargetvalue(Double.valueOf(value));
            //                            index.setTargetvaluemod(Double.valueOf(value));
            //                        }
            //                    }
            //                    indexls.add(index);
            //                }
            //
            //                proEconEqOriginalIndexService.saveBatch(indexls);
            //            }

            dayls.add(pewp);
            monthls.add(pewpmonth);
            yearls.add(pewpyear);


        }
        proEconEqOriginalDayService.saveBatch(dayls);
        proEconEqOriginalMonthService.saveBatch(monthls);
        proEconEqOriginalYearService.saveBatch(yearls);

    }

    private static void calDay(ProBasicEquipment wt, ProEconEqOriginalDay pewp, List<ProEconEquipmentInfoDay1> pepid1ls, List<ProEconEquipmentInfoDay2> pepid2ls, List<ProEconEquipmentInfoDay3> pepid3ls, List<ProEconEquipmentInfoDay4> pepid4ls, List<ProEconInputOrOutputSpeed> pepid5ls, List<ProEconShutdownEvent> pepid6ls) {
        if (!pepid1ls.isEmpty()) {
            ProEconEquipmentInfoDay1 day1 = pepid1ls.get(0);
            //日发电量
            pewp.setTarget01(day1.getRfdl());
            //日试运行发电量
            pewp.setTarget02(0.0);
            //日最大风速
            pewp.setTarget03(day1.getRzdfs());
            //日最小风速
            pewp.setTarget04(day1.getRzxfs());
            //日最大功率
            pewp.setTarget05(day1.getRzdgl());
            //日最小功率
            pewp.setTarget06(day1.getRzxgl());
            //日平均功率
            pewp.setTarget07(day1.getRpjgl());
            //日平均风速
            pewp.setTarget08(day1.getRpjfs());

            //日设计理论发电量（千瓦时）
            pewp.setTarget09(day1.getRfdl() * 0.95);
            //日实际理论发电量（千瓦时）
            pewp.setTarget10(day1.getRllfdl());
            //日智慧风电理论发电量（千瓦时
            pewp.setTarget11(day1.getRllfdl() * 0.93);
            //日风能利用率
            pewp.setTarget12(0.0);

            //日损失电量（千瓦时）
            double total = day1.getRgzssdl() + day1.getRcnslgzssdl() + day1.getRjxssdl() + day1.getRcnsljxssdl() + day1.getRdjssdl() + day1.getRqxjclssdl() +
                    day1.getRsdtjssdl() + day1.getRxnssdl() + day1.getRxdtjssdl() + day1.getRxdjclssdl() + day1.getRcwsldwssdl() + day1.getRcwsltqssdl();
            pewp.setTarget13(StringUtils.round(total, 2));
            //日故障损失电量 	target16
            pewp.setTarget16(StringUtils.round(day1.getRgzssdl() + day1.getRcnslgzssdl(), 2));
            //日故障损失率 target17
            if (day1.getRllfdl() != 0) {
                double result = new BigDecimal(day1.getRgzssdl() + day1.getRcnslgzssdl()).divide(new BigDecimal(day1.getRllfdl()), 2, RoundingMode.HALF_EVEN).doubleValue();
                pewp.setTarget17(result);
            }

            //日检修损失电量 target20
            pewp.setTarget20(StringUtils.round(day1.getRjxssdl() + day1.getRcnsljxssdl(), 2));
            //日检修损失率 target21
            if (day1.getRllfdl() != 0) {
                double result = new BigDecimal(day1.getRjxssdl() + day1.getRcnsljxssdl()).divide(new BigDecimal(day1.getRllfdl()), 2, RoundingMode.HALF_EVEN).doubleValue();
                pewp.setTarget21(result);
            }
            //日性能损失电量 target24
            pewp.setTarget24(StringUtils.round(day1.getRxnssdl() + day1.getRsdtjssdl(), 2));
            //日性能损失率 target25
            if (day1.getRllfdl() != 0) {
                double result = new BigDecimal(day1.getRxnssdl() + day1.getRsdtjssdl()).divide(new BigDecimal(day1.getRllfdl()), 2, RoundingMode.HALF_EVEN).doubleValue();
                pewp.setTarget25(result);
            }


            //日限电损失电量 target28
            pewp.setTarget28(StringUtils.round(day1.getRxdjclssdl() + day1.getRxdtjssdl(), 2));
            //日限电损失率 target29
            if (day1.getRllfdl() != 0) {
                double result = new BigDecimal(day1.getRxdjclssdl() + day1.getRxdtjssdl()).divide(new BigDecimal(day1.getRllfdl()), 2, RoundingMode.HALF_EVEN).doubleValue();
                pewp.setTarget29(result);
            }
            //日弃风率 	target30
            if (day1.getRfdl() != 0) {
                double result = new BigDecimal(day1.getRxdjclssdl() + day1.getRxdtjssdl()).divide(new BigDecimal(day1.getRfdl()), 2, RoundingMode.HALF_EVEN).doubleValue();
                pewp.setTarget30(result + pewp.getTarget29());
            }
            //日弃发比 target31
            if (day1.getRfdl() != 0) {
                double result = new BigDecimal(day1.getRxdjclssdl() + day1.getRxdtjssdl()).divide(new BigDecimal(day1.getRfdl()), 2, RoundingMode.HALF_EVEN).doubleValue();
                pewp.setTarget31(result);
            }
            //日受累损失电量 target34
            pewp.setTarget34(StringUtils.round(day1.getRcwsldwssdl() + day1.getRcwsltqssdl(), 2));
            //日受累损失率 target35
            if (day1.getRllfdl() != 0) {
                double result = new BigDecimal(day1.getRcwsldwssdl() + day1.getRcwsltqssdl()).divide(new BigDecimal(day1.getRllfdl()), 2, RoundingMode.HALF_EVEN).doubleValue();
                pewp.setTarget35(result);
            }
        }

        if (!pepid2ls.isEmpty()) {
            ProEconEquipmentInfoDay2 day2 = pepid2ls.get(0);
            //日故障损失时长target14
            pewp.setTarget14(StringUtils.round(day2.getRgzxsmx() + day2.getRcnslgzxsmx(), 2));
            //日检修损失时长（小时） target18
            pewp.setTarget18(StringUtils.round(day2.getRjxxsmx() + day2.getRcnsljxxsmx(), 2));
            //日性能损失时长（小时） target22
            pewp.setTarget22(StringUtils.round(day2.getRqxjclxsmx() + day2.getRsdtjxsmx(), 2));
            //日限电时长（小时） target26
            pewp.setTarget26(StringUtils.round(day2.getRxdjclxsmx() + day2.getRxdtjxsmx(), 2));
            //日受累损失时长（小时） target32
            pewp.setTarget32(StringUtils.round(day2.getRcwsldwxsmx() + day2.getRcwsltqxsmx(), 2));


            //日等效可利用系数 target54
            double result = new BigDecimal(24 - pewp.getTarget14() - pewp.getTarget18()).divide(new BigDecimal(24), 2, RoundingMode.HALF_EVEN).doubleValue();
            pewp.setTarget54(result);
            //日设备可利用率target55
            result = new BigDecimal(24 - pewp.getTarget14()).divide(new BigDecimal(24), 2, RoundingMode.HALF_EVEN).doubleValue();
            pewp.setTarget55(result);


        }
        if (!pepid3ls.isEmpty()) {
            ProEconEquipmentInfoDay3 day3 = pepid3ls.get(0);
            //日故障次数 target15
            pewp.setTarget15(StringUtils.round(day3.getRgzcsmx() + day3.getRcnslgzcsmx(), 2));
            //日检修次数 target19
            pewp.setTarget19(StringUtils.round(day3.getRjxcsmx() + day3.getRcnsljxcsmx(), 2));
            //日性能损失次数 target23
            pewp.setTarget23(StringUtils.round(day3.getRqxjclcsmx() + day3.getRsdtjcsmx(), 2));
            //日限电次数 target27
            pewp.setTarget27(StringUtils.round(day3.getRxdjclcsmx() + day3.getRxdtjcsmx(), 2));
            //日受累次数 target33
            pewp.setTarget33(StringUtils.round(day3.getRcwsldwcsmx() + day3.getRcwsltqcsmx(), 2));

        }

        //日统计小时target36
        pewp.setTarget36(24.0);

        if (!pepid4ls.isEmpty()) {
            ProEconEquipmentInfoDay4 day4 = pepid4ls.get(0);

            //日平均切入风速 target39
            pewp.setTarget39(day4.getRdfqrfs());
            //日平均切出风速	target40
            pewp.setTarget40(day4.getRxfqcfs());
            //日最大切出风速target41
            pewp.setTarget41(day4.getRdfqcfs());
            //日最小切入风速 target42
            pewp.setTarget42(day4.getRxfqcfs());
            //日额定功率 target43
            if (CacheContext.modelMap.containsKey(wt.getModelId())) {
                ProEconEquipmentmodel model = CacheContext.modelMap.get(wt.getModelId());
                pewp.setTarget43(model.getPowerProduction());
            }
            //日额定风速 target44
            pewp.setTarget44(day4.getRedfs());
            //日设备利用小时 target45
            if (!pepid1ls.isEmpty() && pewp.getTarget43() != 0) {
                ProEconEquipmentInfoDay1 day1 = pepid1ls.get(0);

                double result = new BigDecimal(day1.getRfdl()).divide(new BigDecimal(pewp.getTarget43()), 2, RoundingMode.HALF_EVEN).doubleValue();
                pewp.setTarget45(result);

                result = new BigDecimal(day1.getRpjgl()).divide(new BigDecimal(pewp.getTarget43()), 2, RoundingMode.HALF_EVEN).doubleValue();
                //日负荷率target56
                pewp.setTarget56(result);

            }

            //日功率一致性系数target57
            pewp.setTarget57(day4.getRglyzxxs());
            //日拟合优度target58
            pewp.setTarget58(day4.getRnhyd());
            //日曲线偏差率 target59
            pewp.setTarget59(day4.getRqxpcbbg());
            //日故障消缺及时率 target60
            pewp.setTarget60(day4.getRgzxqjsl());
            //日状态转换及时率 target61
            pewp.setTarget61(day4.getRztzhjsl());
            //日复位及时率target62
            pewp.setTarget62(day4.getRfwjsl());
            //日MTBF target63
            pewp.setTarget63(day4.getRmtbf());
            //日MTTR target64
            pewp.setTarget64(day4.getRmttr());
            //日MTTF target65
            pewp.setTarget65(day4.getRmttr());
        }

        if (!pepid5ls.isEmpty()) {
            List<ProEconInputOrOutputSpeed> list = pepid5ls.stream().filter(i -> i.getInputOrOutput() == 1).collect(Collectors.toList());
            //日切入次数target37
            pewp.setTarget37(Double.valueOf(list.size()));
            list = pepid5ls.stream().filter(i -> i.getInputOrOutput() == 0).collect(Collectors.toList());
            //日切出次数target38
            pewp.setTarget38(Double.valueOf(list.size()));
        }


        if (!pepid6ls.isEmpty()) {
            int time30m = 0;
            int time6h = 0;
            int time12h = 0;
            int time24h = 0;
            int time72h = 0;
            int time168h = 0;
            int time = 0;
            for (ProEconShutdownEvent vo : pepid6ls) {
                if (vo.getStopHours() < 0.5) {
                    time30m++;
                }
                if (vo.getStopHours() < 6) {
                    time6h++;
                }
                if (vo.getStopHours() < 12) {
                    time12h++;
                }
                if (vo.getStopHours() < 24) {
                    time24h++;
                }
                if (vo.getStopHours() < 72) {
                    time72h++;
                }
                if (vo.getStopHours() < 168) {
                    time168h++;
                }
                if (vo.getStopHours() > 168) {
                    time++;
                }
            }

            //日30分钟内故障消除次数 target46
            pewp.setTarget46(Double.valueOf(time30m));
            //日6小时内故障消除次数	target47
            pewp.setTarget47(Double.valueOf(time6h));
            //日12小时内故障消除次数	target48
            pewp.setTarget48(Double.valueOf(time12h));
            //日24小时内故障消除次数	target49
            pewp.setTarget49(Double.valueOf(time24h));
            //日72小时内故障消除次数	target50
            pewp.setTarget50(Double.valueOf(time72h));
            //日168小时内故障消除次数	target51
            pewp.setTarget51(Double.valueOf(time168h));
            //日168小时外故障消除次数	target52
            pewp.setTarget52(Double.valueOf(time));
            //日故障消缺总次数	target53
            pewp.setTarget53(Double.valueOf(time));
        }
    }

    private static void calMonth(ProBasicEquipment wt, ProEconEqOriginalMonth pewp, List<ProEconEquipmentInfoDay1> pepid1ls, List<ProEconEquipmentInfoDay2> pepid2ls, List<ProEconEquipmentInfoDay3> pepid3ls, List<ProEconEquipmentInfoDay4> pepid4ls, List<ProEconInputOrOutputSpeed> pepid5ls, List<ProEconShutdownEvent> pepid6ls) {
        if (!pepid1ls.isEmpty()) {
            ProEconEquipmentInfoDay1 day1 = pepid1ls.get(0);
            //月发电量
            pewp.setTarget01(day1.getYfdl());
            //月试运行发电量
            pewp.setTarget02(0.0);
            //月最大风速
            pewp.setTarget03(day1.getYzdfs());
            //月最小风速
            pewp.setTarget04(day1.getYzxfs());
            //月最大功率
            pewp.setTarget05(day1.getYzdgl());
            //月最小功率
            pewp.setTarget06(day1.getYzxgl());
            //月平均功率
            pewp.setTarget07(day1.getYpjgl());
            //月平均风速
            pewp.setTarget08(day1.getYpjfs());

            //月设计理论发电量（千瓦时）
            pewp.setTarget09(day1.getYfdl() * 0.95);
            //月实际理论发电量（千瓦时）
            pewp.setTarget10(day1.getYllfdl());
            //月智慧风电理论发电量（千瓦时
            pewp.setTarget11(day1.getYllfdl() * 0.93);
            //月风能利用率
            pewp.setTarget12(0.0);

            //月损失电量（千瓦时）
            double total = day1.getYgzssdl() + day1.getYcnslgzssdl() + day1.getYjxssdl() + day1.getYcnsljxssdl() + day1.getYdjssdl() + day1.getYqxjclssdl() +
                    day1.getYsdtjssdl() + day1.getYxnssdl() + day1.getYxdtjssdl() + day1.getYxdjclssdl() + day1.getYcwsldwssdl() + day1.getYcwsltqssdl();
            pewp.setTarget13(StringUtils.round(total, 2));
            //月故障损失电量 	target16
            pewp.setTarget16(StringUtils.round(day1.getYgzssdl() + day1.getYcnslgzssdl(), 2));
            //月故障损失率 target17
            if (day1.getYllfdl() != 0) {
                double result = new BigDecimal(day1.getYgzssdl() + day1.getYcnslgzssdl()).divide(new BigDecimal(day1.getYllfdl()), 2, RoundingMode.HALF_EVEN).doubleValue();
                pewp.setTarget17(result);
            }

            //月检修损失电量 target20
            pewp.setTarget20(StringUtils.round(day1.getYjxssdl() + day1.getYcnsljxssdl(), 2));
            //月检修损失率 target21
            if (day1.getYllfdl() != 0) {
                double result = new BigDecimal(day1.getYjxssdl() + day1.getYcnsljxssdl()).divide(new BigDecimal(day1.getYllfdl()), 2, RoundingMode.HALF_EVEN).doubleValue();
                pewp.setTarget21(result);
            }
            //月性能损失电量 target24
            pewp.setTarget24(StringUtils.round(day1.getYxnssdl() + day1.getYsdtjssdl(), 2));
            //月性能损失率 target25
            if (day1.getYllfdl() != 0) {
                double result = new BigDecimal(day1.getYxnssdl() + day1.getYsdtjssdl()).divide(new BigDecimal(day1.getYllfdl()), 2, RoundingMode.HALF_EVEN).doubleValue();
                pewp.setTarget25(result);
            }


            //月限电损失电量 target28
            pewp.setTarget28(StringUtils.round(day1.getYxdjclssdl() + day1.getYxdtjssdl(), 2));
            //月限电损失率 target29
            if (day1.getYllfdl() != 0) {
                double result = new BigDecimal(day1.getYxdjclssdl() + day1.getYxdtjssdl()).divide(new BigDecimal(day1.getYllfdl()), 2, RoundingMode.HALF_EVEN).doubleValue();
                pewp.setTarget29(result);
            }
            //月弃风率 	target30
            if (day1.getYfdl() != 0) {
                double result = new BigDecimal(day1.getYxdjclssdl() + day1.getYxdtjssdl()).divide(new BigDecimal(day1.getYfdl()), 2, RoundingMode.HALF_EVEN).doubleValue();
                pewp.setTarget30(result + pewp.getTarget29());
            }
            //月弃发比 target31
            if (day1.getYfdl() != 0) {
                double result = new BigDecimal(day1.getYxdjclssdl() + day1.getYxdtjssdl()).divide(new BigDecimal(day1.getYfdl()), 2, RoundingMode.HALF_EVEN).doubleValue();
                pewp.setTarget31(result);
            }
            //月受累损失电量 target34
            pewp.setTarget34(StringUtils.round(day1.getYcwsldwssdl() + day1.getYcwsltqssdl(), 2));
            //月受累损失率 target35
            if (day1.getYllfdl() != 0) {
                double result = new BigDecimal(day1.getYcwsldwssdl() + day1.getYcwsltqssdl()).divide(new BigDecimal(day1.getYllfdl()), 2, RoundingMode.HALF_EVEN).doubleValue();
                pewp.setTarget35(result);
            }
        }

        if (!pepid2ls.isEmpty()) {
            ProEconEquipmentInfoDay2 day2 = pepid2ls.get(0);
            //月故障损失时长target14
            pewp.setTarget14(StringUtils.round(day2.getYgzxsmx() + day2.getYcnslgzxsmx(), 2));
            //月检修损失时长（小时） target18
            pewp.setTarget18(StringUtils.round(day2.getYjxxsmx() + day2.getYcnsljxxsmx(), 2));
            //月性能损失时长（小时） target22
            pewp.setTarget22(StringUtils.round(day2.getYqxjclxsmx() + day2.getYsdtjxsmx(), 2));
            //月限电时长（小时） target26
            pewp.setTarget26(StringUtils.round(day2.getYxdjclxsmx() + day2.getYxdtjxsmx(), 2));
            //月受累损失时长（小时） target32
            pewp.setTarget32(StringUtils.round(day2.getYcwsldwxsmx() + day2.getYcwsltqxsmx(), 2));


            //月等效可利用系数 target54
            double result = new BigDecimal(24 - pewp.getTarget14() - pewp.getTarget18()).divide(new BigDecimal(24), 2, RoundingMode.HALF_EVEN).doubleValue();
            pewp.setTarget54(result);
            //月设备可利用率target55
            result = new BigDecimal(24 - pewp.getTarget14()).divide(new BigDecimal(24), 2, RoundingMode.HALF_EVEN).doubleValue();
            pewp.setTarget55(result);
            //日历小时
            pewp.setTarget66(24.0);

        }
        if (!pepid3ls.isEmpty()) {
            ProEconEquipmentInfoDay3 day3 = pepid3ls.get(0);
            //月故障次数 target15
            pewp.setTarget15(StringUtils.round(day3.getYgzcsmx() + day3.getYcnslgzcsmx(), 2));
            //月检修次数 target19
            pewp.setTarget19(StringUtils.round(day3.getYjxcsmx() + day3.getYcnsljxcsmx(), 2));
            //月性能损失次数 target23
            pewp.setTarget23(StringUtils.round(day3.getYqxjclcsmx() + day3.getYsdtjcsmx(), 2));
            //月限电次数 target27
            pewp.setTarget27(StringUtils.round(day3.getYxdjclcsmx() + day3.getYxdtjcsmx(), 2));
            //月受累次数 target33
            pewp.setTarget33(StringUtils.round(day3.getYcwsldwcsmx() + day3.getYcwsltqcsmx(), 2));

        }

        Calendar c = Calendar.getInstance();
        c.setTime(pewp.getRecordDate());
        int day = c.get(Calendar.DAY_OF_MONTH);
        //月统计小时target36
        pewp.setTarget36(day * 24.0);

        if (!pepid4ls.isEmpty()) {
            ProEconEquipmentInfoDay4 day4 = pepid4ls.get(0);

            //月平均切入风速 target39
            pewp.setTarget39(day4.getYdfqrfs());
            //月平均切出风速	target40
            pewp.setTarget40(day4.getYxfqcfs());
            //月最大切出风速target41
            pewp.setTarget41(day4.getYdfqcfs());
            //月最小切入风速 target42
            pewp.setTarget42(day4.getYxfqcfs());
            //月额定功率 target43
            if (CacheContext.modelMap.containsKey(wt.getModelId())) {
                ProEconEquipmentmodel model = CacheContext.modelMap.get(wt.getModelId());
                pewp.setTarget43(model.getPowerProduction());
            }
            //月额定风速 target44
            pewp.setTarget44(day4.getYedfs());
            //月设备利用小时 target45
            if (!pepid1ls.isEmpty() && pewp.getTarget43() != 0) {
                ProEconEquipmentInfoDay1 day1 = pepid1ls.get(0);

                double result = new BigDecimal(day1.getYfdl()).divide(new BigDecimal(pewp.getTarget43()), 2, RoundingMode.HALF_EVEN).doubleValue();
                pewp.setTarget45(result);

                result = new BigDecimal(day1.getYpjgl()).divide(new BigDecimal(pewp.getTarget43()), 2, RoundingMode.HALF_EVEN).doubleValue();
                //月负荷率target56
                pewp.setTarget56(result);

            }

            //月功率一致性系数target57
            pewp.setTarget57(day4.getYglyzxxs());
            //月拟合优度target58
            pewp.setTarget58(day4.getYnhyd());
            //月曲线偏差率 target59
            pewp.setTarget59(day4.getYqxpcbbg());
            //月故障消缺及时率 target60
            pewp.setTarget60(day4.getYgzxqjsl());
            //月状态转换及时率 target61
            pewp.setTarget61(day4.getYztzhjsl());
            //月复位及时率target62
            pewp.setTarget62(day4.getYfwjsl());
            //月MTBF target63
            pewp.setTarget63(day4.getYmtbf());
            //月MTTR target64
            pewp.setTarget64(day4.getYmttr());
            //月MTTF target65
            pewp.setTarget65(day4.getYmttr());
        }

        if (!pepid5ls.isEmpty()) {
            List<ProEconInputOrOutputSpeed> list = pepid5ls.stream().filter(i -> i.getInputOrOutput() == 1).collect(Collectors.toList());
            //月切入次数target37
            pewp.setTarget37(Double.valueOf(list.size()));
            list = pepid5ls.stream().filter(i -> i.getInputOrOutput() == 0).collect(Collectors.toList());
            //月切出次数target38
            pewp.setTarget38(Double.valueOf(list.size()));
        }


        if (!pepid6ls.isEmpty()) {
            int time30m = 0;
            int time6h = 0;
            int time12h = 0;
            int time24h = 0;
            int time72h = 0;
            int time168h = 0;
            int time = 0;
            for (ProEconShutdownEvent vo : pepid6ls) {
                if (vo.getStopHours() < 0.5) {
                    time30m++;
                }
                if (vo.getStopHours() < 6) {
                    time6h++;
                }
                if (vo.getStopHours() < 12) {
                    time12h++;
                }
                if (vo.getStopHours() < 24) {
                    time24h++;
                }
                if (vo.getStopHours() < 72) {
                    time72h++;
                }
                if (vo.getStopHours() < 168) {
                    time168h++;
                }
                if (vo.getStopHours() > 168) {
                    time++;
                }
            }

            //月30分钟内故障消除次数 target46
            pewp.setTarget46(Double.valueOf(time30m));
            //月6小时内故障消除次数	target47
            pewp.setTarget47(Double.valueOf(time6h));
            //月12小时内故障消除次数	target48
            pewp.setTarget48(Double.valueOf(time12h));
            //月24小时内故障消除次数	target49
            pewp.setTarget49(Double.valueOf(time24h));
            //月72小时内故障消除次数	target50
            pewp.setTarget50(Double.valueOf(time72h));
            //月168小时内故障消除次数	target51
            pewp.setTarget51(Double.valueOf(time168h));
            //月168小时外故障消除次数	target52
            pewp.setTarget52(Double.valueOf(time));
            //月故障消缺总次数	target53
            pewp.setTarget53(Double.valueOf(time));
        }
    }


    private static void calYear(ProBasicEquipment wt, ProEconEqOriginalYear pewp, List<ProEconEquipmentInfoDay1> pepid1ls, List<ProEconEquipmentInfoDay2> pepid2ls, List<ProEconEquipmentInfoDay3> pepid3ls, List<ProEconEquipmentInfoDay4> pepid4ls, List<ProEconInputOrOutputSpeed> pepid5ls, List<ProEconShutdownEvent> pepid6ls) {
        if (!pepid1ls.isEmpty()) {
            ProEconEquipmentInfoDay1 day1 = pepid1ls.get(0);
            //年发电量
            pewp.setTarget01(day1.getNfdl());
            //年试运行发电量
            pewp.setTarget02(0.0);
            //年最大风速
            pewp.setTarget03(day1.getNzdfs());
            //年最小风速
            pewp.setTarget04(day1.getNzxfs());
            //年最大功率
            pewp.setTarget05(day1.getNzdgl());
            //年最小功率
            pewp.setTarget06(day1.getNzxgl());
            //年平均功率
            pewp.setTarget07(day1.getNpjgl());
            //年平均风速
            pewp.setTarget08(day1.getNpjfs());

            //年设计理论发电量（千瓦时）
            pewp.setTarget09(day1.getNfdl() * 0.95);
            //年实际理论发电量（千瓦时）
            pewp.setTarget10(day1.getNllfdl());
            //年智慧风电理论发电量（千瓦时
            pewp.setTarget11(day1.getNllfdl() * 0.93);
            //年风能利用率
            pewp.setTarget12(0.0);

            //年损失电量（千瓦时）
            double total = day1.getNgzssdl() + day1.getNcnslgzssdl() + day1.getNjxssdl() + day1.getNcnsljxssdl() + day1.getNdjssdl() + day1.getNqxjclssdl() +
                    day1.getNsdtjssdl() + day1.getNxnssdl() + day1.getNxdtjssdl() + day1.getNxdjclssdl() + day1.getNcwsldwssdl() + day1.getNcwsltqssdl();
            pewp.setTarget13(StringUtils.round(total, 2));
            //年故障损失电量 	target16
            pewp.setTarget16(StringUtils.round(day1.getNgzssdl() + day1.getNcnslgzssdl(), 2));
            //年故障损失率 target17
            if (day1.getNllfdl() != 0) {
                double result = new BigDecimal(day1.getNgzssdl() + day1.getNcnslgzssdl()).divide(new BigDecimal(day1.getNllfdl()), 2, RoundingMode.HALF_EVEN).doubleValue();
                pewp.setTarget17(result);
            }

            //年检修损失电量 target20
            pewp.setTarget20(StringUtils.round(day1.getNjxssdl() + day1.getNcnsljxssdl(), 2));
            //年检修损失率 target21
            if (day1.getNllfdl() != 0) {
                double result = new BigDecimal(day1.getNjxssdl() + day1.getNcnsljxssdl()).divide(new BigDecimal(day1.getNllfdl()), 2, RoundingMode.HALF_EVEN).doubleValue();
                pewp.setTarget21(result);
            }
            //年性能损失电量 target24
            pewp.setTarget24(StringUtils.round(day1.getNxnssdl() + day1.getNsdtjssdl(), 2));
            //年性能损失率 target25
            if (day1.getNllfdl() != 0) {
                double result = new BigDecimal(day1.getNxnssdl() + day1.getNsdtjssdl()).divide(new BigDecimal(day1.getNllfdl()), 2, RoundingMode.HALF_EVEN).doubleValue();
                pewp.setTarget25(result);
            }


            //年限电损失电量 target28
            pewp.setTarget28(StringUtils.round(day1.getNxdjclssdl() + day1.getNxdtjssdl(), 2));
            //年限电损失率 target29
            if (day1.getNllfdl() != 0) {
                double result = new BigDecimal(day1.getNxdjclssdl() + day1.getNxdtjssdl()).divide(new BigDecimal(day1.getNllfdl()), 2, RoundingMode.HALF_EVEN).doubleValue();
                pewp.setTarget29(result);
            }
            //年弃风率 	target30
            if (day1.getNfdl() != 0) {
                double result = new BigDecimal(day1.getNxdjclssdl() + day1.getNxdtjssdl()).divide(new BigDecimal(day1.getNfdl()), 2, RoundingMode.HALF_EVEN).doubleValue();
                pewp.setTarget30(result + pewp.getTarget29());
            }
            //年弃发比 target31
            if (day1.getNfdl() != 0) {
                double result = new BigDecimal(day1.getNxdjclssdl() + day1.getNxdtjssdl()).divide(new BigDecimal(day1.getNfdl()), 2, RoundingMode.HALF_EVEN).doubleValue();
                pewp.setTarget31(result);
            }
            //年受累损失电量 target34
            pewp.setTarget34(StringUtils.round(day1.getNcwsldwssdl() + day1.getNcwsltqssdl(), 2));
            //年受累损失率 target35
            if (day1.getNllfdl() != 0) {
                double result = new BigDecimal(day1.getNcwsldwssdl() + day1.getNcwsltqssdl()).divide(new BigDecimal(day1.getNllfdl()), 2, RoundingMode.HALF_EVEN).doubleValue();
                pewp.setTarget35(result);
            }
        }

        if (!pepid2ls.isEmpty()) {
            ProEconEquipmentInfoDay2 day2 = pepid2ls.get(0);
            //年故障损失时长target14
            pewp.setTarget14(StringUtils.round(day2.getNgzxsmx() + day2.getNcnslgzxsmx(), 2));
            //年检修损失时长（小时） target18
            pewp.setTarget18(StringUtils.round(day2.getNjxxsmx() + day2.getNcnsljxxsmx(), 2));
            //年性能损失时长（小时） target22
            pewp.setTarget22(StringUtils.round(day2.getNqxjclxsmx() + day2.getNsdtjxsmx(), 2));
            //年限电时长（小时） target26
            pewp.setTarget26(StringUtils.round(day2.getNxdjclxsmx() + day2.getNxdtjxsmx(), 2));
            //年受累损失时长（小时） target32
            pewp.setTarget32(StringUtils.round(day2.getNcwsldwxsmx() + day2.getNcwsltqxsmx(), 2));


            //年等效可利用系数 target54
            double result = new BigDecimal(24 - pewp.getTarget14() - pewp.getTarget18()).divide(new BigDecimal(24), 2, RoundingMode.HALF_EVEN).doubleValue();
            pewp.setTarget54(result);
            //年设备可利用率target55
            result = new BigDecimal(24 - pewp.getTarget14()).divide(new BigDecimal(24), 2, RoundingMode.HALF_EVEN).doubleValue();
            pewp.setTarget55(result);

        }
        if (!pepid3ls.isEmpty()) {
            ProEconEquipmentInfoDay3 day3 = pepid3ls.get(0);
            //年故障次数 target15
            pewp.setTarget15(StringUtils.round(day3.getNgzcsmx() + day3.getNcnslgzcsmx(), 2));
            //年检修次数 target19
            pewp.setTarget19(StringUtils.round(day3.getNjxcsmx() + day3.getNcnsljxcsmx(), 2));
            //年性能损失次数 target23
            pewp.setTarget23(StringUtils.round(day3.getNqxjclcsmx() + day3.getNsdtjcsmx(), 2));
            //年限电次数 target27
            pewp.setTarget27(StringUtils.round(day3.getNxdjclcsmx() + day3.getNxdtjcsmx(), 2));
            //年受累次数 target33
            pewp.setTarget33(StringUtils.round(day3.getNcwsldwcsmx() + day3.getNcwsltqcsmx(), 2));

        }

        //年统计小时target36
        Calendar c = Calendar.getInstance();
        c.setTime(pewp.getRecordDate());
        int day = c.get(Calendar.DAY_OF_YEAR);
        //月统计小时target36
        pewp.setTarget36(day * 24.0);

        if (!pepid4ls.isEmpty()) {
            ProEconEquipmentInfoDay4 day4 = pepid4ls.get(0);

            //年平均切入风速 target39
            pewp.setTarget39(day4.getNdfqrfs());
            //年平均切出风速	target40
            pewp.setTarget40(day4.getNxfqcfs());
            //年最大切出风速target41
            pewp.setTarget41(day4.getNdfqcfs());
            //年最小切入风速 target42
            pewp.setTarget42(day4.getNxfqcfs());
            //年额定功率 target43
            if (CacheContext.modelMap.containsKey(wt.getModelId())) {
                ProEconEquipmentmodel model = CacheContext.modelMap.get(wt.getModelId());
                pewp.setTarget43(model.getPowerProduction());
            }
            //年额定风速 target44
            pewp.setTarget44(day4.getNedfs());
            //年设备利用小时 target45
            if (!pepid1ls.isEmpty() && pewp.getTarget43() != 0) {
                ProEconEquipmentInfoDay1 day1 = pepid1ls.get(0);

                double result = new BigDecimal(day1.getNfdl()).divide(new BigDecimal(pewp.getTarget43()), 2, RoundingMode.HALF_EVEN).doubleValue();
                pewp.setTarget45(result);

                result = new BigDecimal(day1.getNpjgl()).divide(new BigDecimal(pewp.getTarget43()), 2, RoundingMode.HALF_EVEN).doubleValue();
                //年负荷率target56
                pewp.setTarget56(result);

            }

            //年功率一致性系数target57
            pewp.setTarget57(day4.getNglyzxxs());
            //年拟合优度target58
            pewp.setTarget58(day4.getNnhyd());
            //年曲线偏差率 target59
            pewp.setTarget59(day4.getNqxpcbbg());
            //年故障消缺及时率 target60
            pewp.setTarget60(day4.getNgzxqjsl());
            //年状态转换及时率 target61
            pewp.setTarget61(day4.getNztzhjsl());
            //年复位及时率target62
            pewp.setTarget62(day4.getNfwjsl());
            //年MTBF target63
            pewp.setTarget63(day4.getNmtbf());
            //年MTTR target64
            pewp.setTarget64(day4.getNmttr());
            //年MTTF target65
            pewp.setTarget65(day4.getNmttr());
        }

        if (!pepid5ls.isEmpty()) {
            List<ProEconInputOrOutputSpeed> list = pepid5ls.stream().filter(i -> i.getInputOrOutput() == 1).collect(Collectors.toList());
            //年切入次数target37
            pewp.setTarget37(Double.valueOf(list.size()));
            list = pepid5ls.stream().filter(i -> i.getInputOrOutput() == 0).collect(Collectors.toList());
            //年切出次数target38
            pewp.setTarget38(Double.valueOf(list.size()));
        }


        if (!pepid6ls.isEmpty()) {
            int time30m = 0;
            int time6h = 0;
            int time12h = 0;
            int time24h = 0;
            int time72h = 0;
            int time168h = 0;
            int time = 0;
            for (ProEconShutdownEvent vo : pepid6ls) {
                if (vo.getStopHours() < 0.5) {
                    time30m++;
                }
                if (vo.getStopHours() < 6) {
                    time6h++;
                }
                if (vo.getStopHours() < 12) {
                    time12h++;
                }
                if (vo.getStopHours() < 24) {
                    time24h++;
                }
                if (vo.getStopHours() < 72) {
                    time72h++;
                }
                if (vo.getStopHours() < 168) {
                    time168h++;
                }
                if (vo.getStopHours() > 168) {
                    time++;
                }
            }

            //年30分钟内故障消除次数 target46
            pewp.setTarget46(Double.valueOf(time30m));
            //年6小时内故障消除次数	target47
            pewp.setTarget47(Double.valueOf(time6h));
            //年12小时内故障消除次数	target48
            pewp.setTarget48(Double.valueOf(time12h));
            //年24小时内故障消除次数	target49
            pewp.setTarget49(Double.valueOf(time24h));
            //年72小时内故障消除次数	target50
            pewp.setTarget50(Double.valueOf(time72h));
            //年168小时内故障消除次数	target51
            pewp.setTarget51(Double.valueOf(time168h));
            //年168小时外故障消除次数	target52
            pewp.setTarget52(Double.valueOf(time));
            //年故障消缺总次数	target53
            pewp.setTarget53(Double.valueOf(time));
        }
    }

    public static void initial(ProEconEqOriginalDay pepd) {

        /**
         * SCADA发电量（千瓦时）
         */
        pepd.setTarget01(0.0);

        /**
         * 试运行SCADA发电量（千瓦时）
         */
        pepd.setTarget02(0.0);

        /**
         * 日最大风速
         */
        pepd.setTarget03(0.0);

        /**
         * 日最小风速
         */
        pepd.setTarget04(0.0);

        /**
         * 日最大功率
         */
        pepd.setTarget05(0.0);

        /**
         * 日最小功率
         */
        pepd.setTarget06(0.0);

        /**
         * 日平均功率
         */
        pepd.setTarget07(0.0);

        /**
         * 日平均风速
         */
        pepd.setTarget08(0.0);

        /**
         * 日设计理论发电量（千瓦时）
         */
        pepd.setTarget09(0.0);

        /**
         * 日实际理论发电量（千瓦时）
         */
        pepd.setTarget10(0.0);

        /**
         * 日智慧风电理论发电量（千瓦时）
         */
        pepd.setTarget11(0.0);

        /**
         * 风能利用率
         */
        pepd.setTarget12(0.0);

        /**
         * 损失电量（千瓦时）
         */
        pepd.setTarget13(0.0);

        /**
         * 故障损失时长（小时）
         */
        pepd.setTarget14(0.0);

        /**
         * 故障次数
         */
        pepd.setTarget15(0.0);

        /**
         * 故障损失电量
         */
        pepd.setTarget16(0.0);

        /**
         * 故障损失率
         */
        pepd.setTarget17(0.0);

        /**
         * 检修损失时长（小时）
         */
        pepd.setTarget18(0.0);

        /**
         * 检修次数
         */
        pepd.setTarget19(0.0);

        /**
         * 检修损失电量
         */
        pepd.setTarget20(0.0);

        /**
         * 检修损失率
         */
        pepd.setTarget21(0.0);

        /**
         * 性能损失时长（小时）
         */
        pepd.setTarget22(0.0);

        /**
         * 性能损失次数
         */
        pepd.setTarget23(0.0);

        /**
         * 性能损失电量
         */
        pepd.setTarget24(0.0);

        /**
         * 性能损失率
         */
        pepd.setTarget25(0.0);

        /**
         * 限电时长（小时）
         */
        pepd.setTarget26(0.0);

        /**
         * 限电次数
         */
        pepd.setTarget27(0.0);

        /**
         * 限电损失电量
         */
        pepd.setTarget28(0.0);

        /**
         * 限电损失率
         */
        pepd.setTarget29(0.0);

        /**
         * 弃风率
         */
        pepd.setTarget30(0.0);

        /**
         * 弃发比
         */
        pepd.setTarget31(0.0);

        /**
         * 受累损失时长（小时）
         */
        pepd.setTarget32(0.0);

        /**
         * 受累次数
         */
        pepd.setTarget33(0.0);

        /**
         * 受累损失电量
         */
        pepd.setTarget34(0.0);

        /**
         * 受累损失率
         */
        pepd.setTarget35(0.0);

        /**
         * 统计小时
         */
        pepd.setTarget36(0.0);

        /**
         * 切入次数
         */
        pepd.setTarget37(0.0);

        /**
         * 切出次数
         */
        pepd.setTarget38(0.0);

        /**
         * 平均切入风速
         */
        pepd.setTarget39(0.0);

        /**
         * 平均切出风速
         */
        pepd.setTarget40(0.0);

        /**
         * 最大切出风速
         */
        pepd.setTarget41(0.0);

        /**
         * 最小切入风速
         */
        pepd.setTarget42(0.0);

        /**
         * 额定功率
         */
        pepd.setTarget43(0.0);

        /**
         * 额定风速
         */
        pepd.setTarget44(0.0);

        /**
         * 设备利用小时
         */
        pepd.setTarget45(0.0);

        /**
         * 30分钟内故障消除次数
         */
        pepd.setTarget46(0.0);

        /**
         * 6小时内故障消除次数
         */
        pepd.setTarget47(0.0);

        /**
         * 12小时内故障消除次数
         */
        pepd.setTarget48(0.0);

        /**
         * 24小时内故障消除次数
         */
        pepd.setTarget49(0.0);

        /**
         * 72小时内故障消除次数
         */
        pepd.setTarget50(0.0);

        /**
         * 168小时内故障消除次数
         */
        pepd.setTarget51(0.0);

        /**
         * 168小时外故障消除次数
         */
        pepd.setTarget52(0.0);

        /**
         * 故障消缺总次数
         */
        pepd.setTarget53(0.0);

        /**
         * 日等效可利用系数
         */
        pepd.setTarget54(0.0);

        /**
         * 日设备可利用率
         */
        pepd.setTarget55(0.0);

        /**
         * 日负荷率
         */
        pepd.setTarget56(0.0);

        /**
         * 日功率一致性系数
         */
        pepd.setTarget57(0.0);

        /**
         * 日拟合优度
         */
        pepd.setTarget58(0.0);

        /**
         * 日曲线偏差率
         */
        pepd.setTarget59(0.0);

        /**
         * 故障消缺及时率
         */
        pepd.setTarget60(0.0);

        /**
         * 状态转换及时率
         */
        pepd.setTarget61(0.0);

        /**
         * 复位及时率
         */
        pepd.setTarget62(0.0);

        /**
         * 日MTBF
         */
        pepd.setTarget63(0.0);

        /**
         * 日MTTR
         */
        pepd.setTarget64(0.0);

        /**
         * 日MTTF
         */
        pepd.setTarget65(0.0);

        /**
         * 备用1
         */
        pepd.setTarget66(0.0);

        /**
         * 备用2
         */
        pepd.setTarget67(0.0);

        /**
         * 备用3
         */
        pepd.setTarget68(0.0);

        /**
         * 备用4
         */
        pepd.setTarget69(0.0);

        /**
         * 备用5
         */
        pepd.setTarget70(0.0);

        /**
         * 备用6
         */
        pepd.setTarget71(0.0);

        /**
         * 备用7
         */
        pepd.setTarget72(0.0);

        /**
         * 备用8
         */
        pepd.setTarget73(0.0);

        /**
         * 备用9
         */
        pepd.setTarget74(0.0);

        /**
         * 备用10
         */
        pepd.setTarget75(0.0);

        /**
         * 备用11
         */
        pepd.setTarget76(0.0);

        /**
         * 备用12
         */
        pepd.setTarget77(0.0);

        /**
         * 备用13
         */
        pepd.setTarget78(0.0);

        /**
         * 备用14
         */
        pepd.setTarget79(0.0);

        /**
         * 备用15
         */
        pepd.setTarget80(0.0);

        /**
         * 备用16
         */
        pepd.setTarget81(0.0);

        /**
         * 备用17
         */
        pepd.setTarget82(0.0);

        /**
         * 备用18
         */
        pepd.setTarget83(0.0);

        /**
         * 备用19
         */
        pepd.setTarget84(0.0);

        /**
         * 备用20
         */
        pepd.setTarget85(0.0);

        /**
         * 备用21
         */
        pepd.setTarget86(0.0);

        /**
         * 备用22
         */
        pepd.setTarget87(0.0);

        /**
         * 备用23
         */
        pepd.setTarget88(0.0);

        /**
         * 备用24
         */
        pepd.setTarget89(0.0);

        /**
         * 备用25
         */
        pepd.setTarget90(0.0);

        /**
         * 备用26
         */
        pepd.setTarget91(0.0);

        /**
         * 备用27
         */
        pepd.setTarget92(0.0);

        /**
         * 备用28
         */
        pepd.setTarget93(0.0);

        /**
         * 备用29
         */
        pepd.setTarget94(0.0);

        /**
         * 备用30
         */
        pepd.setTarget95(0.0);

        /**
         * 备用31
         */
        pepd.setTarget96(0.0);

        /**
         * 备用32
         */
        pepd.setTarget97(0.0);

        /**
         * 备用33
         */
        pepd.setTarget98(0.0);

        /**
         * 备用34
         */
        pepd.setTarget99(0.0);

        /**
         * 备用35
         */
        pepd.setTarget100(0.0);
        pepd.setTarget101(0.0);
        pepd.setTarget102(0.0);
        pepd.setTarget103(0.0);
        pepd.setTarget104(0.0);
        pepd.setTarget105(0.0);
        pepd.setTarget106(0.0);
        pepd.setTarget107(0.0);
        pepd.setTarget108(0.0);
        pepd.setTarget109(0.0);
        pepd.setTarget110(0.0);
        pepd.setTarget111(0.0);
        pepd.setTarget112(0.0);
        pepd.setTarget113(0.0);
        pepd.setTarget114(0.0);
        pepd.setTarget115(0.0);
        pepd.setTarget116(0.0);
        pepd.setTarget117(0.0);
        pepd.setTarget118(0.0);
        pepd.setTarget119(0.0);
        pepd.setTarget120(0.0);
        pepd.setTarget121(0.0);
        pepd.setTarget122(0.0);
        pepd.setTarget123(0.0);
        pepd.setTarget124(0.0);
        pepd.setTarget125(0.0);
        pepd.setTarget126(0.0);
        pepd.setTarget127(0.0);
        pepd.setTarget128(0.0);
        pepd.setTarget129(0.0);
        pepd.setTarget130(0.0);
        pepd.setTarget131(0.0);
        pepd.setTarget132(0.0);
        pepd.setTarget133(0.0);
        pepd.setTarget134(0.0);
        pepd.setTarget135(0.0);
        pepd.setTarget136(0.0);
        pepd.setTarget137(0.0);
        pepd.setTarget138(0.0);
        pepd.setTarget139(0.0);
        pepd.setTarget140(0.0);
        pepd.setTarget141(0.0);
        pepd.setTarget142(0.0);
        pepd.setTarget143(0.0);
        pepd.setTarget144(0.0);
        pepd.setTarget145(0.0);
        pepd.setTarget146(0.0);
        pepd.setTarget147(0.0);
        pepd.setTarget148(0.0);
        pepd.setTarget149(0.0);
        pepd.setTarget150(0.0);
        pepd.setTarget151(0.0);
        pepd.setTarget152(0.0);
        pepd.setTarget153(0.0);
        pepd.setTarget154(0.0);
        pepd.setTarget155(0.0);
        pepd.setTarget156(0.0);
        pepd.setTarget157(0.0);
        pepd.setTarget158(0.0);
        pepd.setTarget159(0.0);
        pepd.setTarget160(0.0);
        pepd.setTarget161(0.0);
        pepd.setTarget162(0.0);
        pepd.setTarget163(0.0);
        pepd.setTarget164(0.0);
        pepd.setTarget165(0.0);
        pepd.setTarget166(0.0);
        pepd.setTarget167(0.0);
        pepd.setTarget168(0.0);
        pepd.setTarget169(0.0);
        pepd.setTarget170(0.0);
        pepd.setTarget171(0.0);
        pepd.setTarget172(0.0);
        pepd.setTarget173(0.0);
        pepd.setTarget174(0.0);
        pepd.setTarget175(0.0);
        pepd.setTarget176(0.0);
        pepd.setTarget177(0.0);
        pepd.setTarget178(0.0);
        pepd.setTarget179(0.0);
        pepd.setTarget180(0.0);
        pepd.setTarget181(0.0);
        pepd.setTarget182(0.0);
        pepd.setTarget183(0.0);
        pepd.setTarget184(0.0);
        pepd.setTarget185(0.0);
        pepd.setTarget186(0.0);
        pepd.setTarget187(0.0);
        pepd.setTarget188(0.0);
        pepd.setTarget189(0.0);
        pepd.setTarget190(0.0);
        pepd.setTarget191(0.0);
        pepd.setTarget192(0.0);
        pepd.setTarget193(0.0);
        pepd.setTarget194(0.0);
        pepd.setTarget195(0.0);
        pepd.setTarget196(0.0);
        pepd.setTarget197(0.0);
        pepd.setTarget198(0.0);
        pepd.setTarget199(0.0);
        pepd.setTarget200(0.0);
    }

    public static void initial(ProEconEqOriginalMonth pepd) {

        /**
         * SCADA发电量（千瓦时）
         */
        pepd.setTarget01(0.0);

        /**
         * 试运行SCADA发电量（千瓦时）
         */
        pepd.setTarget02(0.0);

        /**
         * 日最大风速
         */
        pepd.setTarget03(0.0);

        /**
         * 日最小风速
         */
        pepd.setTarget04(0.0);

        /**
         * 日最大功率
         */
        pepd.setTarget05(0.0);

        /**
         * 日最小功率
         */
        pepd.setTarget06(0.0);

        /**
         * 日平均功率
         */
        pepd.setTarget07(0.0);

        /**
         * 日平均风速
         */
        pepd.setTarget08(0.0);

        /**
         * 日设计理论发电量（千瓦时）
         */
        pepd.setTarget09(0.0);

        /**
         * 日实际理论发电量（千瓦时）
         */
        pepd.setTarget10(0.0);

        /**
         * 日智慧风电理论发电量（千瓦时）
         */
        pepd.setTarget11(0.0);

        /**
         * 风能利用率
         */
        pepd.setTarget12(0.0);

        /**
         * 损失电量（千瓦时）
         */
        pepd.setTarget13(0.0);

        /**
         * 故障损失时长（小时）
         */
        pepd.setTarget14(0.0);

        /**
         * 故障次数
         */
        pepd.setTarget15(0.0);

        /**
         * 故障损失电量
         */
        pepd.setTarget16(0.0);

        /**
         * 故障损失率
         */
        pepd.setTarget17(0.0);

        /**
         * 检修损失时长（小时）
         */
        pepd.setTarget18(0.0);

        /**
         * 检修次数
         */
        pepd.setTarget19(0.0);

        /**
         * 检修损失电量
         */
        pepd.setTarget20(0.0);

        /**
         * 检修损失率
         */
        pepd.setTarget21(0.0);

        /**
         * 性能损失时长（小时）
         */
        pepd.setTarget22(0.0);

        /**
         * 性能损失次数
         */
        pepd.setTarget23(0.0);

        /**
         * 性能损失电量
         */
        pepd.setTarget24(0.0);

        /**
         * 性能损失率
         */
        pepd.setTarget25(0.0);

        /**
         * 限电时长（小时）
         */
        pepd.setTarget26(0.0);

        /**
         * 限电次数
         */
        pepd.setTarget27(0.0);

        /**
         * 限电损失电量
         */
        pepd.setTarget28(0.0);

        /**
         * 限电损失率
         */
        pepd.setTarget29(0.0);

        /**
         * 弃风率
         */
        pepd.setTarget30(0.0);

        /**
         * 弃发比
         */
        pepd.setTarget31(0.0);

        /**
         * 受累损失时长（小时）
         */
        pepd.setTarget32(0.0);

        /**
         * 受累次数
         */
        pepd.setTarget33(0.0);

        /**
         * 受累损失电量
         */
        pepd.setTarget34(0.0);

        /**
         * 受累损失率
         */
        pepd.setTarget35(0.0);

        /**
         * 统计小时
         */
        pepd.setTarget36(0.0);

        /**
         * 切入次数
         */
        pepd.setTarget37(0.0);

        /**
         * 切出次数
         */
        pepd.setTarget38(0.0);

        /**
         * 平均切入风速
         */
        pepd.setTarget39(0.0);

        /**
         * 平均切出风速
         */
        pepd.setTarget40(0.0);

        /**
         * 最大切出风速
         */
        pepd.setTarget41(0.0);

        /**
         * 最小切入风速
         */
        pepd.setTarget42(0.0);

        /**
         * 额定功率
         */
        pepd.setTarget43(0.0);

        /**
         * 额定风速
         */
        pepd.setTarget44(0.0);

        /**
         * 设备利用小时
         */
        pepd.setTarget45(0.0);

        /**
         * 30分钟内故障消除次数
         */
        pepd.setTarget46(0.0);

        /**
         * 6小时内故障消除次数
         */
        pepd.setTarget47(0.0);

        /**
         * 12小时内故障消除次数
         */
        pepd.setTarget48(0.0);

        /**
         * 24小时内故障消除次数
         */
        pepd.setTarget49(0.0);

        /**
         * 72小时内故障消除次数
         */
        pepd.setTarget50(0.0);

        /**
         * 168小时内故障消除次数
         */
        pepd.setTarget51(0.0);

        /**
         * 168小时外故障消除次数
         */
        pepd.setTarget52(0.0);

        /**
         * 故障消缺总次数
         */
        pepd.setTarget53(0.0);

        /**
         * 日等效可利用系数
         */
        pepd.setTarget54(0.0);

        /**
         * 日设备可利用率
         */
        pepd.setTarget55(0.0);

        /**
         * 日负荷率
         */
        pepd.setTarget56(0.0);

        /**
         * 日功率一致性系数
         */
        pepd.setTarget57(0.0);

        /**
         * 日拟合优度
         */
        pepd.setTarget58(0.0);

        /**
         * 日曲线偏差率
         */
        pepd.setTarget59(0.0);

        /**
         * 故障消缺及时率
         */
        pepd.setTarget60(0.0);

        /**
         * 状态转换及时率
         */
        pepd.setTarget61(0.0);

        /**
         * 复位及时率
         */
        pepd.setTarget62(0.0);

        /**
         * 日MTBF
         */
        pepd.setTarget63(0.0);

        /**
         * 日MTTR
         */
        pepd.setTarget64(0.0);

        /**
         * 日MTTF
         */
        pepd.setTarget65(0.0);

        /**
         * 备用1
         */
        pepd.setTarget66(0.0);

        /**
         * 备用2
         */
        pepd.setTarget67(0.0);

        /**
         * 备用3
         */
        pepd.setTarget68(0.0);

        /**
         * 备用4
         */
        pepd.setTarget69(0.0);

        /**
         * 备用5
         */
        pepd.setTarget70(0.0);

        /**
         * 备用6
         */
        pepd.setTarget71(0.0);

        /**
         * 备用7
         */
        pepd.setTarget72(0.0);

        /**
         * 备用8
         */
        pepd.setTarget73(0.0);

        /**
         * 备用9
         */
        pepd.setTarget74(0.0);

        /**
         * 备用10
         */
        pepd.setTarget75(0.0);

        /**
         * 备用11
         */
        pepd.setTarget76(0.0);

        /**
         * 备用12
         */
        pepd.setTarget77(0.0);

        /**
         * 备用13
         */
        pepd.setTarget78(0.0);

        /**
         * 备用14
         */
        pepd.setTarget79(0.0);

        /**
         * 备用15
         */
        pepd.setTarget80(0.0);

        /**
         * 备用16
         */
        pepd.setTarget81(0.0);

        /**
         * 备用17
         */
        pepd.setTarget82(0.0);

        /**
         * 备用18
         */
        pepd.setTarget83(0.0);

        /**
         * 备用19
         */
        pepd.setTarget84(0.0);

        /**
         * 备用20
         */
        pepd.setTarget85(0.0);

        /**
         * 备用21
         */
        pepd.setTarget86(0.0);

        /**
         * 备用22
         */
        pepd.setTarget87(0.0);

        /**
         * 备用23
         */
        pepd.setTarget88(0.0);

        /**
         * 备用24
         */
        pepd.setTarget89(0.0);

        /**
         * 备用25
         */
        pepd.setTarget90(0.0);

        /**
         * 备用26
         */
        pepd.setTarget91(0.0);

        /**
         * 备用27
         */
        pepd.setTarget92(0.0);

        /**
         * 备用28
         */
        pepd.setTarget93(0.0);

        /**
         * 备用29
         */
        pepd.setTarget94(0.0);

        /**
         * 备用30
         */
        pepd.setTarget95(0.0);

        /**
         * 备用31
         */
        pepd.setTarget96(0.0);

        /**
         * 备用32
         */
        pepd.setTarget97(0.0);

        /**
         * 备用33
         */
        pepd.setTarget98(0.0);

        /**
         * 备用34
         */
        pepd.setTarget99(0.0);

        /**
         * 备用35
         */
        pepd.setTarget100(0.0);
        pepd.setTarget101(0.0);
        pepd.setTarget102(0.0);
        pepd.setTarget103(0.0);
        pepd.setTarget104(0.0);
        pepd.setTarget105(0.0);
        pepd.setTarget106(0.0);
        pepd.setTarget107(0.0);
        pepd.setTarget108(0.0);
        pepd.setTarget109(0.0);
        pepd.setTarget110(0.0);
        pepd.setTarget111(0.0);
        pepd.setTarget112(0.0);
        pepd.setTarget113(0.0);
        pepd.setTarget114(0.0);
        pepd.setTarget115(0.0);
        pepd.setTarget116(0.0);
        pepd.setTarget117(0.0);
        pepd.setTarget118(0.0);
        pepd.setTarget119(0.0);
        pepd.setTarget120(0.0);
        pepd.setTarget121(0.0);
        pepd.setTarget122(0.0);
        pepd.setTarget123(0.0);
        pepd.setTarget124(0.0);
        pepd.setTarget125(0.0);
        pepd.setTarget126(0.0);
        pepd.setTarget127(0.0);
        pepd.setTarget128(0.0);
        pepd.setTarget129(0.0);
        pepd.setTarget130(0.0);
        pepd.setTarget131(0.0);
        pepd.setTarget132(0.0);
        pepd.setTarget133(0.0);
        pepd.setTarget134(0.0);
        pepd.setTarget135(0.0);
        pepd.setTarget136(0.0);
        pepd.setTarget137(0.0);
        pepd.setTarget138(0.0);
        pepd.setTarget139(0.0);
        pepd.setTarget140(0.0);
        pepd.setTarget141(0.0);
        pepd.setTarget142(0.0);
        pepd.setTarget143(0.0);
        pepd.setTarget144(0.0);
        pepd.setTarget145(0.0);
        pepd.setTarget146(0.0);
        pepd.setTarget147(0.0);
        pepd.setTarget148(0.0);
        pepd.setTarget149(0.0);
        pepd.setTarget150(0.0);
        pepd.setTarget151(0.0);
        pepd.setTarget152(0.0);
        pepd.setTarget153(0.0);
        pepd.setTarget154(0.0);
        pepd.setTarget155(0.0);
        pepd.setTarget156(0.0);
        pepd.setTarget157(0.0);
        pepd.setTarget158(0.0);
        pepd.setTarget159(0.0);
        pepd.setTarget160(0.0);
        pepd.setTarget161(0.0);
        pepd.setTarget162(0.0);
        pepd.setTarget163(0.0);
        pepd.setTarget164(0.0);
        pepd.setTarget165(0.0);
        pepd.setTarget166(0.0);
        pepd.setTarget167(0.0);
        pepd.setTarget168(0.0);
        pepd.setTarget169(0.0);
        pepd.setTarget170(0.0);
        pepd.setTarget171(0.0);
        pepd.setTarget172(0.0);
        pepd.setTarget173(0.0);
        pepd.setTarget174(0.0);
        pepd.setTarget175(0.0);
        pepd.setTarget176(0.0);
        pepd.setTarget177(0.0);
        pepd.setTarget178(0.0);
        pepd.setTarget179(0.0);
        pepd.setTarget180(0.0);
        pepd.setTarget181(0.0);
        pepd.setTarget182(0.0);
        pepd.setTarget183(0.0);
        pepd.setTarget184(0.0);
        pepd.setTarget185(0.0);
        pepd.setTarget186(0.0);
        pepd.setTarget187(0.0);
        pepd.setTarget188(0.0);
        pepd.setTarget189(0.0);
        pepd.setTarget190(0.0);
        pepd.setTarget191(0.0);
        pepd.setTarget192(0.0);
        pepd.setTarget193(0.0);
        pepd.setTarget194(0.0);
        pepd.setTarget195(0.0);
        pepd.setTarget196(0.0);
        pepd.setTarget197(0.0);
        pepd.setTarget198(0.0);
        pepd.setTarget199(0.0);
        pepd.setTarget200(0.0);
    }

    public static void initial(ProEconEqOriginalYear pepd) {

        /**
         * SCADA发电量（千瓦时）
         */
        pepd.setTarget01(0.0);

        /**
         * 试运行SCADA发电量（千瓦时）
         */
        pepd.setTarget02(0.0);

        /**
         * 日最大风速
         */
        pepd.setTarget03(0.0);

        /**
         * 日最小风速
         */
        pepd.setTarget04(0.0);

        /**
         * 日最大功率
         */
        pepd.setTarget05(0.0);

        /**
         * 日最小功率
         */
        pepd.setTarget06(0.0);

        /**
         * 日平均功率
         */
        pepd.setTarget07(0.0);

        /**
         * 日平均风速
         */
        pepd.setTarget08(0.0);

        /**
         * 日设计理论发电量（千瓦时）
         */
        pepd.setTarget09(0.0);

        /**
         * 日实际理论发电量（千瓦时）
         */
        pepd.setTarget10(0.0);

        /**
         * 日智慧风电理论发电量（千瓦时）
         */
        pepd.setTarget11(0.0);

        /**
         * 风能利用率
         */
        pepd.setTarget12(0.0);

        /**
         * 损失电量（千瓦时）
         */
        pepd.setTarget13(0.0);

        /**
         * 故障损失时长（小时）
         */
        pepd.setTarget14(0.0);

        /**
         * 故障次数
         */
        pepd.setTarget15(0.0);

        /**
         * 故障损失电量
         */
        pepd.setTarget16(0.0);

        /**
         * 故障损失率
         */
        pepd.setTarget17(0.0);

        /**
         * 检修损失时长（小时）
         */
        pepd.setTarget18(0.0);

        /**
         * 检修次数
         */
        pepd.setTarget19(0.0);

        /**
         * 检修损失电量
         */
        pepd.setTarget20(0.0);

        /**
         * 检修损失率
         */
        pepd.setTarget21(0.0);

        /**
         * 性能损失时长（小时）
         */
        pepd.setTarget22(0.0);

        /**
         * 性能损失次数
         */
        pepd.setTarget23(0.0);

        /**
         * 性能损失电量
         */
        pepd.setTarget24(0.0);

        /**
         * 性能损失率
         */
        pepd.setTarget25(0.0);

        /**
         * 限电时长（小时）
         */
        pepd.setTarget26(0.0);

        /**
         * 限电次数
         */
        pepd.setTarget27(0.0);

        /**
         * 限电损失电量
         */
        pepd.setTarget28(0.0);

        /**
         * 限电损失率
         */
        pepd.setTarget29(0.0);

        /**
         * 弃风率
         */
        pepd.setTarget30(0.0);

        /**
         * 弃发比
         */
        pepd.setTarget31(0.0);

        /**
         * 受累损失时长（小时）
         */
        pepd.setTarget32(0.0);

        /**
         * 受累次数
         */
        pepd.setTarget33(0.0);

        /**
         * 受累损失电量
         */
        pepd.setTarget34(0.0);

        /**
         * 受累损失率
         */
        pepd.setTarget35(0.0);

        /**
         * 统计小时
         */
        pepd.setTarget36(0.0);

        /**
         * 切入次数
         */
        pepd.setTarget37(0.0);

        /**
         * 切出次数
         */
        pepd.setTarget38(0.0);

        /**
         * 平均切入风速
         */
        pepd.setTarget39(0.0);

        /**
         * 平均切出风速
         */
        pepd.setTarget40(0.0);

        /**
         * 最大切出风速
         */
        pepd.setTarget41(0.0);

        /**
         * 最小切入风速
         */
        pepd.setTarget42(0.0);

        /**
         * 额定功率
         */
        pepd.setTarget43(0.0);

        /**
         * 额定风速
         */
        pepd.setTarget44(0.0);

        /**
         * 设备利用小时
         */
        pepd.setTarget45(0.0);

        /**
         * 30分钟内故障消除次数
         */
        pepd.setTarget46(0.0);

        /**
         * 6小时内故障消除次数
         */
        pepd.setTarget47(0.0);

        /**
         * 12小时内故障消除次数
         */
        pepd.setTarget48(0.0);

        /**
         * 24小时内故障消除次数
         */
        pepd.setTarget49(0.0);

        /**
         * 72小时内故障消除次数
         */
        pepd.setTarget50(0.0);

        /**
         * 168小时内故障消除次数
         */
        pepd.setTarget51(0.0);

        /**
         * 168小时外故障消除次数
         */
        pepd.setTarget52(0.0);

        /**
         * 故障消缺总次数
         */
        pepd.setTarget53(0.0);

        /**
         * 日等效可利用系数
         */
        pepd.setTarget54(0.0);

        /**
         * 日设备可利用率
         */
        pepd.setTarget55(0.0);

        /**
         * 日负荷率
         */
        pepd.setTarget56(0.0);

        /**
         * 日功率一致性系数
         */
        pepd.setTarget57(0.0);

        /**
         * 日拟合优度
         */
        pepd.setTarget58(0.0);

        /**
         * 日曲线偏差率
         */
        pepd.setTarget59(0.0);

        /**
         * 故障消缺及时率
         */
        pepd.setTarget60(0.0);

        /**
         * 状态转换及时率
         */
        pepd.setTarget61(0.0);

        /**
         * 复位及时率
         */
        pepd.setTarget62(0.0);

        /**
         * 日MTBF
         */
        pepd.setTarget63(0.0);

        /**
         * 日MTTR
         */
        pepd.setTarget64(0.0);

        /**
         * 日MTTF
         */
        pepd.setTarget65(0.0);

        /**
         * 备用1
         */
        pepd.setTarget66(0.0);

        /**
         * 备用2
         */
        pepd.setTarget67(0.0);

        /**
         * 备用3
         */
        pepd.setTarget68(0.0);

        /**
         * 备用4
         */
        pepd.setTarget69(0.0);

        /**
         * 备用5
         */
        pepd.setTarget70(0.0);

        /**
         * 备用6
         */
        pepd.setTarget71(0.0);

        /**
         * 备用7
         */
        pepd.setTarget72(0.0);

        /**
         * 备用8
         */
        pepd.setTarget73(0.0);

        /**
         * 备用9
         */
        pepd.setTarget74(0.0);

        /**
         * 备用10
         */
        pepd.setTarget75(0.0);

        /**
         * 备用11
         */
        pepd.setTarget76(0.0);

        /**
         * 备用12
         */
        pepd.setTarget77(0.0);

        /**
         * 备用13
         */
        pepd.setTarget78(0.0);

        /**
         * 备用14
         */
        pepd.setTarget79(0.0);

        /**
         * 备用15
         */
        pepd.setTarget80(0.0);

        /**
         * 备用16
         */
        pepd.setTarget81(0.0);

        /**
         * 备用17
         */
        pepd.setTarget82(0.0);

        /**
         * 备用18
         */
        pepd.setTarget83(0.0);

        /**
         * 备用19
         */
        pepd.setTarget84(0.0);

        /**
         * 备用20
         */
        pepd.setTarget85(0.0);

        /**
         * 备用21
         */
        pepd.setTarget86(0.0);

        /**
         * 备用22
         */
        pepd.setTarget87(0.0);

        /**
         * 备用23
         */
        pepd.setTarget88(0.0);

        /**
         * 备用24
         */
        pepd.setTarget89(0.0);

        /**
         * 备用25
         */
        pepd.setTarget90(0.0);

        /**
         * 备用26
         */
        pepd.setTarget91(0.0);

        /**
         * 备用27
         */
        pepd.setTarget92(0.0);

        /**
         * 备用28
         */
        pepd.setTarget93(0.0);

        /**
         * 备用29
         */
        pepd.setTarget94(0.0);

        /**
         * 备用30
         */
        pepd.setTarget95(0.0);

        /**
         * 备用31
         */
        pepd.setTarget96(0.0);

        /**
         * 备用32
         */
        pepd.setTarget97(0.0);

        /**
         * 备用33
         */
        pepd.setTarget98(0.0);

        /**
         * 备用34
         */
        pepd.setTarget99(0.0);

        /**
         * 备用35
         */
        pepd.setTarget100(0.0);
        pepd.setTarget101(0.0);
        pepd.setTarget102(0.0);
        pepd.setTarget103(0.0);
        pepd.setTarget104(0.0);
        pepd.setTarget105(0.0);
        pepd.setTarget106(0.0);
        pepd.setTarget107(0.0);
        pepd.setTarget108(0.0);
        pepd.setTarget109(0.0);
        pepd.setTarget110(0.0);
        pepd.setTarget111(0.0);
        pepd.setTarget112(0.0);
        pepd.setTarget113(0.0);
        pepd.setTarget114(0.0);
        pepd.setTarget115(0.0);
        pepd.setTarget116(0.0);
        pepd.setTarget117(0.0);
        pepd.setTarget118(0.0);
        pepd.setTarget119(0.0);
        pepd.setTarget120(0.0);
        pepd.setTarget121(0.0);
        pepd.setTarget122(0.0);
        pepd.setTarget123(0.0);
        pepd.setTarget124(0.0);
        pepd.setTarget125(0.0);
        pepd.setTarget126(0.0);
        pepd.setTarget127(0.0);
        pepd.setTarget128(0.0);
        pepd.setTarget129(0.0);
        pepd.setTarget130(0.0);
        pepd.setTarget131(0.0);
        pepd.setTarget132(0.0);
        pepd.setTarget133(0.0);
        pepd.setTarget134(0.0);
        pepd.setTarget135(0.0);
        pepd.setTarget136(0.0);
        pepd.setTarget137(0.0);
        pepd.setTarget138(0.0);
        pepd.setTarget139(0.0);
        pepd.setTarget140(0.0);
        pepd.setTarget141(0.0);
        pepd.setTarget142(0.0);
        pepd.setTarget143(0.0);
        pepd.setTarget144(0.0);
        pepd.setTarget145(0.0);
        pepd.setTarget146(0.0);
        pepd.setTarget147(0.0);
        pepd.setTarget148(0.0);
        pepd.setTarget149(0.0);
        pepd.setTarget150(0.0);
        pepd.setTarget151(0.0);
        pepd.setTarget152(0.0);
        pepd.setTarget153(0.0);
        pepd.setTarget154(0.0);
        pepd.setTarget155(0.0);
        pepd.setTarget156(0.0);
        pepd.setTarget157(0.0);
        pepd.setTarget158(0.0);
        pepd.setTarget159(0.0);
        pepd.setTarget160(0.0);
        pepd.setTarget161(0.0);
        pepd.setTarget162(0.0);
        pepd.setTarget163(0.0);
        pepd.setTarget164(0.0);
        pepd.setTarget165(0.0);
        pepd.setTarget166(0.0);
        pepd.setTarget167(0.0);
        pepd.setTarget168(0.0);
        pepd.setTarget169(0.0);
        pepd.setTarget170(0.0);
        pepd.setTarget171(0.0);
        pepd.setTarget172(0.0);
        pepd.setTarget173(0.0);
        pepd.setTarget174(0.0);
        pepd.setTarget175(0.0);
        pepd.setTarget176(0.0);
        pepd.setTarget177(0.0);
        pepd.setTarget178(0.0);
        pepd.setTarget179(0.0);
        pepd.setTarget180(0.0);
        pepd.setTarget181(0.0);
        pepd.setTarget182(0.0);
        pepd.setTarget183(0.0);
        pepd.setTarget184(0.0);
        pepd.setTarget185(0.0);
        pepd.setTarget186(0.0);
        pepd.setTarget187(0.0);
        pepd.setTarget188(0.0);
        pepd.setTarget189(0.0);
        pepd.setTarget190(0.0);
        pepd.setTarget191(0.0);
        pepd.setTarget192(0.0);
        pepd.setTarget193(0.0);
        pepd.setTarget194(0.0);
        pepd.setTarget195(0.0);
        pepd.setTarget196(0.0);
        pepd.setTarget197(0.0);
        pepd.setTarget198(0.0);
        pepd.setTarget199(0.0);
        pepd.setTarget200(0.0);
    }
}







