From c17a0d27b6a2e9e0ebda4ee584b6b2fdf4e323ca Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期三, 05 十一月 2025 12:46:14 +0800
Subject: [PATCH] 数采调整

---
 inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java |   80 +++++++++++++++++++--------------------
 1 files changed, 39 insertions(+), 41 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 7f9701e..e7df59d 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
@@ -11,6 +11,7 @@
 import com.alibaba.fastjson.JSONObject;
 import com.aspose.words.License;
 import com.aspose.words.SaveFormat;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
@@ -168,9 +169,7 @@
     public IPage<InsOrderPlanVO> selectInsOrderPlanList(Page page, InsOrderPlanDTO insOrderPlanDTO) {
         // todo: 浠呯湅鑷繁鎴栬�呭疄楠屽
         //鑾峰彇褰撳墠浜烘墍灞炲疄楠屽id
-
         String laboratory = null;
-
         String userName = null;
         Integer userId = null;
         if (ObjectUtil.isNotEmpty(insOrderPlanDTO.getUserId())) {
@@ -919,24 +918,23 @@
         InsSample insSample = insSampleMapper.selectOne(Wrappers.<InsSample>lambdaQuery()
                 .eq(InsSample::getInsOrderId, orderId)
                 .last("limit 1"));
-//        threadPoolTaskExecutor.execute(() -> {
-//            String message = "";
-//            message += "鑰愪笣绯荤粺妫�楠屼换鍔″鏍搁�氱煡";
-//            message += "\n鎻愪氦浜�: " + userName;
-//            message += "\n濮旀墭缂栧彿: " + order.getEntrustCode();
-//            message += "\n鏍峰搧鍚嶇О: " + insSample.getModel();
-//            message += "\n瑙勬牸鍨嬪彿: " + order.getPartDetail();
-//            if (ifsInventoryQuantity != null) {
-//                message += "\n鎵规鍙�: " + ifsInventoryQuantity.getUpdateBatchNo();
-//            }
-//            //鍙戦�佷紒涓氬井淇℃秷鎭�氱煡  鎻愪氦澶嶆牳
-//            try {
-//                WxCpUtils.inform(sendUserAccount, message, null);
-//            } catch (Exception e) {
-//                throw new RuntimeException(e);
-//            }
-//        });
-
+        threadPoolTaskExecutor.execute(() -> {
+            String message = "";
+            message += "鑰愪笣绯荤粺妫�楠屼换鍔″鏍搁�氱煡";
+            message += "\n鎻愪氦浜�: " + userName;
+            message += "\n濮旀墭缂栧彿: " + order.getEntrustCode();
+            message += "\n鏍峰搧鍚嶇О: " + insSample.getModel();
+            message += "\n瑙勬牸鍨嬪彿: " + order.getPartDetail();
+            if (ifsInventoryQuantity != null) {
+                message += "\n鎵规鍙�: " + ifsInventoryQuantity.getUpdateBatchNo();
+            }
+            //鍙戦�佷紒涓氬井淇℃秷鎭�氱煡  鎻愪氦澶嶆牳
+            try {
+                WxCpUtils.inform(sendUserAccount, message, null);
+            } catch (Exception e) {
+                throw new RuntimeException(e);
+            }
+        });
         // 14.ifs绉诲簱(鍘熸潗鏂欓渶瑕佽繘琛岀Щ搴撴搷浣�) --> 鏈�鍚庢墽琛�,鍥犱负澶辫触鏃犳硶鍥炴粴
         if (ifsInventoryQuantity != null) {
             // 鐧昏妫�楠岀粨鏋�
@@ -950,8 +948,6 @@
                 // 娣诲姞鍒嗘瀽鏁版嵁
                 addAnalysis(productList, ifsInventoryQuantity, order, sendUserAccount);
             });
-
-
         } else {
             // 淇敼鎴愬搧鐘舵��
             // 鍒ゆ柇鏄惁鏈変笉鍚堟牸
@@ -966,7 +962,6 @@
                         .set(InsOrder::getInsResult, 0));
             }
         }
-
         return 1;
     }
 
@@ -1975,26 +1970,29 @@
 
         //璁剧疆鏍峰紡
         TableStyle tableStyle = new TableStyle();
-        for (int i = 1; i <= max; i++) {
-            // 鏍规嵁鍑忓帇閭g粨鏋滀釜鏁颁慨鏀归暱搴�
-            switch (i) {
-                case 1:
-                    tableStyle.setColWidths(new int[]{650, 2900, 850, 2300, 2100, 1200});
-                    break;
-                case 2:
-                    tableStyle.setColWidths(new int[]{650, 2700, 850, 2200, 1200, 1200, 1200});
-                    break;
-                case 3:
-                    tableStyle.setColWidths(new int[]{650, 2700, 850, 1600, 1000, 1000, 1000, 1200});
-                    break;
-                case 4:
-                    tableStyle.setColWidths(new int[]{650, 2400, 850, 1500, 850, 850, 850, 850, 1200});
-                    break;
-                case 5:
-                    tableStyle.setColWidths(new int[]{650, 2200, 850, 1350, 750, 750, 750, 750, 750, 1200});
-                    break;
+        if(max<=5){
+            for (int i = 1; i <= max; i++) {
+                // 鏍规嵁妫�楠岀粨鏋滀釜鏁颁慨鏀归暱搴�
+                switch (i) {
+                    case 1:
+                        tableStyle.setColWidths(new int[]{650, 2900, 850, 2300, 2100, 1200});
+                        break;
+                    case 2:
+                        tableStyle.setColWidths(new int[]{650, 2700, 850, 2200, 1200, 1200, 1200});
+                        break;
+                    case 3:
+                        tableStyle.setColWidths(new int[]{650, 2700, 850, 1600, 1000, 1000, 1000, 1200});
+                        break;
+                    case 4:
+                        tableStyle.setColWidths(new int[]{650, 2400, 850, 1500, 850, 850, 850, 850, 1200});
+                        break;
+                    case 5:
+                        tableStyle.setColWidths(new int[]{650, 2200, 850, 1350, 750, 750, 750, 750, 750, 1200});
+                        break;
+                }
             }
         }
+
         tableStyle.setWidth("10000");
         tableStyle.setAlign(TableRowAlign.CENTER);
         BorderStyle borderStyle = new BorderStyle();

--
Gitblit v1.9.3