| 
					
				 | 
			
			
				@@ -265,7 +265,8 @@ public class OnlineMonitorImpl implements OnlineMonitorService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(onlineDataDto.getSceneTypeName().equals("压力")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             deviceCount=new int[5]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        Double avgValue=null,maxValue=null,minValue=null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        int count=0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Double sumValue=null,maxValue=null,minValue=null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String maxDeviceName=null,minDeviceName=null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<MonitorDataCollectDto> result=onlineMonitorMapper.statsDeviceParm(onlineDataDto); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for(MonitorDataCollectDto monDataCol :result) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -287,13 +288,15 @@ public class OnlineMonitorImpl implements OnlineMonitorService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        Double dataValue= attributeEntity.getDataValue(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        if(dataValue!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            if(onlineDataDto.getSceneTypeName().equals("压力")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                               avgValue=avgValue==null?dataValue:(avgValue+dataValue)/2; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                               count++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                               sumValue=sumValue==null?dataValue:sumValue+dataValue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                boolean isMaxEquals=dataValue.equals(maxValue); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                boolean isMinEquals=dataValue.equals(minValue); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                if(isMaxEquals) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                   maxDeviceName += monDataCol.getDeviceName(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                               }else if(isMinEquals){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                   minDeviceName+=monDataCol.getDeviceName(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                   maxDeviceName += ","+monDataCol.getDeviceName(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                               } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                               if(isMinEquals){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                   minDeviceName += ","+monDataCol.getDeviceName(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                maxValue=Math.max(maxValue==null?dataValue:maxValue,dataValue); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                minValue=Math.min(minValue==null?dataValue:minValue,dataValue); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -336,7 +339,7 @@ public class OnlineMonitorImpl implements OnlineMonitorService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         DistributeIntervalDto distributeIntervalDto=new DistributeIntervalDto(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         distributeIntervalDto.setDistributeValue(deviceCount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        distributeIntervalDto.setAvgValue(avgValue); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        distributeIntervalDto.setAvgValue(count==0?null:sumValue/count); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         distributeIntervalDto.setMaxValue(maxValue); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         distributeIntervalDto.setMinValue(minValue); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         distributeIntervalDto.setMaxDeviceName(maxDeviceName); 
			 |