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

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yuchen.saas.park.api.dto.elevator.ElevatorPointDTO;
import com.yuchen.saas.park.api.dto.elevator.SelectListDTO;
import com.yuchen.saas.park.api.dto.park.IoTEvent;
import com.yuchen.saas.park.api.entity.elevator.SaasParkElevatorManageLocationEntity;
import com.yuchen.saas.park.api.request.ElevatorPointRequest;
import com.yuchen.saas.park.api.response.ElevatorPointResponse;
import com.yuchen.saas.park.api.response.ThirdElevatorPointResponse;
import org.nest.springwrap.core.mp.support.Query;
import org.nest.springwrap.core.tool.api.R;

/**
 * <p>
 * 梯控-电梯点 服务类
 * </p>
 *
 * @author baichaojie
 * @since 2024-06-25
 */
public interface ISaasParkElevatorManageLocationService extends IService<SaasParkElevatorManageLocationEntity> {


    /***
     * 梯控-电梯管理-电梯点-电梯点分页列表
     * @param reqDTO
     * @param query
     * @return
     */
    R<IPage<ElevatorPointResponse>> list(ElevatorPointRequest reqDTO, Query query);


    /***
     * 梯控-第三方电梯设备列表
     * @param reqDTO
     * @param query
     * @return
     */
    R<IPage<ThirdElevatorPointResponse>> thirdList(ElevatorPointRequest reqDTO, Query query);

    /***
     * 梯控-电梯管理-电梯点-添加/编辑
     * @param elevatorPointDTO
     * @return
     */
    Boolean saveOrUpdateByParam(ElevatorPointDTO elevatorPointDTO);

    /**
     * 梯控-电梯管理-电梯点-修改限制
     * @param selectListDTO
     */
    void updateElevatorLimit(SelectListDTO selectListDTO);


    boolean sendSetParameter(SaasParkElevatorManageLocationEntity saasParkElevatorManageLocationEntity);

    /**
     * 梯控-电梯管理-电梯点-删除
     * @param id
     * @return
     * @throws Exception
     */
    String deleteById(Long id) ;

    /**
     * 梯控-调用IOT获取设备列表
     * @return
     */
    R<IPage<ElevatorPointResponse>> getIotElevatorList();


    //Boolean saveOrUpdateElevatorStatusByParam(ElevatorStatusDTO elevatorStatusDTO);

    /**
     * 接收设备事件
     * @param ioTEvent
     * @return
     */
    boolean receiveIotEventInfo(IoTEvent ioTEvent);
}
