whycxzp
2025-03-17 e50d8c30b43dd30daa77da27101ce21d8ef2fcef
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package com.whyc.controller;
 
import com.whyc.dto.DevInfDto;
import com.whyc.dto.Response;
import com.whyc.pojo.db_lithium_ram_db.DevLithiumInf;
import com.whyc.service.DevLithiumInfService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import java.util.List;
import java.util.Map;
 
@RestController
@Api(tags = "锂电设备信息")
@RequestMapping("devInf")
public class DevLithiumInfController {
    @Autowired
    private DevLithiumInfService service;
 
 
 
    @ApiOperation(value = "添加设备")
    @PostMapping("addDev")
    public Response addDev(@RequestBody DevLithiumInf devInf){
        return service.addDev(devInf);
    }
 
    @ApiOperation(value = "获取设备信息")
    @PostMapping("getAllInf")
    public Response getAllInf(@RequestBody DevInfDto devInfDto){
        return service.getAllInf(101, devInfDto);
    }
 
    @ApiOperation(value = "获取设备信息(不分页用于包机组)")
    @GetMapping("getDinf")
    public Response getDevInf(){
        return service.getDevInf();
    }
    @ApiOperation(value = "根据设备id获取设备信息")
    @GetMapping("getDinfById")
    public Response getDevInfById(@RequestParam Integer devId){
        return service.getDevInfById(devId);
    }
 
    @ApiOperation(value = "获取左侧列表")
    @GetMapping("getDevBytype")
    public Response getDevByType(@RequestParam(required = false) Integer devType){
        return service.getDevByType(devType);
    }
 
    @ApiOperation(value = "新获取左侧列表")
    @GetMapping("getLine")
    public Response getLine(){
        return service.getDevType(101);
    }
 
 
    @ApiOperation(value = "编辑设备信息")
    @PostMapping("updateInf")
    public Response updateInf(@RequestBody DevLithiumInf dinf){
        return service.updateInf(dinf);
    }
 
    @ApiOperation(value = "删除设备(同时删除实时和包机组信息)")
    @GetMapping("delDinf")
    public Response delDevInf( Integer devId){
        return service.delDevInf(devId);
    }
 
    @ApiOperation(value = "强制移除批量设备")
    @PostMapping("cancelContPl")
    public Response cancelContPl(@RequestBody List<Integer> devIds){
        return service.cancelContPl(devIds);
    }
 
    @ApiOperation(value = "测试设备统计")
    @GetMapping("getDevStaticByType")
    public Map<String,Object>  getDevStaticByType(){
        return service.getDevStaticByType(101);
    }
}