| | |
| | | |
| | | |
| | | //启动,暂停,继续,停止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); |