package cn.com.countrygarden.bi.main.dao.personnel;

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

import org.apache.ibatis.annotations.Param;

import cn.com.countrygarden.bi.main.core.Mapper;
import cn.com.countrygarden.bi.main.dto.PersonInfoVO;
import cn.com.countrygarden.bi.main.dto.PersonnelAssessmentDTO;
import cn.com.countrygarden.bi.main.dto.ReviewAnswerBeforeVo;
import cn.com.countrygarden.bi.main.dto.ReviewInvestigationVo;
import cn.com.countrygarden.bi.main.dto.ReviewQuestionnaireProblemClassificationVo;
import cn.com.countrygarden.bi.main.dto.ReviewQuestionnaireProblemDTO;
import cn.com.countrygarden.bi.main.dto.ReviewQuestionnaireProblemOptionVo;
import cn.com.countrygarden.bi.main.dto.ReviewQuestionnaireProblemTypeVo;
import cn.com.countrygarden.bi.main.dto.ReviewQuestionnaireProblemVo;
import cn.com.countrygarden.bi.main.dto.ReviewQuestionnairelistVo;
import cn.com.countrygarden.bi.main.dto.ReviewScoreDTO;
import cn.com.countrygarden.bi.main.dto.ReviewScoreProblemDTO;
import cn.com.countrygarden.bi.main.dto.reviewInvestigatedIsRepeatVo;
import cn.com.countrygarden.bi.main.dto.ReviewExcel.ReviewRinquDTO;
import cn.com.countrygarden.bi.main.dto.ReviewExcel.ReviewjudgeGradeDTO;
import cn.com.countrygarden.bi.main.model.test.Test;
import cn.com.countrygarden.bi.main.model.personnel.PersonnelAssessment;
import cn.com.countrygarden.bi.main.model.review.ReviewEvaluate;
import cn.com.countrygarden.bi.main.model.review.ReviewInvestigated;
import cn.com.countrygarden.bi.main.model.review.ReviewJudge;
import cn.com.countrygarden.bi.main.model.review.ReviewQuestionnaireProblemClassification;
/**
 * 270评估-数据层
 *
 * @author 吕伟峰
 * @email www.justintoforest@gamail.com
 * @url 
 * @date 2018-10-08
 */
public interface PersonnelAssessmentMapper extends Mapper<PersonnelAssessment>{
	
	public List<ReviewScoreProblemDTO> scoreproblem(ReviewScoreProblemDTO scoreproblem);
	
	List<ReviewJudge> reviewjudge(ReviewScoreProblemDTO scoreproblem);
	
	int updateByPrimary(PersonnelAssessment personnelAssessment);
	
	int deleteass(PersonnelAssessment personnelAssessment);
	
	int delupdate(@Param("id")Integer id);
	
	int delupdatepiliang(@Param("id") List<String> id);
	
	List<ReviewInvestigationVo> selectrerediao(@Param("id") String id);
	
	List<PersonnelAssessmentDTO> selectdelpas(@Param("id") String id);
	
	List<ReviewQuestionnaireProblemDTO>  questionnaireProblems(ReviewScoreProblemDTO scoreproblem);
	
	List<ReviewQuestionnairelistVo> ReviewQuestionnairelistVo(@Param("id")Integer id,@Param("name") String name,
			@Param("hasRole") boolean hasRole,@Param("userCode") String userCode,@Param("investigationmanagementId")Integer investigationmanagementId);
	
	List<Integer> findProblemClassificationIds(@Param(value="questionnaireId")int questionnaireId);
	
	 List<Integer> selectProblemClassificationIds(@Param(value="classificationIds")List<Integer> classificationIds,@Param(value="questionnaireId")int id);
	 
	 List<ReviewQuestionnaireProblemTypeVo> selectQuestionnaireProblemTypeVo(@Param(value="investigationmanagementId")Integer investigationmanagementId);
	 
	  List<ReviewQuestionnaireProblemVo> queryQuestionnaireProblemdanVo(@Param(value="questionnaireId")int questionnaireId);

	  List<ReviewQuestionnaireProblemClassificationVo> queryQuestionnaireProblemClassificationVo(@Param(value="investigationmanagementId")Integer investigationmanagementId);
	  
	  List<Integer> findClassificationFlagTwo();
	  
	  int deleteNotClassificationIds(@Param(value="classificationId")List<Integer> classificationId);
	  
	  List<Integer> selectrqclassiid();
	  
	  int updateProblemFlag(@Param(value="questionnaireId")Integer questionnaireId);
	  
	  List<ReviewInvestigationVo> selectInvestigationVoList(@Param("reviewinvesti") ReviewInvestigationVo reviewinvesti,@Param("rolesMap") Map<String, Object> rolesMap,@Param("userquyu") List<String> userquyu);
	  
	  List<ReviewJudge> selectJudgeTel(@Param(value="investigatedId")int investigatedId,@Param(value="questionnaireId")int questionnaireId);
	  
	  reviewInvestigatedIsRepeatVo selectInvestigatedIsRepeatVo(@Param(value="investigatedId")int investigatedId,@Param(value="reviewJudgeId")int reviewJudgeId);

	  ReviewAnswerBeforeVo selectAnswerBeforeVo(@Param(value="investigatedId")int investigatedId,@Param(value="questionnaireId")int questionnaireId);
	  
	  List<ReviewQuestionnaireProblemVo> queryQuestionnaireProblemVoasse(@Param(value="questionnaireId")int questionnaireId);
	  
	  List<ReviewQuestionnaireProblemOptionVo> option(@Param("problemid") int problemid); 
	  
	  List<ReviewQuestionnaireProblemVo> queryQuestionnaireProblemwendaVoasse(@Param(value="questionnaireId")int questionnaireId);
	  
	  int updataflag(@Param(value="id")Integer id,@Param(value="judgeId")Integer judgeId,@Param(value="questionnaireId")Integer questionnaireId);

	  List<ReviewInvestigated> revinveads(PersonnelAssessmentDTO personnelAssessmentDTO);
	  
	  List<ReviewInvestigated> revinveaAssessment(@Param("perseluserid") List<String> perseluserid);
	  
	  List<PersonnelAssessmentDTO> pernnelAsseslidt(@Param("personnelAssessmentDTO") PersonnelAssessmentDTO personnelAssessmentDTO,@Param("rolesMap") Map<String, Object> rolesMap,@Param("userquyu")List<String> userquyu);
	  
	  List<PersonnelAssessmentDTO> pernnelAssessment(@Param("personnelAssessmentDTO") PersonnelAssessmentDTO personnelAssessment,@Param("perseluserid") List<String> perseluserid,@Param("rolesMap") Map<String, Object> rolesMap,@Param("userquyu")List<String> userquyu);
	  
	  List<PersonnelAssessmentDTO> exxlspersonneall(@Param("rolesMap") Map<String, Object> rolesMap,@Param("userquyu")List<String> userquyu);
	  
	  List<PersonnelAssessmentDTO> scprezong(@Param(value="investigatedId")Integer investigatedId);
	  	  
	  List<PersonnelAssessmentDTO> perslassntscore(@Param(value="investigatedId")Integer investigatedId);
	  
	  List<ReviewQuestionnaireProblemClassification> reviewreProblemClaions();
	  
	  List<ReviewScoreDTO> scoredtos(@Param(value="investigatedid")Integer investigatedid,@Param(value="gradeid")Integer gradeid,@Param(value="questionnaireId")Integer questionnaireId);
	  
	  List<ReviewScoreDTO> scoredtosrj(@Param(value="investigatedid")Integer investigatedid,@Param(value="gradeid")Integer gradeid,@Param(value="questionnaireId")Integer questionnaireId);
	  
	  List<ReviewScoreDTO> scoredtosrjname(@Param(value="investigatedid")Integer investigatedid,@Param(value="gradeid")Integer gradeid);
	  
	  List<ReviewScoreProblemDTO> evaluationproblem(@Param(value="investigatedid")Integer investigatedid,@Param(value="questionnaireId")Integer questionnaireId);
	  
	  int updateedit(ReviewEvaluate reviewe);
	  
	  List<ReviewjudgeGradeDTO> reviewjudgegrade(@Param(value="investigatedid")int investigatedid,@Param(value="questionnaireId")int questionnaireId);
	  
	  ReviewRinquDTO reviewrinqu(@Param(value="investigatedid")Integer investigatedid,@Param(value="questionnaireId")int questionnaireId);
	  
	  List<ReviewQuestionnaireProblemDTO> questionoblemsex(@Param(value="questionnaireId")Integer questionnaireId,@Param(value="investigationmanagementId") Integer investigationmanagementId);
	  
	  List<ReviewScoreProblemDTO> scoreproblemexcl(@Param(value="investigatedid")Integer investigatedid,@Param(value="questionnaireid")Integer questionnaireid);
	  
	  List<ReviewQuestionnaireProblemDTO> questionoblemswenex(@Param(value="questionnaireId")Integer questionnaireId,@Param(value="investigationmanagementId") Integer investigationmanagementId);
	  
	  List<ReviewScoreProblemDTO> scoreproblemwenexcl(@Param(value="investigatedid")Integer investigatedid,@Param(value="questionnaireid")Integer questionnaireid);
	  
	  List<ReviewScoreProblemDTO> getlistlishi(@Param(value="investigatedid")Integer investigatedid);
	  
	  List<PersonnelAssessment> peradsssone(@Param(value="userId")String userId);
	  
	  Integer scoreraid(ReviewScoreProblemDTO scoreproblem);
	  
	  String reviewevaluate(@Param(value="investigatedid")Integer investigatedid,@Param(value="questionnaireid")Integer questionnaireid);

	  List<PersonInfoVO> personInfoCodeOrId(@Param("search") String search);
}