Browse Source

数据库改成本地test和prod环境

hfxc226 2 years ago
parent
commit
bef7ffc69a

+ 4 - 0
platform-service/src/main/java/com/platform/service/big/impl/BigScreenSbInfoServiceImpl.java

@@ -114,7 +114,11 @@ public class BigScreenSbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, Sb
         SbInfo sbInfo = new SbInfo();
         sbInfo.setBaoyangTimes(lineNum);
         List<SbInfo> list = mapper.select(sbInfo);
+        if(CollectionUtils.isEmpty(list)){
+            throw new BusinessException("该电力线路下没有设备,请先在设备详情中添加线路,将设备和线路进行绑定" );
+        }
         List<String> ids = list.stream().map(SbInfo::getId).collect(Collectors.toList());
+
         // 查询所有的遥测点位
         Weekend<RemoteMeasure> remoteDegreeWeekend = new Weekend<>(RemoteMeasure.class);
         WeekendCriteria<RemoteMeasure, Object> remoteDegreeObjectWeekendCriteria = remoteDegreeWeekend.weekendCriteria();