package incheon.ags.ias.linkData.mapper;

import incheon.ags.ias.linkData.vo.LinkDataSearchVO;
import incheon.ags.ias.linkData.vo.LinkDataVO;
import incheon.com.config.annotation.MainDB;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import org.apache.ibatis.annotations.Param;

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

@org.egovframe.rte.psl.dataaccess.mapper.Mapper @incheon.com.config.annotation.MainDB
public interface LinkDataMapper {
    List<Map<String,Object>> selectLinkDataList(LinkDataSearchVO linkDataSearchVO) throws Exception;
    LinkDataVO selectLinkDataDetail(LinkDataVO linkDataVO) throws Exception;
    List<Map<String,Object>> selectSysList() throws Exception;
    int insertLinkData(LinkDataVO linkDataVO) throws Exception;
    int updateLinkData(LinkDataVO linkDataVO) throws Exception;
    int deleteLinkData(LinkDataVO linkDataVO) throws Exception;
    int selectLinkDataCnt(LinkDataSearchVO linkDataSearchVO) throws Exception;

    // 연계데이터 설정 팝업
    List<Map<String,Object>> selectMetDataWithLinkId(LinkDataVO linkDataVO) throws Exception;
    List<Map<String,Object>> selectMetDataDmndHeader(LinkDataVO linkDataVO) throws Exception;
    List<Map<String,Object>> selectMetDataDmndParam(LinkDataVO linkDataVO) throws Exception;
    int insertLinkDataSettingMetData(LinkDataVO linkDataVO) throws Exception;
    int updateLinkDataSettingMetData(LinkDataVO linkDataVO) throws Exception;
    int deleteLinkDataSettingMetData(LinkDataVO linkDataVO) throws Exception;
    int deleteLinkMetdataByLinkId(@Param("linkId") String linkId) throws Exception;
    int deleteLinkMetdataDmndByLinkId(@Param("linkId") String linkId) throws Exception;
    int insetLinkDataSettingApiData(LinkDataVO linkDataVO) throws Exception;
    int updateLinkDataSettingApiData(LinkDataVO linkDataVO) throws Exception;
    int deleteLinkDataSettingApiData(LinkDataVO linkDataVO) throws Exception;

    // 수집 현황 팝업
    List<Map<String,Object>> selectClctDalySmryList(LinkDataSearchVO linkDataSearchVO) throws Exception;
    List<Map<String,Object>> selectClctIntgHstryList(LinkDataSearchVO linkDataSearchVO) throws Exception;
    int selectDalySmryTotPrcsCnt(LinkDataSearchVO linkDataSearchVO) throws Exception;
    int selectDalySmryTotScsCnt(LinkDataSearchVO linkDataSearchVO) throws Exception;
    int selectDalySmryTotFailCnt(LinkDataSearchVO linkDataSearchVO) throws Exception;
    int selectDalyScsRpbltyAvg(LinkDataSearchVO linkDataSearchVO) throws Exception;
    long selectDalyPrcsHrAvg(LinkDataSearchVO linkDataSearchVO) throws Exception;
    int selectClctHstryTotCnt(LinkDataSearchVO linkDataSearchVO) throws Exception;

    // 데이터 등록 팝업
    List<Map<String,Object>> selectLinkDataHoprHstryList(LinkDataSearchVO linkDataSearchVO) throws Exception;
    int insertLinkDataHoprHstry(LinkDataVO linkDataVO) throws Exception;
    int selectLinkDataHoprHstryTotCnt(LinkDataSearchVO linkDataSearchVO) throws Exception;
}
