package com.njcn.advance.service.govern.voltage;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.njcn.advance.pojo.dto.govern.voltage.ProductLineComputeData;
import com.njcn.advance.pojo.dto.govern.voltage.SgEventExcel;
import com.njcn.advance.pojo.param.govern.voltage.SgEventParam;
import com.njcn.advance.pojo.po.govern.voltage.SgEvent;
import com.njcn.advance.pojo.vo.govern.voltage.SgEventVO;
import com.njcn.advance.pojo.vo.govern.voltage.TransientEventCountVO;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author hongawen
 * @since 2024-02-29
 */
public interface ISgEventService extends IService<SgEvent> {

    Page<SgEventVO> sgEventList(SgEventParam.SgEventParamQueryParam sgEventParamQueryParam);

    void downloadTemplate();

    void exportEventData(SgEventParam.SgEventParamQueryParam sgEventParamQueryParam);

    void importEventData(List<SgEventExcel> sgEventExcels, String incomingLineId,String productLineId);

    List<SgEvent> getEventData(String id, String startTime, String endTime);

    Map<Integer[], Integer> getEventMap(String id, String startTime, String endTime);

    Map<Integer[], Integer> countEventMap4Switch(Map<Integer[], Integer> eventMap, String id, String incomingLineId, String startTime, String endTime, Double actionTime);

    List<SgEvent> countEvent4Switch(List<SgEvent> sgEventList, String id, String incomingLineId, String startTime, String endTime, Double actionTime);

    boolean deleteEventData(List<String> ids);

    TransientEventCountVO threeDList(SgEventParam.SgEventParamQueryParam sgEventParamQueryParam);

    void calcLoss(String id);

    Double[] getEventLossAndFailureRate(ProductLineComputeData productLineComputeData, double amplitude, double durationTime);

    List<SgEventVO> getEventDataByProductLineId(SgEventParam.SgEventParamQueryParam sgEventParamQueryParam);
}
