| | |
| | | } |
| | | |
| | | |
| | | //设置a200均衡仪参数 |
| | | //设置a200一体机参数 |
| | | public Object setA200Param(A200ResDto param) { |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("dev_id",param.getDevId()); |
| | |
| | | return dto; |
| | | } |
| | | |
| | | //批量设置a200均衡仪参数 |
| | | //批量设置a200一体机参数 |
| | | public Object setA200ParamPl2(A200ResDto param) { |
| | | Map<Integer,Object> map=new HashMap<>(); |
| | | int size=param.getDevIds().size(); |
| | |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return new Response().setII(1,true,map,"批量设置a200均衡仪参数"); |
| | | return new Response().setII(1,true,map,"批量设置a200一体机参数"); |
| | | } |
| | | //批量设置a200均衡仪参数 |
| | | //批量设置a200一体机参数 |
| | | public Object setA200ParamPl(A200ResDto param) { |
| | | Map<Integer,Object> map=new HashMap<>(); |
| | | int size=param.getDevIds().size(); |
| | |
| | | ResultA200Dto dto= (ResultA200Dto) setA200Param(param); |
| | | map.put(finaldevId,dto); |
| | | } |
| | | return new Response().setII(1,true,map,"批量设置a200均衡仪参数"); |
| | | return new Response().setII(1,true,map,"批量设置a200一体机参数"); |
| | | } |
| | | |
| | | //启动a200均衡仪放电/充电 |
| | | //启动a200一体机放电/充电 |
| | | public Object startA200Param(int devId,int type) { |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("dev_id",devId); |
| | |
| | | ResultA200Dto dto= (ResultA200Dto) TestparamHttpUtil.postforform_dataA200(restTemplate,url,paramMap); |
| | | return dto; |
| | | } |
| | | //停止a200均衡仪放电/充电 |
| | | //停止a200一体机放电/充电 |
| | | public Object stopA200Param(int devId) { |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("dev_id",devId); |
| | |
| | | return dto; |
| | | } |
| | | |
| | | //批量启动a200均衡仪 |
| | | //批量启动a200一体机 |
| | | public Response startA200ParamPl2(List<Integer> devIds,int type) { |
| | | Map<Integer,Object> map=new HashMap<>(); |
| | | try { |
| | |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return new Response().set(1,true,"批量控制a200均衡仪"); |
| | | return new Response().set(1,true,"批量控制a200一体机"); |
| | | } |
| | | |
| | | //批量启动a200均衡仪 |
| | | //批量启动a200一体机 |
| | | public Response startA200ParamPl(List<Integer> devIds,int type) { |
| | | Map<Integer,Object> map=new HashMap<>(); |
| | | for (int devId:devIds) { |
| | | ResultA200Dto dto= (ResultA200Dto) startA200Param(devId,type); |
| | | UpdateWrapper wrapper=new UpdateWrapper(); |
| | | wrapper.eq("dev_id",devId); |
| | | wrapper.set("batch_state",1); |
| | | dinfMapper.update(null,wrapper); |
| | | map.put(devId,dto); |
| | | } |
| | | return new Response().set(1,true,"批量控制a200均衡仪"); |
| | | return new Response().setII(1,true,map,"批量控制a200一体机"); |
| | | } |
| | | |
| | | //批量停止a200均衡仪 |
| | | //批量停止a200一体机 |
| | | public Response stopA200ParamPl2(List<Integer> devIds) { |
| | | Map<Integer,Object> map=new HashMap<>(); |
| | | try { |
| | |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return new Response().set(1,true,"批量停止a200均衡仪"); |
| | | return new Response().set(1,true,"批量停止a200一体机"); |
| | | } |
| | | //批量停止a200均衡仪 |
| | | //批量停止a200一体机 |
| | | public Response stopA200ParamPl(List<Integer> devIds) { |
| | | Map<Integer,Object> map=new HashMap<>(); |
| | | for (int devId:devIds) { |
| | | ResultA200Dto dto= (ResultA200Dto) stopA200Param(devId); |
| | | map.put(devId,dto); |
| | | } |
| | | return new Response().set(1,true,"批量停止a200均衡仪"); |
| | | return new Response().setII(1,true,map,"批量停止a200一体机"); |
| | | } |
| | | |
| | | //将dto拷贝至param |