fei
2 天以前 436b955086030caec4513022c1f5127470ad2b14
ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/archiveAllExportController.java
@@ -6,11 +6,14 @@
import com.itextpdf.text.*;
import com.itextpdf.text.pdf.PdfPCell;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.file.FileUtils;
import com.ruoyi.common.utils.poi.*;
import com.ruoyi.domain.ArchiveProjectName;
import com.ruoyi.domain.ArchiveRecords;
import com.ruoyi.domain.DocumentMaterials;
import com.ruoyi.domain.vo.*;
import com.ruoyi.service.IArchiveProjectNameService;
import com.ruoyi.service.IArchiveRecordsService;
import com.ruoyi.service.IDocumentMaterialsService;
import com.ruoyi.service.impl.BarcodeService;
@@ -53,7 +56,8 @@
    private BarcodeService barcodeService;
    @Autowired
    private IDocumentMaterialsService documentMaterialsService;
    @Autowired
    private IArchiveProjectNameService iArchiveProjectNameService;
    @Autowired
    private IArchiveRecordsService iArchiveRecordsService;
@@ -330,7 +334,7 @@
        String recordId = aIV.getRecordId();
        byte[] imgr = barcodeService.generateBarcodeImage(recordId);
        byte[] sedcode = pdfGenerateService.createQrCodeN(recordId, 30, 30);
        byte[] sedcode = pdfGenerateService.createQrCodeN(recordId, 100, 100);
        ExcelExp e1 = new ExcelExp("案卷封面数据",arsi, ArchiveInfoVo.class);
        ExcelExp e2 = new ExcelExp("案卷封面",  arsi, recordId, imgr,sedcode, ArchiveInfoVo.class);
        List<ExcelExp> mysheet = new ArrayList<ExcelExp>();
@@ -445,7 +449,7 @@
            ExcelExp e6 = new ExcelExp("移交清单",lrs, ArchiveRecordSmall.class);
            ExcelExp e6 = new ExcelExp("移交清单","GH" + formattedDate + sequence,  lrs, ArchiveRecordSmall.class);
          //  ExcelExp e4 = new ExcelExp("案卷封面",  arsi, recordId1, imgr1,sedcode, ArchiveInfoVo.class);
            List<ExcelExp> mysheet6 = new ArrayList<ExcelExp>();
            mysheet6.add(e6);
@@ -464,20 +468,26 @@
            System.out.println(ids.length);
            System.out.println("------------------");
            for(int i = 0; i < ids.length; i++) {
                System.out.println(ids[i]);
                // 获取文件的保存位置,读取数据库,
                DocumentMaterials documentMaterials = new DocumentMaterials();
                documentMaterials.setRecordId(ids[i]);
                List<DocumentMaterialsVoLarge> docs = documentMaterialsService.selectDocumentMaterialsAllByRecordId(ids[i]);
                System.out.println(docs.size()+"----009");
                System.out.println(docs.size()+"----7777");
                //.selectDocumentMaterialsList(documentMaterials);
                List<DocumentMaterialsVo> dsvs = documentMaterialsService.findArchMInfo(ids[i].toString());
                ArchiveInfoVo aIV = iArchiveRecordsService.selectByRecordId(ids[i]);
                System.out.println(aIV.getInquiryNumber());
                System.out.println(aIV.getRecordId());
                String adir = aIV.getInquiryNumber() + " " + aIV.getRecordId();
                System.out.println(adir);
                System.out.println(fna+adir);
                zos.putNextEntry(new ZipEntry(fna + adir + "/"));
@@ -494,39 +504,26 @@
                }
                //添加07  的pdf
                //pdf目录封面
                String pdfPathF = "07-案卷封面.pdf";
                pdfGenerateService.generatePdf(pdfPathF, ids[i]);
                // 2. 压缩PDF到ZIP文件
                // 添加PDF文件到ZIP
                ZipEntry zipEntry2 = new ZipEntry(fna + adir +"/"+pdfPathF);
                zos.putNextEntry(zipEntry2);
//                String pdfPathF = "07-案卷封面.pdf";
//                pdfGenerateService.generatePdf(pdfPathF, ids[i]);
//                // 2. 压缩PDF到ZIP文件
//                // 添加PDF文件到ZIP
//                ZipEntry zipEntry2 = new ZipEntry(fna + adir +"/"+pdfPathF);
//                zos.putNextEntry(zipEntry2);
//
//                // 读取PDF文件内容并写入ZIP
//                try (FileInputStream fis = new FileInputStream(pdfPathF)) {
//                    byte[] buffer = new byte[1024];
//                    int len;
//                    while ((len = fis.read(buffer)) > 0) {
//                        zos.write(buffer, 0, len);
//                    }
//                }
                // 读取PDF文件内容并写入ZIP
                try (FileInputStream fis = new FileInputStream(pdfPathF)) {
                    byte[] buffer = new byte[1024];
                    int len;
                    while ((len = fis.read(buffer)) > 0) {
                        zos.write(buffer, 0, len);
                    }
                }
                //08-卷内卷内目录的pdf
                String pdf08Path= "08-卷内目录.pdf";
                List<DocumentMaterialsVo> list3 = dsvs;
                if(list3.size()>0) {
                    pdfGenerateService.generateFileDirectoryPdf(pdf08Path, list3);
                    ZipEntry zipEntry3 = new ZipEntry(fna + adir +"/"+pdf08Path);
                    zos.putNextEntry(zipEntry3);
                    // 读取PDF文件内容并写入ZIP
                    try (FileInputStream fis = new FileInputStream(pdf08Path)) {
                        byte[] buffer = new byte[1024];
                        int len;
                        while ((len = fis.read(buffer)) > 0) {
                            zos.write(buffer, 0, len);
                        }
                    }
                }
                //09-备考表.pdf
@@ -568,13 +565,31 @@
                {
                    for(DocumentMaterialFileStyle documentMaterialFileStyle:dmfs)
                    {
                        if(documentMaterialFileStyle.getFileStyle().equals("文字材料"))
                        if(documentMaterialFileStyle.getFileStyle()!=null&&documentMaterialFileStyle.getFileStyle().equals("文字材料"))
                            texPages = documentMaterialFileStyle.getCnt();
                        if(documentMaterialFileStyle.getFileStyle().equals("图样材料"))
                        if(documentMaterialFileStyle.getFileStyle()!=null&&documentMaterialFileStyle.getFileStyle().equals("图样材料"))
                            patPages = documentMaterialFileStyle.getCnt();
                        if(documentMaterialFileStyle.getFileStyle().equals("照片材料"))
                        if(documentMaterialFileStyle.getFileStyle()!=null&&documentMaterialFileStyle.getFileStyle().equals("照片材料"))
                            picPages = documentMaterialFileStyle.getCnt();
                    }
                }
                String compName = "广州盈家档案管理有限公司";
                String li_person = "仇翀";
                String sh_person = "曾瑞莹";
                ArchiveRecords archiveRecords1 = iArchiveRecordsService.selectArchiveRecordsById(ids[i]);
                if(!StringUtils.isEmpty(archiveRecords1.getLiPerson()))
                    li_person = archiveRecords1.getLiPerson();
                ArchiveProjectName tmp = new ArchiveProjectName();
                tmp.setName(archiveRecords1.getProjectName());
                List<ArchiveProjectName> projectName = iArchiveProjectNameService.selectArchiveProjectNameList(tmp);
                if(!projectName.isEmpty())
                {
                    if(!StringUtils.isEmpty(projectName.get(0).getCompanyName()))
                        compName = projectName.get(0).getCompanyName();
                    if(!StringUtils.isEmpty(projectName.get(0).getCreatePerson()))
                        sh_person = projectName.get(0).getCreatePerson();
                }
                allPages = texPages + picPages + patPages;
                hs.put("pages", allPages);
@@ -582,6 +597,9 @@
                hs.put("picPages", picPages);
                hs.put("texPages", texPages);
                hs.put("volumeNumber", aIV.getRecordId());
                hs.put("company", compName);
                hs.put("liPerson", li_person);
                hs.put("shPerson", sh_person);
                hs.put("time", cdt);
                if (!getLicense()) {
@@ -591,10 +609,16 @@
                try {
                    // 获取 Word 模板所在路径
                    String filepath = "09-备考表.docx";
                    ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
                    org.springframework.core.io.Resource resource = resolver.getResource("classpath:09.docx");
//                String filepath = resource.getFile().getAbsolutePath();
//                // 通过 XWPFTemplate 编译文件并渲染数据到模板中
//                XWPFTemplate template = XWPFTemplate.compile(filepath).render(hs
//                       );
                    InputStream inputStream = resource.getInputStream();
                    // 通过 XWPFTemplate 编译文件并渲染数据到模板中
                    XWPFTemplate template = XWPFTemplate.compile(filepath).render(hs
                    XWPFTemplate template = XWPFTemplate.compile(inputStream).render(hs
                    );
                    String renderedDocPath = "rendered_output.docx";
@@ -638,7 +662,7 @@
                String recordId1 = aIV.getRecordId();
                byte[] imgr1 = barcodeService.generateBarcodeImage(recordId1);
                byte[] sedcode = pdfGenerateService.createQrCodeN(recordId1, 30, 30);
                byte[] sedcode = pdfGenerateService.createQrCodeN(recordId1, 200, 200);
                ExcelExp e3 = new ExcelExp("案卷封面数据",arsi, ArchiveInfoVo.class);
                ExcelExp e4 = new ExcelExp("案卷封面",  arsi, recordId1, imgr1,sedcode, ArchiveInfoVo.class);
                List<ExcelExp> mysheet1 = new ArrayList<ExcelExp>();
@@ -652,6 +676,64 @@
                //  System.out.println(bos2);
                zos.putNextEntry(entryiv);
                bos2.writeTo(zos);
                //pdf目录封面
                String pdfPathF = "07-案卷封面.pdf";
                // pdfGenerateService.generatePdf(pdfPathF, id);
                try {
                    if (!getLicenseExcel()) {
                        System.out.println("授权失败");
                        // return ;
                    }
                    // 读取Excel文件
                    com.aspose.cells.Workbook wb = poiToAspose(util3.getWb());
                    // 获取需要导出的sheet(索引从0开始)
                    int targetSheetIndex = 1;
                    com.aspose.cells.Worksheet targetSheet = wb.getWorksheets().get(targetSheetIndex);
                    targetSheet.autoFitRows(true);
                    System.out.println("当前sheet名称:" + targetSheet.getName());
                    System.out.println("当前sheet索引:" + targetSheet.getIndex());
                    // 隐藏所有其他工作表
                    for (int j = 0; j < wb.getWorksheets().getCount(); j++) {
                        if (j != targetSheetIndex) {
                            wb.getWorksheets().get(j).setVisible(false);
                        }
                    }
                    // 设置活动工作表为目标工作表
                    wb.getWorksheets().setActiveSheetIndex(targetSheetIndex);
                    // 创建PDF保存选项
                    com.aspose.cells.PdfSaveOptions pdfSaveOptions = new com.aspose.cells.PdfSaveOptions();
                    pdfSaveOptions.setCompliance(com.aspose.cells.PdfCompliance.PDF_A_1_B);
                    // 创建临时字节输出流
                    ByteArrayOutputStream baos = new ByteArrayOutputStream();
                    // 将新的Workbook保存为PDF到临时流
                    //   newWorkbook.save(baos, com.aspose.cells.SaveFormat.PDF);
                    wb.save(baos, pdfSaveOptions);
                    // 将PDF添加到ZIP文件
                    ZipEntry entry07 = new ZipEntry(fna + adir +"/"+pdfPathF);
                    zos.putNextEntry(entry07);
                    zos.write(baos.toByteArray());
                    //  zos.closeEntry();
                    // 直接将原始工作簿保存为PDF(只包含可见的工作表)
                    long now = System.currentTimeMillis();
                    //   System.out.println("pdf转换成功,共耗时:" + ((now - old) / 1000.0) + "秒");
                } catch (Exception e) {
                    e.printStackTrace();
                    // 打印详细错误信息
                    System.err.println("转换失败:" + e.getMessage());
                    e.printStackTrace(System.err);
                }
//            ExcelUtil<ArchiveInfoVo> utilsv = new ExcelUtil<ArchiveInfoVo>(ArchiveInfoVo.class);
//
//
@@ -659,7 +741,7 @@
//            List<ArchiveInfoVo> aivs = new ArrayList<>();
//            aivs.add(aIV);
//            utilsv.byteOutputStreamExcel(boss, aivs,"Date List", "");
                bos2.writeTo(zos);
@@ -675,7 +757,7 @@
                //拿到卷内目录的excel
                List<DocumentMaterialsVoSmall> list2 = dsvs.stream().map(res1 -> new DocumentMaterialsVoSmall(res1.getNum(), res1.getDocumentNumber(),res1.getCreator(),
                        res1.getTitle(), res1.getDate(), res1.getPageNumber(), res1.getRemarks())).collect(Collectors.toList());
                        res1.getTitle(), res1.getDate(), res1.getPageNumberFormatted(), res1.getRemarks())).collect(Collectors.toList());
                if(!dsvs.isEmpty()) {
                    String recordId = dsvs.get(0).getRecordId();
                    byte[] imgr = barcodeService.generateBarcodeImage(recordId);
@@ -691,12 +773,90 @@
                    zos.putNextEntry(entr);
                    ByteOutputStream bos8 = new ByteOutputStream();
                    util2.exportExcelManySheet(bos6, mysheet);
                    util2.exportExcelManySheet(bos8, mysheet);
                    //   util1.byteOutputStreamExcel(bos1, dsvs,"Date List", "");
                    bos8.writeTo(zos);
                    //08-卷内卷内目录的pdf
                    String pdf08Path= "08-卷内目录.pdf";
                    try {
                        if (!getLicenseExcel()) {
                            System.out.println("授权失败");
                            // return ;
                        }
                        // 读取Excel文件
                        com.aspose.cells.Workbook wb1 = poiToAspose(util2.getWb());
                        // 获取需要导出的sheet(索引从0开始)
                        int targetSheetIndex = 1;
                        com.aspose.cells.Worksheet targetSheet = wb1.getWorksheets().get(targetSheetIndex);
                        targetSheet.autoFitRows(true);
                        System.out.println("当前sheet名称:" + targetSheet.getName());
                        System.out.println("当前sheet索引:" + targetSheet.getIndex());
                        // 隐藏所有其他工作表
                        for (int j = 0; j < wb1.getWorksheets().getCount(); j++) {
                            if (j != targetSheetIndex) {
                                wb1.getWorksheets().get(j).setVisible(false);
                            }
                        }
                        // 设置活动工作表为目标工作表
                        wb1.getWorksheets().setActiveSheetIndex(targetSheetIndex);
                        // 创建PDF保存选项
                        com.aspose.cells.PdfSaveOptions pdfSaveOptions = new com.aspose.cells.PdfSaveOptions();
                        pdfSaveOptions.setCompliance(com.aspose.cells.PdfCompliance.PDF_A_1_B);
                        // 创建临时字节输出流
                        ByteArrayOutputStream baosm = new ByteArrayOutputStream();
                        // 将新的Workbook保存为PDF到临时流
                        //   newWorkbook.save(baos, com.aspose.cells.SaveFormat.PDF);
                        wb1.save(baosm, pdfSaveOptions);
                        // 将PDF添加到ZIP文件
                        ZipEntry entry2 = new ZipEntry(fna + adir +"/"+pdf08Path);
                        zos.putNextEntry(entry2);
                        zos.write(baosm.toByteArray());
                        //  zos.closeEntry();
                        // 直接将原始工作簿保存为PDF(只包含可见的工作表)
                        long now = System.currentTimeMillis();
                        //   System.out.println("pdf转换成功,共耗时:" + ((now - old) / 1000.0) + "秒");
                    } catch (Exception e) {
                        e.printStackTrace();
                        // 打印详细错误信息
                        System.err.println("转换失败:" + e.getMessage());
                        e.printStackTrace(System.err);
                    }
                }
                //把excel转为pdf
//
//                //08-卷内卷内目录的pdf
//                String pdf08Path= "08-卷内目录.pdf";
//                List<DocumentMaterialsVo> list3 = dsvs;
//                if(list3.size()>0) {
//                    pdfGenerateService.generateFileDirectoryPdf(pdf08Path, list3);
//                    ZipEntry zipEntry3 = new ZipEntry(fna + adir +"/"+pdf08Path);
//                    zos.putNextEntry(zipEntry3);
//
//                    // 读取PDF文件内容并写入ZIP
//                    try (FileInputStream fis = new FileInputStream(pdf08Path)) {
//                        byte[] buffer = new byte[1024];
//                        int len;
//                        while ((len = fis.read(buffer)) > 0) {
//                            zos.write(buffer, 0, len);
//                        }
//                    }
//                }
//
//
@@ -713,38 +873,40 @@
                    //在压缩包中添加文件夹
                    //得到文件名frontCompWithZore(4, dc.get)+
                    String fname = frontCompWithZore(4, dc.getFileNumber().intValue())+"-"+dc.getTitle()+"-"+frontCompWithZore(4,dc.getPageNumber().intValue())+"."
                            +dc.getUrl().split("\\.")[1];
                    if(dc.getStage().equals("01-申请材料"))
                        zos.putNextEntry(new ZipEntry(fna + adir + "/01-申请材料/"+fname));
                    else if(dc.getStage().equals("02-办案过程材料"))
                        zos.putNextEntry(new ZipEntry(fna + adir + "/02-办案过程材料/"+fname));
                    else if(dc.getStage().equals("03-结论性文件"))
                        zos.putNextEntry(new ZipEntry(fna + adir + "/03-结论性文件/"+fname));
                    else if(dc.getStage().equals("04-其他材料")) {
                        zos.putNextEntry(new ZipEntry(fna + adir + "/04-其他材料/" + fname));
                    }
                    else if(dc.getStage().equals("05-档案变更材料"))
                        zos.putNextEntry(new ZipEntry(fna + adir + "/05-档案变更材料/"+fname));
                    else if(dc.getStage().equals("06-业务数据"))
                        zos.putNextEntry(new ZipEntry(fna + adir + "/06-业务数据/"+fname));
                    else
                        zos.putNextEntry(new ZipEntry(fna + adir + "/"+fname));
                    String fname = "";
                    if(dc.getFileNumber()!=null&&dc.getPageNumber()!=null) {
                        fname = frontCompWithZore(4, dc.getFileNumber().intValue()) + "-" + dc.getTitle() + "-" + frontCompWithZore(4, dc.getPageNumber().intValue()) + "."
                                + dc.getUrl().split("\\.")[1];
                        if (dc.getStage().equals("01-申请材料"))
                            zos.putNextEntry(new ZipEntry(fna + adir + "/01-申请材料/" + fname));
                        else if (dc.getStage().equals("02-办案过程材料"))
                            zos.putNextEntry(new ZipEntry(fna + adir + "/02-办案过程材料/" + fname));
                        else if (dc.getStage().equals("03-结论性文件"))
                            zos.putNextEntry(new ZipEntry(fna + adir + "/03-结论性文件/" + fname));
                        else if (dc.getStage().equals("04-其他材料")) {
                            zos.putNextEntry(new ZipEntry(fna + adir + "/04-其他材料/" + fname));
                        } else if (dc.getStage().equals("05-档案变更材料"))
                            zos.putNextEntry(new ZipEntry(fna + adir + "/05-档案变更材料/" + fname));
                        else if (dc.getStage().equals("06-业务数据"))
                            zos.putNextEntry(new ZipEntry(fna + adir + "/06-业务数据/" + fname));
                        else
                            zos.putNextEntry(new ZipEntry(fna + adir + "/" + fname));
                    int len;
                    FileInputStream in = new FileInputStream(tempFile);
                    while ((len = in.read(buf)) != -1){
                        zos.write(buf, 0, len);
                    }
                    //  zos.putNextEntry(new ZipEntry("04-其他材料"));
                    zos.closeEntry();
                    in.close();
                }
            }
            //删除压缩包
                int len;
                FileInputStream in = new FileInputStream(tempFile);
                while ((len = in.read(buf)) != -1){
                    zos.write(buf, 0, len);
                }
                  //  zos.putNextEntry(new ZipEntry("04-其他材料"));
                zos.closeEntry();
                in.close();
            }
        }
        //删除压缩包
//            if(file.exists()){
//                file.delete();
//            }
@@ -958,20 +1120,41 @@
            {
                for(DocumentMaterialFileStyle documentMaterialFileStyle:dmfs)
                {
                    if(documentMaterialFileStyle.getFileStyle().equals("文字材料"))
                    if(documentMaterialFileStyle.getFileStyle()!=null&&documentMaterialFileStyle.getFileStyle().equals("文字材料"))
                        texPages = documentMaterialFileStyle.getCnt();
                    if(documentMaterialFileStyle.getFileStyle().equals("图样材料"))
                    if(documentMaterialFileStyle.getFileStyle()!=null&&documentMaterialFileStyle.getFileStyle().equals("图样材料"))
                        patPages = documentMaterialFileStyle.getCnt();
                    if(documentMaterialFileStyle.getFileStyle().equals("照片材料"))
                    if(documentMaterialFileStyle.getFileStyle()!=null&&documentMaterialFileStyle.getFileStyle().equals("照片材料"))
                        picPages = documentMaterialFileStyle.getCnt();
                }
            }
            String compName = "广州盈家档案管理有限公司";
            String li_person = "仇翀";
            String sh_person = "曾瑞莹";
            ArchiveRecords archiveRecords = iArchiveRecordsService.selectArchiveRecordsById(id);
            if(!StringUtils.isEmpty(archiveRecords.getLiPerson()))
                li_person = archiveRecords.getLiPerson();
            ArchiveProjectName tmp = new ArchiveProjectName();
            tmp.setName(archiveRecords.getProjectName());
            List<ArchiveProjectName> projectName = iArchiveProjectNameService.selectArchiveProjectNameList(tmp);
            if(!projectName.isEmpty())
            {
                if(!StringUtils.isEmpty(projectName.get(0).getCompanyName()))
                    compName = projectName.get(0).getCompanyName();
                if(!StringUtils.isEmpty(projectName.get(0).getCreatePerson()))
                    sh_person = projectName.get(0).getCreatePerson();
            }
            allPages = texPages + picPages + patPages;
            hs.put("pages", allPages);
            hs.put("patPages", patPages);
            hs.put("picPages", picPages);
            hs.put("texPages", texPages);
            hs.put("volumeNumber", aIV.getRecordId());
            hs.put("company", compName);
            hs.put("liPerson", li_person);
            hs.put("shPerson", sh_person);
            hs.put("time", cdt);
            if (!getLicense()) {
@@ -982,10 +1165,22 @@
            try {
                // 获取 Word 模板所在路径
                String filepath = "09-备考表.docx";
                // 通过 XWPFTemplate 编译文件并渲染数据到模板中
                XWPFTemplate template = XWPFTemplate.compile(filepath).render(hs
                       );
                ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
                org.springframework.core.io.Resource resource = resolver.getResource("classpath:09.docx");
//                String filepath = resource.getFile().getAbsolutePath();
//                // 通过 XWPFTemplate 编译文件并渲染数据到模板中
//                XWPFTemplate template = XWPFTemplate.compile(filepath).render(hs
//                       );
                InputStream inputStream = resource.getInputStream();
                    // 通过 XWPFTemplate 编译文件并渲染数据到模板中
                    XWPFTemplate template = XWPFTemplate.compile(inputStream).render(hs
                    );
                String renderedDocPath = "rendered_output.docx";
                File renderedFile = new File(renderedDocPath);
@@ -1017,7 +1212,7 @@
            com.aspose.words.Document doc = new com.aspose.words.Document("09-备考表.docx");
           // com.aspose.words.Document doc = new com.aspose.words.Document("09.docx");
@@ -1048,7 +1243,7 @@
            String recordId1 = aIV.getRecordId();
            byte[] imgr1 = barcodeService.generateBarcodeImage(recordId1);
            byte[] sedcode = pdfGenerateService.createQrCodeN(recordId1, 30, 30);
            byte[] sedcode = pdfGenerateService.createQrCodeN(recordId1, 200, 200);
            ExcelExp e3 = new ExcelExp("案卷封面数据",arsi, ArchiveInfoVo.class);
            ExcelExp e4 = new ExcelExp("案卷封面",  arsi, recordId1, imgr1,sedcode, ArchiveInfoVo.class);
            List<ExcelExp> mysheet1 = new ArrayList<ExcelExp>();
@@ -1140,7 +1335,7 @@
            //拿到卷内目录的excel
            List<DocumentMaterialsVoSmall> list2 = dsvs.stream().map(res -> new DocumentMaterialsVoSmall(res.getNum(), res.getDocumentNumber(),res.getCreator(),
                    res.getTitle(), res.getDate(), res.getPageNumber(), res.getRemarks())).collect(Collectors.toList());
                    res.getTitle(), res.getDate(), res.getPageNumberFormatted(), res.getRemarks())).collect(Collectors.toList());
            String recordId = dsvs.get(0).getRecordId();
            byte[] imgr = barcodeService.generateBarcodeImage(recordId);
@@ -1248,6 +1443,7 @@
                System.out.println(filePath);
                File tempFile = new File(filePath);
                //在压缩包中添加文件夹
                if(res) {
                    zos.putNextEntry(new ZipEntry("01-申请材料/"));