downloadFileById(file_id){
window.open(utils.getUpdateFileUrl()+"file/downLoadFile"+"?file_id="+file_id)
},
@RequestMapping(value = "/downLoadFile")
public HttpServletResponse downLoadFile(String file_id,HttpServletResponse response )throws Exception {
System.out.println(file_id);
FileBean downloadFile = fileService.getFileById( file_id);
String filename = downloadFile.getFile_name();
String fileRelativePath = downloadFile.getFile_relativePath();
String fileAbsolutePath = System.getProperty("user.dir")+tomcatPath+fileRelativePath.replaceFirst(".","");
InputStream fis = new BufferedInputStream(new FileInputStream(fileAbsolutePath));
byte[] downloadFileBuffer = new byte[fis.available()];
fis.read(downloadFileBuffer);
fis.close();
response.reset();
response.addHeader("Content-Disposition", "attachment;filename=" + new String(filename.getBytes("gb2312"),"ISO8859-1"));
response.addHeader("Content-Length", "" + downloadFileBuffer.length);
OutputStream toClient = new BufferedOutputStream(response.getOutputStream());
response.setContentType("application/octet-stream");
toClient.write(downloadFileBuffer);
toClient.flush();
toClient.close();
return response;
}