package com.pqs9000.service.responsibility;

import com.njcn.pojo.responsibility.ResponsibilityData;
import com.pqs9000.exception.UserDataException;
import com.pqs9000.pojo.responsibility.Responsibility;
import com.pqs9000.pojo.responsibility.ResponsibilityResult;
import org.springframework.web.multipart.MultipartFile;

import java.util.Date;
import java.util.List;

/**
 * @author hongawen
 * @Date: 2019/3/28 15:27
 * 处理责任划分业务的业务接口类
 */
public interface ResponsibilityService {
    //根据条件获取历史谐波数据
    List<Responsibility> getHistoryData(Integer lineIndex, Date startTime, Date endTime, String type, Integer time) throws UserDataException;

    //处理用采数据
    String dealExcelData(MultipartFile file) throws Exception;

    //获取动态数据和责任列表格  根据谐波数据和功率数据
    ResponsibilityResult getDynamicDataAndResponsibiltyByPData(Date startTime, Date endTime, String type, Integer lineIndex, Integer time, String userDataIndex, int calFlag) throws Exception;

    //获取动态数据和责任列表格  根据动态责任数据和谐波数据
    ResponsibilityResult getDynamicDataAndResponsibiltyByFkData(Date startTime, Date endTime,  Integer time, float limitValue, Date limitS, Date limitE,String responsibilityIndex) throws Exception;

    //获取计算时间范围内的谐波责任数据列
    List<ResponsibilityData> responsibilityDataList(Date startTime, Date endTime);

    //根据索引获取责任计算值索引
    ResponsibilityData selectByIndex(String resIndex);

    //根据谐波次数以及谐波责任索引获取详细数据
    List<ResponsibilityResult> displayHistoryData(Integer time, String resIndex)throws Exception;

    //根据谐波索引删除下面所有数据
    void deleteResponsibilityByResIndex(String resIndex);

    //根据监测点获取指定条件的限值
    Float getLimitByTimeAndType(Integer lineIndex, Integer time, String type);
}
