From 2eb261814a2407b3481dfe7b995c58d413a18cff Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 20 十月 2026 16:28:17 +0800
Subject: [PATCH] feat(quality): 质量监督/质量监控流程对齐程序文件并完善导入

---
 cnas-process/src/main/java/com/ruoyi/process/service/QualityMonitorInspectionEvaluationService.java |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/cnas-process/src/main/java/com/ruoyi/process/service/QualityMonitorInspectionEvaluationService.java b/cnas-process/src/main/java/com/ruoyi/process/service/QualityMonitorInspectionEvaluationService.java
index f94a4e1..3b64429 100644
--- a/cnas-process/src/main/java/com/ruoyi/process/service/QualityMonitorInspectionEvaluationService.java
+++ b/cnas-process/src/main/java/com/ruoyi/process/service/QualityMonitorInspectionEvaluationService.java
@@ -61,6 +61,14 @@
             evaluation.setSampleName(detail.getSampleName());
             evaluation.setSampleSpec(detail.getSampleSpec());
         }
+        // 璇勪环璁板綍閲岀殑鈥滅洃鐫e憳鈥濆氨鏄鍒掍腑鎸囧畾鐨勨�滆瘎浠蜂汉鈥濓紝鏈繚瀛樿繃璇勪环鏃剁洿鎺ュ弽鏄捐瘎浠蜂汉
+        if (evaluation.getSupervisorUserId() == null) {
+            evaluation.setSupervisorUserId(detail.getEvaluatorUserId());
+        }
+        // 鍘嗗彶璇勪环璁板綍鍙兘娌℃湁淇濆瓨琚洃鐫d汉鍛橈紝鍥為��鍒拌鍒掓槑缁嗕腑鐨勬娴嬪憳
+        if (evaluation.getInspectorUserId() == null) {
+            evaluation.setInspectorUserId(detail.getInspectorUserId());
+        }
         List<QualityMonitorEvaluateResult> rows = evaluation.getDetailsEvaluateId() == null
                 ? List.of() : resultMapper.selectList(Wrappers.<QualityMonitorEvaluateResult>lambdaQuery()
                                                       .eq(QualityMonitorEvaluateResult::getDetailsEvaluateId, evaluation.getDetailsEvaluateId())
@@ -85,6 +93,15 @@
         }
         evaluation.setResultRows(rows);
         evaluation.setInspectionTaskState(task == null ? null : task.getInsState());
+        // 鐩戠潱鍛樸�佹娴嬪憳鍙兘涓嶅湪鍓嶇浜哄憳涓嬫媺鍒楄〃涓紙瑙掕壊鎴栫姸鎬佽杩囨护锛夛紝鍥炰紶鍚嶇О淇濊瘉鑳芥甯稿弽鏄�
+        if (evaluation.getSupervisorUserId() != null) {
+            var supervisor = userMapper.selectById(evaluation.getSupervisorUserId());
+            if (supervisor != null) evaluation.setSupervisorName(supervisor.getName());
+        }
+        if (evaluation.getInspectorUserId() != null) {
+            var inspector = userMapper.selectById(evaluation.getInspectorUserId());
+            if (inspector != null) evaluation.setInspectorName(inspector.getName());
+        }
         if (Integer.valueOf(1).equals(evaluation.getIsFinish())) {
             evaluation.setEvaluationEditReason("璇勪环宸叉壒鍑嗗綊妗o紝鍙兘鏌ョ湅");
         } else if (task == null) {
@@ -117,9 +134,8 @@
             throw new ErrorException("鍙湁鎸囧畾璇勪环浜哄彲浠ュ~鍐欒瘎浠�");
         if (input.getSupervisorUserId() == null
                 || input.getSupervisorUserId().equals(detail.getInspectorUserId())
-                || input.getSupervisorUserId().equals(detail.getEvaluatorUserId())
                 || userMapper.selectById(input.getSupervisorUserId()) == null)
-            throw new ErrorException("璇烽�夋嫨涓庢娴嬪憳銆佽瘎浠蜂汉涓嶅悓鐨勭洃鐫e憳");
+            throw new ErrorException("璇烽�夋嫨鐩戠潱鍛橈紙榛樿涓鸿鍒掕瘎浠蜂汉锛屼笉鑳戒笌妫�娴嬪憳鐩稿悓锛�");
         Long pendingCount = stateMapper.selectCount(Wrappers.<InsOrderState>lambdaQuery()
                 .eq(InsOrderState::getInsOrderId, task.getId()).ne(InsOrderState::getInsState, 5));
         if (pendingCount > 0) throw new ErrorException("鍘熷璁板綍澶嶆牳閫氳繃鍚庢墠鑳借瘎浠�");

--
Gitblit v1.9.3