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

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

import java.util.List;

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

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

	List<OverhaulPlanOne> findByBackupAIsNull();

	List<OverhaulPlanOne> findByBackupAIsNotNull();
}
