package incheon.ags.ias.sys.service;

import incheon.ags.ias.sys.vo.SysSearchVO;
import incheon.ags.ias.sys.vo.SysVO;

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

/**
 * 시스템 관리 Service 인터페이스
 */
public interface SysService {

    /* ========================================
     * 시스템 관련 메서드
     * ======================================== */

    /**
     * 시스템 목록 조회 (페이징)
     */
    List<Map<String, Object>> selectSysList(SysSearchVO sysSearchVO) throws Exception;

    /**
     * 시스템 총 개수 조회 (검색 조건 적용)
     */
    int selectSysListCnt(SysSearchVO sysSearchVO) throws Exception;

    /**
     * 시스템 상세 조회
     */
    SysVO selectSysDetail(SysVO sysVO) throws Exception;

    /**
     * 시스템 등록
     */
    int insertSys(SysVO sysVO) throws Exception;

    /**
     * 시스템 수정
     */
    int updateSys(SysVO sysVO) throws Exception;

    /**
     * 시스템 삭제
     */
    int deleteSys(SysVO sysVO) throws Exception;

    /* ========================================
     * 전체 조회 및 부서 관련 메서드
     * ======================================== */

    /**
     * 전체 시스템 목록 조회 (공통코드용)
     */
    List<Map<String, Object>> selectAllSysList() throws Exception;

    /**
     * 시스템별 부서 목록 조회
     */
    List<Map<String, Object>> selectSysDeptList() throws Exception;

    /**
     * 시스템 상태별 개수 조회
     */
    Map<String, Object> selectSysStatusCnt() throws Exception;

    /**
     * 시스템별 사용자 수 조회
     */
    List<Map<String, Object>> selectUserCntBySys() throws Exception;

    /**
     * 시스템 코드 중복 체크
     * @param sysCd 시스템 코드
     * @return 중복 여부 (true: 중복, false: 사용 가능)
     */
    boolean isSysCdDuplicate(String sysCd) throws Exception;
}
