| 
					
				 | 
			
			
				@@ -1,16 +1,13 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 package com.huaxu.service.impl; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.baomidou.mybatisplus.core.metadata.IPage; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.huaxu.dao.DeviceMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.huaxu.dao.OnlineMonitorMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.huaxu.dto.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.huaxu.entity.DeviceEntity; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.huaxu.entity.MonitorDataEntity; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.huaxu.entity.MonitorDataValueEntity; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.huaxu.model.LoginUser; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.huaxu.model.Pagination; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.huaxu.service.DeviceAttributeSpecsService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.huaxu.service.DeviceService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.huaxu.service.OnlineMonitorService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.huaxu.util.ByteArrayUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.huaxu.util.RedisUtil; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -205,11 +202,217 @@ public class OnlineMonitorImpl implements OnlineMonitorService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         monitorDataCollectDto.setUserType(loginUser.getType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //1是公司,2是公司及以下,3部门,4部门及以下,5自定义 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         monitorDataCollectDto.setPermissonType(loginUser.getPermissonType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        monitorDataCollectDto.setType(4); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<MonitorDataCollectDto> result=onlineMonitorMapper.selectDeviceMapParam(monitorDataCollectDto); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        for(MonitorDataCollectDto monDataCol :result) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //取缓存里的数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            byte[] bytes = redisUtil.get(("sms_water_" + monDataCol.getDeviceCode()).getBytes()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            MonitorDataEntity monitorDataEntity = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (bytes != null && bytes.length > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                monitorDataEntity = (MonitorDataEntity) ByteArrayUtils.bytesToObject(bytes).get(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                SimpleDateFormat formatdate = new SimpleDateFormat("YYYY-MM-dd");//日期算换格式 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                monDataCol.setCollectDate(monitorDataEntity.getCollectDate()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for (MonitorDataDto monData : monDataCol.getMonitorDataEntities()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (monitorDataEntity != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    //筛选该设备相同属性的值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    List<MonitorDataValueEntity> attributeEntities = monitorDataEntity.getDataValues().stream().filter((MonitorDataValueEntity m) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            -> m.getAttributeId().equals(monData.getAttributeId())).collect(Collectors.toList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    MonitorDataValueEntity attributeEntity = attributeEntities.size() > 0 ? attributeEntities.get(0) : null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (attributeEntity != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //赋值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        monData.setDataValue(attributeEntity.getDataValue()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        monData.setUnit(attributeEntity.getUnit()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if (monData.getAttributeType() != null && (monData.getAttributeType().equals("1") || monData.getAttributeType().equals("2"))) {//如果是状态值 需转换 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            DecimalFormat decimalFormat = new DecimalFormat("###################.###########");//去掉末尾小数点 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            String specsValue = attributeEntity.getDataValue() == null ? null : decimalFormat.format(attributeEntity.getDataValue()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            monData.setSpecsName(specsValue == null ? null : deviceAttributeSpecsService.selectSpecsName(attributeEntity.getAttributeId(), specsValue)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 统计设备合格数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public DeviceCountStatsDto statsDeviceQualified(OnlineDataDto onlineDataDto) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LoginUser loginUser = UserUtil.getCurrentUser(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        onlineDataDto.setTenantId(loginUser.getTenantId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        onlineDataDto.setProgramItems(loginUser.getProgramItemList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        onlineDataDto.setUserType(loginUser.getType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //1是公司,2是公司及以下,3部门,4部门及以下,5自定义 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        onlineDataDto.setPermissonType(loginUser.getPermissonType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        DeviceCountStatsDto result=onlineMonitorMapper.statsDeviceQualified(onlineDataDto); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<DeviceCountStatsDto> parmResult=onlineMonitorMapper.statsParmQualified(onlineDataDto); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        result.setParmQualified(parmResult); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        for(DeviceCountStatsDto parm : result.getParmQualified()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            parm.setTotalCount(result.getTotalCount()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            parm.setNormalCount(result.getTotalCount()-parm.getAlarmCount()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 统计今日累计流量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public List<MonitorDataCollectDto> statsDeviceFlow(OnlineDataDto onlineDataDto) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LoginUser loginUser = UserUtil.getCurrentUser(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        onlineDataDto.setTenantId(loginUser.getTenantId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        onlineDataDto.setProgramItems(loginUser.getProgramItemList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        onlineDataDto.setUserType(loginUser.getType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //1是公司,2是公司及以下,3部门,4部门及以下,5自定义 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        onlineDataDto.setPermissonType(loginUser.getPermissonType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<MonitorDataCollectDto> result=onlineMonitorMapper.statsDeviceParm(onlineDataDto); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        for(MonitorDataCollectDto monDataCol :result) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //取缓存里的数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            byte[] bytes = redisUtil.get(("sms_water_" + monDataCol.getDeviceCode()).getBytes()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            MonitorDataEntity monitorDataEntity = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (bytes != null && bytes.length > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                monitorDataEntity = (MonitorDataEntity) ByteArrayUtils.bytesToObject(bytes).get(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                SimpleDateFormat formatdate = new SimpleDateFormat("YYYY-MM-dd");//日期算换格式 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                monDataCol.setCollectDate(monitorDataEntity.getCollectDate()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for (MonitorDataDto monitorData : monDataCol.getMonitorDataEntities()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (monitorDataEntity != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    SimpleDateFormat formatdate = new SimpleDateFormat("YYYY-MM-dd");//日期算换格式 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    //计算今日数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (formatdate.format(new Date()).equals(formatdate.format(monitorDataEntity.getCollectDate()))) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //筛选该设备相同属性的值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        List<MonitorDataValueEntity> attributeEntities = monitorDataEntity.getDataValues().stream().filter((MonitorDataValueEntity m) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                -> m.getAttributeId().equals(monitorData.getAttributeId())).collect(Collectors.toList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        MonitorDataValueEntity attributeEntity = attributeEntities.size() > 0 ? attributeEntities.get(0) : null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if (attributeEntity != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            Double attributeValue = 0d; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            if (attributeEntity.getDataValue() != null && monitorData.getLatestValue() != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                attributeValue = attributeEntity.getDataValue() - monitorData.getLatestValue(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            monDataCol.setYieldWaterUsage(monDataCol.getYieldWaterUsage() != null ? monDataCol.getYieldWaterUsage() + attributeValue : attributeValue); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 统计压力、瞬时流量的分布区间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public int[] statsDeviceParmCount(OnlineDataDto onlineDataDto) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LoginUser loginUser = UserUtil.getCurrentUser(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        onlineDataDto.setTenantId(loginUser.getTenantId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        onlineDataDto.setProgramItems(loginUser.getProgramItemList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        onlineDataDto.setUserType(loginUser.getType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //1是公司,2是公司及以下,3部门,4部门及以下,5自定义 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        onlineDataDto.setPermissonType(loginUser.getPermissonType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        int[] deviceCount=new int[6]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(onlineDataDto.getSceneTypeName().equals("压力")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            deviceCount=new int[5]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<MonitorDataCollectDto> result=onlineMonitorMapper.statsDeviceParm(onlineDataDto); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        for(MonitorDataCollectDto monDataCol :result) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //取缓存里的数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            byte[] bytes = redisUtil.get(("sms_water_" + monDataCol.getDeviceCode()).getBytes()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            MonitorDataEntity monitorDataEntity = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (bytes != null && bytes.length > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                monitorDataEntity = (MonitorDataEntity) ByteArrayUtils.bytesToObject(bytes).get(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                SimpleDateFormat formatdate = new SimpleDateFormat("YYYY-MM-dd");//日期算换格式 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                monDataCol.setCollectDate(monitorDataEntity.getCollectDate()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for (MonitorDataDto monitorData : monDataCol.getMonitorDataEntities()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (monitorDataEntity != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    SimpleDateFormat formatdate = new SimpleDateFormat("YYYY-MM-dd");//日期算换格式 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    //筛选该设备相同属性的值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    List<MonitorDataValueEntity> attributeEntities = monitorDataEntity.getDataValues().stream().filter((MonitorDataValueEntity m) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            -> m.getAttributeId().equals(monitorData.getAttributeId())).collect(Collectors.toList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    MonitorDataValueEntity attributeEntity = attributeEntities.size() > 0 ? attributeEntities.get(0) : null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (attributeEntity != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                       Double dataValue= attributeEntity.getDataValue(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                       if(dataValue!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                           if(onlineDataDto.getSceneTypeName().equals("压力")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                               if(dataValue<=0.2){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                   deviceCount[0]++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                               }else if(dataValue<=0.25) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                   deviceCount[1]++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                               }else if(dataValue<=0.3) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                   deviceCount[2]++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                               }else if(dataValue<=0.35) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                   deviceCount[3]++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                               }else if(dataValue>0.35) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                   deviceCount[4]++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                               } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                           }else if(onlineDataDto.getSceneTypeName().equals("流量")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                               if(dataValue>=0&&dataValue<=100){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                   deviceCount[0]++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                               }else if(dataValue<=200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                   deviceCount[1]++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                               }else if(dataValue<=300) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                   deviceCount[2]++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                               }else if(dataValue<=400) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                   deviceCount[3]++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                               }else if(dataValue<=500) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                   deviceCount[4]++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                               }else if(dataValue>500) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                   deviceCount[5]++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                               } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return deviceCount; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 管网分页查询 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public IPage<OnlineDataDto> selectPipeNetPage(IPage<OnlineDataDto> page, OnlineDataDto onlineDataDto) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LoginUser loginUser = UserUtil.getCurrentUser(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        onlineDataDto.setTenantId(loginUser.getTenantId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        onlineDataDto.setProgramItems(loginUser.getProgramItemList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        onlineDataDto.setUserType(loginUser.getType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //1是公司,2是公司及以下,3部门,4部门及以下,5自定义 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        onlineDataDto.setPermissonType(loginUser.getPermissonType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        IPage<OnlineDataDto> iPage =onlineMonitorMapper.selectPipeNetPage(page,onlineDataDto); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Pagination<OnlineDataDto> pages = new Pagination<>(iPage); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<Long> deviceIds = pages.getList().stream().map(OnlineDataDto::getDeviceId).collect(Collectors.toList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        onlineDataDto.setDeviceIds(deviceIds); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        onlineDataDto.setTenantId(loginUser.getTenantId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<MonitorDataCollectDto> calculateRes=onlineMonitorMapper.statsDeviceParm(onlineDataDto); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        GetCalOnlineData(pages.getList(),calculateRes);//获取在线数据及计算数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return iPage; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 查询管网地图图层 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public  List<PipeNetLayerDto> selectPipeNetLayer(OnlineDataDto onlineDataDto) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LoginUser loginUser = UserUtil.getCurrentUser(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        onlineDataDto.setTenantId(loginUser.getTenantId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        onlineDataDto.setProgramItems(loginUser.getProgramItemList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        onlineDataDto.setUserType(loginUser.getType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //1是公司,2是公司及以下,3部门,4部门及以下,5自定义 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        onlineDataDto.setPermissonType(loginUser.getPermissonType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return onlineMonitorMapper.selectPipeNetLayer(onlineDataDto); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * 获取在线数据及计算数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -289,82 +492,98 @@ public class OnlineMonitorImpl implements OnlineMonitorService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for(MonitorDataCollectDto calculate :calculateRes ) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             for(OnlineDataDto monDataCol : result) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 //相同场景 则取值计算 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if(monDataCol.getSceneId().equals(calculate.getSceneId())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    List<MonitorDataDto> pumpStatus=new ArrayList<>(0);//水泵状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    for(MonitorDataDto monitorData : calculate.getMonitorDataEntities()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if((monDataCol.getDeviceId()==null&&monDataCol.getSceneId().equals(calculate.getSceneId()))|| 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                   (monDataCol.getDeviceId()!=null&&monDataCol.getDeviceId().equals(calculate.getDeviceId()))) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    MonitorDataEntity monitorDataEntity =null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if(monDataCol.getDeviceId()!=null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         //取缓存里的数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        byte[] bytes = redisUtil.get(("sms_water_"+monitorData.getDeviceCode()).getBytes()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        byte[] bytes = redisUtil.get(("sms_water_"+monDataCol.getDeviceCode()).getBytes()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         if(bytes != null && bytes.length>0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            MonitorDataEntity monitorDataEntity = (MonitorDataEntity) ByteArrayUtils.bytesToObject(bytes).get(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                monDataCol.setCollectDate(monitorDataEntity.getCollectDate()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                //筛选该设备相同属性的值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                List<MonitorDataValueEntity> attributeEntities = monitorDataEntity.getDataValues().stream().filter((MonitorDataValueEntity m) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                        -> m.getAttributeId().equals(monitorData.getAttributeId())).collect(Collectors.toList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                MonitorDataValueEntity  attributeEntity=attributeEntities.size()>0?attributeEntities.get(0):null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                if (attributeEntity != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                    //实时数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                    monitorData.setDataValue(attributeEntity.getDataValue()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                    monitorData.setUnit(attributeEntity.getUnit()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                    SimpleDateFormat formatdate = new SimpleDateFormat("YYYY-MM-dd");//日期算换格式 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                    //计算今日数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                    if(formatdate.format(new Date()).equals(formatdate.format(monitorDataEntity.getCollectDate()))) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                        Double attributeValue =0d; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                        if(attributeEntity.getDataValue() != null && monitorData.getLatestValue() != null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            attributeValue=attributeEntity.getDataValue() - monitorData.getLatestValue(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                        switch (monitorData.getAttributeType()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            case "3"://供水量or出水量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                                monDataCol.setYieldWaterUsage(monDataCol.getYieldWaterUsage() != null ? monDataCol.getYieldWaterUsage() + attributeValue : attributeValue); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                                break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            case "4"://取水量or进水量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                                monDataCol.setIntakeWaterUsage(monDataCol.getIntakeWaterUsage() != null ? monDataCol.getIntakeWaterUsage() + attributeValue : attributeValue); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                                break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            case "5"://耗电量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                                monDataCol.setPowerUsage(monDataCol.getPowerUsage() != null ? monDataCol.getPowerUsage() + attributeValue : attributeValue); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                                break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            case "6"://耗药量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                                monDataCol.setDrugUsage(monDataCol.getDrugUsage() != null ? monDataCol.getDrugUsage() + attributeValue : attributeValue); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                                break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            monitorDataEntity = (MonitorDataEntity) ByteArrayUtils.bytesToObject(bytes).get();} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    List<MonitorDataDto> pumpStatus=new ArrayList<>(0);//水泵状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    for(MonitorDataDto monitorData : calculate.getMonitorDataEntities()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if(monDataCol.getDeviceId()==null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            byte[] bytes = redisUtil.get(("sms_water_"+monDataCol.getDeviceCode()).getBytes()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            if(bytes != null && bytes.length>0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                monitorDataEntity = (MonitorDataEntity) ByteArrayUtils.bytesToObject(bytes).get();} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if(monitorDataEntity != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            monDataCol.setCollectDate(monitorDataEntity.getCollectDate()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            //筛选该设备相同属性的值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            List<MonitorDataValueEntity> attributeEntities = monitorDataEntity.getDataValues().stream().filter((MonitorDataValueEntity m) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    -> m.getAttributeId().equals(monitorData.getAttributeId())).collect(Collectors.toList()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            MonitorDataValueEntity  attributeEntity=attributeEntities.size()>0?attributeEntities.get(0):null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            if (attributeEntity != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                //实时数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                monitorData.setDataValue(attributeEntity.getDataValue()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                monitorData.setUnit(attributeEntity.getUnit()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                SimpleDateFormat formatdate = new SimpleDateFormat("YYYY-MM-dd");//日期算换格式 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                //计算今日数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                if(formatdate.format(new Date()).equals(formatdate.format(monitorDataEntity.getCollectDate()))) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    Double attributeValue =0d; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    if(attributeEntity.getDataValue() != null && monitorData.getLatestValue() != null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        attributeValue=attributeEntity.getDataValue() - monitorData.getLatestValue(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     switch (monitorData.getAttributeType()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                        case "7"://取水PHor进水PH 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            monDataCol.setIntakePh(monitorData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                        case "8"://供水PHor出水PH 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            monDataCol.setYieldPh(monitorData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                        case "9"://取水浊度or进水浊度 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            monDataCol.setIntakeTurbidity(monitorData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                        case "10"://供水浊度or出水浊度 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            monDataCol.setYieldTurbidity(monitorData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                        case "11"://余氯 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            monDataCol.setResidualChlorine(monitorData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                        case "12"://水位 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            monDataCol.setWaterLevel(monitorData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        case "3"://供水量or出水量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            monDataCol.setYieldWaterUsage(monDataCol.getYieldWaterUsage() != null ? monDataCol.getYieldWaterUsage() + attributeValue : attributeValue); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                        case "13"://压力 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            monDataCol.setPressure(monitorData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        case "4"://取水量or进水量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            monDataCol.setIntakeWaterUsage(monDataCol.getIntakeWaterUsage() != null ? monDataCol.getIntakeWaterUsage() + attributeValue : attributeValue); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                        case "14"://瞬时流量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            monDataCol.setInstantFlow(monitorData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        case "5"://耗电量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            monDataCol.setPowerUsage(monDataCol.getPowerUsage() != null ? monDataCol.getPowerUsage() + attributeValue : attributeValue); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                        case "2"://水泵状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            DecimalFormat decimalFormat = new DecimalFormat("###################.###########");//去掉末尾小数点 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            String specsValue = attributeEntity.getDataValue() == null ? null : decimalFormat.format(attributeEntity.getDataValue()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            monitorData.setSpecsName(specsValue == null ? null : deviceAttributeSpecsService.selectSpecsName(attributeEntity.getAttributeId(), specsValue)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            pumpStatus.add(monitorData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            monDataCol.setPumpStatus(pumpStatus); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        case "6"://耗药量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            monDataCol.setDrugUsage(monDataCol.getDrugUsage() != null ? monDataCol.getDrugUsage() + attributeValue : attributeValue); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                switch (monitorData.getAttributeType()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    case "7"://取水PHor进水PH 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        monDataCol.setIntakePh(monitorData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    case "8"://供水PHor出水PH 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        monDataCol.setYieldPh(monitorData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    case "9"://取水浊度or进水浊度 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        monDataCol.setIntakeTurbidity(monitorData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    case "10"://供水浊度or出水浊度 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        monDataCol.setYieldTurbidity(monitorData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    case "11"://余氯 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        monDataCol.setResidualChlorine(monitorData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    case "12"://水位 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        monDataCol.setWaterLevel(monitorData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    case "13"://压力 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        monDataCol.setPressure(monitorData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    case "14"://瞬时流量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        monDataCol.setInstantFlow(monitorData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    case "2"://水泵状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        DecimalFormat decimalFormat = new DecimalFormat("###################.###########");//去掉末尾小数点 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        String specsValue = attributeEntity.getDataValue() == null ? null : decimalFormat.format(attributeEntity.getDataValue()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        monitorData.setSpecsName(specsValue == null ? null : deviceAttributeSpecsService.selectSpecsName(attributeEntity.getAttributeId(), specsValue)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        pumpStatus.add(monitorData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        monDataCol.setPumpStatus(pumpStatus); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    case "16"://累计流量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        monDataCol.setTotalFlow(monitorData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    case "18"://电导率 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        monDataCol.setConductivity(monitorData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |