package com.njcn.cloud.controller.RealTimeInfo;

import com.njcn.cloud.service.RealTimeInfoService;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.common.utils.HttpResultUtil;
import com.njcn.device.pq.pojo.vo.LineDetailVO;
import com.njcn.web.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description: 实时数据列表
 * @Author: wr
 * @Date: 2023/11/22 15:38
 */
@RestController
@RequestMapping("/realtimeinfo")
@Api(tags = "实时数据接口")
@RequiredArgsConstructor
public class RealTimeInfoController extends BaseController {


    private final RealTimeInfoService realTimeInfoService;


    @PostMapping("/getLineBaseInfo")
    @ApiOperation(value = "监测点信息接口", notes = "监测点信息")
    public HttpResult<List<LineDetailVO.Detail>> getLineBaseInfo(@RequestBody List<String> lineId) {
        String methodDescribe = getMethodDescribe("getLineBaseInfo");
        List<LineDetailVO.Detail> lineBaseInfo1 = realTimeInfoService.getLineBaseInfo(lineId);
        return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, lineBaseInfo1, methodDescribe);
    }


}