package sgc.portal.cd.cd0306.web;

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

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cd.cd0301.model.CD03010001P;
import sgc.portal.cd.cd0306.dto.CD03060001USearch;
import sgc.portal.cd.cd0306.service.CD03060001UService;

@RestController
@RequestMapping("/cd/cd0306/CD03060001U")
public class CD03060001UController {

	private final CD03060001UService service;
	
	public CD03060001UController(CD03060001UService service) {
		this.service = service;
	}
	
	//조회
    @PostMapping("/selectConWkiOdrList")	
    public List<EasyHashMap<String, Object>> selectConWkiOdrList(@RequestBody CD03060001USearch search) {
        return service.selectConWkiOdrList(search);
    }
    
    /**
     * 작업지시서 승인 결재 후처리
     * @param cD03010001P
     * @return
     */
    @PostMapping("/approval")
    public Map<String, String> approval(@RequestBody CD03010001P cD03010001P) {
    	return service.approval(cD03010001P);
    }
	
}