package sgc.portal.cd.cdpop.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cd.cdpop.dto.CDPOPSearch;
import sgc.portal.cd.cdpop.service.CDPOPService;

import java.util.List;

@RestController
@RequestMapping("/cd/cdpop")
public class CDPOPController {
    private final CDPOPService service;

    public CDPOPController(CDPOPService service) {
        this.service = service;
    }
    
    @PostMapping("/CDPOP/ccList")
    public List<EasyHashMap<String, Object>> getCcList(@RequestBody CDPOPSearch search) {
        return service.getCcList(search);
    }
    
    @PostMapping("/CDPOP/ccAsList")
    public List<EasyHashMap<String, Object>> getCcAsList(@RequestBody CDPOPSearch search) {
        return service.getCcAsList(search);
    }
    
    @PostMapping("/CDPOP/ccSiteList")
    public List<EasyHashMap<String, Object>> ccSiteList(@RequestBody CDPOPSearch search) {
        return service.getCcSiteList(search);
    }
    
    @PostMapping("/CDPOP/jobtypListKo")
    public List<EasyHashMap<String, Object>> getJobtypListKo(@RequestBody CDPOPSearch search) {
    	return service.getJobtypListKo(search);
    }
    
    @PostMapping("/CDPOP/jobtypListEn")
    public List<EasyHashMap<String, Object>> getJobtypListEn(@RequestBody CDPOPSearch search) {
    	return service.getJobtypListEn(search);
    }
    
    @PostMapping("/CDPOP/eqpmListKo")
    public List<EasyHashMap<String, Object>> getEqpmListKo(@RequestBody CDPOPSearch search) {
    	return service.getEqpmListKo(search);
    }
    
    @PostMapping("/CDPOP/eqpmListEn")
    public List<EasyHashMap<String, Object>> getEqpmListEn(@RequestBody CDPOPSearch search) {
    	return service.getEqpmListEn(search);
    }
    
    @PostMapping("/CDPOP/bdmtListKo")
    public List<EasyHashMap<String, Object>> getBdmtListKo(@RequestBody CDPOPSearch search) {
    	return service.getBdmtListKo(search);
    }
    
    @PostMapping("/CDPOP/bdmtListEn")
    public List<EasyHashMap<String, Object>> getBdmtListEn(@RequestBody CDPOPSearch search) {
    	return service.getBdmtListEn(search);
    }
    
    @PostMapping("/CDPOP/covendNmList")
    public List<EasyHashMap<String, Object>> getCovendNmList(@RequestBody CDPOPSearch search) {
    	return service.getCovendNmList(search);
    }
    
    @PostMapping("/CDPOP/vendList")
    public List<EasyHashMap<String, Object>> getVendList(@RequestBody CDPOPSearch search) {
        return service.getVendList(search);
    }
    
}
