package com.inspect.metadata.area.service;

import com.inspect.metadata.area.domain.BaseDataArea;
import com.inspect.metadata.area.domain.vo.TreeSelect;
import com.inspect.metadata.prodevmnt.domain.TreeModule;

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

public interface IBaseDataAreaService {
    List<BaseDataArea> selectAreaList(BaseDataArea area);
    List<BaseDataArea> selectAreaRelationList(BaseDataArea area);

    List<BaseDataArea> buildAreaTree(List<BaseDataArea> areas);

    List<TreeSelect> buildAreaTreeSelect(List<BaseDataArea> areas);

    List<TreeModule> buildAreaTreeAgain(List<BaseDataArea> areas);

    List<Long> selectAreaListByRoleId(Long roleId);

    BaseDataArea selectAreaById(Long id);

    BaseDataArea selectAreaRelationById(Long id);

    void updateAreaRelationById(Long areaId, Long toAreaId, String ancestors);

    int selectNormalChildrenAreaById(Long id);

    boolean hasChildByAreaId(Long areaId);

    boolean checkAreaExistUser(Long userId);

    String checkAreaNameUnique(BaseDataArea area);

    void checkAreaDataScope(Long dataId);

    int insertArea(BaseDataArea area);

    int updateArea(BaseDataArea area);

    int deleteAreaById(Long id);

    BaseDataArea selectBasedataAreaByPatrolPointId(String pointId);

    String selectAreaIdByName(String name, String name2);

    Map<String, Long> selectAreaForNamePatch(BaseDataArea area);
}
