From f3f2c64ad502c054a996cff6ec9a0a091f54e8a8 Mon Sep 17 00:00:00 2001
From: Junjie <xjj@123>
Date: 星期日, 17 八月 2025 10:36:09 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java |   22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
index 98cad51..6edd73e 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -1650,6 +1650,7 @@
                 if (crnProtocol.getTaskNo() == 9999) {
                     // 鍫嗗灈鏈哄浣�
                     crnThread.setResetFlag(true);
+                    redisUtil.set(RedisConstantType.CRN_MOVE_LOCK + crn.getId(), "lock", 8);//闃叉鍥炲師鐐瑰悗涓嬪彂鎸囦护杩囧揩
                     continue;
                 }
 
@@ -2142,17 +2143,26 @@
 
                     if (!wrkDetls.isEmpty()) {
                         WrkDetl wrkDetl = wrkDetls.get(0);
+                        double anfme = 0D;
+                        double weight = 0D;
                         for (WrkDetl detl : wrkDetls) {
-                            double anfme = wrkDetl.getAnfme() + detl.getAnfme();
-                            double weight = wrkDetl.getWeight() + detl.getWeight();
-                            double stockNum = wrkDetl.getStockNum() + detl.getStockNum();
-                            double stockNum2 = wrkDetl.getStockNum2() + detl.getStockNum2();
+                            anfme += detl.getAnfme();
+                            weight += detl.getWeight();
                             wrkDetl.setAnfme(anfme);
                             wrkDetl.setWeight(weight);
-                            wrkDetl.setStockNum(stockNum);
-                            wrkDetl.setStockNum2(stockNum2);
                         }
 
+                        List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>()
+                                .eq("loc_no", wrkMast.getSourceLocNo()));
+                        double totalAnfme = 0D;
+                        double totalWeight = 0D;
+                        for (LocDetl locDetl : locDetls) {
+                            totalAnfme += locDetl.getAnfme();
+                            totalWeight += locDetl.getWeight();
+                        }
+                        wrkDetl.setStockNum(totalAnfme);
+                        wrkDetl.setStockNum2(totalWeight);
+
                         ledCommand.getMatDtos().add(new MatDto(
                                 wrkDetl.getMatnr()
                                 , wrkDetl.getMaktx()

--
Gitblit v1.9.1