From 4497f5b1e322eba5ec519ebc1955317ed656aa8e Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 26 十二月 2024 14:31:15 +0800
Subject: [PATCH] Merge branch 'master' into cnas
---
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java
index 833dce9..ca5212b 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java
+++ b/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,11 +248,10 @@
put("seal2", Pictures.ofLocal(imgUrl + "/" + sealUrl).create());
}}, finalUrl);
wordToPdf(finalUrl, sealUrl);
-
- InsOrder insOrder = new InsOrder();
- insOrder.setId(insReportMapper.selectById(id).getInsOrderId());
- insOrder.setState(4);
- insOrderMapper.updateById(insOrder);
+ /*鏂板cnas7.8鎶ュ憡缁撴灉*/
+ ProcessReport processReport = new ProcessReport();
+ processReport.setInsReportCode(insReport.getCode());
+ processReportMapper.insert(processReport);
return insReportMapper.updateById(insReport);
}
@@ -365,10 +368,10 @@
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 {
- //濡傛灉涓嶇敓鎴愬氨涓�鐩存寕鐫�
}
} else {
throw new ErrorException("璇ヨ鍗曡繕鏈粨鏉熻瘯楠�,鏃犳硶鐢熸垚鎶ュ憡!");
--
Gitblit v1.9.3