package com.zcxk.rmcp.web.controller;

import com.zcxk.core.common.pojo.AjaxMessage;
import com.zcxk.rmcp.api.vo.MeasuringPointVo;
import com.zcxk.rmcp.web.service.ProductMeasuringPointService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
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.ResponseBody;

import java.util.List;

/**
 * @author Andy
 * @version V1.0
 * @description: 测点
 * @date 2021/8/2
 **/
@Controller
@ResponseBody
@RequestMapping("/measuring/point")
@Api(tags = "测点")
public class MeasuringPointController {

    @Autowired
    private ProductMeasuringPointService productMeasuringPointService;

    @GetMapping("/find")
    @ApiOperation(value = "获取设备测点")
    public AjaxMessage<List<MeasuringPointVo>> find(@ApiParam(value = "产品id", required = true) @RequestParam Integer productId) {
        return AjaxMessage.success(productMeasuringPointService.getMeasuringPoint(productId));
    }
}
