package com.xydl.cac.old;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = "旧接口")
@RestController
@RequestMapping("BlqController")
public class ArresterController {

    @Resource
    OldService service;

    /**
     * 查询避雷器表格数据
     *
     * @param eqmid
     * @return
     */
    @ApiOperation(value = "查询避雷器表格数据")
    @GetMapping(value = "/queryTableData/{eqmid}")
    public AjaxResult queryTableData(@PathVariable Integer eqmid) {
        return AjaxResult.success(service.queryTableDataList2(eqmid));
    }

    /**
     * 查询避雷器趋势图数据
     *
     * @param eqmid
     * @return
     */
    @ApiOperation(value = "查询避雷器趋势图数据")
    @GetMapping(value = "/queryLineData/{eqmid}")
    public AjaxResult queryLineData(@PathVariable Integer eqmid) {
        return AjaxResult.success(service.queryLineDataList2(eqmid));
    }
}
