package sgc.portal.cd.cd0301.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.dto.CD03010003PSearch;
import sgc.portal.cd.cd0301.service.CD03010003PService;

@RestController
@RequestMapping("/cd/cd0301/CD03010003P")
public class CD03010003PController {

	private final CD03010003PService service;
	
	public CD03010003PController(CD03010003PService service) {
		this.service = service;
	}
	
	/**
	 * 메일전송 작업지시서 조회
	 * @param search
	 * @return
	 */
    @PostMapping("/selectConWkiOdrList")	
    public List<EasyHashMap<String, Object>> selectConWkiOdrList(@RequestBody CD03010003PSearch search) {
        return service.selectConWkiOdrList(search);
    }

    /**
     * 작업지시서 메일전송
     * @param search
     * @return
     */
    @PostMapping("/sendMailConWkiShr")
    public List<Map<String, String>> sendMailConWkiOdr(@RequestBody List<CD03010003PSearch> CD03010003PS) {
        return service.sendMailConWkiOdr(CD03010003PS);
    }
    
}
