From 43be81738ea7a041bd78dabbbb580e688a0d6804 Mon Sep 17 00:00:00 2001 From: ytfl <ytfl@qq.com> Date: 星期六, 16 八月 2025 13:57:54 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 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..61d6d09 100644 --- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java @@ -2145,12 +2145,17 @@ 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(); + 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); + } wrkDetl.setAnfme(anfme); wrkDetl.setWeight(weight); - wrkDetl.setStockNum(stockNum); - wrkDetl.setStockNum2(stockNum2); } ledCommand.getMatDtos().add(new MatDto( -- Gitblit v1.9.1