package com.lz.modules.flow.dao;
/**
* <p>
* 发起考核考，核组人员对应关系表 服务类
* </p>
*
* @author quyixiao
* @since 2020-10-13
*/
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lz.modules.app.entity.StaffSimpleInfo;
import com.lz.modules.flow.entity.EvaluationStartStaff;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface EvaluationStartStaffMapper extends BaseMapper<EvaluationStartStaff> {


	EvaluationStartStaff selectEvaluationStartStaffById(@Param("id")Long id);


	Long insertEvaluationStartStaff(EvaluationStartStaff evaluationStartStaff);


	int updateEvaluationStartStaffById(EvaluationStartStaff evaluationStartStaff);


	int updateCoverEvaluationStartStaffById(EvaluationStartStaff evaluationStartStaff);


	int deleteEvaluationStartStaffById(@Param("id")Long id);


    Long insertEvaluationStartStaffs(@Param("list") List<EvaluationStartStaff> evaluationStartStaffs);

	EvaluationStartStaff selectOneByStartIdAndStaffId(@Param("startId")Long startId,@Param("staffId")Long staffId);

    EvaluationStartStaff selectManagerEvaluationStartStaff(@Param("evaluationId") Long evaluationId, @Param("staffId") Long userId);

	int existByStartIdAndEvaluationId(@Param("startId") Long startId,@Param("evaluationId")Long evaluationId);

	int updateBatchToScore(@Param("startId") Long startId,@Param("evaluationId")Long evaluationId);

	int deleteEvaluationStartStaffChangeAssess(@Param("startId") Long startId,@Param("staffIds") List<String> staffIds);

	List<Long> selectStaffIdsByStart(@Param("startId") Long startId);

	List<Long> selectStaffIdsByStartAndStaffId(@Param("startId") Long id, @Param("list") List<StaffSimpleInfo> staffIds);

	int deleteByStartId(@Param("startId") Long startId);

    EvaluationStartStaff selectEvaluationStartById(@Param("evaluationId") Long evaluationId, @Param("startId") Long startId);
}