| | |
| | | } |
| | | @ApiOperation(value = "启动,暂停,继续,停止actm均衡仪") |
| | | @GetMapping("controllerActmParam") |
| | | public Object controllerActmParam(@RequestParam int devId,@RequestParam int index,@RequestParam int type){ |
| | | return service.controllerActmParam(devId,index,type); |
| | | public Object controlActmParam(@RequestParam int devId,@RequestParam int index,@RequestParam int type){ |
| | | return service.controlActmParam(devId,index,type); |
| | | } |
| | | |
| | | @ApiOperation(value = "批量控制actm均衡仪") |
| | | @PostMapping("controllActmParamPl") |
| | | public Response controllActmParamPl(@RequestBody List<Integer> devIds,@RequestParam int index,@RequestParam int type){ |
| | | return service.controllActmParamPl(devIds,index,type); |
| | | public Response controlActmParamPl(@RequestBody List<Integer> devIds,@RequestParam int index,@RequestParam int type){ |
| | | return service.controlActmParamPl(devIds,index,type); |
| | | } |
| | | |
| | | @ApiOperation(value = "设置电池组数与电池节数") |
| | |
| | | |
| | | |
| | | //启动,暂停,继续,停止actm均衡仪 |
| | | public Object controllerActmParam(int devId,int index,int type) { |
| | | public Object controlActmParam(int devId,int index,int type) { |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("dev_id",devId); |
| | | wrapper.last("limit 1"); |
| | |
| | | CountDownLatch latch = new CountDownLatch(actmPlContDtos.size()); |
| | | for (ActmPlContDto actmPlContDto:actmPlContDtos) { |
| | | poolExecutor.execute(() -> { |
| | | ResultActmDto dto= (ResultActmDto) controllerActmParam(actmPlContDto.getDevId(),actmPlContDto.getIndex(),actmPlContDto.getType()); |
| | | ResultActmDto dto= (ResultActmDto) controlActmParam(actmPlContDto.getDevId(),actmPlContDto.getIndex(),actmPlContDto.getType()); |
| | | map.put(actmPlContDto.getDevId(),dto); |
| | | latch.countDown(); |
| | | }); |
| | |
| | | } |
| | | |
| | | //批量控制Actm均衡仪 |
| | | public Response controllActmParamPl(List<Integer> devIds, int index, int type) { |
| | | public Response controlActmParamPl(List<Integer> devIds, int index, int type) { |
| | | Map<Integer,Object> map=new HashMap<>(); |
| | | for (Integer devId:devIds) { |
| | | ResultActmDto dto= (ResultActmDto) controllerActmParam(devId,index,type); |
| | | ResultActmDto dto= (ResultActmDto) controlActmParam(devId,index,type); |
| | | if(type==1){ |
| | | UpdateWrapper wrapper=new UpdateWrapper(); |
| | | wrapper.eq("dev_id",devId); |