BigViewController.java 1.45 KB
package com.ruoyi.controller;

import com.ruoyi.common.global.Result;
import com.ruoyi.pojo.vo.bigViewVo.FleetInfoVo;
import com.ruoyi.service.BigViewService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
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 java.util.List;

/**
 * 可视化大屏控制controller
 * @author 20412
 */
@RestController
@RequestMapping("/big/view")
@Api(tags = "可视化大屏")
public class BigViewController {

    @Autowired
    private BigViewService bigViewService;


    /**
     * 类型 device 设备数量  line  线路数   car   车辆数
     * sale  售票员签到数量    driver   驾驶员签到    auxiliary   辅助人员签到数量
     * @param type
     * @return
     */
    @ApiOperation("根据类型获取数值")
    @GetMapping("/queryNumberByType/{type}")
    public Result<Integer> queryNumberByType(@PathVariable("type") String type){
        return Result.OK(bigViewService.queryNumberByType(type));
    }

    @ApiOperation("获取车队信息")
    @GetMapping("/queryLineInfo")
    public Result<List<FleetInfoVo>> queryFleetInfoByFleetName(){
        return Result.OK(bigViewService.queryFleetInfoByFleetName());
    }


}