package sgc.portal.cs.cs0402.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.com.auth.model.PrvtinfoFindHist;
import sgc.portal.com.auth.model.SmComHdlgAuth;
import sgc.portal.com.auth.service.MaskingDesabledService;
import sgc.portal.com.com.service.ComAuthUserMngService;
import sgc.portal.cs.cs0402.service.CS04020001UService;
import sgc.portal.cs.cs0402.dto.CS04020001USearch;

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

@RestController
@RequestMapping("/cs/cs0402")
public class CS04020001UController {
	
	private final CS04020001UService service;

    public CS04020001UController(CS04020001UService service) {
        this.service = service;
    }
    
    //동적조회 
    @PostMapping("/CS04020001U/selectTotalTcsWeekWorkList")
    public Map<String, Object> selectTotalTcsWeekWorkList(@RequestBody CS04020001USearch search) {
    	
    	Map<String, Object> resultMap = new HashMap<String, Object>();
    	
    	List<EasyHashMap<String, Object>>  list1 = service.selectTotalTcsWeekWorkList(search);
    	List<EasyHashMap<String, Object>>  list2 = service.selectHeaderUpList(search);
    	List<EasyHashMap<String, Object>>  list3 = service.selectHeaderDownList(search);
    	
    	resultMap.put("dcdataList1"			, list1);
    	resultMap.put("dsHeaderUpList"		, list2);
        resultMap.put("dsHeaderDownList"	, list3);
        
        return resultMap;
    }
    
    @PostMapping("/CS04020001U/selectChooseTcsWeekWorkList")
    public EasyHashMap<String, Object> selectChooseTcsWeekWorkList(@RequestBody CS04020001USearch search) {
        return service.selectChooseTcsWeekWorkList(search);
    }
    
    @PostMapping("/CS04020001U/selectChooseTcsWeekWorkRptList1")
    public List<EasyHashMap<String, Object>> selectChooseTcsWeekWorkRptList1(@RequestBody CS04020001USearch search) {
        return service.selectChooseTcsWeekWorkRptList1(search);
    }
    
    @PostMapping("/CS04020001U/selectChooseTcsWeekWorkRptList2")
    public List<EasyHashMap<String, Object>> selectChooseTcsWeekWorkRptList2(@RequestBody CS04020001USearch search) {
        return service.selectChooseTcsWeekWorkRptList2(search);
    }
}
