package cokr.xit.fims.sprt.service.bean;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cokr.xit.foundation.component.AbstractServiceBean;
import cokr.xit.foundation.data.DataObject;

import cokr.xit.fims.sprt.CvlcptDscsnCn;
import cokr.xit.fims.sprt.SprtQuery;
import cokr.xit.fims.sprt.service.Sprt04Service;

/**민원 상담 내용 서비스 구현체.
 *
 * <p>상세 설명:
 *
 * <pre>
 * ============ 변경 이력 ============
 * 2023-09-05	JoJH 최초 작성
 * ================================
 * </pre>
 */
@Service("sprt04Service")
public class Sprt04ServiceBean extends AbstractServiceBean implements Sprt04Service {

	/** 민원 상담 내용 정보 Bean */
	@Resource(name = "sprt04Bean")
	private Sprt04Bean sprt04Bean;

	@Override
	public List<DataObject> getCvlcptDscsnCnList(SprtQuery req) {
		return sprt04Bean.getCvlcptDscsnCnList(req);
	}

	@Override
	public List<DataObject> getCvlcptDscsnCns(SprtQuery req) {
		return sprt04Bean.getCvlcptDscsnCns(req);
	}

	@Override
	public DataObject getCvlcptDscsnCnInfo(SprtQuery req) {
		if (req.getCvlcptDscsnId() != null) {
			return sprt04Bean.getCvlcptDscsnCnInfo(req);
		} else {
			return sprt04Bean.getCrdnInfo(req);
		}
	}

	@Override
	public String createCvlcptDscsnCn(CvlcptDscsnCn cvlcptDscsnCn) {
		return sprt04Bean.createCvlcptDscsnCn(cvlcptDscsnCn);
	}

	@Override
	public String updateCvlcptDscsnCn(CvlcptDscsnCn cvlcptDscsnCn) {
		return sprt04Bean.updateCvlcptDscsnCn(cvlcptDscsnCn);
	}

	@Override
	public String removeCvlcptDscsnCn(CvlcptDscsnCn cvlcptDscsnCn) {
		return sprt04Bean.removeCvlcptDscsnCn(cvlcptDscsnCn);
	}

}
