From 516f34b58253db0882d6658dec081912c6b53421 Mon Sep 17 00:00:00 2001 From: erdanergou Date: Sat, 4 Feb 2023 16:39:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=87=BA=E5=BA=93=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E5=88=A0=E9=99=A4=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../depository_manage/controller/MaterialController.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/dreamchaser/depository_manage/controller/MaterialController.java b/src/main/java/com/dreamchaser/depository_manage/controller/MaterialController.java index 4bfe8fa6..f7bc6b2f 100644 --- a/src/main/java/com/dreamchaser/depository_manage/controller/MaterialController.java +++ b/src/main/java/com/dreamchaser/depository_manage/controller/MaterialController.java @@ -135,10 +135,10 @@ public class MaterialController { didList.add(did); map.put("depositoryId", did); List inventory = materialService.findInventory(map); - list.addAll(inventory); + total += materialService.findInventoryCount(map); - if (list.size() >= size) { - break; + if (list.size() < size) { + list.addAll(inventory); } } if (list.size() < size) {