From c65ab218b14e87489f1594b2d932f7bd54b3ba11 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期五, 17 十月 2025 13:34:19 +0800
Subject: [PATCH] 数采调整

---
 inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java |   61 +++++++++++++++---------------
 1 files changed, 31 insertions(+), 30 deletions(-)

diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java
index 829cd4c..0215407 100644
--- a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java
@@ -42,9 +42,11 @@
 import com.ruoyi.inspect.mapper.InsOrderMapper;
 import com.ruoyi.inspect.mapper.InsProductMapper;
 import com.ruoyi.inspect.mapper.InsSampleMapper;
+import com.ruoyi.inspect.mapper.InsUnqualifiedHandlerMapper;
 import com.ruoyi.inspect.pojo.IfsSplitOrderRecord;
 import com.ruoyi.inspect.pojo.InsOrder;
 import com.ruoyi.inspect.pojo.InsReport;
+import com.ruoyi.inspect.pojo.InsUnqualifiedHandler;
 import com.ruoyi.inspect.service.IfsSplitOrderRecordService;
 import com.ruoyi.inspect.service.InsOrderService;
 import com.ruoyi.inspect.service.InsReportService;
@@ -100,6 +102,8 @@
     private IfsApiUtils ifsApiUtils;
 
     private IfsSplitOrderRecordService ifsSplitOrderRecordService;
+
+    private InsUnqualifiedHandlerMapper insUnqualifiedHandlerMapper;
 
 
     @Override
@@ -172,31 +176,31 @@
                 .set(IfsInventoryQuantity::getIsInspect, 1)
                 .set(IfsInventoryQuantity::getDeclareDate, LocalDateTime.now())
         );
-//        threadPoolTaskExecutor.execute(() -> {
-//            List<IfsInventoryQuantity> quantityList = ifsInventoryQuantityMapper.selectList(Wrappers.<IfsInventoryQuantity>lambdaQuery()
-//                    .in(IfsInventoryQuantity::getId, ids));
-//            // 浼佷笟寰俊閫氱煡
-//            String message = "";
-//            message += "鏂板鎶ユ閫氱煡";
-//            for (IfsInventoryQuantity inventoryQuantity : quantityList) {
-//                message += "\n鎵规鍙�: " + inventoryQuantity.getUpdateBatchNo();
-//                message += "\n闆朵欢鎻忚堪: " + inventoryQuantity.getPartDesc();
-//                message += "\n鎶佃揪鏁伴噺: " + inventoryQuantity.getQtyArrived().stripTrailingZeros().toPlainString() + inventoryQuantity.getBuyUnitMeas();
-//
-//                // 鍒ゆ柇鏈夋病鏈夊埌20鍚�. 鎴栬�呰兘鍚﹀厤妫�
-//                int result = notificationRawOrder(inventoryQuantity.getId());
-//                switch (result) {
-//                    case 1:
-//                        message += "\n褰撳墠鏍峰搧宸叉楠岃繃, 鍙互鍏嶆";
-//                        break;
-//                    case 2:
-//                        message += "\n褰撳墠鏍峰搧宸茶秴杩�20鍚�";
-//                        break;
-//                }
-//                message += "\n";
-//            }
-//            WxCpUtils.informWebHook(wechatProperty.getExaminingUrl(), message);
-//        });
+        threadPoolTaskExecutor.execute(() -> {
+            List<IfsInventoryQuantity> quantityList = ifsInventoryQuantityMapper.selectList(Wrappers.<IfsInventoryQuantity>lambdaQuery()
+                    .in(IfsInventoryQuantity::getId, ids));
+            // 浼佷笟寰俊閫氱煡
+            String message = "";
+            message += "鏂板鎶ユ閫氱煡";
+            for (IfsInventoryQuantity inventoryQuantity : quantityList) {
+                message += "\n鎵规鍙�: " + inventoryQuantity.getUpdateBatchNo();
+                message += "\n闆朵欢鎻忚堪: " + inventoryQuantity.getPartDesc();
+                message += "\n鎶佃揪鏁伴噺: " + inventoryQuantity.getQtyArrived().stripTrailingZeros().toPlainString() + inventoryQuantity.getBuyUnitMeas();
+
+                // 鍒ゆ柇鏈夋病鏈夊埌20鍚�. 鎴栬�呰兘鍚﹀厤妫�
+                int result = notificationRawOrder(inventoryQuantity.getId());
+                switch (result) {
+                    case 1:
+                        message += "\n褰撳墠鏍峰搧宸叉楠岃繃, 鍙互鍏嶆";
+                        break;
+                    case 2:
+                        message += "\n褰撳墠鏍峰搧宸茶秴杩�20鍚�";
+                        break;
+                }
+                message += "\n";
+            }
+            WxCpUtils.informWebHook(wechatProperty.getExaminingUrl(), message);
+        });
         return 1;
     }
 
@@ -597,16 +601,13 @@
         if (!ifsInventoryQuantity.getInspectStatus().equals(2)) {
             throw new ErrorException("涓嶅悎鏍肩殑鍘熸潗鏂欐墠鑳借姝ユ斁琛�");
         }
-
         // todo:闇�瑕佸垽鏂璷a娴佺▼鏄惁鏄姝ユ斁琛�
         String toLocation = insOrderService.moveRawMaterial(ifsInventoryQuantity);
 
-        ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>()
+        return ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>()
                 .set(IfsInventoryQuantity::getInspectStatus, 4)
                 .set(IfsInventoryQuantity::getToLocation, toLocation)
-                .eq(IfsInventoryQuantity::getId, ifsInventoryId));
-
-        return true;
+                .eq(IfsInventoryQuantity::getId, ifsInventoryId))>0;
     }
 
     /**

--
Gitblit v1.9.3