From 010eb7b8cdcaaba77ec272234352f15aa028ca82 Mon Sep 17 00:00:00 2001
From: Crunchy <3114200645@qq.com>
Date: 星期二, 23 七月 2024 09:52:05 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java |   22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
index 07d458c..a4fd33f 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
+++ b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
@@ -143,7 +143,8 @@
              userId = map1.get("userId");
             insOrderPlanDTO.setUserId(userId.longValue());
         }
-        IPage<InsOrderPlanVO> insOrderPage = insSampleMapper.findInsSampleAndOrder(page, QueryWrappers.queryWrappers(insOrderPlanDTO), userId);
+        String sonLaboratory = insOrderPlanDTO.getSonLaboratory();//璇曢獙瀹�
+        IPage<InsOrderPlanVO> insOrderPage = insSampleMapper.findInsSampleAndOrder(page, QueryWrappers.queryWrappers(insOrderPlanDTO), userId,sonLaboratory);
         map.put("body", insOrderPage);
         return map;
     }
@@ -162,6 +163,7 @@
         return map;
     }
 
+    //璁ら浠诲姟
     @Override
     public boolean claimInsOrderPlan(InsOrderPlanDTO entity) {
         if (Objects.isNull(entity)) {
@@ -169,7 +171,7 @@
         }
         Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId(null);
         Integer userId = map1.get("userId");
-        InsSampleUser insSampleUser = new InsSampleUser(entity.getInsSampleId().intValue(), userId, 1);
+        InsSampleUser insSampleUser = new InsSampleUser(entity.getInsSampleId().intValue(), userId, 1,entity.getSonLaboratory());
         return insSampleUserMapper.insert(insSampleUser) > 0;
     }
 
@@ -418,7 +420,7 @@
             productVos = productVos.stream().sorted(Comparator.comparing(productVo -> productVo.getInsProduct().getInspectionItemClass())).collect(Collectors.toList());
         }
         else {
-            //鐢靛姏--鐑惊鐜�
+            //鐢靛姏--鐑惊鐜拰娓╁崌璇曢獙
             List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery()
                     .eq(InsProduct::getInsSampleId, sampleId)
                     .eq(InsProduct::getInspectionItem, inspectionItem));
@@ -545,7 +547,7 @@
                         .eq(AuxiliaryOutputWorkingHours::getInspectionItemSubclass, insProduct.getInspectionItemSubclass())
                         .eq(AuxiliaryOutputWorkingHours::getOrderNo, insOrder.getEntrustCode()));
                 if (count == 0 && ObjectUtils.isNotEmpty(insProduct.getManHour())) {
-                    //娣诲姞姣忎釜浜虹殑浜ч噺宸ユ椂
+                    //娣诲姞姣忎釜浜虹殑浜ч噺宸ユ椂,瑕佸垽鏂綋鍓嶆椂闂存槸鍚︽槸杩欎釜浜虹殑鎺掔彮鏃堕棿,濡傛灉涓嶆槸鍒欐槸鍔犵彮
                     AuxiliaryOutputWorkingHours auxiliaryOutputWorkingHours = new AuxiliaryOutputWorkingHours();
                     auxiliaryOutputWorkingHours.setInspectionItem(insProduct.getInspectionItem());//妫�娴嬬埗椤�
                     auxiliaryOutputWorkingHours.setInspectionItemSubclass(insProduct.getInspectionItemSubclass());//妫�娴嬪瓙椤�
@@ -608,12 +610,14 @@
         });
     }
 
+    //浜ゆ帴
     @Override
-    public int upPlanUser(Integer userId, Integer orderId) {
+    public int upPlanUser(Integer userId, Integer orderId,String sonLaboratory) {
         InsSampleUser insSampleUser = new InsSampleUser();
         insSampleUser.setUserId(userId);
         insSampleUser.setInsSampleId(orderId);
         insSampleUser.setState(0);
+        insSampleUser.setSonLaboratory(sonLaboratory);
         return insSampleUserMapper.insert(insSampleUser);
     }
 
@@ -3455,7 +3459,13 @@
         info.setViewStatus(false);
         info.setJumpPath("b1-inspect-order-plan");
         informationNotificationService.addInformationNotification(info);
-        upPlanUser(verifyUser, orderId);
+        //澶嶆牳浜�--妫�楠屽崟鐩稿叧璐熻矗浜�
+        InsSampleUser insSampleUser = new InsSampleUser();
+        insSampleUser.setUserId(verifyUser);
+        insSampleUser.setInsSampleId(orderId);
+        insSampleUser.setState(0);
+        insSampleUser.setSonLaboratory(laboratory);
+         insSampleUserMapper.insert(insSampleUser);
         /*鏍¢獙涓�涓媟esult琛�*/
         CompletableFuture.supplyAsync(() -> {
             List<Integer> ips = insProducts.stream().map(InsProduct::getId).distinct().collect(Collectors.toList());

--
Gitblit v1.9.3