From e97dab13219385366ea6c5001e1352bd8eb00e05 Mon Sep 17 00:00:00 2001 From: Junjie <xjj@123> Date: 星期六, 16 八月 2025 14:08:18 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 26 +++++++++++++++----------- 1 files changed, 15 insertions(+), 11 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 61d6d09..de0d16d 100644 --- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java @@ -2142,22 +2142,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() -- Gitblit v1.9.1