cnas-process/src/main/java/com/ruoyi/process/service/impl/InspectionOrderServiceImpl.java
@@ -146,14 +146,7 @@
        /*新增7.8报告结果*/
        ProcessReport processReport = new ProcessReport();
        processReport.setInspectionOrderId(inspectionOrder.getInsOrderId());
        processReport.setInsReportCode(inspectionOrder.getEntrustCode());//报告编号=委托编号
        //页数
        try {
            com.aspose.words.Document doc = new com.aspose.words.Document(path);
            processReport.setPages(doc.getPageCount()+"");
        } catch (Exception e) {
        }
        processReport.setNumber("1");//发送份数默认1
        processReport.setInsReportCode(insReport.getCode());//报告编号使用正式报告编号
        processReport.setSend(inspectionOrder.getCommissionUnit());//发往何处=委托单位
        processReport.setMethod(inspectionOrder.getSend()==1?"自取":"其他");//发送方式
        processReport.setSendTime(insReport.getRatifyTime().toLocalDate());//发送日期
@@ -247,9 +240,17 @@
        inspectionOrderDetailService.saveBatch(InspectionOrder.getOrderDetailList());
        //修改7.9报告结果
        ProcessReport processReport = processReportService.getOne(Wrappers.<ProcessReport>lambdaQuery().eq(ProcessReport::getInspectionOrderId, InspectionOrder.getInspectionOrderId()));
        processReport.setInsReportCode(InspectionOrder.getEntrustCode());//报告编号=委托编号
        processReportService.updateById(processReport);
        ProcessReport processReport = processReportService.getOne(Wrappers.<ProcessReport>lambdaQuery()
                .eq(ProcessReport::getInspectionOrderId, InspectionOrder.getInsOrderId())
                .last("limit 1"));
        InsReport insReport = insReportService.getOne(Wrappers.<InsReport>lambdaQuery()
                .eq(InsReport::getInsOrderId, InspectionOrder.getInsOrderId())
                .orderByDesc(InsReport::getId)
                .last("limit 1"));
        if (processReport != null && insReport != null) {
            processReport.setInsReportCode(insReport.getCode());//报告编号使用正式报告编号
            processReportService.updateById(processReport);
        }
        return true;
    }