fengxiang
2018-06-27 d32fa50fca18a3fff89b9ec22deaa3d964ddd19b
src/main/java/com/moral/controller/ScreenController.java
@@ -108,6 +108,8 @@
   private AlarmDailyService alarmDailyService;
   @Resource
   private OrganizationLayoutService orgLayoutService;
   @Resource
   private  DeviceVersionService dviceVersionService;
   /**
    * Screen login. 大屏登录
    * 
@@ -594,6 +596,18 @@
            return  ResultBean.fail();
         }
      } else {
         MonitorPoint monitorPoint = monitorPointService.queryMonitorPointById(Integer.parseInt(primaryKey));
         List<DeviceVersion> versionList = deviceVersionService.queryByOrgId(monitorPoint.getOrganizationId());
         if(versionList.size() > 0) {
         List<Integer> versionNolist =   versionList.stream().map(item -> {
               return  item.getVersion();
            }).collect(Collectors.toList());
            rtdLayout = orgLayoutService.queryRtdLayoutWithUnit(monitorPoint.getOrganizationId(),versionNolist);
            if(rtdLayout == null) {
               return ResultBean.fail();
            }
         }
      }
      return new ResultBean(rtdLayout);
   }