From f53654f10cd256eecaa91f44030d1983448ac677 Mon Sep 17 00:00:00 2001
From: zhuo <2089219845@qq.com>
Date: 星期五, 25 四月 2025 21:40:58 +0800
Subject: [PATCH] 修复复核的时候提交人错误问题

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

diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java
index bbce5a1..acbe28a 100644
--- a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java
@@ -499,13 +499,15 @@
                     }
                 }
 
-                //鏌ヨ妫�楠屽崟淇℃伅
                 // 娣诲姞宸ユ椂
-                InsProduct finalInsProduct = insProductMapper.selectById(product.getId());
-                threadPoolTaskExecutor.execute(() -> {
-                    InsOrder insOrder = insOrderMapper.selectById(insSample.getInsOrderId());
-                    this.addAuxiliary(userId, finalInsProduct, insOrder);
-                });
+                // 鍒ゆ柇鏄惁鍙槸鍙備笌璁$畻鍊�, 鍙備笌璁$畻鍊煎疄闄呮病鏈夊~鍐�
+                if (StringUtils.isNotBlank(newResult.getInsValue()) && !newResult.getInsValue().equals("[]")) {
+                    InsProduct finalInsProduct = insProductMapper.selectById(product.getId());
+                    threadPoolTaskExecutor.execute(() -> {
+                        InsOrder insOrder = insOrderMapper.selectById(insSample.getInsOrderId());
+                        this.addAuxiliary(userId, finalInsProduct, insOrder);
+                    });
+                }
 
             }
         });
@@ -936,7 +938,7 @@
             // 鏌ヨifs淇℃伅鑾峰彇鑾峰彇鍓�10涓緵搴斿晢涓�鏍风殑, 妫�楠岄」涓�鏍蜂俊鎭�
             threadPoolTaskExecutor.execute(() -> {
                 // 娣诲姞鍒嗘瀽鏁版嵁
-                addAnalysis(productList, ifsInventoryQuantity, order, userName);
+                addAnalysis(productList, ifsInventoryQuantity, order, sendUserAccount);
             });
 
 
@@ -964,13 +966,13 @@
      * @param ifsInventoryQuantity
      * @param order
      */
-    private void addAnalysis(List<InsProduct> productList, IfsInventoryQuantity ifsInventoryQuantity, InsOrder order, String userName) {
+    private void addAnalysis(List<InsProduct> productList, IfsInventoryQuantity ifsInventoryQuantity, InsOrder order, String sendUserAccount) {
         for (InsProduct insProduct : productList) {
             // 鍒ゆ柇鏄惁鏄暟鍊肩被鍨�
             if (insProduct.getInspectionValueType().equals("1") && insProduct.getInsResult().equals(1)) {
                 List<InsProductDeviationWarningDetail> insProductAnalysisDtoList = insProductMapper.selectAnalysis(insProduct, ifsInventoryQuantity.getSupplierName());
 
-                if (insProductAnalysisDtoList.size() < 5) {
+                if (insProductAnalysisDtoList.size() < 10) {
                     continue;
                 }
 
@@ -1031,10 +1033,10 @@
                             message += "\n妫�楠岄」: " + insProduct.getInspectionItem() + insProduct.getInspectionItemSubclass();
                             message += "\n鍋忓樊瓒呰繃浜� 10%";
                             // 鍙戦�佺粰鎻愪氦浜�
-                            WxCpUtils.inform(userName, message, null);
-
-                            // todo: 鍙戦�佺粰妫�娴嬩腑蹇冧富浠�(鍥哄畾姝�)
-                            WxCpUtils.inform("ZT-004704", message, null);
+//                            WxCpUtils.inform(sendUserAccount, message, null);
+//
+//                            // todo: 鍙戦�佺粰妫�娴嬩腑蹇冧富浠�(鍥哄畾姝�)
+//                            WxCpUtils.inform("ZT-004704", message, null);
                         } catch (Exception e) {
                             e.printStackTrace();
                             log.error("鍋忓樊棰勮浼佷笟寰俊閫氱煡鎶ラ敊");

--
Gitblit v1.9.3