zss
2024-12-30 97bb7a8832281eafe0ef947ea095258d355e52f5
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java
@@ -41,6 +41,7 @@
import org.apache.logging.log4j.util.Strings;
import org.apache.poi.xwpf.usermodel.*;
import org.apache.poi.xwpf.usermodel.ParagraphAlignment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.ClassPathResource;
import org.springframework.stereotype.Service;
@@ -84,6 +85,9 @@
    @Resource
    private InsReportMapper insReportMapper;
    @Autowired
    ProcessReportMapper1 processReportMapper;
    @Value("${wordUrl}")
    private String wordUrl;
@@ -244,6 +248,10 @@
            put("seal2", Pictures.ofLocal(imgUrl + "/" + sealUrl).create());
        }}, finalUrl);
        wordToPdf(finalUrl, sealUrl);
        /*新增cnas7.8报告结果*/
        ProcessReport processReport = new ProcessReport();
        processReport.setInsReportCode(insReport.getCode());
        processReportMapper.insert(processReport);
        return insReportMapper.updateById(insReport);
    }
@@ -360,7 +368,9 @@
            if (insReportDto.getState() == 1) {
                List<InsReportDto1> insReportDto1s = insReportDto.getInsReportDto1s();
                for (InsReportDto1 insReportDto1 : insReportDto1s) {
                    wordUtils.generateReport(insReportDto.getId(), insReportDto1);
                    if (ObjectUtils.isNotEmpty(insReportDto1.getInsReportDto2s())){
                        wordUtils.generateReport(insReportDto.getId(), insReportDto1);
                    }
                }
            }
        } else {