| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.dto.A200ResDto; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.db_lithium_ram_db.DevActmTestparam; |
| | | import com.whyc.service.DevA200TestparamService; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | |
| | | @Autowired |
| | | private DevA200TestparamService service; |
| | | |
| | | |
| | | @ApiOperation(value = "读取a200一体机参数") |
| | | @GetMapping("getA200Param") |
| | | public Response getA200Param(@RequestParam int devId){ |
| | | public Object getA200Param(@RequestParam int devId){ |
| | | return service.getA200Param(devId); |
| | | } |
| | | |
| | | @ApiOperation(value = "设置a200均衡仪参数") |
| | | @ApiOperation(value = "设置a200一体机参数") |
| | | @PostMapping("setA200Param") |
| | | public Response setA200Param(@RequestBody DevActmTestparam param){ |
| | | public Object setA200Param(@RequestBody A200ResDto param){ |
| | | return service.setA200Param(param); |
| | | } |
| | | |
| | | @ApiOperation(value = "控制a200均衡仪") |
| | | @GetMapping("controllA200Param") |
| | | public Response controllA200Param(@RequestParam int devId){ |
| | | return service.controllA200Param(devId); |
| | | @ApiOperation(value = "批量设置a200一体机参数") |
| | | @PostMapping("setA200ParamPl") |
| | | public Object setA200ParamPl(@RequestBody A200ResDto param){ |
| | | return service.setA200ParamPl(param); |
| | | } |
| | | |
| | | @ApiOperation(value = "批量控制a200均衡仪") |
| | | @GetMapping("controllA200ParamPl") |
| | | public Response controllA200ParamPl(@RequestParam List<Integer> devIds){ |
| | | return service.controllA200ParamPl(devIds); |
| | | /*@ApiOperation(value = "批量设置a200一体机参数(测试多线程)") |
| | | @PostMapping("setA200ParamPl2") |
| | | public Object setA200ParamPl2(@RequestBody A200ResDto param){ |
| | | return service.setA200ParamPl2(param); |
| | | }*/ |
| | | |
| | | @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); |
| | | } |
| | | |
| | | @ApiOperation(value = "启动a200一体机暂停/继续") |
| | | @GetMapping("pauseA200Param") |
| | | public Object pauseA200Param(@RequestParam int devId,@RequestParam int type){ |
| | | return service.pauseA200Param(devId,type); |
| | | } |
| | | } |