import request from '@/utils/request'

// 查询照明设备列表
export function listLightingDevice(query) {
    return request({
        url: '/subsystem/lighting/device/list',
        method: 'get',
        params: query
    })
}

// 控制照明设备
export function controlLightingDevice(data) {
    return request({
        url: '/subsystem/lighting/device/control',
        method: 'post',
        data: data
    })
}

// 批量控制照明
export function batchControlLighting(data) {
    return request({
        url: '/subsystem/lighting/device/batchControl',
        method: 'post',
        data: data
    })
}

// 查询照明报警列表
export function listLightingAlarm(query) {
    return request({
        url: '/subsystem/lighting/alarm/list',
        method: 'get',
        params: query
    })
}

// 处理照明报警
export function handleLightingAlarm(data) {
    return request({
        url: '/subsystem/lighting/alarm/handle',
        method: 'post',
        data: data
    })
}

// 查询照明计划列表
export function listLightingSchedule(query) {
    return request({
        url: '/subsystem/lighting/schedule/list',
        method: 'get',
        params: query
    })
}

// 新增照明计划
export function addLightingSchedule(data) {
    return request({
        url: '/subsystem/lighting/schedule',
        method: 'post',
        data: data
    })
}

// 修改照明计划
export function updateLightingSchedule(data) {
    return request({
        url: '/subsystem/lighting/schedule',
        method: 'put',
        data: data
    })
}

// 删除照明计划
export function deleteLightingSchedule(id) {
    return request({
        url: '/subsystem/lighting/schedule/' + id,
        method: 'delete'
    })
}

// 获取楼栋列表
export function getBuildingList() {
    return request({
        url: '/subsystem/common/building/list',
        method: 'get'
    })
}


// 获取楼层列表
export function getFloorList(query) {
    return request({
        url: '/subsystem/common/floor/list',
        method: 'get',
        params: query
    })
}