whycxzp
2025-04-25 1059492cab966417e1cadd41f5d091cee5af1a8b
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
package com.whyc.controller;
 
import com.whyc.dto.A200ResDto;
import com.whyc.dto.Response;
import com.whyc.service.DevA200TestParamService;
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;
 
@RestController
@Api(tags = "a200一体机控制操作")
@RequestMapping("a200param")
public class DevA200TestParamController {
    @Autowired
    private DevA200TestParamService service;
 
 
    @ApiOperation(value = "读取a200一体机参数")
    @GetMapping("getA200Param")
    public Object getA200Param(@RequestParam int devId){
        return service.getA200Param(devId);
    }
 
    @ApiOperation(value = "设置a200一体机参数")
    @PostMapping("setA200Param")
    public Object setA200Param(@RequestBody A200ResDto param){
        return service.setA200Param(param);
    }
 
    @ApiOperation(value = "批量设置a200一体机参数")
    @PostMapping("setA200ParamPl")
    public Object setA200ParamPl(@RequestBody A200ResDto param){
        return service.setA200ParamPl(param);
    }
 
    /*@ApiOperation(value = "批量设置a200一体机参数(测试多线程)")
    @PostMapping("setA200ParamPl2")
    public Object setA200ParamPl2(@RequestBody A200ResDto param){
        return service.setA200ParamPl2(param);
    }*/
 
    /**
     *
     * @param devId
     * @param type 1启动放电 ,2启动充电
     * @return
     */
    @ApiOperation(value = "启动a200一体机放电/充电")
    @GetMapping("startA200Param")
    public Object startA200Param(@RequestParam int devId,@RequestParam int type){
        return service.startA200Param(devId,type);
    }
 
    @ApiOperation(value = "停止a200一体机放电/充电")
    @GetMapping("stopA200Param")
    public Object stopA200Param(@RequestParam int devId){
        return service.stopA200Param(devId);
    }
 
    @ApiOperation(value = "批量启动a200一体机")
    @PostMapping("startA200ParamPl")
    public Response startA200ParamPl(@RequestBody List<Integer> devIds,@RequestParam int type){
        return service.startA200ParamPl(devIds,type);
    }
 
    @ApiOperation(value = "批量停止a200一体机")
    @PostMapping("stopA200ParamPl")
    public Response stopA200ParamPl(@RequestBody List<Integer> devIds){
        return service.stopA200ParamPl(devIds);
    }
 
    /**
     *
     * @param devId
     * @param type 1暂停测试 ,2继续测试
     * @return
     */
    @ApiOperation(value = "暂停/继续启动a200一体机")
    @GetMapping("pauseA200Param")
    public Object pauseA200Param(@RequestParam int devId,@RequestParam int type){
        return service.pauseA200Param(devId,type);
    }
 
    /**
     *
     * @param devIds
     * @param type 1暂停测试 ,2继续测试
     * @return
     */
    @ApiOperation(value = "批量暂停/继续启动a200一体机")
    @PostMapping("pauseA200ParamPl")
    public Response pauseA200ParamPl(@RequestBody List<Integer> devIds,@RequestParam int type){
        return service.pauseA200ParamPl(devIds,type);
    }
 
}