| | |
| | | } |
| | | |
| | | public void getCabinetDetail(){ |
| | | CabinetDetailBean bean = new CabinetDetailBean(); |
| | | bean.setGridNum(24); |
| | | bean.setOnlineKeyNum(1); |
| | | bean.setOutKeyNum(2); |
| | | bean.setErrGridNum(3); |
| | | bean.setServiceKeyNum(4); |
| | | bean.setUnBindGridNum(5); |
| | | dataOb.set(bean); |
| | | List<ManageKeyCabinetBean> datas = new ArrayList<>(); |
| | | for(int i=1;i<=16;i++){ |
| | | ManageKeyCabinetBean b = new ManageKeyCabinetBean(); |
| | | b.setBindStatus(0); |
| | | b.setBoardCode("1"); |
| | | b.setCarCode("车牌"+i); |
| | | b.setChannelCode(i+""); |
| | | b.setCode("A柜"+i); |
| | | b.setId(i); |
| | | b.setKeyStatus(0); |
| | | b.setKeyCode(null); |
| | | b.setStatus(0); |
| | | b.setWorkingStatus(0); |
| | | datas.add(b); |
| | | } |
| | | for(int i=17;i<=24;i++){ |
| | | ManageKeyCabinetBean b = new ManageKeyCabinetBean(); |
| | | b.setBindStatus(0); |
| | | b.setBoardCode("2"); |
| | | b.setCarCode("车牌"+i); |
| | | b.setChannelCode((i-16)+""); |
| | | b.setCode("B柜"+i); |
| | | b.setId(i); |
| | | b.setKeyStatus(0); |
| | | b.setKeyCode(null); |
| | | b.setStatus(0); |
| | | b.setWorkingStatus(0); |
| | | datas.add(b); |
| | | } |
| | | ManageKeyCabinetBean b1 = datas.get(0); |
| | | b1.setKeyCode("C97B092F"); |
| | | b1.setKeyStatus(1); |
| | | b1.setBindStatus(1); |
| | | |
| | | ManageKeyCabinetBean b2 = datas.get(1); |
| | | b2.setKeyStatus(2); |
| | | b2.setBindStatus(1); |
| | | |
| | | ManageKeyCabinetBean b3 = datas.get(2); |
| | | b3.setKeyStatus(3); |
| | | b3.setBindStatus(1); |
| | | |
| | | ManageKeyCabinetBean b4 = datas.get(3); |
| | | b4.setKeyStatus(1); |
| | | b4.setWorkingStatus(1); |
| | | b4.setBindStatus(1); |
| | | |
| | | datasLD.setValue(datas); |
| | | |
| | | if(true){ |
| | | return; |
| | | } |
| | | showLoading(true); |
| | | getRetrofitService(Apis.class).getCabinetDetail(MApplication.getLoginBean().getToken(), |
| | | MApplication.getConfigBean().getId()) |
| | |
| | | }); |
| | | } |
| | | |
| | | public void batchOpenGridAdmin(List<Integer> gridIdList){ |
| | | public void batchOpenGridAdmin(List<Integer> gridIdList,boolean isAll){ |
| | | if(isAll) { |
| | | doAction(8); |
| | | }else { |
| | | doAction(10); |
| | | } |
| | | if(true){ |
| | | return; |
| | | } |
| | | showLoading(true); |
| | | BatchOpenGridAdminParam param = new BatchOpenGridAdminParam(); |
| | | param.setCabinetId(MApplication.getConfigBean().getId()); |
| | |
| | | @Override |
| | | public void onNext(@NonNull BaseResponse response) { |
| | | if(200==response.getCode()){ |
| | | doAction(8); |
| | | if(isAll) { |
| | | doAction(8); |
| | | }else { |
| | | doAction(10); |
| | | } |
| | | }else { |
| | | toast(response.getMessage()); |
| | | } |
| | |
| | | } |
| | | |
| | | public void cancelFault(List<Integer> gridIdList){ |
| | | |
| | | showLoading(true); |
| | | CancelFaultParam param = new CancelFaultParam(); |
| | | param.setCabinetId(MApplication.getConfigBean().getId()); |