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

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

import com.jpsoft.shinestar.modules.base.entity.PersonInfo;
import com.jpsoft.shinestar.modules.base.entity.PersonPopedom;
import com.jpsoft.shinestar.modules.business.entity.YearRequestForLeaveInfo;
import com.github.pagehelper.Page;
import com.jpsoft.shinestar.modules.common.dto.Sort;

public interface YearRequestForLeaveInfoService {
	YearRequestForLeaveInfo get(String id);
	boolean exist(String id);
	int insert(YearRequestForLeaveInfo model);
	int update(YearRequestForLeaveInfo model);
	void updatePersonWorkStatus(YearRequestForLeaveInfo yearRequestForLeaveInfo);
	void logic(YearRequestForLeaveInfo yearRequestForLeaveInfo) throws Exception;
	int delete(String id);
	List<YearRequestForLeaveInfo> list();
	List<YearRequestForLeaveInfo> findByPersonIdAndDate(Long personId, Date attendanceDate);
    BigDecimal sumDaysByPersonIdAndTimeRange(Long personId, Date startDate, Date endDate);
	Page<YearRequestForLeaveInfo> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
	Page<YearRequestForLeaveInfo> pageMobileSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
	void approvalRequestForLeave(PersonInfo personInfo, String id, String approvalOpinions, String approvalExplain, int status) throws Exception;
	String leaveSubmit(PersonPopedom personPopedom,String startTime, String endTime, String startTimeQuantum, String endTimeQuantum, String imageUrl, String reason, String days, String formId, String activityId, String draft, String id) throws Exception;
}