New file |
| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.db_ram_db.DeviceSetparam; |
| | | import com.whyc.pojo.db_user.User; |
| | | import com.whyc.service.DeviceSetparamService; |
| | | import com.whyc.util.ActionUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @Api(tags = "设备远程控制管理") |
| | | @RequestMapping("devSetparam") |
| | | public class DeviceSetparamController { |
| | | @Autowired |
| | | private DeviceSetparamService service; |
| | | |
| | | |
| | | @ApiOperation("设置放电参数") |
| | | @PostMapping("updateParam") |
| | | public Response updateParam(@RequestBody DeviceSetparam param) { |
| | | return service.updateParam(param); |
| | | } |
| | | @ApiOperation("读取放电参数") |
| | | @GetMapping("getParam") |
| | | public Response getParam(@RequestParam int devId, @RequestParam int battGroupNum) { |
| | | return service.getParam(devId, battGroupNum); |
| | | } |
| | | |
| | | @ApiOperation("远程重启") |
| | | @GetMapping("restart") |
| | | public Response restart(@RequestParam int devId, @RequestParam int battGroupNum) { |
| | | return service.restart(devId, battGroupNum); |
| | | } |
| | | |
| | | @ApiOperation("远程核容") |
| | | @GetMapping("startDis") |
| | | public Response startDis(@RequestParam int devId, @RequestParam int battGroupNum) { |
| | | return service.startDis(devId, battGroupNum); |
| | | } |
| | | |
| | | @ApiOperation("内阻测试") |
| | | @GetMapping("startRes") |
| | | public Response startRes(@RequestParam int devId, @RequestParam int battGroupNum) { |
| | | return service.startRes(devId, battGroupNum); |
| | | } |
| | | |
| | | @ApiOperation("停止内阻测试") |
| | | @GetMapping("stopRes") |
| | | public Response stopRes(@RequestParam int devId, @RequestParam int battGroupNum) { |
| | | return service.stopRes(devId, battGroupNum); |
| | | } |
| | | } |