package com.zcloud.fire.check.persistence.repository;

import com.alibaba.cola.dto.PageResponse;
import com.jjb.saas.framework.repository.repo.BaseRepository;
import com.zcloud.fire.check.persistence.dataobject.DataStatisticDO;
import com.zcloud.fire.check.persistence.dataobject.FireDeviceDO;

import javax.validation.constraints.NotEmpty;
import java.util.List;
import java.util.Map;

/**
 * web-infrastructure
 *
 * @Author zhaokai
 * @Date 2025-11-26 10:12:34
 */
public interface FireDeviceRepository extends BaseRepository<FireDeviceDO> {
    PageResponse<FireDeviceDO> listPage(Map<String, Object> params);

    long countByFirePointId(String firePointId);

    Map<String, Long> countByFirePointIdIn(List<String> firePointIds);

    boolean existsByDeviceCode(@NotEmpty(message = "器材编号不能为空") String fireDeviceCode);

    List<FireDeviceDO> getDeviceList();

    boolean addBatch(List<FireDeviceDO> fireDeviceDOS);

    List<FireDeviceDO> getAllList(Map<String, Object> params);

    FireDeviceDO getInfoById(Long id);

    Long getFireDeviceCount();

    List<FireDeviceDO> getDeviceListByFirePointId(@NotEmpty(message = "消防点位id不能为空") String firePointId);

    List<DataStatisticDO> countByCorpinfoIds(List<Long> corpinfoIds);

    PageResponse<FireDeviceDO> pageByPointId(Map<String, Object> params);

    FireDeviceDO getInfoByCode(@NotEmpty(message = "器材编号不能为空") String fireDeviceCode);

    List<FireDeviceDO> getListByTime(String tomorrowTime);
}

