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.FirePointDeviceCountDO;
import com.zcloud.fire.check.persistence.dataobject.FirePointDO;

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

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

    Map<String, Long> countByFireRegionIdIn(List<String> fireRegionIds);

    long countByFireRegionId(String fireRegionId);

    void editAllDepartment(@NotNull(message = "主键不能为空") List<Long> ids, @NotNull(message = "部门id不能为空") Long departmentId);

    List<FirePointDO> listByCorpinfoId(Long corpinfoId);

    List<FirePointDO> listByFireRegionId(String fireRegionId);

    boolean existsByFirePointCode(@NotEmpty(message = "消防点位编码不能为空") String firePointCode);

    FirePointDO getInfoById(Long id);

    Long getFirePointCount();

    FirePointDO getInfoByUUId(@NotEmpty(message = "消防点位id不能为空") String firePointId);

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

    FirePointDO getInfoByCode(@NotEmpty(message = "消防点位编码不能为空") String firePointCode);
    PageResponse<FirePointDeviceCountDO> listDevice(Map<String, Object> params);
}

