From 51786b723d0a91d11476776d9ce50af7994dc4bd Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期三, 23 九月 2026 15:58:53 +0800
Subject: [PATCH] feat(inspect): 完善检验订单状态管理和样品接收流程

---
 inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java
index bfb7516..5333df2 100644
--- a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java
@@ -6,6 +6,7 @@
 import com.alibaba.excel.ExcelWriter;
 import com.alibaba.excel.write.metadata.WriteSheet;
 import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
+import com.aspose.words.FontSettings;
 import com.aspose.words.License;
 import com.aspose.words.SaveFormat;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -87,6 +88,12 @@
 @Slf4j
 public class InsReportServiceImpl extends ServiceImpl<InsReportMapper, InsReport>
         implements InsReportService {
+    static {
+        // Linux 鏈嶅姟鍣ㄧ己灏戜腑鏂囧瓧浣擄紝鎶ュ憡杞� PDF 鏃朵腑鏂囦細鍙樻垚鏂瑰潡锛涘皢妯℃澘瀛椾綋鏄犲皠鍒� Noto CJK 鍏滃簳銆�
+        FontSettings.addFontSubstitutes("瀹嬩綋", "Noto Serif CJK SC");
+        FontSettings.addFontSubstitutes("榛戜綋", "Noto Sans CJK SC");
+    }
+
     private static final int DETECTION_REPORT = 0;
     private static final int INSPECTION_REPORT = 1;
 
@@ -307,6 +314,9 @@
             if (userId == null) {
                 throw new ErrorException("缂哄皯鎵瑰噯浜�");
             }
+            if (Objects.equals(insReport.getExamineUserId(), userId)) {
+                throw new ErrorException("瀹℃牳浜哄拰鎵瑰噯浜轰笉鑳戒负鍚屼竴浜猴紝璇烽噸鏂伴�夋嫨鎵瑰噯浜�");
+            }
         }
         insReport.setRatifyUserId(userId);//鎵瑰噯浜�
         //鑾峰彇瀹℃牳浜虹殑绛惧悕鍦板潃
@@ -389,6 +399,9 @@
     @Transactional(rollbackFor = Exception.class)
     public int ratifyReport(Integer id, Integer isRatify, String ratifyTell) {
         InsReport insReport = insReportMapper.selectById(id);
+        if (Objects.equals(insReport.getExamineUserId(), SecurityUtils.getUserId().intValue())) {
+            throw new ErrorException("瀹℃牳浜哄拰鎵瑰噯浜轰笉鑳戒负鍚屼竴浜猴紝璇烽噸鏂伴�夋嫨鎵瑰噯浜�");
+        }
         insReport.setIsRatify(isRatify);
         if (ObjectUtils.isNotEmpty(ratifyTell)) {
             insReport.setRatifyTell(ratifyTell);

--
Gitblit v1.9.3