BigViewController.java
1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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());
}
}