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

import com.jpsoft.shinestar.modules.base.entity.WorkOverPerson;
import com.jpsoft.shinestar.modules.common.dto.Sort;
import org.springframework.stereotype.Repository;

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

/**
 * @author 墨鱼_mo
 * @date 2021-5-21 9:25
 */
@Repository
public interface WorkOverPersonDAO {
    int insert(WorkOverPerson entity);
    int update(WorkOverPerson entity);
    int exist(String id);
    WorkOverPerson get(String id);
    int delete(String id);
    List<WorkOverPerson> list();
    List<WorkOverPerson> search(Map<String,Object> searchParams, List<Sort> sortList);
    List<WorkOverPerson> findByWorkOverId(String workOverId);
    WorkOverPerson findOneByPersonIdAndDate(Long personId, Date attendanceDate);
    List<WorkOverPerson> findByPersonIdAndSEDate(Long personId, Date startDate,Date endDate);
    WorkOverPerson findOneByPersonIdAndOffsetMinute(Long personId, Date recordTime, int earlyMinutes, int delayMinutes);
    List<Map> findUnFinishByDate(Date startDate, Date endDate);
    int deletePerson(String id);
}
