发版合并 #363

Merged
wangqiong123 merged 129 commits from dev into pro 2024-06-03 02:26:01 +00:00
Showing only changes of commit 743040d813 - Show all commits
@@ -345,13 +345,39 @@ public class CaseApplicationController extends BaseController {
/**
* 下载案件压缩包
*/
@PostMapping("/downloadCaseZipFile")
public AjaxResult downloadCaseZipFile(@Validated @RequestBody CaseApplication caseApplication) {
@PostMapping("/downloadCaseZipFile1")
public AjaxResult downloadCaseZipFile1(@Validated @RequestBody CaseApplication caseApplication) {
CaseAttach caseAttach = caseApplicationService.downloadCaseZipFile(caseApplication);
return success(caseAttach);
}
/**
* 下载案件压缩包
*/
@PostMapping("/downloadCaseZipFile")
public void downloadCaseZipFile(@Validated @RequestBody CaseApplication caseApplication,HttpServletResponse response) {
CaseAttach caseAttach = caseApplicationService.downloadCaseZipFile(caseApplication);
String annexPath = caseAttach.getAnnexPath();
String annexName = caseAttach.getAnnexName();
String urlstr = "http://121.40.189.20:8000/API" + annexPath;
try {
InputStream fileInputStream = new URL(urlstr).openStream();
response.setHeader("content-type", "application/octet-stream");
response.setContentType("application/octet-stream");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(annexName,"UTF-8"));
byte[] buffer = new byte[1024];
int length;
while ((length = fileInputStream.read(buffer)) > 0) {
response.getOutputStream().write(buffer, 0, length);
}
} catch (IOException e) {
throw new RuntimeException(e);
}
}
/**
* 发送房间号短信