zss
2024-10-30 d8ba960d180c0ad08b7dfb5a17e7ad351ca2eb62
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java
@@ -101,9 +101,6 @@
    private InsOrderMapper insOrderMapper;
    @Resource
    private StandardMethodListMapper standardMethodListMapper;
    @Resource
    private InsOrderStateMapper insOrderStateMapper;
    @Resource
@@ -491,25 +488,10 @@
            os = new FileOutputStream(file);
            //要转换的word文件
            com.aspose.words.Document doc = new com.aspose.words.Document(wordPath);
            TableCollection tables = doc.getFirstSection().getBody().getTables();
            for (Table table : tables) {
                RowCollection rows = table.getRows();
                table.setAllowAutoFit(false);
                for (Row row : rows) {
                    CellCollection cells = row.getCells();
                    for (Cell cell : cells) {
                        CellFormat cellFormat = cell.getCellFormat();
                        cellFormat.setFitText(false);  //设置自适应关闭
                        cellFormat.setWrapText(true);  // 设置自动换行
                    }
                }
            }
            doc.updateFields();
            doc.save(os, SaveFormat.PDF);
            //添加骑缝章
            stamperCheckMarkPDF(pdfPath.replace(".pdf", "-1.pdf"), pdfPath, imgUrl + "/" + sealUrl);
        } catch (Exception e) {
            e.printStackTrace();