| | |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | |
| | | List<String> list; |
| | | list = monitorMapper.listMonitorDeviceSerial(); |
| | | |
| | | MonitorParam monitorParam1; |
| | | for (String devices_serial : list) { |
| | | monitorParam1 = new MonitorParam(); |
| | | monitorParam1.setAccessToken(monitorService.getAccessToken()); |
| | | monitorParam1.setDeviceSerial(devices_serial); |
| | | getYSYMonitorInfoAndaddMonitorToTable(monitorParam1); |
| | | } |
| | | // List<String> list; |
| | | // list = monitorMapper.listMonitorDeviceSerial(); |
| | | // |
| | | // MonitorParam monitorParam1; |
| | | // for (String devices_serial : list) { |
| | | // monitorParam1 = new MonitorParam(); |
| | | // monitorParam1.setAccessToken(monitorService.getAccessToken()); |
| | | // monitorParam1.setDeviceSerial(devices_serial); |
| | | // getYSYMonitorInfoAndaddMonitorToTable(monitorParam1); |
| | | // } |
| | | //返回查询的摄像头信息列表 |
| | | List<MonitorBo> listresult; |
| | | if (monitorParam == null) { |
| | |
| | | */ |
| | | @PostMapping("/getYSYMonitorInfoAndaddMonitorToTable") |
| | | public boolean getYSYMonitorInfoAndaddMonitorToTable(@RequestBody MonitorParam monitorParam) { |
| | | YSY_MonitorDto getMonitorDto = monitorService.getYSYMonitorInfo(monitorService.getAccessToken(), monitorParam.getDeviceSerial()); |
| | | |
| | | if ("200".equals(getMonitorDto.getCode())) { |
| | | Monitor monitor = new Monitor(); |
| | | monitor.setDeviceSerial(getMonitorDto.getData().getDeviceSerial()); |
| | | if (monitorParam.getValidateCode() != null) { |
| | | monitor.setDevicesCode(monitorParam.getValidateCode()); |
| | | } |
| | | 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()); |
| | | |
| | | return monitorService.addMonitorInfoToTable(monitor); |
| | | } else { |
| | | throw new BusinessException(getMonitorDto.getMsg()); |
| | | } |
| | | Monitor monitor = monitorService.getYSYMonitorInfoAndaddMonitorToTable(monitorParam); |
| | | return monitorService.addMonitorInfoToTable(monitor); |
| | | } |
| | | |
| | | /** |