package com.zcxk.charge.web.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zcxk.charge.api.dto.*;
import com.zcxk.charge.api.vo.DeviceParmInfoVo;
import com.zcxk.charge.api.vo.ParmTypeCountVo;
import com.zcxk.charge.api.vo.ReportAttributeVo;
import com.zcxk.charge.core.entity.DeviceParmEntity;

import java.util.Collection;
import java.util.List;

/**
 * @description 设备参数
 * @author  wangli
 * @data 2020-11-17 11:01
 */
public interface DeviceParmService {

    /**
    * 查询单个设备参数
    * @author Andy
    * @date 18:00 2021/8/17
    * @param id:
    * @return com.zcxk.charge.core.entity.DeviceParmEntity
    **/
    DeviceParmEntity selectById(Integer id);

    /**
    * 查询单个设备参数信息
    * @author Andy
    * @date 18:01 2021/8/17
    * @param sceneId:
    * @param id:
    * @return java.util.List<com.zcxk.charge.core.entity.DeviceParmEntity>
    **/
    List<DeviceParmEntity> selectByDeviceId(Integer sceneId, Integer id);

    /**
    * 按场景查询设备参数
    * @author Andy
    * @date 18:01 2021/8/17
    * @param sceneId:
    * @return java.util.List<com.zcxk.charge.core.entity.DeviceParmEntity>
    **/
    List<DeviceParmEntity> selectByScendId(Integer sceneId);

    /**
    * 查询单个设备参数信息针对工艺图
    * @author Andy
    * @date 18:01 2021/8/17
    * @param sceneId:
    * @param id:
    * @return java.util.List<com.zcxk.charge.core.entity.DeviceParmEntity>
    **/
    List<DeviceParmEntity> selectByDeviceIdForGis(Integer sceneId, Integer id);

    /**
    * 添加设备参数
    * @author Andy
    * @date 18:01 2021/8/17
    * @param deviceParmEntity:
    * @return java.lang.Integer
    **/
    Integer insert(DeviceParmEntity deviceParmEntity);

    /**
    * 批量添加设备参数
    * @author Andy
    * @date 18:01 2021/8/17
    * @param deviceParmEntities:
    * @return java.lang.Integer
    **/
    Integer batchInsert(List<DeviceParmEntity> deviceParmEntities);

    /**
    * 单条删除设备参数
    * @author Andy
    * @date 18:01 2021/8/17
    * @param id:
    * @return java.lang.Integer
    **/
    Integer delete(Integer id);

    /**
    * 修改设备参数信息
    * @author Andy
    * @date 18:01 2021/8/17
    * @param deviceParmEntity:
    * @return java.lang.Integer
    **/
    Integer update(DeviceParmEntity deviceParmEntity);

    /**
    * T批量修改设备参数信息
    * @author Andy
    * @date 18:01 2021/8/17
    * @param deviceParmEntities:
    * @return void
    **/
    void batchUpdate(List<DeviceParmEntity> deviceParmEntities);

    /**
    * 批量保存设备参数信息
    * @author Andy
    * @date 18:01 2021/8/17
    * @param entityList:
    * @return boolean
    **/
    boolean saveOrUpdateBatch(Collection<DeviceParmEntity> entityList);

    /**
    * 查询设备参数信息
    * @author Andy
    * @date 18:01 2021/8/17
    * @param deviceParmEntity:
    * @return java.util.List<com.zcxk.charge.core.entity.DeviceParmEntity>
    **/
    List<DeviceParmEntity> selectList(DeviceParmEntity deviceParmEntity);

    /**
    * 分页查询
    * @author Andy
    * @date 18:01 2021/8/17
    * @param page:
    * @param deviceParmEntity:
    * @return com.baomidou.mybatisplus.core.metadata.IPage<com.zcxk.charge.core.entity.DeviceParmEntity>
    **/
    IPage<DeviceParmEntity> selectPage(IPage<DeviceParmEntity> page, DeviceParmEntity deviceParmEntity);

    /**
    * findAttributeNameList
    * @author Andy
    * @date 18:01 2021/8/17
    * @param reportDto:
    * @return java.util.List<com.zcxk.charge.api.vo.ReportAttributeVo>
    **/
    List<ReportAttributeVo> findAttributeNameList(ReportDto reportDto);

    /**
    * 查询历史
    * @author Andy
    * @date 18:02 2021/8/17
    * @param reportDto:
    * @return java.util.List<com.zcxk.charge.api.vo.ReportAttributeVo>
    **/
    List<ReportAttributeVo> findHistoryDataAttributeNameList(ReportDto reportDto);

    /**
    * selectBySceneAndDeviceId
    * @author Andy
    * @date 18:02 2021/8/17
    * @param parentSceneId:
    * @param sceneId:
    * @param deviceId:
    * @return java.util.List<com.zcxk.charge.api.vo.DeviceParmInfoVo>
    **/
    List<DeviceParmInfoVo> selectBySceneAndDeviceId(Integer parentSceneId, Integer sceneId, Integer deviceId);

    /**
    * 批量操作
    * @author Andy
    * @date 18:02 2021/8/17
    * @param sceneId:
    * @param deviceId:
    * @param deviceParmInfos:
    * @return void
    **/
    void batchSaveEdit(Long sceneId, Long deviceId, List<DeviceParmInfoDto> deviceParmInfos);

    /**
    * selectDeviceBySceneIdAndType
    * @author Andy
    * @date 18:02 2021/8/17
    * @param deviceParmEntity:
    * @return java.util.List<com.zcxk.charge.core.entity.DeviceParmEntity>
    **/
    List<DeviceParmEntity> selectDeviceBySceneIdAndType(DeviceParmEntity deviceParmEntity);

    /**
    * findAlarmCount
    * @author Andy
    * @date 18:03 2021/8/17
    * @param deviceParmEntity:
    * @return java.util.List<com.zcxk.charge.api.vo.ParmTypeCountVo>
    **/
    List<ParmTypeCountVo> findAlarmCount(DeviceParmEntity deviceParmEntity);

    /**
    * findAlarmTotalCount
    * @author Andy
    * @date 18:03 2021/8/17
    * @param deviceParmEntity:
    * @return java.util.List<com.zcxk.charge.api.vo.ParmTypeCountVo>
    **/
    List<ParmTypeCountVo> findAlarmTotalCount(DeviceParmEntity deviceParmEntity);

    /**
    * findAlarmCountTotalCount
    * @author Andy
    * @date 18:03 2021/8/17
    * @param deviceParmEntity:
    * @return java.util.List<com.zcxk.charge.api.vo.ParmTypeCountVo>
    **/
    List<ParmTypeCountVo> findAlarmCountTotalCount(DeviceParmEntity deviceParmEntity);

    /**
    * 批量修改统计维度信息
    * @author Andy
    * @date 18:03 2021/8/17
    * @param statisticalDimensionDtos:
    * @return void
    **/
    void batchUpdateStatisticalDimension(List<ReportStatisticalDimensionDto> statisticalDimensionDtos);

}
