package sgc.portal.cs.cs0402.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.com.persistence.ComAuthUserMngMapper;
import sgc.portal.cs.cs0402.persistence.CS04020001UMapper;
import sgc.portal.cs.cs0402.dto.CS04020001USearch;

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

@Service
public class CS04020001UService {
    
	private final CS04020001UMapper mapper;

    public CS04020001UService(CS04020001UMapper mapper) {
        this.mapper = mapper;
    }
    
    //동적 세팅  조회
    public List<EasyHashMap<String, Object>> selectTotalTcsWeekWorkList(CS04020001USearch search) {
    	String name = mapper.selectName(search);
    	String day = mapper.selectChooseTcsWeekWorkFirstDay(search);
    	
    	search.setName(name);
    	search.setWorkMonth3(day);
        return mapper.selectTotalTcsWeekWorkList(search);
    }
    
    public List<EasyHashMap<String, Object>> selectHeaderUpList(CS04020001USearch search) {
        return mapper.selectHeaderUpList(search);
    }
    
    public List<EasyHashMap<String, Object>> selectHeaderDownList(CS04020001USearch search) {
        return mapper.selectHeaderDownList(search);
    }
    
    //담당자별주간보고 목록조회
    public EasyHashMap<String, Object> selectChooseTcsWeekWorkList(CS04020001USearch search) {
        return mapper.selectChooseTcsWeekWorkList(search);
    }
    
    public List<EasyHashMap<String, Object>> selectChooseTcsWeekWorkRptList1(CS04020001USearch search) {
        return mapper.selectChooseTcsWeekWorkRptList1(search);
    }
    
    public List<EasyHashMap<String, Object>> selectChooseTcsWeekWorkRptList2(CS04020001USearch search) {
        return mapper.selectChooseTcsWeekWorkRptList2(search);
    }
}