@RequestMapping("/downloadFile.htm")//文件下载
		@ResponseBody
	    public void file2Stream( Map<String, Object> requestMap, HttpServletResponse response,HttpServletRequest request) {  
	    	
	        InputStream iStream = null;  
	        OutputStream outStrem = null;  
			String url=request.getParameter("url").trim();//获取前端传来的起始年度

	        try {  

	        	String[] filename=url.split("/");
	            writeFilesService.downFile(url, filename[filename.length-1], request, response);

	        } catch (Exception e) {  
	 			e.printStackTrace();  
	        }finally {  
	            if(iStream != null){  
	                try {  
	                    iStream.close();  
	                    iStream = null;  
	                } catch (IOException e) {  
	         			e.printStackTrace();  
	                }  
	            }  
	            if(outStrem != null){  
	                try {  
	                    outStrem.close();  
	                    outStrem = null;  
	                } catch (IOException e) {  
	         			e.printStackTrace();
	                }  
	            }  
	        }  
	    }
	    
	    serviceImplement
	    
	    public HttpServletResponse downFile(String path1,String fileName,HttpServletRequest request,HttpServletResponse response) throws Exception {
		
		request.setCharacterEncoding("UTF-8");
//		String ctxPath = request.getSession().getServletContext().getRealPath("")
//	       + File.separator + "export_table"+ File.separator;
//		path1 =ctxPath+path1;
		File file =new File(path1);
		System.out.println(path1);
		//String filename = file.getName();
		try {
			InputStream fis = new BufferedInputStream(new FileInputStream(file));
			byte[] buffer = new byte[fis.available()];
			try {
				fis.read(buffer);
			} catch (IOException e1) {
				// TODO Auto-generated catch block
				e1.printStackTrace();
			}
			try {
				fis.close();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			response.reset();
			
					//URLEncoder.encode(path2,"UTF-8");
//			if(fileName.length()>150){
//				fileName = new String(path2.getBytes("GBK"),"ISO-8859-1");
				response.addHeader("Content-disposition", "p_w_upload; filename="+ fileName);
				
				response.addHeader("Content-Length", String.valueOf(file.length()));
				OutputStream tc = new BufferedOutputStream(response.getOutputStream());
				response.setContentType("application/octet-stream");
				tc.write(buffer);
				tc.flush();
				tc.close();
//				file.delete();
//			}
			
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return response;
		
	}