|
@@ -170,8 +170,8 @@ public class ArchivesAutoController extends BladeController {
|
|
|
ids.add(nodeId+"");
|
|
|
}
|
|
|
List<ArchivesAutoVO5> list= archivesAutoService.selectArchivesAutoFileFormDownload(projectId,contractId,ids);
|
|
|
- //String templatePath="/mnt/sdc/Users/hongchuangyanfa/Desktop/excel/archiveTemplate.xlsx";
|
|
|
- String templatePath="C:\\Users\\hc01\\Desktop\\archiveTemplate.xlsx";
|
|
|
+ String templatePath="/mnt/sdc/Users/hongchuangyanfa/Desktop/excel/archiveTemplate.xlsx";
|
|
|
+ //String templatePath="C:\\Users\\hc01\\Desktop\\archiveTemplate.xlsx";
|
|
|
InputStream templateStream = new FileInputStream(new File(templatePath));
|
|
|
org.apache.poi.ss.usermodel.Workbook workbook = WorkbookFactory.create(templateStream);
|
|
|
Sheet sheet = workbook.getSheetAt(0);
|
|
@@ -183,7 +183,7 @@ public class ArchivesAutoController extends BladeController {
|
|
|
// 填充各列数据
|
|
|
row.createCell(0).setCellValue(i + 1); // 序号
|
|
|
row.createCell(1).setCellValue(StringUtils.isNotEmpty(vo1.getFileNumber())?vo1.getFileNumber():""); // 档号
|
|
|
- row.createCell(2).setCellValue(StringUtils.isNotEmpty(vo1.getStorageTimeValue())?vo1.getStorageTimeValue():""); // 案卷题名
|
|
|
+ row.createCell(2).setCellValue(StringUtils.isNotEmpty(vo1.getName())?vo1.getName():""); // 案卷题名
|
|
|
row.createCell(3).setCellValue(StringUtils.isNotEmpty(vo1.getStorageTimeValue())?vo1.getStorageTimeValue():""); // 保管期限
|
|
|
row.createCell(4).setCellValue(vo1.getPageN()+""); // 总页数
|
|
|
row.createCell(5).setCellValue(StringUtils.isNotEmpty(vo1.getUnit())?vo1.getUnit():""); // 立卷单位
|
|
@@ -198,7 +198,7 @@ public class ArchivesAutoController extends BladeController {
|
|
|
String encodedFileName = URLEncoder.encode(fileName, StandardCharsets.UTF_8.toString())
|
|
|
.replaceAll("\\+", "%20");
|
|
|
return ResponseEntity.ok()
|
|
|
- .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename*=UTF-8''" + encodedFileName)
|
|
|
+ .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename*=" + encodedFileName)
|
|
|
.contentType(MediaType.APPLICATION_OCTET_STREAM)
|
|
|
.contentLength(resource.contentLength())
|
|
|
.body(resource);
|