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.FireRegionDO;

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:13:10
 */
public interface FireRegionRepository extends BaseRepository<FireRegionDO> {
    PageResponse<FireRegionDO> listPage(Map<String, Object> params);

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

    List<FireRegionDO> listByCorpinfoId(Long corpinfoId);

    boolean existsByFireRegionCode(@NotEmpty(message = "编码不能为空") String fireRegionCode);

    Long getFireRegionCount();

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

    void checkRegion(@NotEmpty(message = "消防区域id不能为空") String fireRegionId);

    FireRegionDO getInfoByfireRefionCode(@NotEmpty(message = "编码不能为空") String fireRegionCode);
}

