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

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import org.springframework.stereotype.Repository;
import com.jpsoft.shinestar.modules.base.entity.BusinessOut;
import java.util.Map;
import com.jpsoft.shinestar.modules.common.dto.Sort;

@Repository
public interface BusinessOutDAO {
	int insert(BusinessOut entity);
	int update(BusinessOut entity);
	int exist(String id);
	BusinessOut get(String id);
	int delete(String id);
	List<BusinessOut> list();
	List<BusinessOut> search(Map<String, Object> searchParams, List<Sort> sortList);
    BusinessOut findLastActiveByPersonId(Long personId);
    List<BusinessOut> findByPersonPopedomAndEndTimeIsNull(String personPopedomId);
    List<BusinessOut> findByPersonIdAndDate(Long personId, Date attendanceDate);

    List<BusinessOut> findByGreaterEndTime(Date date,String personPopedomId);
	List<BusinessOut> findByPersonIdAndSEDate(Long personId, Date startDate, Date endDate);
}