package com.inspect.metadata.prodevmnt.service;

import com.inspect.metadata.area.domain.BaseDataArea;
import com.inspect.metadata.prodevmnt.domain.BasedataDevice;
import com.inspect.metadata.prodevmnt.domain.TreeModule;
import com.inspect.metadata.prodevmnt.domain.vo.AreaDeviceTreeSelect;
import com.inspect.metadata.prodevmnt.domain.vo.ProDeviceTreeSelectVO;
import com.inspect.metadata.prodevmnt.domain.vo.ProMainDevicePatrolEquTreeSelect;

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

public interface IBasedataDeviceService {
    BasedataDevice selectBasedataDeviceByDeviceId(Long deviceId);

    List<BasedataDevice> selectBasedataDeviceList(BasedataDevice device);

    List<TreeModule> selectAreaAndDeviceTree(BasedataDevice device);

    List<TreeModule> selectPointList();

    List<BasedataDevice> selectBasedataTreeByEqBookCode(BasedataDevice device);

    int insertBasedataDevice(BasedataDevice device);

    int updateBasedataDevice(BasedataDevice device);

    int deleteBasedataDeviceByDeviceIds(Long[] deviceIds);

    int deleteBasedataDeviceByDeviceId(Long deviceId);

    BasedataDevice selectBasedataDeviceByPatrolPointId(String patrolPointId);

    List<AreaDeviceTreeSelect> buildAreaDeviceTreeSelect(List<BaseDataArea> areas);

    List<ProMainDevicePatrolEquTreeSelect> treeProMainDevicePatrolEquSelect(List<BasedataDevice> devices);

    BasedataDevice insertMainDeviceAndCommByDeviceType(BasedataDevice device);

    List<ProDeviceTreeSelectVO> getProDeviceTreeSelect(BasedataDevice device);

    Map<String, Long> getProDeviceAllPatchNameId();

    List getDeviceAllDeviceCode();

    String checkDeviceCodeUnique(BasedataDevice device);

    String checkDeviceNameUnique(BasedataDevice device);

    List<AreaDeviceTreeSelect> buildAreaDeviceTreeSelectByAreas(List<BaseDataArea> areas);

    List<AreaDeviceTreeSelect> buildAreaDeviceTreeSelectByAreasFilterByPreset(List<BaseDataArea> areas, List<String> filterNameList);
    List<AreaDeviceTreeSelect> buildAreaDeviceTreeSelectByAreasFilterByPresetRelationLeft(List<BaseDataArea> areas, List<String> filterNameList);
    List<AreaDeviceTreeSelect> buildAreaDeviceTreeSelectByAreasFilterByPresetRelationRight(List<BaseDataArea> areas, List<String> filterNameList, BaseDataArea baseDataArea);

    List<AreaDeviceTreeSelect> buildAreaDeviceTreeSelectByAreasFilterByPresetRelation(List<BaseDataArea> areas, List<String> filterNameList);

    List<AreaDeviceTreeSelect> buildAreaDeviceTreeSelectByAreasFilterByMeter(List<BaseDataArea> areas);

    List<AreaDeviceTreeSelect> buildAreaDeviceTreeSelectByAreasFilterByFault(List<BaseDataArea> areas);

    Boolean updateBasedataDeviceRelation(Long toAreaId, Long deviceId);

    BasedataDevice selectBasedataDeviceRelationByDeviceId(Long toDeviceId);
}
