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

import com.jpsoft.shinestar.modules.base.entity.CheckNumCompany;
import com.jpsoft.shinestar.modules.base.entity.CompanyInfo;
import com.jpsoft.shinestar.modules.common.dto.Sort;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

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

/**
 * @author 墨鱼_mo
 * @date 2020-3-27 10:35
 */
@Repository
public interface CheckNumCompanyDAO {


    int insert(CheckNumCompany entity);

    int update(CheckNumCompany entity);

    CheckNumCompany get(Long id);

    int delete(Long id);

    List<CheckNumCompany> list();

    List<CheckNumCompany> search(Map<String, Object> searchParams, List<Sort> sortList);


    CheckNumCompany  findByCompanyIdAndRecordTime(@Param("companyId") String companyId, @Param("recordTime") String recordTime);


    Integer getDayCheckNum(@Param("recordTime") String recordTime);


    Integer getDayCheckNumByCompanyList(@Param("recordTime") String recordTime, @Param("list") List<CompanyInfo> list);

    List<CheckNumCompany> findByRecordTime(@Param("recordTime") String recordTime);


    Integer getDayNormalNumByCompanyList(@Param("recordTime") String recordTime, @Param("list") List<CompanyInfo> list);

    Integer getDayAbnormalNumByCompanyList(@Param("recordTime") String recordTime, @Param("list") List<CompanyInfo> list);
}
