package com.jiayue.ipfcst.dataexchange.dataprocesser.datapacker.powerofreference;


import com.jiayue.ipfcst.common.data.constant.enums.ElectricFieldTypeEnum;
import com.jiayue.ipfcst.console.service.ElectricFieldService;
import com.jiayue.ipfcst.console.service.InverterInfoService;
import com.jiayue.ipfcst.console.service.WindTurbineInfoService;
import com.jiayue.ipfcst.dataexchange.service.ProtocolGatherDataPointService;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;

/**
 * 样板机的发电比例法计算 判断参照功率
 *
 * @author: xiuwei
 * @version: 3.0
 */
@Component
public abstract class BasePowerOfReferenceCalculator {


  /**
   * 风机信息的查询 方便推算样板机数据
   */
  protected WindTurbineInfoService windTurbineInfoService;


  /**
   * 逆变器信息查询
   */
  protected InverterInfoService inverterInfoService;


  /**
   * 查询场站信息
   */
  protected ElectricFieldService electricFieldService;


  /**
   * 查询到场站的实际功率的点位
   */
  protected ProtocolGatherDataPointService protocolGatherDataPointService;


  /**
   * 场站类型
   */
  protected ElectricFieldTypeEnum electricFieldType;

  public BasePowerOfReferenceCalculator(WindTurbineInfoService windTurbineInfoService, InverterInfoService inverterInfoService, ElectricFieldService electricFieldService, ProtocolGatherDataPointService protocolGatherDataPointService) {
    this.windTurbineInfoService = windTurbineInfoService;
    this.electricFieldService = electricFieldService;
    this.inverterInfoService = inverterInfoService;
    this.protocolGatherDataPointService = protocolGatherDataPointService;
  }

  /**
   * 获取预计理论的发电功率
   *
   * @return 预计的功率
   */
  public abstract BigDecimal getEstimatePower();

  /**
   * 初始化 或者重新初始化该类
   *
   * @return 预计的功率
   */
  public abstract BasePowerOfReferenceCalculator init();

}

