| | |
| | | import com.moral.common.util.ValidateUtil;
|
| | | import com.moral.entity.Device;
|
| | | import com.moral.entity.DeviceProperty;
|
| | | import com.moral.entity.MonitorPoint;
|
| | | import com.moral.mapper.DeviceMapper;
|
| | | import com.moral.mapper.DevicePropertyMapper;
|
| | | import com.moral.mapper.DeviceVersionMapper;
|
| | |
| | | Example.Criteria deviceCriteria = deviceExample.createCriteria();
|
| | | deviceCriteria.orEqualTo("isDelete", Constants.IS_DELETE_FALSE);
|
| | | List<Device> devicesInfo = deviceMapper.selectByExample(deviceExample);
|
| | | Example monitorExample = new Example(MonitorPoint.class);//实例化
|
| | | Example.Criteria monitorCriteria = monitorExample.createCriteria();
|
| | | monitorCriteria.orEqualTo("isDelete", Constants.IS_DELETE_FALSE);
|
| | | List<MonitorPoint> monitorsInfo = monitorPointMapper.selectByExample(monitorExample);
|
| | | for (Device d : deviceList) {
|
| | | if (dv.contains(d.getDeviceVersionId())) {
|
| | | d.setHasWindInfo(true);
|
| | |
| | | d.setState(temp.getState());
|
| | | }
|
| | | }
|
| | | for (MonitorPoint mp : monitorsInfo) {
|
| | | if (d.getMonitorPointId().equals(mp.getId())) {
|
| | | d.setMonitorPoint(mp);
|
| | | }
|
| | | }
|
| | | }
|
| | | return deviceList;
|
| | | }
|