package sgc.portal.cw.cw0902.service;

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.cs.cs0402.dto.CS04020001USearch;
import sgc.portal.cw.cw0902.persistence.CW09020001UMapper;
import sgc.portal.cw.cw0902.dto.CW09020001USearch;

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

@Service
public class CW09020001UService {

	private final CW09020001UMapper mapper;

    public CW09020001UService(CW09020001UMapper mapper) {
        this.mapper = mapper;
    }

    public List<EasyHashMap<String, Object>> selectDeptZehrWeekWorkPopList(CW09020001USearch search) {
    	
    	String guBun = search.getGuBun1();
    	search.setGuBun1(guBun);
    	String chk = mapper.selectDeptChk(search);
    	search.setChk(chk);
    	
        return mapper.selectDeptZehrWeekWorkPopList(search);
    }
    
    public EasyHashMap<String, Object> selectDeptZehrWeekWorkPopTitleList(CW09020001USearch search) {
        return mapper.selectDeptZehrWeekWorkPopTitleList(search);
    }
       
    //동적 세팅  조회
    public List<EasyHashMap<String, Object>> selectDeptZehrWeekWorkList(CW09020001USearch search) {
    	String name = mapper.selectName(search);
    	search.setName(name);
    	String chk = mapper.selectDeptChk(search);
    	search.setChk(chk);
        return mapper.selectDeptZehrWeekWorkList(search);
    }
    
    public List<EasyHashMap<String, Object>> selectHeaderUpList(CW09020001USearch search) {
        return mapper.selectHeaderUpList(search);
    }
    
    public List<EasyHashMap<String, Object>> selectHeaderDownList(CW09020001USearch search) {
        return mapper.selectHeaderDownList(search);
    }
    
    public List<EasyHashMap<String, Object>> selectDeptZehrWeekWorkPopFileList(CW09020001USearch search) {
        return mapper.selectDeptZehrWeekWorkPopFileList(search);
    }
 
}