| | |
| | | private final PoleBindingService poleBindingService; |
| | | |
| | | /** |
| | | * 模糊查询 |
| | | * 摄像头列表模糊查询 |
| | | */ |
| | | public CommonPage listMonitorByKeyword(BaseConditionVO baseConditionVO,Integer order,Integer seq, MonitorParam monitorParam) { |
| | | public CommonPage listMonitorByKeyword(BaseConditionVO baseConditionVO, Integer order, Integer seq, MonitorParam monitorParam) { |
| | | //绑定状态:已绑定/未绑定/全部 |
| | | if (monitorParam.getBindingState() == null) { |
| | | //全部 |
| | |
| | | //排序字段 |
| | | String orderByResult = "id"; |
| | | //正序、倒叙 |
| | | String orderBySeq =OrderByEnums.ASC.getCode(); |
| | | String orderBySeq = OrderByEnums.ASC.getCode(); |
| | | if (order != null) { |
| | | switch (order) { |
| | | case 1: |
| | |
| | | |
| | | List<MonitorBo> list; |
| | | if (SecurityUtils.getClientId() == null) { |
| | | list = monitorMapper.listMonitorDeviceSerial1(null, monitorParam.getKeyword(), monitorParam.getBindingState(),orderBy); |
| | | list = monitorMapper.listMonitorDeviceSerial1(null, monitorParam.getKeyword(), monitorParam.getBindingState(), orderBy); |
| | | } else { |
| | | list = monitorMapper.listMonitorDeviceSerial1(SecurityUtils.getUserId(), monitorParam.getKeyword(), monitorParam.getBindingState(),orderBy); |
| | | list = monitorMapper.listMonitorDeviceSerial1(SecurityUtils.getUserId(), monitorParam.getKeyword(), monitorParam.getBindingState(), orderBy); |
| | | } |
| | | |
| | | //没有数据时候直接返回空数组 |
| | |
| | | return commonPage; |
| | | } |
| | | |
| | | public Monitor getYSYMonitorInfoAndaddMonitorToTable(String deviceSerial) { |
| | | YSY_MonitorDto getMonitorDto = getYSYMonitorInfo(getAccessToken(), deviceSerial); |
| | | /** |
| | | * 摄像头列表地(用于首页数据统计) |
| | | * |
| | | * @return |
| | | */ |
| | | public List<MonitorBo> listMonitorOnHome() { |
| | | |
| | | if ("200".equals(getMonitorDto.getCode())) { |
| | | Monitor monitor = getOne(Wrappers.lambdaQuery(Monitor.class).eq(Monitor::getDeviceSerial, deviceSerial)); |
| | | if (monitor != null) { |
| | | monitor.setDeviceSerial(getMonitorDto.getData().getDeviceSerial()); |
| | | |
| | | monitor.setDeviceName(getMonitorDto.getData().getDeviceName()); |
| | | monitor.setDeviceType(getMonitorDto.getData().getModel()); |
| | | monitor.setEquipmentState(getMonitorDto.getData().getStatus()); |
| | | monitor.setIsEncrypt(getMonitorDto.getData().getIsEncrypt()); |
| | | monitor.setAddTime(getMonitorDto.getData().getUpdateTime()); |
| | | monitor.setNetAddress(getMonitorDto.getData().getNetAddress()); |
| | | //更新摄像头状态 |
| | | updateById(monitor); |
| | | } else { |
| | | monitor = new Monitor(); |
| | | monitor.setDeviceSerial(getMonitorDto.getData().getDeviceSerial()); |
| | | monitor.setDeviceName(getMonitorDto.getData().getDeviceName()); |
| | | monitor.setDeviceType(getMonitorDto.getData().getModel()); |
| | | monitor.setEquipmentState(getMonitorDto.getData().getStatus()); |
| | | monitor.setIsEncrypt(getMonitorDto.getData().getIsEncrypt()); |
| | | monitor.setAddTime(getMonitorDto.getData().getUpdateTime()); |
| | | monitor.setNetAddress(getMonitorDto.getData().getNetAddress()); |
| | | //更新摄像头状态 |
| | | save(monitor); |
| | | } |
| | | |
| | | return monitor; |
| | | List<MonitorBo> list; |
| | | if (SecurityUtils.getClientId() == null) { |
| | | list = monitorMapper.listMonitorDeviceSerial1(null, null, 2, null); |
| | | } else { |
| | | return null; |
| | | list = monitorMapper.listMonitorDeviceSerial1(SecurityUtils.getUserId(), null, 2, null); |
| | | } |
| | | |
| | | //没有数据时候直接返回空数组 |
| | | if (list == null) { |
| | | return new ArrayList<>(); |
| | | } |
| | | |
| | | return list; |
| | | } |
| | | |
| | | /** |