|
|
|
@ -1578,33 +1578,6 @@ public class DepositoryRecordController { |
|
|
|
} |
|
|
|
ZipMultiFileUtil.zipDownload(response, "出库订单.zip", files); |
|
|
|
ZipMultiFileUtil.deleteFile(files); |
|
|
|
/*try { |
|
|
|
|
|
|
|
String path = "static/upload/materialTypeImport.xlsx"; |
|
|
|
|
|
|
|
String fileName = "materialTypeImport.xlsx"; |
|
|
|
response.setHeader("content-disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8")); |
|
|
|
response.setContentType("content-type:octet-stream"); |
|
|
|
*//* .getClassLoader() 方法是在静态文件路径添加一个/ *//*
|
|
|
|
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(path); |
|
|
|
OutputStream outputStream = response.getOutputStream(); |
|
|
|
try { |
|
|
|
byte[] buffer = new byte[1024]; |
|
|
|
int len; |
|
|
|
assert inputStream != null; |
|
|
|
while ((len = inputStream.read(buffer)) != -1) { *//* 将流中内容写出去 .*//*
|
|
|
|
outputStream.write(buffer, 0, len); |
|
|
|
} |
|
|
|
}catch (IOException e){ |
|
|
|
e.printStackTrace(); |
|
|
|
}finally { |
|
|
|
assert inputStream != null; |
|
|
|
inputStream.close(); |
|
|
|
outputStream.close(); |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
}*/ |
|
|
|
} else { |
|
|
|
throw new MyException("缺少必要参数"); |
|
|
|
} |
|
|
|
|