package sgc.portal.cw.cw0804.web;

import org.springframework.web.bind.annotation.*;

import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cw.cw0201.model.CW02010001U;
import sgc.portal.cw.cw0804.dto.CW08040007PSearch;
import sgc.portal.cw.cw0804.model.CW08040007P;
import sgc.portal.cw.cw0804.service.CW08040007PService;

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

@RestController
@RequestMapping("/cw/cw0804")
public class CW08040007PController {
    private final CW08040007PService service;

    public CW08040007PController(CW08040007PService service) {
        this.service = service;
    }
    
    @PostMapping("/CW08040007P/selectRemInfo")
    public EasyHashMap<String, Object> getSelectRemInfo(@RequestBody CW08040007PSearch search) {
        return service.getSelectRemInfo(search);
    }

    @PostMapping("/CW08040007P/save")
    public Map<String, String> save(@RequestBody CW08040007P CW08040007P) {
    	return service.save(CW08040007P);
    }
    
    @PostMapping("/CW08040007P/cancel")
    public Map<String, String> cancel(@RequestBody List<CW08040007P> CW08040007P) {
    	return service.cancel(CW08040007P);
    }
}
