package com.jiayue.ipfcst.common.data.repository;

import com.jiayue.ipfcst.common.data.entity.OverhaulPlan;

import java.util.List;

/**
 * 检修计划
 *
 * @author zzy
 * @version 1.0
 * @since 2019/9/26 11:44
 */
public interface OverhaulPlanRepository extends BaseRepository<OverhaulPlan, Integer> {
	/**
	 * 查询检修记录
	 *
	 * @param stTime 开始时间
	 * @param eTime  结束时间
	 * @return 检修记录
	 */
	List<OverhaulPlan> findByEndTimeGreaterThanEqualAndStartTimeLessThanEqual(Long stTime, Long eTime);
	List<OverhaulPlan> findByEndTimeGreaterThanEqualAndStartTimeLessThanEqualAndStatus(Long stTime, Long eTime,Integer status);
	List<OverhaulPlan> findByStartTimeLessThanAndEndTimeGreaterThanAndStatus(Long startTime,Long endTime,Integer status);

	List<OverhaulPlan> findByEndTimeAfterAndStatus(Long time,Integer status);

	List<OverhaulPlan> findByBackupAIsNull();

	List<OverhaulPlan> findByBackupAIsNotNull();
}
