|
|
@@ -790,4 +790,24 @@ public class PublicController extends CertifyApiController {
|
|
|
res.data(povertyService.selectPoverty(file));
|
|
|
return res;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 批量导入回款模版
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/downloadPovertyTemplate", method = RequestMethod.GET)
|
|
|
+ public void downloadTemplate(HttpServletResponse response) {
|
|
|
+ Result res = new Result();
|
|
|
+ StringBuffer url= new StringBuffer(uploadPath);
|
|
|
+ url=url.append("/tmp").append("/poverty_template.xls");
|
|
|
+ try {
|
|
|
+ response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
|
|
|
+ FileUtils.setAttachmentResponseHeader(response, url.toString(),"poverty导入模版.xls");
|
|
|
+ FileUtils.writeBytes(url.toString(), response.getOutputStream());
|
|
|
+ }
|
|
|
+ catch (Exception e) {
|
|
|
+ LoggerUtils.error(PublicController.class,"下载文件失败", e);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|