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

import com.github.pagehelper.Page;
import com.jpsoft.shinestar.modules.base.entity.WorkOverPerson;
import com.jpsoft.shinestar.modules.common.dto.Sort;

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

/**
 * @author 墨鱼_mo
 * @date 2021-5-21 9:19
 */
public interface WorkOverPersonService {

    WorkOverPerson get(String id);
    boolean exist(String id);
    int insert(WorkOverPerson model);
    int update(WorkOverPerson model);
    int delete(String id);
    List<WorkOverPerson> list();
    Page<WorkOverPerson> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, 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 updateFinishTime(String day);

    int deletePerson(String id);
}
