package sgc.portal.cw.cw0624.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cw.cw0624.dto.CW06240001USearch;
import sgc.portal.cw.cw0624.model.CW06240001U;
import sgc.portal.cw.cw0624.service.CW06240001UService;

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

@RestController
@RequestMapping("/cw/cw0624")
public class CW06240001UController {
    private final CW06240001UService service;

    public CW06240001UController(CW06240001UService service) {
        this.service = service;
    }

    @PostMapping("/CW06240001U/list")
    public List<EasyHashMap<String, Object>> getList(@RequestBody CW06240001USearch search) {
        return service.getList(search);
    }

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

    @PostMapping("/CW06240001U/getInitData")
    public List<EasyHashMap<String, Object>> getInitData(@RequestBody CW06240001USearch search) {
        return service.getInitData(search);
    }

    @PostMapping("/CW06240001U/selectInitData")
    public List<EasyHashMap<String, Object>> selectInitData(@RequestBody CW06240001USearch search) {
        return service.selectInitData(search);
    }

    @PostMapping("/CW06240001U/selectGoalList")
    public List<EasyHashMap<String, Object>> selectGoalList(@RequestBody CW06240001USearch search) {
        return service.selectGoalList(search);
    }

    @PostMapping("/CW06240001U/selectSeqRowCnt")
    public List<EasyHashMap<String, Object>> selectSeqRowCnt(@RequestBody CW06240001USearch search) {
        return service.selectSeqRowCnt(search);
    }
}
