package com.yuchen.saas.park.service.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yuchen.saas.park.api.dto.response.PmgBatDeviceDataResponse;
import com.yuchen.saas.park.api.dto.response.PmgBatDeviceTreeResponse;
import com.yuchen.saas.park.api.entity.device.PmgBatSmartEquipment;
import com.yuchen.saas.park.api.entity.park.PmgBatDeviceCategory;
import com.yuchen.saas.park.api.vo.request.DeviceCategoryAddRequest;
import com.yuchen.saas.park.api.vo.request.DeviceCategoryDelRequest;
import com.yuchen.saas.park.api.vo.request.DeviceCategoryReOperationRequest;
import com.yuchen.saas.park.api.vo.request.DeviceCategoryUpdateRequest;
import org.nest.springwrap.core.mp.base.BaseService;
import org.nest.springwrap.core.tool.api.R;

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

/**
 * @ClassName PmgBatDeviceCategoryService
 * @Description 设备分类服务实现接口
 * @Author 肖祥
 * @Date 2022/10/5 14:51
 * @Version 1.0。0
 **/
public interface PmgBatDeviceCategoryService extends BaseService<PmgBatDeviceCategory> {

    /**
     * @Description 新增设备分类
     * @author 肖祥
     * @date  2022/10/5 17:32
     * @param deviceCategoryAddRequest
     * @return boolean
     */
    R addDeviceCategory(DeviceCategoryAddRequest deviceCategoryAddRequest);

    /**
     * @Description 更新设备分类
     * @author 肖祥
     * @date  2022/10/5 17:32
     * @param deviceCategoryUpdateRequest
     * @return boolean
     */
    R updateDeviceCategory(DeviceCategoryUpdateRequest deviceCategoryUpdateRequest);

    /**
     * @Description 删除设备分类
     * @author 肖祥
     * @date  2022/10/5 17:32
     * @param deviceCategoryDelRequest
     * @return boolean
     */
    R deleteDeviceCategory(DeviceCategoryDelRequest deviceCategoryDelRequest);


    /**
     * @Description 获取分类树形信息
     * @author 肖祥
     * @date  2022/10/5 17:32
     * @return boolean
     */
    R<List<PmgBatDeviceTreeResponse>> getParkingTree(Long parkId);

    /**
     * @Description 获取分类树形信息
     * @author 蔡文强
     * @date  2022/10/5 17:32
     * @return boolean
     */
    R<List<PmgBatDeviceTreeResponse>> getParkingTreeV2(Long parkId);


    /**
     * @Description 设备分类待关联接口
     * @author 肖祥
     * @date  2022/10/5 17:32
     * @return boolean
     */
    R<List<PmgBatDeviceDataResponse>> waitRelDevice(Long parkId);

    /**
     * @Description 设备分类待关联接口
     * @author 肖祥
     * @date  2022/10/5 17:32
     * @return boolean
     */
    R<List<PmgBatDeviceDataResponse>> alreadyRelDevice(Long parkId, Long categoryId);

    /**
     * @Description 设备分类关联操作
     * @author 肖祥
     * @date  2022/10/5 17:32
     * @param deviceCategoryReOperationRequest
     * @return boolean
     */
    R deviceCategoryLinkOperation(DeviceCategoryReOperationRequest deviceCategoryReOperationRequest);

    /**
     * @Description  getParkingTreeById
     * @author 肖祥
     * @date  2022/10/5 17:32
     * @param id
     * @return boolean
     */
    R<Set<Long>> getParkingTreeById(Long id);

    /**
     * @Description getParkingAreaTree
     * @author 肖祥
     * @date  2022/10/5 17:32
     * @return boolean
     */
    R<List<PmgBatDeviceTreeResponse>> getParkingAreaTree(Long parkId);


    /**
     * 根据角色获取园区数据统计
     * @param roleId
     * @return
     */
    Map<String,String> getParkBusinessDataByRoleId(Long parKId, Long roleId, Integer type);


    R<Integer> parkDeviceDataCount(Long parkId);

    R<Set<String>> parkDeviceDataScopeValue(String scopeValue);

    R<IPage<PmgBatSmartEquipment>> getSmartEquipmentList(Long parkId, String productKey,String name,String categoryId, int current, int size);
}
