package com.style24.scm.biz.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.style24.persistence.domain.SearchData;
import com.style24.scm.biz.dao.TssCommonDao;

import lombok.extern.slf4j.Slf4j;

/**
 * 공용 Service
 *
 * @author eskim
 * @since 2020. 10. 20
 */
@Service
@Slf4j
public class TssCommonService {

	@Autowired
	private TssCommonDao commonDao;

	/**
	 * 엑셀조회를 위한 SEARCH 테이블 삭제
	 *
	 * @param searchData
	 * @return
	 * @author eskim
	 * @since 2020. 10. 22
	 */
	public void deleteExceluploadSearCh(SearchData searchData) {
		commonDao.deleteExceluploadSearCh(searchData);
	}

	/**
	 * 엑셀조회를 위한 SEARCH 테이블 생성
	 *
	 * @param searchData
	 * @return
	 * @author eskim
	 * @since 2020. 10. 22
	 */
	public void createExceluploadSearch(SearchData searchData) {
		commonDao.createExceluploadSearch(searchData);
	}

	/**
	 * 엑셀조회를 위한 SEARCH 테이블 생성 - dummy 컬럼 포함
	 *
	 * @param searchData
	 * @return
	 * @author eskim
	 * @since 2020. 10. 22
	 */
	public void createExceluploadSearchByAll(SearchData searchData) {
		commonDao.createExceluploadSearchByAll(searchData);
	}

	/**
	 * 샘플파일 시스템파일명 조회
	 * @param sampleFileId - 샘플파일ID
	 * @return
	 * @author gagamel
	 * @since 2020. 11. 3
	 */
	public String getSampleFileSystemFilename(String sampleFileId) {
		return commonDao.getSampleFileSystemFilename(sampleFileId);
	}

	/**
	 * ERP 연동 여부
	 *
	 * @param
	 * @return
	 * @author eskim
	 * @since 2020. 01. 16
	 */
	public String getErpSyncYn() {
		return commonDao.getErpSyncYn();
	}

}
