package com.jpsoft.shinestar.modules.base.dao;

import java.util.List;

import com.jpsoft.shinestar.modules.base.entity.PersonSuperviseRelation;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import com.jpsoft.shinestar.modules.base.entity.CompanySupervise;
import java.util.Map;
import com.jpsoft.shinestar.modules.common.dto.Sort;

@Repository
public interface CompanySuperviseDAO {
	int insert(CompanySupervise entity);
	int update(CompanySupervise entity);
	int exist(String id);
	CompanySupervise get(String id);
	int delete(String id);
	List<CompanySupervise> list();
	List<CompanySupervise> search(Map<String,Object> searchParams,List<Sort> sortList);
    CompanySupervise findByCompanyIdAndRecordDate(String companyId, String recordTime);

    Integer findTotalNumByCompanyIdAndDate(@Param("list")List<PersonSuperviseRelation> list, @Param("date")String date);

	Integer findTotalCheckNumByCompanyIdAndDate(@Param("list")List<PersonSuperviseRelation> personSuperviseRelationList, @Param("date")String date);
	Integer findTotalAbnormalNumByCompanyIdAndDate(@Param("list")List<PersonSuperviseRelation> personSuperviseRelationList, @Param("date")String date);
	Integer findLeaveNumByCompanyIdAndDate(@Param("list")List<PersonSuperviseRelation> personSuperviseRelationList, @Param("date")String date);

}