package com.iamberry.answer.service.questionnaire;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.iamberry.answer.face.questionnaire.QuestionnaireService;
import com.iamberry.answer.service.mapper.QuestionnaireMapper;
import com.iamberry.wechat.core.entity.questionnaire.QuestionnaireAnswer;
import com.iamberry.wechat.core.entity.questionnaire.QuestionnaireAnswerDetailed;
import com.iamberry.wechat.core.entity.questionnaire.QuestionnaireOption;
import com.iamberry.wechat.core.entity.questionnaire.QuestionnairePaper;
import com.iamberry.wechat.core.entity.questionnaire.QuestionnaireQuestion;
import com.iamberry.wechat.core.entity.questionnaire.QuestionnaireQuestionOptionDto;



/**
 * 营养自测-业务逻辑
 * @author Administrator
 *
 */
@Service
public class QuestionnaireServiceImpl implements QuestionnaireService {

	
	@Autowired
	private QuestionnaireMapper mapper;
	
	@Override
	public QuestionnaireAnswer addQuestionnaireAnswer(QuestionnaireAnswer answer) {
		// TODO Auto-generated method stub
		mapper.addQuestionnaireAnswer(answer);
		return answer;
	}
	

	@Override
	public Integer updateQuestionnaireAnswer(QuestionnaireAnswer answer) {
		// TODO Auto-generated method stub
		return mapper.updateQuestionnaireAnswer(answer);
	}
	
	
	

	@Override
	public Integer addQuestionnaireAnswerDetailed(
			QuestionnaireAnswerDetailed answerdetailed) {
		// TODO Auto-generated method stub
		return mapper.addQuestionnaireAnswerDetailed(answerdetailed);
	}

	@Override
	public Integer getQuestionnaireAnswerDetailedByAns(String answerid,
			String questionId) {
		// TODO Auto-generated method stub
		return mapper.getQuestionnaireAnswerDetailedByAns(answerid,questionId);
	}
	@Override
	public Integer updateQuestionnaireAnswerDetailedByansAndques(String answerid,
			String questionId) {
		// TODO Auto-generated method stub
		return mapper.updateQuestionnaireAnswerDetailedByansAndques(answerid,questionId);
	}
	
	
	
	@Override
	public List<QuestionnaireAnswerDetailed> getQuestionnaireAnswerDetailedsByansid(String answerid) {
		// TODO Auto-generated method stub
		return mapper.getQuestionnaireAnswerDetailedsByansid(answerid);
	}
	
	
	@Override
	public Integer updateQuestionnaireAnswerDetailed(
			QuestionnaireAnswerDetailed answerdetailed) {
		// TODO Auto-generated method stub
		return mapper.updateQuestionnaireAnswerDetailed(answerdetailed);
	}

	@Override
	public List<QuestionnaireQuestionOptionDto> getQuestionnaireQuestionList(
			Integer month) {
		// TODO Auto-generated method stub
		return mapper.getQuestionnaireQuestionList( month);
	}
	
	
	@Override
	public QuestionnaireOption getQuestionnaireOptionByid(String optionId) {
		// TODO Auto-generated method stub
		return mapper.getQuestionnaireOptionByid(optionId);
	}
	
	@Override
	public QuestionnaireQuestion getQuestionnaireQuestionByid(String quesitonId) {
		// TODO Auto-generated method stub
		return mapper.getQuestionnaireQuestionByid(quesitonId);
	}
	@Override
	public QuestionnaireAnswer getQuestionnaireAnswerByid(String answerId) {
		// TODO Auto-generated method stub
		return mapper.getQuestionnaireAnswerByid(answerId);
	}
	
	
	
}
