| | |
| | | */ |
| | | public List<Monitor> listMonitorByKeyword(MonitorParam monitorParam) { |
| | | //设备状态:在线/离线/全部 |
| | | String equipmentState1; |
| | | String equipmentState2; |
| | | if ("全部".equals(monitorParam.getEquipmentState())) { |
| | | equipmentState1 = "在线"; |
| | | equipmentState2 = "离线"; |
| | | int equipmentState1; |
| | | int equipmentState2; |
| | | if (2 == monitorParam.getEquipmentState()) { |
| | | //在线 |
| | | equipmentState1 = 1; |
| | | //离线 |
| | | equipmentState2 = 0; |
| | | } else { |
| | | equipmentState1 = monitorParam.getEquipmentState(); |
| | | equipmentState2 = monitorParam.getEquipmentState(); |
| | | } |
| | | |
| | | //绑定状态:已绑定/未绑定/全部 |
| | | String bindingState1; |
| | | String bindingState2; |
| | | if ("全部".equals(monitorParam.getBindingState())) { |
| | | bindingState1 = "已绑定"; |
| | | bindingState2 = "未绑定"; |
| | | int bindingState1; |
| | | int bindingState2; |
| | | if (2 == monitorParam.getBindingState()) { |
| | | //已绑定 |
| | | bindingState1 = 1; |
| | | //未绑定 |
| | | bindingState2 = 0; |
| | | } else { |
| | | bindingState1 = monitorParam.getBindingState(); |
| | | bindingState2 = monitorParam.getBindingState(); |
| | |
| | | return removeById(Id); |
| | | } |
| | | |
| | | /** |
| | | * 编辑摄像头 |
| | | * @param Id |
| | | * @param monitorParam |
| | | * @return |
| | | */ |
| | | public boolean updateBanner(Long Id, MonitorParam monitorParam) { |
| | | Monitor monitor = getById(Id); |
| | | if (monitor == null) { |
| | | throw new BusinessException("找不到摄像头"); |
| | | } |
| | | Monitor update = new Monitor(); |
| | | update.setId(Id); |
| | | update.setSerialNumber(monitorParam.()); |
| | | update.setBannerUrl(bannerParam.getUrl()); |
| | | update.setId(bannerId); |
| | | return updateById(update); |
| | | } |
| | | |
| | | } |