| | |
| | | resultData.put("sensorUnitMap",sensorUnitMap); |
| | | }else { |
| | | resultData.put("osuList",new ArrayList<>()); // 组织和待选单位 |
| | | resultData.put("sensorUnitMap",new Object()); // 待选单位 |
| | | resultData.put("sensorUnitMap",new HashMap<>()); // 待选单位 |
| | | } |
| | | return new ResultBean(resultData); |
| | | } |
| | |
| | | @Override |
| | | public Map<Integer,List<SensorUnit>> queryGroupSensorBySids(List<Integer> sensorIds){ |
| | | SensorUnit sensorUnitQuery = new SensorUnit(); |
| | | Map<Integer,List<SensorUnit>> resultList = new HashMap<>(); |
| | | Map<Integer,List<SensorUnit>> resultListMap = new HashMap<>(); |
| | | for(Integer sensorId: sensorIds) { |
| | | sensorUnitQuery.setSensorId(sensorId); |
| | | List<SensorUnit> sensorUnitList = sensorUnitMapper.select(sensorUnitQuery); |
| | | if(sensorUnitList!=null&&sensorUnitList.size()>0){ |
| | | resultList.put(sensorId,sensorUnitList); |
| | | resultListMap.put(sensorId,sensorUnitList); |
| | | } |
| | | } |
| | | return resultList; |
| | | return resultListMap; |
| | | } |
| | | } |