package sgc.portal.cs.cscom.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cs.cscom.dto.CSCOMSearch;
import sgc.portal.cs.cscom.service.CSCOMService;
import sgc.portal.cs.cspop.dto.CSPOPSearch;

import java.util.List;

@RestController
@RequestMapping("/cs/cscom")
public class CSCOMController {
    private final CSCOMService service;

    public CSCOMController(CSCOMService service) {
        this.service = service;
    }
    
    //위치
    @PostMapping("/CSCOM/getComboLoc")
    public List<EasyHashMap<String, Object>> getComboLoc(@RequestBody CSCOMSearch search) {
        return service.getComboLoc(search);
    }
    
    //현장별대공종
    @PostMapping("/CSCOM/getComboLjob")
    public List<EasyHashMap<String, Object>> getComboLjob(@RequestBody CSCOMSearch search) {
        return service.getComboLjob(search);
    }
    
    //현장별하자공종
    @PostMapping("/CSCOM/getComboJob")
    public List<EasyHashMap<String, Object>> getComboJob(@RequestBody CSCOMSearch search) {
        return service.getComboJob(search);
    }
    
    //하자원인
    @PostMapping("/CSCOM/getComboCaus")
    public List<EasyHashMap<String, Object>> getComboCaus(@RequestBody CSCOMSearch search) {
        return service.getComboCaus(search);
    }
    
    //하자유형
    @PostMapping("/CSCOM/getComboType")
    public List<EasyHashMap<String, Object>> getComboType(@RequestBody CSCOMSearch search) {
        return service.getComboType(search);
    }
    
    //위치(현장)
    @PostMapping("/CSCOM/getComboSiteLoc")
    public List<EasyHashMap<String, Object>> getComboSiteLoc(@RequestBody CSCOMSearch search) {
        return service.getComboSiteLoc(search);
    }
    
    //현장별대공종(현장)
    @PostMapping("/CSCOM/getComboSiteLjob")
    public List<EasyHashMap<String, Object>> getComboSiteLjob(@RequestBody CSCOMSearch search) {
        return service.getComboSiteLjob(search);
    }
    
    //현장별하자공종(현장)
    @PostMapping("/CSCOM/getComboSiteJob")
    public List<EasyHashMap<String, Object>> getComboSiteJob(@RequestBody CSCOMSearch search) {
        return service.getComboSiteJob(search);
    }
    
    //하자원인(현장)
    @PostMapping("/CSCOM/getComboSiteCaus")
    public List<EasyHashMap<String, Object>> getComboSiteCaus(@RequestBody CSCOMSearch search) {
        return service.getComboSiteCaus(search);
    }
    
    //하자유형(현장)
    @PostMapping("/CSCOM/getComboSiteType")
    public List<EasyHashMap<String, Object>> getComboSiteType(@RequestBody CSCOMSearch search) {
        return service.getComboSiteType(search);
    }
    
    //현장별 동(현장)
    @PostMapping("/CSCOM/getComboSiteDong")
    public List<EasyHashMap<String, Object>> getComboSiteDong(@RequestBody CSCOMSearch search) {
        return service.getComboSiteDong(search);
    }
    
    //현장별 호수(현장)
    @PostMapping("/CSCOM/getComboSiteHo")
    public List<EasyHashMap<String, Object>> getComboSiteHo(@RequestBody CSCOMSearch search) {
        return service.getComboSiteHo(search);
    }
    
    //현장별 동 호수 정보(현장)
    @PostMapping("/CSCOM/getComboSiteInfo")
    public List<EasyHashMap<String, Object>> getComboSiteInfo(@RequestBody CSCOMSearch search) {
        return service.getComboSiteInfo(search);
    }
    
    //회사직영AS사업자번호
    @PostMapping("/CSCOM/getCovendInfo")
    public List<EasyHashMap<String, Object>> getCovendInfo(@RequestBody CSCOMSearch search) {
        return service.getCovendInfo(search);
    }
}
