| 
				
			 | 
			
			
				@@ -55,14 +55,14 @@ public class GtController { 
			 | 
		
	
		
			
			| 
				
					55
				
			 | 
			
				
					55
				
			 | 
			
			
				         jdbcTemplate = new JdbcTemplate(dataSource); 
			 | 
		
	
		
			
			| 
				
					56
				
			 | 
			
				
					56
				
			 | 
			
			
				         long sumData = 0; 
			 | 
		
	
		
			
			| 
				
					57
				
			 | 
			
				
					57
				
			 | 
			
			
				         try { 
			 | 
		
	
		
			
			| 
				
					58
				
			 | 
			
				
			 | 
			
			
				-                if (wellList.isEmpty() || wellList.size()==0 ){ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				
					58
				
			 | 
			
			
				+                if (wellList.isEmpty()){ 
			 | 
		
	
		
			
			| 
				
					59
				
			 | 
			
				
					59
				
			 | 
			
			
				                     String sql = String.format("select so.well_id,so.well_common_name,so.org_id,ti.prod_date,ti.stroke_frequency,ti.stroke_length,ti.sgt from centralbase.cb_temp_well_mech_runtime ti, centralbase.cb_cd_well_source so " + 
			 | 
		
	
		
			
			| 
				
					60
				
			 | 
			
				
					60
				
			 | 
			
			
				                             " where ti.well_id = so.well_id  and ti.prod_date between '%s' and '%s' " ,startDate,endDate); 
			 | 
		
	
		
			
			| 
				
					61
				
			 | 
			
				
					61
				
			 | 
			
			
				                     sumData = sendDataToMQ(sql); 
			 | 
		
	
		
			
			| 
				
					62
				
			 | 
			
				
					62
				
			 | 
			
			
				                 }else { 
			 | 
		
	
		
			
			| 
				
					63
				
			 | 
			
				
			 | 
			
			
				-                    for (int i = 0; i < wellList.size(); i++) { 
			 | 
		
	
		
			
			| 
				
			 | 
			
				
					63
				
			 | 
			
			
				+                    for (String s : wellList) { 
			 | 
		
	
		
			
			| 
				
					64
				
			 | 
			
				
					64
				
			 | 
			
			
				                         String sql = String.format("select so.well_id,so.well_common_name,so.org_id,ti.prod_date,ti.stroke_frequency,ti.stroke_length,ti.sgt from centralbase.cb_temp_well_mech_runtime ti, centralbase.cb_cd_well_source so " + 
			 | 
		
	
		
			
			| 
				
					65
				
			 | 
			
				
			 | 
			
			
				-                                " where ti.well_id = so.well_id and ti.well_id = '%s' and ti.prod_date between '%s' and '%s' ", wellList.get(i), startDate, endDate); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				
					65
				
			 | 
			
			
				+                                " where ti.well_id = so.well_id and ti.well_id = '%s' and ti.prod_date between '%s' and '%s' ", s, startDate, endDate); 
			 | 
		
	
		
			
			| 
				
					66
				
			 | 
			
				
					66
				
			 | 
			
			
				                         sumData = sendDataToMQ(sql); 
			 | 
		
	
		
			
			| 
				
					67
				
			 | 
			
				
					67
				
			 | 
			
			
				                     } 
			 | 
		
	
		
			
			| 
				
					68
				
			 | 
			
				
					68
				
			 | 
			
			
				                 } 
			 |