package sgc.portal.cw.cw0801.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cw.cw0801.dto.CW08010001USearch;
import sgc.portal.cw.cw0801.model.CW08010001U;
import sgc.portal.cw.cw0801.model.CW08010002U;
import sgc.portal.cw.cw0801.service.CW08010001UService;

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

@RestController
@RequestMapping("/cw/cw0801")
public class CW08010001UController {
	
    private final CW08010001UService service;

    public CW08010001UController(CW08010001UService service) {
        this.service = service;
    }

    @PostMapping("/CW08010001U/selectZehrRomInfoList")
    public List<EasyHashMap<String, Object>> selectZehrRomInfoList(@RequestBody CW08010001USearch search) {
        return service.selectZehrRomInfoList(search);
    }
    
    @PostMapping("/CW08010001U/selectZehrRomLoctnList")
    public List<EasyHashMap<String, Object>> selectZehrRomLoctnList(@RequestBody CW08010001USearch search) {
        return service.selectZehrRomLoctnList(search);
    }
    
    @PostMapping("/CW08010001U/selectZehrRomLoctnCommList")
    public List<EasyHashMap<String, Object>> selectZehrRomLoctnCommList() {
        return service.selectZehrRomLoctnCommList();
    }
    
    @PostMapping("/CW08010001U/selectZherRomDisplList")
    public List<EasyHashMap<String, Object>> selectZherRomDisplList() {
        return service.selectZherRomDisplList();
    }
    
    @PostMapping("/CW08010001U/saveZehrRomInfoList")
    public Map<String, String> saveZehrRomInfoList(@RequestBody List<CW08010001U> CW08010001U) {
    	return service.saveZehrRomInfoList(CW08010001U);
    }
    
    @PostMapping("/CW08010001U/saveZehrRomLoctnList")
    public Map<String, String> saveZehrRomLoctnList(@RequestBody List<CW08010002U> CW08010002U) {
    	return service.saveZehrRomLoctnList(CW08010002U);
    }
    
    @PostMapping("/CW08010001U/saveZherRomDisplList")
    public void saveZherRomDisplList(@RequestBody CW08010001U cW08010001U) {
    	 service.saveZherRomDisplList(cW08010001U);
    }
    
    @PostMapping("/CW08010001U/saveZherRomDisplAllList")
    public Map<String, String> saveZherRomDisplAllList(@RequestBody CW08010001U cW08010001U) {
    	return service.saveZherRomDisplAllList(cW08010001U);
    }
}