package sgc.portal.cd.cd0303.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.cd0303.dto.CD03030001USearch;
import sgc.portal.cd.cd0303.service.CD03030001UService;

@RestController
@RequestMapping("/cd/cd0303")
public class CD03030001UController {

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

}
