package com.usky.fire.controller.web;


import com.usky.common.core.bean.ApiResult;
import com.usky.fire.service.BaseModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 三维模型设备信息 前端控制器
 * </p>
 *
 * @author JCB
 * @since 2022-09-05
 */
@RestController
@RequestMapping("/baseModel")
public class BaseModelController {

    @Autowired
    private BaseModelService baseModelService;

    /**
     * 三维建模-设备信息查询
     *
     * @param buildId 建筑ID
     * @param floorId 楼层
     * @return
     */
    @GetMapping("modelDataList")
    public ApiResult<List<Object>> modelDataList(@RequestParam(value = "buildId") Integer buildId,
                                                 @RequestParam(value = "floorId") Integer floorId) {
        return ApiResult.success(baseModelService.modelDataList(buildId, floorId));
    }
}

