package com.yeejoin.amos.fas.business.dao.mapper;

import com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentPointEntity;
import com.yeejoin.amos.fas.business.param.FireEquipmentPointParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface FireEquipPointMapper extends BaseMapper {

    Map queryOne(@Param("id") Long id);


    List<Map> queryForPage(@Param("fireEqumntId") Long fireEqumntId, @Param("name") String name, @Param("start") long start, @Param("length") Integer length);

    Long queryCountForPage(@Param("fireEqumntId") Long fireEqumntId, @Param("name") String name);


    List<Map> queryForEqueAndPointName(@Param("riskSourceId") Long riskSourceId);


    int queryStopCountByEuipmentIdAndAlarmType(@Param("equimentId") String equimentId, @Param("alarmType") String alarmType, @Param("value") String needSate);

    void updateValue(@Param("id") long id, @Param("state") String state);


    int queryCountByEuipmentIdAndAlarmType(@Param("equimentId") String equipmentId, @Param("alarmType") String alarmType);

    void saveBatch(List<FireEquipmentPointParam> list);

    void updateBatch(List<FireEquipmentPointParam> list);

    Long countByMap(Map<String, Object> map);

    List<FireEquipmentPointEntity> listByMap(Map<String, Object> map);

    Long countBindByIds(List<Long> ids);

    void updatefireEquipmentIdByIds(@Param("fireEquipmentId") Long fireEquipmentId, @Param("ids") List<Long> ids);

    FireEquipmentPointEntity getByCode(String code);

    FireEquipmentPointEntity getById(Long id);

    void save(FireEquipmentPointEntity fireEquipmentPointEntity);

    void update(FireEquipmentPointEntity fireEquipmentPointEntity);

    void deleteBatchByIds(List<Long> ids);

    List<FireEquipmentPointEntity> listByCodes(@Param("codes") Set<String> codes);


	List<Map> getPointsByEquipmentIdAndType(@Param("id")long id, @Param("type") String type);


}
