|  |  |  | @ -40,6 +40,7 @@ import org.springframework.web.client.RestTemplate; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | import javax.annotation.Resource; | 
			
		
	
		
			
				
					|  |  |  |  | import javax.servlet.http.HttpServletRequest; | 
			
		
	
		
			
				
					|  |  |  |  | import java.io.BufferedReader; | 
			
		
	
		
			
				
					|  |  |  |  | import java.io.FileNotFoundException; | 
			
		
	
		
			
				
					|  |  |  |  | import java.io.FileReader; | 
			
		
	
		
			
				
					|  |  |  |  | import java.io.IOException; | 
			
		
	
	
		
			
				
					|  |  |  | @ -268,19 +269,15 @@ public class SpsSyncDataController { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     private String readDataFile(String cacheFilePath) { | 
			
		
	
		
			
				
					|  |  |  |  |         // 读取文件数据
 | 
			
		
	
		
			
				
					|  |  |  |  |         try { | 
			
		
	
		
			
				
					|  |  |  |  |             FileReader reader = new FileReader(cacheFilePath); | 
			
		
	
		
			
				
					|  |  |  |  |             StringBuilder str = new StringBuilder(); | 
			
		
	
		
			
				
					|  |  |  |  |             int data; | 
			
		
	
		
			
				
					|  |  |  |  |             while ((data = reader.read()) != -1) { | 
			
		
	
		
			
				
					|  |  |  |  |                 str.append((char) data); | 
			
		
	
		
			
				
					|  |  |  |  |         try (BufferedReader reader = new BufferedReader(new FileReader(cacheFilePath))) { | 
			
		
	
		
			
				
					|  |  |  |  |             StringBuilder str = new StringBuilder(1024); | 
			
		
	
		
			
				
					|  |  |  |  |             String line; | 
			
		
	
		
			
				
					|  |  |  |  |             while ((line = reader.readLine()) != null) { | 
			
		
	
		
			
				
					|  |  |  |  |                 str.append(line); | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |             reader.close(); | 
			
		
	
		
			
				
					|  |  |  |  |             return str.toString(); | 
			
		
	
		
			
				
					|  |  |  |  |         } catch (FileNotFoundException e) { | 
			
		
	
		
			
				
					|  |  |  |  |             throw new RuntimeException("系统异常,未找到对应数据文件"); | 
			
		
	
		
			
				
					|  |  |  |  |         } catch (IOException e) { | 
			
		
	
		
			
				
					|  |  |  |  |             throw new RuntimeException(e); | 
			
		
	
		
			
				
					|  |  |  |  |         } catch (IOException e) { // 3. 合并异常处理
 | 
			
		
	
		
			
				
					|  |  |  |  |             throw new RuntimeException("文件读取失败: " + e.getMessage(), e); | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | 
 |