From 9f2dee507ecd07e30f5e515711775888dd0c436a Mon Sep 17 00:00:00 2001 From: jishenghua <752718920@qq.com> Date: Sun, 14 Jan 2024 15:38:22 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=A4=9A=E8=B4=A6=E6=88=B7?= =?UTF-8?q?=E7=9A=84=E6=98=8E=E7=BB=86=E5=90=88=E8=AE=A1=E7=9A=84=E7=A9=BA?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../erp/service/account/AccountService.java | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/jshERP-boot/src/main/java/com/jsh/erp/service/account/AccountService.java b/jshERP-boot/src/main/java/com/jsh/erp/service/account/AccountService.java index 6e5ad2cf..e1f2df98 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/service/account/AccountService.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/service/account/AccountService.java @@ -331,15 +331,17 @@ public class AccountService { List dataList = accountMapperEx.getManyAccountSum(accountId, beginTime, endTime, forceFlag); if (dataList != null) { for (DepotHead depotHead : dataList) { - String accountIdList = depotHead.getAccountIdList(); - String accountMoneyList = depotHead.getAccountMoneyList(); - if(StringUtil.isNotEmpty(accountIdList) && StringUtil.isNotEmpty(accountMoneyList)) { - String[] aList = accountIdList.split(","); - String[] amList = accountMoneyList.split(","); - for (int i = 0; i < aList.length; i++) { - if (aList[i].equals(accountId.toString())) { - if(amList.length>0) { - accountSum = accountSum.add(new BigDecimal(amList[i])); + if(depotHead != null) { + String accountIdList = depotHead.getAccountIdList(); + String accountMoneyList = depotHead.getAccountMoneyList(); + if(StringUtil.isNotEmpty(accountIdList) && StringUtil.isNotEmpty(accountMoneyList)) { + String[] aList = accountIdList.split(","); + String[] amList = accountMoneyList.split(","); + for (int i = 0; i < aList.length; i++) { + if (aList[i].equals(accountId.toString())) { + if(amList.length>0) { + accountSum = accountSum.add(new BigDecimal(amList[i])); + } } } }