package com.unis.detectionnum.server.dao;

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

import com.unis.detectionnum.server.entity.WaterTempVO;
import org.apache.ibatis.annotations.Param;

import com.unis.detectionnum.common.vo.WaterStatisticsVO;
import com.unis.detectionnum.server.entity.DetectionDataDO;
import com.unis.detectionnum.server.entity.DetectionHistoryDO;

public interface DetectionDataDao {
    int deleteByPrimaryKey(Integer id);

    int insert(DetectionDataDO record);

    int insertSelective(DetectionDataDO record);

    DetectionDataDO selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(DetectionDataDO record);

    int updateByCableId(DetectionDataDO record);

	/** 
	 * @Title: insertBatch 
	 * @Description: TODO
	 * @param dataDOs
	 * @return int
	 * @throws 
	 */
	int insertBatch(List<DetectionDataDO> dataDOs);

	/** 
	 * @Title: insertHistoryBatch 
	 * @Description: TODO
	 * @param dataDOs
	 * @return void
	 * @throws 
	 */
	int insertHistoryBatch(List<DetectionDataDO> dataDOs);

	/** 
	 * @Title: selectByCfbh 
	 * @Description: TODO
	 * @param cfbh
	 * @param @return
	 * @return List<DetectionWaterReportVO>
	 * @throws 
	 */
	List<DetectionDataDO> selectByCfbh(String cfbh);

	/** 
	 * @Title: getDataStatistics 
	 * @Description: TODO
	 * @param cfbh
	 * @param @return
	 * @return WaterStatisticsVO
	 * @throws 
	 */
	WaterStatisticsVO getDataStatistics(@Param(value="cfbh")String cfbh,@Param(value="historyId")Integer historyId);

	/** 
	 * @Title: insertHistory 
	 * @Description: TODO
	 * @param @param historyDO
	 * @return void
	 * @throws 
	 */
	int insertHistory(DetectionHistoryDO historyDO);


	/**
	 * 通过CFBH获取温度，水分折线图数据
	 * @param cfbh
	 * @return
	 */
    List<WaterTempVO> getWaterTempView(Map selectMap);

	/**
	 * 通过CFBH获取对应的监测时间
	 * @param selectMap
	 */
	List<String> getCreateTimes(Map selectMap);
}