#
Junjie
2025-08-18 e22952465f1ab08a58f84c2f01e7d4e89b6bd61e
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -749,7 +749,7 @@
//            }
            //堆垛机回原点任务中
            Object object = redisUtil.get(RedisConstantType.CRN_MOVE_LOCK);
            Object object = redisUtil.get(RedisConstantType.CRN_MOVE_LOCK + crn.getId());
            if (object != null) {
                continue;
            }
@@ -821,7 +821,7 @@
                    continue;
                }
                Object object = redisUtil.get(RedisConstantType.CRN_MOVE_LOCK);
                Object object = redisUtil.get(RedisConstantType.CRN_MOVE_LOCK + crn.getId());
                if (object != null) {
                    continue;
                }
@@ -893,7 +893,7 @@
                    continue;
                }
                Object object = redisUtil.get(RedisConstantType.CRN_MOVE_LOCK);
                Object object = redisUtil.get(RedisConstantType.CRN_MOVE_LOCK + crn.getId());
                if (object != null) {
                    continue;
                }
@@ -1650,6 +1650,7 @@
                if (crnProtocol.getTaskNo() == 9999) {
                    // 堆垛机复位
                    crnThread.setResetFlag(true);
                    redisUtil.set(RedisConstantType.CRN_MOVE_LOCK + crn.getId(), "lock", 8);//防止回原点后下发指令过快
                    continue;
                }
@@ -2142,22 +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();
                            if (wrkDetl.getStockNum() != null) {
                                double stockNum = wrkDetl.getStockNum() + detl.getStockNum();
                                wrkDetl.setStockNum(stockNum);
                            }
                            if (wrkDetl.getStockNum2() != null) {
                                double stockNum2 = wrkDetl.getStockNum2() + detl.getStockNum2();
                                wrkDetl.setStockNum2(stockNum2);
                            }
                            anfme += detl.getAnfme();
                            weight += detl.getWeight();
                            wrkDetl.setAnfme(anfme);
                            wrkDetl.setWeight(weight);
                        }
                        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()