From cbf2486983b77a27af9968bbb362cb8d43789115 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期三, 26 三月 2025 15:30:53 +0800 Subject: [PATCH] 修改统计bug和部分功能修改 --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopBalanceStatementServiceImpl.java | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopBalanceStatementServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopBalanceStatementServiceImpl.java index 2276d32..31797f0 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopBalanceStatementServiceImpl.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopBalanceStatementServiceImpl.java @@ -44,11 +44,20 @@ BigDecimal totalCommission = shopCommissionMap.getOrDefault(1,BigDecimal.ZERO); BigDecimal totalSubordinateCommission = shopCommissionMap.getOrDefault(2,BigDecimal.ZERO); BigDecimal totalServiceCharge = shopCommissionMap.getOrDefault(3,BigDecimal.ZERO); - + shopCommissionStatisticsVO.setTotalCommission(totalCommission); + shopCommissionStatisticsVO.setTotalSubordinateCommission(totalSubordinateCommission); + shopCommissionStatisticsVO.setTotalServiceCharge(totalServiceCharge); BigDecimal totalAmount = totalCommission.add(totalSubordinateCommission).add(totalServiceCharge); shopCommissionStatisticsVO.setTotalAmount(totalAmount); - IPage<ShopBalanceStatement> statementIPage = this.baseMapper.queryShopBalanceStatementPage(page, shopBalanceStatement); + for (ShopBalanceStatement record : statementIPage.getRecords()) { + if (record.getChangeDirection() == -1){ + // 减少 + record.setVariableAmountString("-¥"+record.getVariableAmount()); + }else{ + record.setVariableAmountString("+¥"+record.getVariableAmount()); + } + } shopCommissionStatisticsVO.setStatementIPage(statementIPage); return shopCommissionStatisticsVO; } -- Gitblit v1.7.1