package sgc.portal.qc.qc0102.service;

import org.apache.commons.lang3.RandomStringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.base.websquare.GridRowStatus;
import sgc.portal.com.auth.model.SmComHdlgAuth;
import sgc.portal.com.auth.persistence.ComBusiHandleAuthMngMapper;
import sgc.portal.com.sym.mail.persistence.MailMapper;
import sgc.portal.com.sym.mail.service.MailService;
import sgc.portal.cw.cw0902.dto.CW09020001USearch;
import sgc.portal.qc.qc0102.persistence.QC01020001UMapper;
import sgc.portal.qc.qc0102.dto.QC01020001USearch;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class QC01020001UService {

	private final QC01020001UMapper mapper;

    public QC01020001UService(QC01020001UMapper mapper) {
        this.mapper = mapper;
    }
    
    //eTEC Standard Doc
    public List<EasyHashMap<String, Object>> selectQcStndPrcgList30(QC01020001USearch search) {
        return mapper.selectQcStndPrcgList30(search);
    }
    
    public List<EasyHashMap<String, Object>> selectQcStndGudlList30(QC01020001USearch search) {
        return mapper.selectQcStndGudlList30(search);
    }
    
    public List<EasyHashMap<String, Object>> selectQcStndPrcgList(QC01020001USearch search) {
        return mapper.selectQcStndPrcgList(search);
    }
    
    public List<EasyHashMap<String, Object>> selectQcStndGudlList(QC01020001USearch search) {
        return mapper.selectQcStndGudlList(search);
    }
    public List<EasyHashMap<String, Object>> selectQcStndPrcgFileList(QC01020001USearch search) {
        return mapper.selectQcStndPrcgFileList(search);
    }
    
    public List<EasyHashMap<String, Object>> selectQcStndGudlFileList(QC01020001USearch search) {
        return mapper.selectQcStndGudlFileList(search);
    }
    
    public List<EasyHashMap<String, Object>> selectQcStndContextList(QC01020001USearch search) {
        return mapper.selectQcStndContextList(search);
    }
    
  	//1. 규정
    public List<EasyHashMap<String, Object>> selectQcStndRList(QC01020001USearch search) {
    	
    	String name1 = mapper.selectName1(search);
    	String name11 = mapper.selectName11(search);
    	search.setName11(name1);
    	search.setName22(name11);
        return mapper.selectQcStndRList(search);
    }
    
    public List<EasyHashMap<String, Object>> selectHeaderUpList1(QC01020001USearch search) {
        return mapper.selectHeaderUpList1(search);
    }
    
    public List<EasyHashMap<String, Object>> selectHeaderDownList1(QC01020001USearch search) {
        return mapper.selectHeaderDownList1(search);
    }
    

    //2. 경영기획
    public List<EasyHashMap<String, Object>> selectQcStndAList(QC01020001USearch search) {
    	
    	String name1 = mapper.selectName2(search);
    	String name11 = mapper.selectName22(search);
    	search.setName11(name1);
    	search.setName22(name11);
        return mapper.selectQcStndAList(search);
    }
    
    public List<EasyHashMap<String, Object>> selectHeaderUpList2(QC01020001USearch search) {
        return mapper.selectHeaderUpList2(search);
    }
    
    public List<EasyHashMap<String, Object>> selectHeaderDownList2(QC01020001USearch search) {
        return mapper.selectHeaderDownList2(search);
    }
    
  	//3. 수주영업
    public List<EasyHashMap<String, Object>> selectQcStndMList(QC01020001USearch search) {
    	
    	String name1 = mapper.selectName3(search);
    	String name11 = mapper.selectName33(search);
    	search.setName11(name1);
    	search.setName22(name11);
        return mapper.selectQcStndMList(search);
    }
    
    public List<EasyHashMap<String, Object>> selectHeaderUpList3(QC01020001USearch search) {
        return mapper.selectHeaderUpList3(search);
    }
    
    public List<EasyHashMap<String, Object>> selectHeaderDownList3(QC01020001USearch search) {
        return mapper.selectHeaderDownList3(search);
    }
    
  	//4. 사업수행
    public List<EasyHashMap<String, Object>> selectQcStndEList(QC01020001USearch search) {
    	
    	String name1 = mapper.selectName4(search);
    	String name11 = mapper.selectName44(search);
    	search.setName11(name1);
    	search.setName22(name11);
        return mapper.selectQcStndEList(search);
    }
    
    public List<EasyHashMap<String, Object>> selectHeaderUpList4(QC01020001USearch search) {
        return mapper.selectHeaderUpList4(search);
    }
    
    public List<EasyHashMap<String, Object>> selectHeaderDownList4(QC01020001USearch search) {
        return mapper.selectHeaderDownList4(search);
    }
    
  	//5. 사업지원
    public List<EasyHashMap<String, Object>> selectQcStndSList(QC01020001USearch search) {
    	
    	String name1 = mapper.selectName5(search);
    	String name11 = mapper.selectName55(search);
    	search.setName11(name1);
    	search.setName22(name11);
        return mapper.selectQcStndSList(search);
    }
    
    public List<EasyHashMap<String, Object>> selectHeaderUpList5(QC01020001USearch search) {
        return mapper.selectHeaderUpList5(search);
    }
    
    public List<EasyHashMap<String, Object>> selectHeaderDownList5(QC01020001USearch search) {
        return mapper.selectHeaderDownList5(search);
    }
    
    public List<EasyHashMap<String, Object>> selectQcStndTreeListNext(QC01020001USearch search) {
        return mapper.selectQcStndTreeListNext(search);
    }
    
    public List<EasyHashMap<String, Object>> selectQcStndListNext(QC01020001USearch search) {
        return mapper.selectQcStndListNext(search);
    }
    
    public List<EasyHashMap<String, Object>> selectQcStndPrcgFrmtAflIdList(QC01020001USearch search) {
        return mapper.selectQcStndPrcgFrmtAflIdList(search);
    }
    
    public List<EasyHashMap<String, Object>> selectQcStndGudlNmList(QC01020001USearch search) {
        return mapper.selectQcStndGudlNmList(search);
    }
    
    public List<EasyHashMap<String, Object>> selectQcStndPrcgListNext(QC01020001USearch search) {
        return mapper.selectQcStndPrcgListNext(search);
    }
    
    public List<EasyHashMap<String, Object>> selectQcStndGudlListNext(QC01020001USearch search) {
        return mapper.selectQcStndGudlListNext(search);
    }
    
    public List<EasyHashMap<String, Object>> selectQcStndPrcgGudlAflIdListNext(QC01020001USearch search) {
        return mapper.selectQcStndPrcgGudlAflIdListNext(search);
    }
    
    public List<EasyHashMap<String, Object>> selectQcStndPrcgHisFrmtAflIdListNext(QC01020001USearch search) {
        return mapper.selectQcStndPrcgHisFrmtAflIdListNext(search);
    }
    
    public List<EasyHashMap<String, Object>> selectQcStndGudlGudlRelAflIdListNext(QC01020001USearch search) {
        return mapper.selectQcStndGudlGudlRelAflIdListNext(search);
    }
    
    public int selectQcStndRCount(QC01020001USearch search) {
        return mapper.selectQcStndRCount(search);
    }
    
    public int selectQcStndACount(QC01020001USearch search) {
        return mapper.selectQcStndACount(search);
    }
    
    public int selectQcStndMCount(QC01020001USearch search) {
        return mapper.selectQcStndMCount(search);
    }
    
    public int selectQcStndECount(QC01020001USearch search) {
        return mapper.selectQcStndECount(search);
    }
    
    public int selectQcStndSCount(QC01020001USearch search) {
        return mapper.selectQcStndSCount(search);
    }
    
}