package sgc.portal.qc.qc0101.persistence;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.qc.qc0101.dto.QC01010001USearch;
import sgc.portal.qc.qc0101.model.QC01010001U;
import sgc.portal.qc.qc0101.model.QC01010002U;
import sgc.portal.qc.qc0101.model.QC01010003U;

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

@Mapper
public interface QC01010001UMapper {
	
	//레벨
	//(품질)표준문서) TREE  조회
	List<EasyHashMap<String, Object>> selectQcStndTreeList(QC01010001USearch search);
	
	//(품질)표준문서)  조회
	List<EasyHashMap<String, Object>> selectQcStndList(QC01010001USearch search);

	//(품질)표준문서)  수정삭체추가
	void insertQcStnd(QC01010001U qC01010001U);
	void deleteQcStnd(QC01010001U qC01010001U);
	void updateQcStnd(QC01010001U qC01010001U);
	String selectChevern(QC01010001U qC01010001U);
	
	
	//프로세스
	List<EasyHashMap<String, Object>> selectQcStndPrcgHisList(QC01010001USearch search);
	int selectQcStndPrcgCount(QC01010002U qC01010002U);	
	int selectQcStndPrcgHisCount(QC01010002U qC01010002U);
	
	void insertQcStndPrcg(QC01010002U qC01010002U);
	void deleteQcStndPrcg(QC01010002U qC01010002U);
	void updateQcStndPrcg(QC01010002U qC01010002U);
	void insertQcStndPrcgHis(QC01010002U qC01010002U);
	void deleteQcStndPrcgHis(QC01010002U qC01010002U);
	void updateQcStndPrcgHis(QC01010002U qC01010002U);
	
	void updateQcStndPrcgHis2(QC01010002U qC01010002U);
	void updateQcStndPrcgHisCheckN(QC01010002U qC01010002U);
	void updateQcStndPrcgHisCheckRevNo(QC01010002U qC01010002U);
	void updateQcStndPrcgHisCheckY(QC01010002U qC01010002U);
	
	List<EasyHashMap<String, Object>> selectQcStndPrcgGudlAflIdList(QC01010001USearch search);
	List<EasyHashMap<String, Object>> selectQcStndPrcgHisFrmtAflIdList(QC01010001USearch search);
	
	void updateGudlAflId(QC01010002U qC01010002U);
	void updateGudlAflIdHis(QC01010002U qC01010002U);
	int selectGudlAflIfileIdCount(QC01010002U qC01010002U);
	
	void updateFrmtAflId(QC01010002U qC01010002U);
	void updateFrmtAflIdHis(QC01010002U qC01010002U);
	int selectFrmtAflIfileIdCount(QC01010002U qC01010002U);
	
	
	int selectPrcsAflIdCount1(QC01010002U qC01010002U);
	int selectAtvAflIdCount1(QC01010002U qC01010002U);
	int selectGudlAflIdCount1(QC01010002U qC01010002U);
	int selectFrmtAflIdCount1(QC01010002U qC01010002U);
	
	void updatePrcsAflIdGangSin1(QC01010002U qC01010002U);
	void updateAtvAflIdGangSin1(QC01010002U qC01010002U);
	void updateGudlAflIdGangSin1(QC01010002U qC01010002U);
	void updateFrmtAflIdGangSin1(QC01010002U qC01010002U);
	
	void updateQcStndPrcgCheckAflId(QC01010002U qC01010002U);
	
	//지침
	List<EasyHashMap<String, Object>> selectQcStndGudlList(QC01010001USearch search);
	List<EasyHashMap<String, Object>> selectQcStndGudlHisList(QC01010001USearch search);
	
	List<EasyHashMap<String, Object>> selectQcStndGudlGudlRelAflIdList(QC01010001USearch search);
	List<EasyHashMap<String, Object>> selectQcStndGudlHisGudlRelAflIdList(QC01010001USearch search);
	
	void insertQcStndGudl(QC01010003U qC01010003U);
	void deleteQcStndGudl(QC01010003U qC01010003U);
	void updateQcStndGudl(QC01010003U qC01010003U);
	void insertQcStndGudlHis(QC01010003U qC01010003U);
	void deleteQcStndGudlHis(QC01010003U qC01010003U);
	void updateQcStndGudlHis(QC01010003U qC01010003U);
	
	void updateQcStndGudl2(QC01010003U qC01010003U);
	void updateQcStndGudlHis2(QC01010003U qC01010003U);
	
	int selectGudlAflIdCount11(QC01010003U qC01010003U);
	int selectGudlRelAflIdCount1(QC01010003U qC01010003U);
	void updateGudlAflIdGangSin11(QC01010003U qC01010003U);
	void updateGudlRelAflIdGangSin1(QC01010003U qC01010003U);
	
	void updateGudlRelAflId(QC01010003U qC01010003U);
	int selectGudlRelAflIdCount(QC01010003U qC01010003U);
}
