package com.casic.missiles.modular.system.dao;

import com.baomidou.mybatisplus.plugins.Page;
import com.casic.missiles.modular.system.dto.BatchExportDataDto;
import com.casic.missiles.modular.system.dto.BfztCountDataDto;
import com.casic.missiles.modular.system.dto.DeviceData;
import com.casic.missiles.modular.system.model.BusWellInfo;
import com.casic.missiles.core.datascope.DataScope;
import com.casic.missiles.modular.system.dto.WatchDataDto;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 闸井信息表 Mapper 接口
 * </p>
 *
 * @author stylefeng123
 * @since 2019-05-13
 */
public interface BusWellInfoMapper extends BaseMapper<BusWellInfo> {

    List<BusWellInfo> selectDataScopePage(@Param("scope") DataScope dataScope, @Param("page") Page<BusWellInfo> page,@Param("keywords") String keywords, @Param("wellType") String wellType, @Param("deptid") String deptid, @Param("bfzt") String bfzt);

    List<BusWellInfo> selectDataScopePageForPolice(@Param("scope") DataScope dataScope, @Param("page") Page<BusWellInfo> page,@Param("keywords") String keywords,@Param("position") String position,@Param("owner") String owner, @Param("wellType") String wellType, @Param("deptid") String deptid, @Param("notes") String notes);

    void updateBatchBfcf(@Param("keywords") String keywords,@Param("position") String position,@Param("owner") String owner, @Param("wellType") String wellType, @Param("deptid") String deptid,@Param("bfzt") String bfzt,@Param("deptIds") List<Long> deptIds, @Param("notes") String notes);

    List<WatchDataDto> watchData(@Param("id") Long id);

    DeviceData wellcoverData(@Param("devcode") String devcode);
    DeviceData liquidData(@Param("devcode") String devcode);

    BfztCountDataDto bfztCountData(@Param("scope") DataScope dataScope, @Param("deptIds") List<Long> deptIds);

    List<BatchExportDataDto> selectDataScope(@Param("scope") DataScope dataScope, @Param("page") Page<BatchExportDataDto> page, @Param("wellType") String deviceType, @Param("deptid") String deptid, @Param("keywords") String keywords);

    Integer deviceCountData(@Param("id") Long id);

    String deptNameData(@Param("deptid") String deptid);

    String getAreaId(@Param("qu") String qu, @Param("area") String area);

    String getAreaPId(@Param("id") String id);

    List<BusWellInfo> getWellList(@Param("scope") DataScope dataScope, @Param("keywords") String keywords, @Param("wellType") String deviceType, @Param("deptid") String deptid);
    List<BusWellInfo> getAllWellList();
    List<BusWellInfo> getAlarmWellList(@Param("scope") DataScope dataScope, @Param("keywords") String keywords, @Param("wellType") String deviceType, @Param("deptid") String deptid);

    List<BusWellInfo> getNotAlarmWellList(@Param("scope") DataScope dataScope, @Param("keywords") String keywords, @Param("wellType") String deviceType, @Param("deptid") String deptid);

}
