package sgc.portal.cd.cd0304.web;

import java.util.Map;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import sgc.portal.cd.cd0301.model.CD03010001P;
import sgc.portal.cd.cd0304.dto.CD03040001PSearch;
import sgc.portal.cd.cd0304.model.CD03040001P;
import sgc.portal.cd.cd0304.service.CD03040001PService;

@RestController
@RequestMapping("/cd/cd0304/CD03040001P")
public class CD03040001PController {
	
	private final CD03040001PService service;

	public CD03040001PController(CD03040001PService service) {
		this.service = service;
	}
	
	//조회
    @PostMapping("/selectConWkiConf")	
    public CD03040001P selectConWkiConf(@RequestBody CD03040001PSearch search) {
        return service.selectConWkiConf(search);
    }
	
	//저장
    @PostMapping("/saveConWkiConf")
    public Map<String, String> saveConWkiConf(@RequestBody CD03040001P cD03040001P) {
    	return service.saveConWkiConf(cD03040001P);
    }
    
    //합의요청
    @PostMapping("/requestConWkiConf")
    public Map<String, String> requestConWkiConf(@RequestBody CD03040001P cD03040001P) {
    	return service.requestConWkiConf(cD03040001P);
    }
    
	//결재
    @PostMapping("/approval")
    public Map<String, String> approval(@RequestBody CD03010001P cD03010001P) {
    	return service.approval(cD03010001P);
    }
    
	//업체승인
    @PostMapping("/coApprove")
    public Map<String, String> coApprove(@RequestBody CD03010001P cD03010001P) {
    	return service.coApprove(cD03010001P);
    }

}