/**
 * There are <a href="http://www.jeeplus.org/">jeeplus</a> code generation
 */
package com.jeeplus.modules.oa.dao;

import com.jeeplus.common.persistence.CrudDao;
import com.jeeplus.common.persistence.annotation.MyBatisDao;
import com.jeeplus.modules.oa.entity.Leave;

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

/**
 * 请假DAO接口
 * @author liuj
 * @version 2013-8-23
 */
@MyBatisDao
public interface LeaveDao extends CrudDao<Leave> {

	/**
	 * 更新流程实例ID
	 * @param leave
	 * @return
	 */
	public int updateProcessInstanceId(Leave leave);

	/**
	 * 根据流程实例ID获取Leave
	 * @param processInstanceId
	 * @return
	 */
	public Leave getByProcessInstanceId(String processInstanceId);

	/**
	 * 更新实际开始结束时间
	 * @param leave
	 * @return
	 */
	public int updateRealityTime(Leave leave);

	//public int update(Leave leave);
	/**
	 * 获取当天出差list
	 * @param leave
	 * @return
	 */
	public List<Leave> findByCompany(Leave leave);

	List getCreateDateList(Map<String, String> map);

    List<Leave> findByCompany2(Map<String, Object> map);

	public List getCreateDateList1(Map<String,String> map);
	public List findByCompany1(Map<String,String> map);
	public List getCreateDateListAll(Map<String,String> map);
	public List findByCompanyAll(Map<String,String> map);
	public List<Leave> findByManage(Map<String,Object> map);
	public List<Leave> findByCompanySelf(Map<String,Object> map);
}
