|
@@ -5,6 +5,7 @@ import com.onemap.apply.domain.cggl.CgscDto;
|
|
|
import com.onemap.apply.domain.sbjk.TjpgsbDTO;
|
|
|
import com.onemap.apply.domain.sbjk.XzczghcgsbDTO;
|
|
|
import com.onemap.apply.service.sbjk.XzczghcgsbService;
|
|
|
+import com.onemap.apply.utils.ZipDownload;
|
|
|
import com.onemap.common.core.utils.StringUtils;
|
|
|
import com.onemap.common.core.utils.file.FileUtils;
|
|
|
import com.onemap.common.core.web.controller.BaseController;
|
|
@@ -141,13 +142,17 @@ public class XzczghcgsbController extends BaseController {
|
|
|
|
|
|
if (xzczghcgsbDTO != null) {
|
|
|
File file = new File(xzczghcgsbDTO.getFilePath());
|
|
|
- if (!file.exists())
|
|
|
+ if (!file.exists()) {
|
|
|
throw new Exception();
|
|
|
+ }
|
|
|
|
|
|
String downloadName = file.getName();
|
|
|
- response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
|
|
|
- FileUtils.setAttachmentResponseHeader(response, downloadName);
|
|
|
- FileUtils.writeBytes(xzczghcgsbDTO.getFilePath(), response.getOutputStream());
|
|
|
+ ZipDownload.download(response, xzczghcgsbDTO.getFilePath(), downloadName);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
} else {
|
|
|
response.getWriter().println("没有找到结果文件");
|
|
|
}
|