package com.njcn.mapper.data;

import com.njcn.pojo.commons.SimpleValue;
import com.njcn.pojo.commons.device.LineInfo;
import com.njcn.pojo.commons.runmanage.IntergralityTable;
import com.njcn.pojo.data.Integrity;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.Date;
import java.util.List;

/**
 * @author hongawen
 * @date 2018/4/11 15:53
 */
public interface IntegrityMapper extends Mapper<Integrity> {
	//根据监测点查询笼统的数据完整性
	SimpleValue selectIntegralityByLineIndexAndTime(@Param("list")List<Integer> temp, @Param("startTime")Date startTime, @Param("endTime")Date endTime);

	//根据监测点查询笼统的数据完整性(国网)
	SimpleValue selectGwIntegralityByLineIndexAndTime(@Param("list")List<Integer> temp, @Param("startTime")Date startTime, @Param("endTime")Date endTime);

	//根据监测点获取前20条数据，按完整性从低到高排序
	List<SimpleValue> selectGistIntegrality(@Param("list") List<Integer> temp, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

	//查询监测点时间范围内详细的数据完整性
    List<IntergralityTable> selectIntegrityData(@Param("list") List<Integer> tempIndexs,@Param("startTime")Date startTime,@Param("endTime") Date endTime);

	List<IntergralityTable> selectGWIntegrityData(@Param("list") List<Integer> tempIndexs,@Param("startTime")Date startTime,@Param("endTime") Date endTime);

	List<LineInfo> getLineInfo(@Param("list") List<Integer> tempIndexs,@Param("postType") Integer postType, @Param("powerId") Integer powerId);
}
