24282 2 years ago
parent
commit
b20547cdfd

+ 4 - 3
bladex-saas-project/saas-business-tradeerp/src/main/java/com/fjhx/fundAccount/service/impl/FundAccountServiceImpl.java

@@ -67,13 +67,14 @@ public class FundAccountServiceImpl extends ServiceImpl<FundAccountMapper, FundA
         queryWrapper.like(ObjectUtil.isNotEmpty(condition.get("name")), "name", condition.get("name"));
         queryWrapper.like(ObjectUtil.isNotEmpty(condition.get("accountNumber")), "account_number", condition.get("accountNumber"));
         queryWrapper.eq("del_fleg", 0);
+        queryWrapper.eq("tenant_id", AuthUtil.getTenantId());
         queryWrapper.orderByDesc("create_time");
         List<FundAccount> list = baseMapper.selectList(queryWrapper);
         //获取到人民币余额不等于null的数据
         List<FundAccount> rmbAmountList = list.stream().filter(fundAccount -> ObjectUtil.isNotEmpty(fundAccount.getRmbAmount())).collect(Collectors.toList());
         if (rmbAmountList.size() > 0) {
             //资金账户管理:人民币汇总
-            BigDecimal rmbSummary = rmbAmountList.stream().map(fundAccount -> fundAccount.getRmbAmount()).reduce(BigDecimal.ZERO, BigDecimal::add);
+            BigDecimal rmbSummary = rmbAmountList.stream().map(FundAccount::getRmbAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
             map.put("rmbSummary", rmbSummary);
         } else {
             map.put("rmbSummary", new BigDecimal(0));
@@ -83,7 +84,7 @@ public class FundAccountServiceImpl extends ServiceImpl<FundAccountMapper, FundA
         List<FundAccount> dollarAmountList = list.stream().filter(fundAccount -> ObjectUtil.isNotEmpty(fundAccount.getDollarAmount())).collect(Collectors.toList());
         if (dollarAmountList.size() > 0) {
             //资金账户管理:美元汇总
-            BigDecimal dollarSummary = dollarAmountList.stream().map(fundAccount -> fundAccount.getDollarAmount()).reduce(BigDecimal.ZERO, BigDecimal::add);
+            BigDecimal dollarSummary = dollarAmountList.stream().map(FundAccount::getDollarAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
             map.put("dollarSummary", dollarSummary);
         } else {
             map.put("dollarSummary", new BigDecimal(0));
@@ -94,7 +95,7 @@ public class FundAccountServiceImpl extends ServiceImpl<FundAccountMapper, FundA
         if (euroAmountList.size() > 0) {
 
             //资金账户管理:欧元汇总
-            BigDecimal euroSummary = euroAmountList.stream().map(fundAccount -> fundAccount.getEuroAmount()).reduce(BigDecimal.ZERO, BigDecimal::add);
+            BigDecimal euroSummary = euroAmountList.stream().map(FundAccount::getEuroAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
             map.put("euroSummary", euroSummary);
         } else {
             map.put("euroSummary", new BigDecimal(0));