package incheon.ags.ias.dataHoprReg.service;

import incheon.ags.ias.dataHoprReg.vo.JbpsVO;

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

/**
 * 직위 동기화 서비스
 */
public interface JbpsSyncService {

    /**
     * 파일에서 직위 데이터 동기화 (파일 파싱 + 동기화)
     * @param atchFileId 첨부파일 ID
     * @param operatorId 작업자 ID
     * @return 처리된 건수 (inserted + updated + deleted)
     */
    int syncFromFile(String atchFileId, String operatorId) throws Exception;

    /**
     * 직위 데이터 동기화
     * @param fileDataList 파일에서 파싱한 직위 목록
     * @param operatorId 작업자 ID
     * @return 동기화 결과 (inserted, updated, deleted, unchanged)
     */
    Map<String, Integer> syncJbpss(List<JbpsVO> fileDataList, String operatorId) throws Exception;

    /**
     * 파일 헤더와 값을 JbpsVO로 변환
     */
    JbpsVO convertToJbpsVO(List<String> headers, List<String> values);
}
