/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.leaveapply.dao;

import com.jeeplus.common.persistence.CrudDao;
import com.jeeplus.common.persistence.annotation.MyBatisDao;
import com.jeeplus.modules.leaveapply.entity.LeaveDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 请假申请DAO接口
 * @author ssrh
 * @version 2018-09-10
 */
@MyBatisDao
public interface LeaveDetailDao extends CrudDao<LeaveDetail> {
  List<LeaveDetail> findListHis(String staffId);
  List<LeaveDetail> findDetailListHis(String staffId);
  List<LeaveDetail> findListResetHis(String staffId);
  int updateReset(String staffId);
  List<LeaveDetail> findHisList(String staffId);
  String findMaxEndTime(String leaveId);
  int updateRealEndDate(@Param("id")String id, @Param("time")String time, @Param("type")String type, @Param("realDays")String realDays);
  int updateIsUse(@Param("id")String id);
  List<LeaveDetail> findListValidateTime(String staffId);
  String sumday(@Param("typeId")String typeId, @Param("leaveId")String leaveId);
  String maxdays(@Param("typeId")String typeId, @Param("staffId")String staffId);
  List<LeaveDetail> onlyOne(@Param("typeId")String typeId, @Param("staffId")String staffId);
}