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

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;
import com.github.pagehelper.Page;
import com.jpsoft.shinestar.modules.base.entity.WorkPersonScheduling;
import com.jpsoft.shinestar.modules.common.dto.Sort;

public interface WorkPersonSchedulingService {
	WorkPersonScheduling get(String id);
	boolean exist(String id);
	int insert(WorkPersonScheduling model);
	int update(WorkPersonScheduling model);
	int delete(String id);
	List<WorkPersonScheduling> list();
	Page<WorkPersonScheduling> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,boolean count,List<Sort> sortList);

    WorkPersonScheduling findByYearMonthDayPersonId(int year, int month, int day, Long personId);
	int deleteByPersonIdSchedulingDay(int year, int month, int day, Long personId);

    WorkPersonScheduling findByPersonIdSchedulingDay(Long personId, Date dateTime);

	List<WorkPersonScheduling> findByPersonIdYearMonth(Long personId,int year,int month);
	List<WorkPersonScheduling> findByPersonIdYearMonths(Long personId,int year,List<Integer> months,boolean isQueryRest);

	List<WorkPersonScheduling> findByPersonIdSDateAndEDate(Long personId,Date startDate,Date endDate,boolean isQueryRest);
	List<Date> findSchedulingDayByPersonIdSDateAndEDate(Long personId,Date startDate,Date endDate,boolean isQueryRest);

	int findRepeatSchedulingDayByPersonId(Long personId);


	BigDecimal findAttendanceDaysByPersonIdSDateAndEDate(Long personId, Date startDate, Date endDate, boolean isQueryRest);
}