package sgc.portal.cs.cs0401.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.cs0401.service.CS04010001UService;
import sgc.portal.cs.cs0401.dto.CS04010001USearch;
import sgc.portal.cs.cs0401.model.CS04010001U;
import sgc.portal.cs.cs0401.model.CS04010002U;

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

@RestController
@RequestMapping("/cs/cs0401")
public class CS04010001UController {
	
	private final CS04010001UService service;

    public CS04010001UController(CS04010001UService service) {
        this.service = service;
    }

    //담당자별주간보고 조회
    @PostMapping("/CS04010001U/selectTcsWeekWorkList")
    public EasyHashMap<String, Object> selectTcsWeekWorkList(@RequestBody CS04010001USearch search) {
        return service.selectTcsWeekWorkList(search);
    }
    
    //담당자별주간보고 상세 조회
    @PostMapping("/CS04010001U/selectTcsWeekWorkRptList1")
    public List<EasyHashMap<String, Object>> selectTcsWeekWorkRptList1(@RequestBody CS04010001USearch search) {
        return service.selectTcsWeekWorkRptList1(search);
    }
    
    @PostMapping("/CS04010001U/selectTcsWeekWorkRptList2")
    public List<EasyHashMap<String, Object>> selectTcsWeekWorkRptList2(@RequestBody CS04010001USearch search) {
        return service.selectTcsWeekWorkRptList2(search);
    }
    
    @PostMapping("/CS04010001U/selectTcsWeekWorkCommList")
    public List<EasyHashMap<String, Object>> selectTcsWeekWorkCommList(@RequestBody CS04010001USearch search) {
        return service.selectTcsWeekWorkCommList(search);
    }
    
    @PostMapping("/CS04010001U/selectTcsWeekWorkCommList2")
    public List<EasyHashMap<String, Object>> selectTcsWeekWorkCommList2(@RequestBody CS04010001USearch search) {
        return service.selectTcsWeekWorkCommList2(search);
    }

	//담당자별주간보고 등록 수정 삭제
    @PostMapping("/CS04010001U/saveTcsWeekWork1")
    public Map<String, String> saveTcsWeekWork1(@RequestBody CS04010001U cS04010001U) {
    	return service.saveTcsWeekWork1(cS04010001U);
    }
    
    @PostMapping("/CS04010001U/saveTcsWeekWork2")
    public Map<String, String> saveTcsWeekWork2(@RequestBody CS04010001U cS04010001U) {
    	return service.saveTcsWeekWork2(cS04010001U);
    }
    
    @PostMapping("/CS04010001U/saveTcsWeekWork3")
    public Map<String, String> saveTcsWeekWork3(@RequestBody CS04010001U cS04010001U) {
    	return service.saveTcsWeekWork3(cS04010001U);
    }
    
    //담당자별주간보고  삭제
    @PostMapping("/CS04010001U/deleteTcsWeekWork")
    public Map<String, String> deleteTcsWeekWork(@RequestBody CS04010001U cS04010001U) {
    	return service.deleteTcsWeekWork(cS04010001U);
    }

}
