|
@@ -17,6 +17,7 @@ import com.github.pagehelper.Page;
|
17
|
17
|
import com.github.pagehelper.PageHelper;
|
18
|
18
|
import com.google.common.collect.Maps;
|
19
|
19
|
import lombok.extern.slf4j.Slf4j;
|
|
20
|
+import org.apache.commons.collections.CollectionUtils;
|
20
|
21
|
import org.apache.commons.lang3.StringUtils;
|
21
|
22
|
import org.springframework.beans.factory.annotation.Autowired;
|
22
|
23
|
import org.springframework.stereotype.Service;
|
|
@@ -202,6 +203,10 @@ public class MonitoringServiceImpl implements IMonitoringService {
|
202
|
203
|
*/
|
203
|
204
|
|
204
|
205
|
List<TpEquipment> tpEquipments = tpEquipmentMapper.selectByCommunityIdAndUnitId(userElement.getCommunityId(), userElement.getUnitId(), 5);
|
|
206
|
+ if (CollectionUtils.isEmpty(tpEquipments)) {
|
|
207
|
+ responseBean.addError("系统未配置单元门口机设备!");
|
|
208
|
+ return responseBean;
|
|
209
|
+ }
|
205
|
210
|
TpEquipment tpEquipment = tpEquipments.get(0);
|
206
|
211
|
TpConfiguration tpConfiguration = tpConfigurationMapper.selectByPrimaryKey(tpEquipment.getUuidId());
|
207
|
212
|
|