| | |
| | | public List<Device> getDeviceById3(int id) {
|
| | | return deviceMapper.getDeviceById3(id);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<Device> queryDevice(Map<String, Object> params) {
|
| | | List<Integer> dv = deviceMapper.getHasWindDirAndWindSpeedDeviceVersion();
|
| | | Object orgIdObj = params.get("orgId");
|
| | | List<Device> deviceList = null;
|
| | | if (orgIdObj != null) {
|
| | | Integer orgId = Integer.parseInt(orgIdObj.toString());
|
| | | List<Integer> orgIds = orgMapper.selectLowerOrgIds(orgId);
|
| | | params.put("orgIds", orgIds);
|
| | | deviceList = deviceMapper.selectDevicesAll(params);
|
| | | }
|
| | | List<Device> deviceListHasWind=new ArrayList<>();
|
| | | for (Device d : deviceList) {
|
| | | if (dv.contains(d.getDeviceVersionId())) {
|
| | | deviceListHasWind.add(d);
|
| | | }
|
| | | }
|
| | | return deviceListHasWind;
|
| | | }
|
| | | }
|