package sgc.portal.cs.cs0403.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.cs0403.service.CS04030001UService;
import sgc.portal.cs.cs0403.dto.CS04030001USearch;
import sgc.portal.cs.cs0403.model.CS04030001U;

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

@RestController
@RequestMapping("/cs/cs0403")
public class CS04030001UController {
	
	private final CS04030001UService service;

    public CS04030001UController(CS04030001UService service) {
        this.service = service;
    }

    
    //주간 현장별 주요현안 상세 조회
    @PostMapping("/CS04030001U/selectTcsWeekWorkMainisuList")
    public List<EasyHashMap<String, Object>> selectTcsWeekWorkMainisuList(@RequestBody CS04030001USearch search) {
        return service.selectTcsWeekWorkMainisuList(search);
    }
    
    @PostMapping("/CS04030001U/selectTcsWeekWorkMainisuDtlList")
    public List<EasyHashMap<String, Object>> selectTcsWeekWorkMainisuDtlList(@RequestBody CS04030001USearch search) {
        return service.selectTcsWeekWorkMainisuDtlList(search);
    }
    
    @PostMapping("/CS04030001U/selectTcsWeekWorkMainisuCommList1")
    public List<EasyHashMap<String, Object>> selectTcsWeekWorkMainisuCommList1(@RequestBody CS04030001USearch search) {
        return service.selectTcsWeekWorkMainisuCommList1(search);
    }
    
    @PostMapping("/CS04030001U/selectTcsWeekWorkMainisuCommList2")
    public List<EasyHashMap<String, Object>> selectTcsWeekWorkMainisuCommList2(@RequestBody CS04030001USearch search) {
        return service.selectTcsWeekWorkMainisuCommList2(search);
    }

	//주간 현장별 주요현안  등록 수정 삭제
    @PostMapping("/CS04030001U/saveTcsWeekWorkMainisu1")
    public Map<String, String> saveTcsWeekWorkMainisu1(@RequestBody CS04030001U cS04030001U) {
    	return service.saveTcsWeekWorkMainisu1(cS04030001U);
    }
    
    @PostMapping("/CS04030001U/saveTcsWeekWorkMainisu2")
    public Map<String, String> saveTcsWeekWorkMainisu2(@RequestBody CS04030001U cS04030001U) {
    	return service.saveTcsWeekWorkMainisu2(cS04030001U);
    }
    
    @PostMapping("/CS04030001U/saveTcsWeekWorkMainisu3")
    public Map<String, String> saveTcsWeekWorkMainisu3(@RequestBody List<CS04030001U> CS04030001U) {
    	return service.saveTcsWeekWorkMainisu3(CS04030001U);
    }
}
