package com.ho.business.service;

import com.alibaba.fastjson.JSONObject;
import com.ho.business.entity.Station;
import com.ho.business.vo.req.MonitorQuery;
import com.ho.business.vo.req.xxjob.RefreshHisDataReq;
import com.ho.business.vo.resp.DeviceRespVO;
import com.ho.td.api.entity.elecMeter.ElecPowerGeneration;

import java.math.BigDecimal;
import java.text.ParseException;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author fancl
 * @desc: 外部调用处理类
 * @date 2023/5/6
 */
public interface OutApiService {

    //昨天的充放电量
    void dayChargeDeal(MonitorQuery monitorQuery);

    void dayPVCharge(MonitorQuery monitorQuery);

    void dayPVMpptCharge(MonitorQuery monitorQuery);

    //天小时的充放电量
    void hourChargeDeal(MonitorQuery monitorQuery) throws ParseException;

    //当月充放电量
    void currentMonthYearDeal(MonitorQuery monitorQuery);

    //日发电量
    ElecPowerGeneration getDayPower(DeviceRespVO deviceRespVO, Date begin, Date end);

    /**
     * 根据电站id计算当日的日冲日放电量
     *
     * @param monitorQuery
     * @return
     */
    JSONObject getDayChargeDeal(MonitorQuery monitorQuery);

    /**
     * 根据电站id计算当日的日冲日放电量
     *
     * @param monitorQuery
     * @return
     */
    JSONObject getDayChargeDeal(MonitorQuery monitorQuery, String deviceType);

    void dayChargeValue(MonitorQuery monitorQuery, List<Station> stationList);

    void day(MonitorQuery monitorQuery, List<Station> stationList);

    void getJobStationState(List<Station> stationList);

    /**
     * 自算日差值（动态配置自算使用）
     *
     * @param monitorQuery
     * @param srcId
     * @param col
     * @param colAlias     别名
     * @return
     */
    BigDecimal getDayChargeDeal(MonitorQuery monitorQuery, Integer srcId, String col, String colAlias);

    /**
     * 计算系统转换效率
     */
    void getSystemEfficiency();

    /**
     * 根据电站id获取转发模板id
     * @param stationId
     * @return
     */
    String getTempId(Integer stationId);

    /**
     * 对外上送筛选数据
     * @param stationId
     * @return
     */
    Map<Object, Object> getForwardPushData(Integer stationId,Integer tempId);
}
