From 0b68ed7d48b882ad10cf7ae7f58b99d71ea86cde Mon Sep 17 00:00:00 2001 From: cabbage <281119120@qq.com> Date: Fri, 25 Jul 2025 15:41:13 +0800 Subject: [PATCH] =?UTF-8?q?##=20=E7=A6=8F=E5=88=A9=E4=B8=93=E5=8C=BA?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=EF=BC=9B=E5=A4=84=E7=90=86=E8=A7=81=E7=82=B9?= =?UTF-8?q?=E3=80=81=E5=8C=BA=E5=9F=9F=E5=A5=96=E9=87=91=E6=8B=A8=E6=AF=94?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../statis/ICuBonusStatisServiceApi.java | 6 +- .../ICuBonusVertexStatisServiceApi.java | 4 +- .../impl/CuMemberAssessServiceImpl.java | 2 - .../api/ApiCuMemberAssessController.java | 35 +-- .../manager/CuBonusStatisController.java | 2 + .../CuBonusVertexStatisController.java | 68 ++--- .../CuBonusVertexStatisTotalController.java | 8 +- .../mapper/CuBonusVertexStatisMapper.java | 37 +-- .../ICuBonusVertexStatisServiceProvider.java | 6 - .../service/ICuBonusVertexStatisService.java | 15 - .../impl/CuBonusStatisServiceImpl.java | 51 +--- .../impl/CuBonusVertexStatisServiceImpl.java | 59 ++-- .../hzs/member/statis/vo/CuBonusStatisVO.java | 129 +++++---- .../statis/vo/CuBonusVertexStaticTotalVO.java | 66 +++-- .../statis/vo/CuBonusVertexStatisVO.java | 130 +++++---- .../member/statis/CuBonusStatisMapper.xml | 46 +-- .../statis/CuBonusVertexStatisMapper.xml | 261 +++++------------- .../api/ApiOthSaOrderController.java | 1 - .../service/impl/SaOrderServiceImpl.java | 8 - .../com/hzs/common/core/enums/EOrderType.java | 5 - .../hzs/common/core/enums/ESpecialArea.java | 5 - .../hzs/common/core/enums/ESystemConfig.java | 3 - .../domain/member/statis/CuBonusStatis.java | 12 + .../member/statis/CuBonusVertexStatis.java | 12 + 24 files changed, 404 insertions(+), 567 deletions(-) diff --git a/bd-api/bd-api-member/src/main/java/com/hzs/member/statis/ICuBonusStatisServiceApi.java b/bd-api/bd-api-member/src/main/java/com/hzs/member/statis/ICuBonusStatisServiceApi.java index b84ff819..dbd6f83b 100644 --- a/bd-api/bd-api-member/src/main/java/com/hzs/member/statis/ICuBonusStatisServiceApi.java +++ b/bd-api/bd-api-member/src/main/java/com/hzs/member/statis/ICuBonusStatisServiceApi.java @@ -3,17 +3,17 @@ package com.hzs.member.statis; import com.hzs.common.core.domain.R; /** - * @description: 奖金拨比统计 + * 奖金拨比统计 **/ public interface ICuBonusStatisServiceApi { /** - * @description: 统计历史奖金拨比 + * 统计历史奖金拨比 **/ R statsHistoryBonus(String startDate, String endDate); /** - * @description: 删除奖金拨比统计数据 + * 删除奖金拨比统计数据 **/ R delStats(String startDate, String endDate); diff --git a/bd-api/bd-api-member/src/main/java/com/hzs/member/statis/ICuBonusVertexStatisServiceApi.java b/bd-api/bd-api-member/src/main/java/com/hzs/member/statis/ICuBonusVertexStatisServiceApi.java index 9d1983d1..532b49d7 100644 --- a/bd-api/bd-api-member/src/main/java/com/hzs/member/statis/ICuBonusVertexStatisServiceApi.java +++ b/bd-api/bd-api-member/src/main/java/com/hzs/member/statis/ICuBonusVertexStatisServiceApi.java @@ -8,12 +8,12 @@ import com.hzs.common.core.domain.R; public interface ICuBonusVertexStatisServiceApi { /** - * @description: 7天重算顶点奖金拨比统计 + * 7天重算顶点奖金拨比统计 **/ R anewStatsHistoryBonus(String startDate, String endDate); /** - * @description: 删除奖金拨比统计数据 + * 删除奖金拨比统计数据 **/ R delStats(String startDate, String endDate); diff --git a/bd-business/bd-business-bonus/src/main/java/com/hzs/bonus/detail/service/impl/CuMemberAssessServiceImpl.java b/bd-business/bd-business-bonus/src/main/java/com/hzs/bonus/detail/service/impl/CuMemberAssessServiceImpl.java index 9e70ca2e..0ac3e8e5 100644 --- a/bd-business/bd-business-bonus/src/main/java/com/hzs/bonus/detail/service/impl/CuMemberAssessServiceImpl.java +++ b/bd-business/bd-business-bonus/src/main/java/com/hzs/bonus/detail/service/impl/CuMemberAssessServiceImpl.java @@ -360,8 +360,6 @@ public class CuMemberAssessServiceImpl extends ServiceImpl monthList = cuMemberAssessService.getMemberAssessMonthList(cuMemberAssessVO); + List monthList = iCuMemberAssessService.getMemberAssessMonthList(cuMemberAssessVO); startPage(); - List list = cuMemberAssessService.selectAssessList(cuMemberAssessVO, orderTypeList); + List list = iCuMemberAssessService.selectAssessList(cuMemberAssessVO, orderTypeList); if (!monthList.isEmpty() && !list.isEmpty()) { for (CuMemberAssessVO mo : monthList) { for (CuMemberAssessVO ca : list) { @@ -108,7 +101,7 @@ public class ApiCuMemberAssessController extends BaseController { } if (!list.isEmpty()) { - R currency = currencyServiceApi.getCurrency(SecurityUtils.getPkCountry()); + R currency = iCurrencyServiceApi.getCurrency(SecurityUtils.getPkCountry()); final EChangeType purAsseAdd = EChangeType.PURCHASE_ASSESSMENT_ADD; final EChangeType purAsseDeduct = EChangeType.PURCHASE_ASSESSMENT_DEDUCT; final EChangeType shareAsseAdd = EChangeType.SHARE_ASSESSMENT_ADD; @@ -163,10 +156,6 @@ public class ApiCuMemberAssessController extends BaseController { // 复购订单 item.setChangeType(purAsseAdd.getValue()); item.setTradeAchieveSign("+" + tradeAchieve); - } else if (orderType == EOrderType.WELFARE_ORDER.getValue()) { - // 福利订单 - item.setChangeType(shareAsseAdd.getValue()); - item.setTradeAchieveSign("+" + tradeAchieve); } } }); @@ -233,24 +222,14 @@ public class ApiCuMemberAssessController extends BaseController { orderTypeList.add(EOrderType.SPECIAL_REPURCHASE_ORDER.getValue()); cuMemberAssessVO.setOrderTypeList(orderTypeList); - CuMemberAssessVO order = cuMemberAssessService.getOrderAssessList(cuMemberAssessVO); + CuMemberAssessVO order = iCuMemberAssessService.getOrderAssessList(cuMemberAssessVO); if (StringUtils.isNotNull(order)) { monthSurplus = monthSurplus.add(order.getOrderAchieve()); } if (pkCountry.equals(CountryConstants.CHINA_COUNTRY)) { - R currency = currencyServiceApi.getCurrency(pkCountry); + R currency = iCurrencyServiceApi.getCurrency(pkCountry); monthSurplus = monthSurplus.multiply(currency.getData().getInExchangeRate()); } - } else if (EAssessmentType.SHARE_ASSESS.getValue() == assessType) { - // 分红考核 - orderTypeList.add(EOrderType.WELFARE_ORDER.getValue()); - cuMemberAssessVO.setOrderTypeList(orderTypeList); - - CuMemberAssessVO order = cuMemberAssessService.getOrderAssessList(cuMemberAssessVO); - BigDecimal orderAchieve = BigDecimal.ZERO; - if (StringUtils.isNotNull(order)) { - monthSurplus = monthSurplus.add(order.getOrderAssAchieve()).add(orderAchieve); - } } return AjaxResult.success(monthSurplus); } diff --git a/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/controller/manager/CuBonusStatisController.java b/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/controller/manager/CuBonusStatisController.java index 83af01ba..9d12dc0a 100644 --- a/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/controller/manager/CuBonusStatisController.java +++ b/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/controller/manager/CuBonusStatisController.java @@ -189,6 +189,8 @@ public class CuBonusStatisController extends BaseController { subtotal.setRepurRangeBonus(subtotal.getRepurRangeBonusSum()); subtotal.setRepurOrgBonus(subtotal.getRepurOrgBonusSum()); subtotal.setRepurLeaderBonus(subtotal.getRepurLeaderBonusSum()); + subtotal.setGlobalPointsBonus(subtotal.getGlobalPointsBonusSum()); + subtotal.setStoreIncomeBonus(subtotal.getStoreIncomeBonusSum()); subtotal.setMainBonus(subtotal.getMainBonusSum()); subtotal.setMainBonusRate(subtotal.getMainBonusRateSum()); subtotal.setRepurBonus(subtotal.getRepurBonusSum()); diff --git a/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/controller/manager/CuBonusVertexStatisController.java b/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/controller/manager/CuBonusVertexStatisController.java index c8274d12..a5c8d4db 100644 --- a/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/controller/manager/CuBonusVertexStatisController.java +++ b/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/controller/manager/CuBonusVertexStatisController.java @@ -95,6 +95,39 @@ public class CuBonusVertexStatisController extends BaseController { return getDataTable(slList); } + /** + * 顶点奖金拨比列表统计合计 + **/ + @AccessPermissions("TopPerformance") + @GetMapping("/subtotal") + @Log(module = EOperationModule.BONUS_DIAL_RATIO, business = EOperationBusiness.BONUS_DIAL_RATIO_LIST, method = EOperationMethod.SELECT) + public AjaxResult subtotal(CuBonusVertexStatisVO cuBonusVertexStatisVO) { + Integer pkCountry = SecurityUtils.getPkCountry(); + R currency = iCurrencyServiceApi.getCurrency(pkCountry); + BigDecimal cent = new BigDecimal(100); + BigDecimal exchangeRate = currency.getData().getInExchangeRate() == null ? BigDecimal.ONE : currency.getData().getInExchangeRate(); + cuBonusVertexStatisVO.setRate(exchangeRate); + cuBonusVertexStatisVO.setPerCent(exchangeRate.multiply(cent)); + cuBonusVertexStatisVO.setPkCountry(pkCountry); + + // 默认查询当前日期的前一天 + Date date = DateUtils.currentDate(); + if (StringUtils.isEmpty(cuBonusVertexStatisVO.getStartDate()) + || StringUtils.isEmpty(cuBonusVertexStatisVO.getEndDate())) { + cuBonusVertexStatisVO.setStartDate(DateUtils.beforeDateStr(1, ChronoUnit.DAYS, DateUtils.YYYY_MM_DD, date)); + cuBonusVertexStatisVO.setEndDate(DateUtils.beforeDateStr(1, ChronoUnit.DAYS, DateUtils.YYYY_MM_DD, date)); + } + + //查询合计 + CuBonusVertexStatisVO subtotal = iCuBonusVertexStatisService.queryCuBonusSumStatis(cuBonusVertexStatisVO); + if (null != subtotal) { + subtotal.setMainRegAmountSum(subtotal.getMainRegAmountSum().add(subtotal.getSpecialRegisterAmountSum())); + subtotal.setMainUpAmountSum(subtotal.getMainUpAmountSum().add(subtotal.getSpecialUpgradeAmountSum())); + subtotal.setMainRepurAmountSum(subtotal.getMainRepurAmountSum().add(subtotal.getSpecialRepurchaseAmountSum())); + } + return AjaxResult.success(subtotal); + } + /** * 顶点奖金拨比列表统计导出 **/ @@ -144,6 +177,8 @@ public class CuBonusVertexStatisController extends BaseController { subtotal.setRepurRangeBonus(subtotal.getRepurRangeBonusSum()); subtotal.setRepurOrgBonus(subtotal.getRepurOrgBonusSum()); subtotal.setRepurLeaderBonus(subtotal.getRepurLeaderBonusSum()); + subtotal.setGlobalPointsBonus(subtotal.getGlobalPointsBonusSum()); + subtotal.setStoreIncomeBonus(subtotal.getStoreIncomeBonusSum()); subtotal.setMainBonus(subtotal.getMainBonusSum()); subtotal.setMainBonusRate(subtotal.getMainBonusRateSum()); subtotal.setRepurBonus(subtotal.getRepurBonusSum()); @@ -157,39 +192,6 @@ public class CuBonusVertexStatisController extends BaseController { util.exportExcel(response, slList, "拨比列表"); } - /** - * 顶点奖金拨比列表统计合计 - **/ - @AccessPermissions("TopPerformance") - @GetMapping("/subtotal") - @Log(module = EOperationModule.BONUS_DIAL_RATIO, business = EOperationBusiness.BONUS_DIAL_RATIO_LIST, method = EOperationMethod.SELECT) - public AjaxResult subtotal(CuBonusVertexStatisVO cuBonusVertexStatisVO) { - Integer pkCountry = SecurityUtils.getPkCountry(); - R currency = iCurrencyServiceApi.getCurrency(pkCountry); - BigDecimal cent = new BigDecimal(100); - BigDecimal exchangeRate = currency.getData().getInExchangeRate() == null ? BigDecimal.ONE : currency.getData().getInExchangeRate(); - cuBonusVertexStatisVO.setRate(exchangeRate); - cuBonusVertexStatisVO.setPerCent(exchangeRate.multiply(cent)); - cuBonusVertexStatisVO.setPkCountry(pkCountry); - - // 默认查询当前日期的前一天 - Date date = DateUtils.currentDate(); - if (StringUtils.isEmpty(cuBonusVertexStatisVO.getStartDate()) - || StringUtils.isEmpty(cuBonusVertexStatisVO.getEndDate())) { - cuBonusVertexStatisVO.setStartDate(DateUtils.beforeDateStr(1, ChronoUnit.DAYS, DateUtils.YYYY_MM_DD, date)); - cuBonusVertexStatisVO.setEndDate(DateUtils.beforeDateStr(1, ChronoUnit.DAYS, DateUtils.YYYY_MM_DD, date)); - } - - //查询合计 - CuBonusVertexStatisVO subtotal = iCuBonusVertexStatisService.queryCuBonusSumStatis(cuBonusVertexStatisVO); - if (null != subtotal) { - subtotal.setMainRegAmountSum(subtotal.getMainRegAmountSum().add(subtotal.getSpecialRegisterAmountSum())); - subtotal.setMainUpAmountSum(subtotal.getMainUpAmountSum().add(subtotal.getSpecialUpgradeAmountSum())); - subtotal.setMainRepurAmountSum(subtotal.getMainRepurAmountSum().add(subtotal.getSpecialRepurchaseAmountSum())); - } - return AjaxResult.success(subtotal); - } - /** * 统计历史奖金拨比数据, 手动统计某一天 **/ diff --git a/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/controller/manager/CuBonusVertexStatisTotalController.java b/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/controller/manager/CuBonusVertexStatisTotalController.java index 32a60204..01c0ca02 100644 --- a/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/controller/manager/CuBonusVertexStatisTotalController.java +++ b/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/controller/manager/CuBonusVertexStatisTotalController.java @@ -77,12 +77,12 @@ public class CuBonusVertexStatisTotalController extends BaseController { CuBonusVertexStaticTotalVO mapTouch = new CuBonusVertexStaticTotalVO(); mapTouch.setPkVertex(ve.getPkVertex()); - //查询顶点拓展封顶人数 + // 查询顶点拓展封顶人数 CuBonusVertexStaticTotalVO orgTopNumber = iCuBonusVertexStatisService.queryOrgTopNumber(cvs); if (orgTopNumber != null) { mapTouch.setOrgTopNumber(orgTopNumber.getOrgTopNumber()); } - //查询顶点拓展平均碰次和拓展最高碰次 + // 查询顶点拓展平均碰次和拓展最高碰次 CuBonusVertexStaticTotalVO touch = iCuBonusVertexStatisService.queryTouch(cvs); if (touch != null) { mapTouch.setOrgAvTouch(touch.getOrgAvTouch()); @@ -112,6 +112,8 @@ public class CuBonusVertexStatisTotalController extends BaseController { itm.setRepurRangeBonusRate(itm.getRepurRangeBonus().multiply(cuBonusVertexStaticTotalVO.getPerCent()).divide(itm.getRepurchaseAllAmount(), 4, RoundingMode.HALF_UP)); itm.setRepurOrgBonusRate(itm.getRepurOrgBonus().multiply(cuBonusVertexStaticTotalVO.getPerCent()).divide(itm.getRepurchaseAllAmount(), 4, RoundingMode.HALF_UP)); itm.setRepurLeaderBonusRate(itm.getRepurLeaderBonus().multiply(cuBonusVertexStaticTotalVO.getPerCent()).divide(itm.getRepurchaseAllAmount(), 4, RoundingMode.HALF_UP)); + itm.setGlobalPointsBonusRate(itm.getGlobalPointsBonus().multiply(cuBonusVertexStaticTotalVO.getPerCent()).divide(itm.getRepurchaseAllAmount(), 4, RoundingMode.HALF_UP)); + itm.setStoreIncomeBonusRate(itm.getStoreIncomeBonus().multiply(cuBonusVertexStaticTotalVO.getPerCent()).divide(itm.getRepurchaseAllAmount(), 4, RoundingMode.HALF_UP)); } }); } @@ -192,6 +194,8 @@ public class CuBonusVertexStatisTotalController extends BaseController { itm.setRepurRangeBonusRate(itm.getRepurRangeBonus().multiply(cuBonusVertexStaticTotalVO.getPerCent()).divide(itm.getRepurchaseAllAmount(), 4, RoundingMode.HALF_UP)); itm.setRepurOrgBonusRate(itm.getRepurOrgBonus().multiply(cuBonusVertexStaticTotalVO.getPerCent()).divide(itm.getRepurchaseAllAmount(), 4, RoundingMode.HALF_UP)); itm.setRepurLeaderBonusRate(itm.getRepurLeaderBonus().multiply(cuBonusVertexStaticTotalVO.getPerCent()).divide(itm.getRepurchaseAllAmount(), 4, RoundingMode.HALF_UP)); + itm.setGlobalPointsBonusRate(itm.getGlobalPointsBonus().multiply(cuBonusVertexStaticTotalVO.getPerCent()).divide(itm.getRepurchaseAllAmount(), 4, RoundingMode.HALF_UP)); + itm.setStoreIncomeBonusRate(itm.getStoreIncomeBonus().multiply(cuBonusVertexStaticTotalVO.getPerCent()).divide(itm.getRepurchaseAllAmount(), 4, RoundingMode.HALF_UP)); } }); } diff --git a/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/mapper/CuBonusVertexStatisMapper.java b/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/mapper/CuBonusVertexStatisMapper.java index 2d266340..a4f44964 100644 --- a/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/mapper/CuBonusVertexStatisMapper.java +++ b/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/mapper/CuBonusVertexStatisMapper.java @@ -13,22 +13,22 @@ import java.util.List; public interface CuBonusVertexStatisMapper extends BaseMapper { /** - * @description: 奖金拨比列表 + * 奖金拨比列表 **/ List queryCuBonusStatis(CuBonusVertexStatisVO cuBonusVertexStatisVO); /** - * @description: 查询顶点奖金拨比汇总 + * 查询顶点奖金拨比汇总 **/ List queryCuBonusStatisTotal(CuBonusVertexStaticTotalVO cuBonusVertexStaticTotalVO); /** - * @description: 顶点奖金拨比汇总查询总和 + * 顶点奖金拨比汇总查询总和 **/ CuBonusVertexStaticTotalVO queryCuBonusStatisSum(CuBonusVertexStaticTotalVO cuBonusVertexStaticTotalVO); /** - * @description: 查询时间内奖金拨比顶点会员 + * 查询时间内奖金拨比顶点会员 **/ List queryCuBonusVertex(CuBonusVertexStaticTotalVO cuBonusVertexStaticTotalVO); @@ -43,55 +43,40 @@ public interface CuBonusVertexStatisMapper extends BaseMapper querySaOrderByLessDay(CuBonusVertexStatisVO CuBonusVertexStatisVO); /** - * @description: 7天重算查询订单 + * 7天重算查询订单 **/ List queryAnewSaOrderByLessDay(CuBonusVertexStatisVO CuBonusVertexStatisVO); /** - * @description: 删除奖金拨比统计表数据 + * 删除奖金拨比统计表数据 **/ Boolean delStatis(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("pkVertexList") List pkVertexList); /** - * @description: 查询奖金扣项配置参数 - **/ - List bonusDeductlist(CuBonusVertexStatisVO CuBonusVertexStatisVO); - - /** - * @description: 查询中国奖金 - **/ - List queryChinaCountryBonus(CuBonusVertexStatisVO CuBonusVertexStatisVO); - - /** - * @description: 查询7天重算奖金查询 + * 查询7天重算奖金查询 **/ List queryVertexChinaCountryBonus(CuBonusVertexStatisVO CuBonusVertexStatisVO); /** - * @description: 查询生效国外国家列表 - **/ - List countrylist(CuBonusVertexStatisVO CuBonusVertexStatisVO); - - /** - * @description: 查询有效顶点 + * 查询有效顶点 **/ List vertexList(@Param("pkVertex") Integer pkVertex); /** - * @description: 查询当天团队统计数据 + * 查询当天团队统计数据 **/ List getCuBonusStatis(CuBonusVertexStatis CuBonusVertexStatis); diff --git a/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/provider/ICuBonusVertexStatisServiceProvider.java b/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/provider/ICuBonusVertexStatisServiceProvider.java index 7126597e..3dcf66cf 100644 --- a/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/provider/ICuBonusVertexStatisServiceProvider.java +++ b/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/provider/ICuBonusVertexStatisServiceProvider.java @@ -22,17 +22,11 @@ public class ICuBonusVertexStatisServiceProvider implements ICuBonusVertexStatis @Autowired private ICuBonusVertexStatisService iCuBonusVertexStatisService; - /** - * @description: 7天重算顶点奖金拨比统计 - **/ @Override public R anewStatsHistoryBonus(String startDate, String endDate) { return R.ok(iCuBonusVertexStatisService.anewStatisHistoryBonus(startDate, endDate)); } - /** - * @description: 删除奖金拨比统计数据 - **/ @Override public R delStats(String startDate, String endDate) { List vertexList = iCuBonusVertexStatisService.vertexList(null); diff --git a/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/service/ICuBonusVertexStatisService.java b/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/service/ICuBonusVertexStatisService.java index e2d08818..575d099d 100644 --- a/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/service/ICuBonusVertexStatisService.java +++ b/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/service/ICuBonusVertexStatisService.java @@ -57,21 +57,6 @@ public interface ICuBonusVertexStatisService extends IService pkVertexList); - /** - * 查询奖金扣项配置参数 - **/ - List bonusDeductlist(CuBonusVertexStatisVO cuBonusVertexStatisVO); - - /** - * 查询中国奖金 - **/ - List queryChinaCountryBonus(CuBonusVertexStatisVO cuBonusVertexStatisVO); - - /** - * 查询生效国外国家列表 - **/ - List countrylist(CuBonusVertexStatisVO cuBonusVertexStatisVO); - /** * 查询所有体系 **/ diff --git a/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/service/impl/CuBonusStatisServiceImpl.java b/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/service/impl/CuBonusStatisServiceImpl.java index bf5e62f6..533d6948 100644 --- a/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/service/impl/CuBonusStatisServiceImpl.java +++ b/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/service/impl/CuBonusStatisServiceImpl.java @@ -147,11 +147,6 @@ public class CuBonusStatisServiceImpl extends ServiceImpl existingRecord = getCuBonusStatis(bs); @@ -272,57 +276,36 @@ public class CuBonusStatisServiceImpl extends ServiceImpl queryCuBonusStatis(CuBonusStatisVO cuBonusStatisVO) { return baseMapper.queryCuBonusStatis(cuBonusStatisVO); } - /** - * 查询体系合计的订单业绩 - **/ @Override public CuBonusStatisVO queryOrderAchieveSum(CuBonusStatisVO cuBonusStatisVO) { return baseMapper.queryOrderAchieveSum(cuBonusStatisVO); } - /** - * 奖金拨比列表统计小计(最后一行) - **/ @Override public CuBonusStatisVO queryCuBonusSumStatis(CuBonusStatisVO cuBonusStatisVO) { return baseMapper.queryCuBonusSumStatis(cuBonusStatisVO); } - /** - * 查询个人奖金拨比 - **/ @Override public CuBonusSinglePersonStatisVO bonusSingleSum(CuBonusSinglePersonStatisVO csps) { return baseMapper.bonusSingleSum(csps); } - /** - * 奖金拨比图表 - **/ @Override public List queryCuBonusStatisChart(CuBonusStatisChartVO chartVO) { return baseMapper.queryCuBonusStatisChart(chartVO); } - /** - * 奖金拨比图表合计 - **/ @Override public CuBonusStatisChartVO queryCuBonusSumStatisChart(CuBonusStatisChartVO chartVO) { return baseMapper.queryCuBonusSumStatisChart(chartVO); } - /** - * 查询奖金拨比图形数据-柱形图 - **/ @Override public CuBonusStatisColumnarVO pillarRatio(CuBonusStatisColumnarVO columnarVO) { // 查询当年的数据 @@ -348,18 +331,12 @@ public class CuBonusStatisServiceImpl extends ServiceImpl opt = Optional.ofNullable(baseMapper.queryYearData(columnarVO)); return opt.orElse(null); } - /** - * 查询奖金拨比(饼状图) - **/ @Override public CuBonusStatisRoundVO queryDiallingRatio(CuBonusStatisRoundVO roundVO) { return baseMapper.queryDiallingRatio(roundVO); @@ -433,11 +410,10 @@ public class CuBonusStatisServiceImpl extends ServiceImpl vertexList = vertexList(null); - //会员订单信息 + // 会员订单信息 List orachListAll = new ArrayList<>(); - //查询新增订单 + // 查询新增订单 CuBonusVertexStatisVO cbs = new CuBonusVertexStatisVO(); - //日期集合 + // 日期集合 List dates = getDatesInRange(startDate, endDate); for (String date : dates) { int period = iCuMemberSettlePeriodService.getCuMemberSettlePeriodByDate(date).getPkId(); @@ -77,13 +77,14 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl orachList = baseMapper.queryAnewSaOrderByLessDay(cbs); - orachListAll.addAll(orachList); + List tmpList = baseMapper.queryAnewSaOrderByLessDay(cbs); + orachListAll.addAll(tmpList); } - //先查中国订单 - Map> orachListMap = orachListAll.stream().collect(Collectors.groupingBy(CuBonusVertexStatisVO::getCreationTime)); - //查询所有体系 + // 查询所有体系 if (CollectionUtil.isNotEmpty(orachListAll)) { + // 先查中国订单 + Map> orachListMap = orachListAll.stream().collect(Collectors.groupingBy(CuBonusVertexStatisVO::getCreationTime)); + if (CollectionUtil.isNotEmpty(vertexList)) { for (Map.Entry> entry : orachListMap.entrySet()) { for (CuBonusVertexStatisVO ve : vertexList) { @@ -96,15 +97,15 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl acAll = new ArrayList<>(); if (CollectionUtil.isNotEmpty(vertexList)) { for (CuBonusVertexStatisVO ve : vertexList) { cbs.setPkVertex(ve.getPkVertex()); - //查询中国统计奖金 + // 查询中国统计奖金 List listCn = baseMapper.queryVertexChinaCountryBonus(cbs); - Map> listCnMap = listCn.stream().collect(Collectors.groupingBy(CuBonusVertexStatisVO::getCreationTime)); if (CollectionUtil.isNotEmpty(listCn)) { + Map> listCnMap = listCn.stream().collect(Collectors.groupingBy(CuBonusVertexStatisVO::getCreationTime)); for (Map.Entry> entry : listCnMap.entrySet()) { CuBonusVertexStatisVO oldSo = new CuBonusVertexStatisVO(); for (CuBonusVertexStatisVO cb : entry.getValue()) { @@ -119,9 +120,9 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl bonusDeductlist(CuBonusVertexStatisVO cuBonusVertexStatisVO) { - return baseMapper.bonusDeductlist(cuBonusVertexStatisVO); - } - @Override public List queryCuBonusStatis(CuBonusVertexStatisVO cuBonusVertexStatisVO) { return baseMapper.queryCuBonusStatis(cuBonusVertexStatisVO); @@ -219,15 +215,18 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl countrylist(CuBonusVertexStatisVO cuBonusVertexStatisVO) { - return baseMapper.countrylist(cuBonusVertexStatisVO); - } - @Override public List vertexList(Integer pkVertex) { return baseMapper.vertexList(pkVertex); @@ -283,11 +282,6 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl existingRecord = getCuBonusStatis(bs); @@ -400,11 +396,6 @@ public class CuBonusVertexStatisServiceImpl extends ServiceImpl queryChinaCountryBonus(CuBonusVertexStatisVO cuBonusVertexStatisVO) { - return baseMapper.queryChinaCountryBonus(cuBonusVertexStatisVO); - } - // 获取或初始化金额 private BigDecimal addOrInitializeAmount(BigDecimal currentAmount, BigDecimal newAmount, int type) { if (type == 1) { diff --git a/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/vo/CuBonusStatisVO.java b/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/vo/CuBonusStatisVO.java index 35c969d8..cc8d9214 100644 --- a/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/vo/CuBonusStatisVO.java +++ b/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/vo/CuBonusStatisVO.java @@ -63,17 +63,17 @@ public class CuBonusStatisVO implements Serializable { private BigDecimal repurBonusPvRate = BigDecimal.ZERO; /** - * 注册新增金额(¥) + * 注册新增金额 */ @BigDecimalFormat - @Excel(name = "注册专区(¥)", scale = 2) + @Excel(name = "注册专区", scale = 2) private BigDecimal mainRegAmount = BigDecimal.ZERO; /** - * 升级新增金额(¥) + * 升级新增金额 */ @BigDecimalFormat - @Excel(name = "升级专区(¥)", scale = 2) + @Excel(name = "升级专区", scale = 2) private BigDecimal mainUpAmount = BigDecimal.ZERO; /** @@ -83,7 +83,7 @@ public class CuBonusStatisVO implements Serializable { private BigDecimal specialRegisterAmount = BigDecimal.ZERO; /** - * 特殊注册新增金额(¥)小计 + * 特殊注册新增金额小计 */ @BigDecimalFormat private BigDecimal specialRegisterAmountSum = BigDecimal.ZERO; @@ -94,56 +94,56 @@ public class CuBonusStatisVO implements Serializable { @BigDecimalFormat private BigDecimal specialUpgradeAmount = BigDecimal.ZERO; /** - * 特殊升级新增金额(¥)小计 + * 特殊升级新增金额小计 */ @BigDecimalFormat private BigDecimal specialUpgradeAmountSum = BigDecimal.ZERO; /** - * 虚拟订单金额(¥) + * 虚拟订单金额 */ @BigDecimalFormat private BigDecimal fictitiousAmount = BigDecimal.ZERO; /** - * 首购总金额(¥) 注册金额+升级金额+礼包订单(1万礼包) + * 首购总金额 注册金额+升级金额+礼包订单(1万礼包) */ - @Excel(name = "首购金额(¥)", scale = 2) + @Excel(name = "首购金额", scale = 2) @BigDecimalFormat private BigDecimal firstPurchaseAll = BigDecimal.ZERO; /** - * 直推收益(¥) + * 直推收益 */ - @Excel(name = "直推收益(¥)", scale = 2) + @Excel(name = "直推收益", scale = 2) @BigDecimalFormat private BigDecimal introduceBonus = BigDecimal.ZERO; /** - * 拓展收益(¥) + * 拓展收益 */ - @Excel(name = "拓展收益(¥)", scale = 2) + @Excel(name = "拓展收益", scale = 2) @BigDecimalFormat private BigDecimal orgBonus = BigDecimal.ZERO; /** - * 辅导收益(¥) + * 辅导收益 */ - @Excel(name = "辅导收益(¥)", scale = 2) + @Excel(name = "辅导收益", scale = 2) @BigDecimalFormat private BigDecimal leaderBonus = BigDecimal.ZERO; /** - * 分红收益(¥) + * 分红收益 */ @BigDecimalFormat private BigDecimal shareBonus = BigDecimal.ZERO; /** - * 服务补贴(¥) + * 服务补贴 */ - @Excel(name = "服务补贴(¥)", scale = 2) + @Excel(name = "服务补贴", scale = 2) @BigDecimalFormat private BigDecimal serviceBonus = BigDecimal.ZERO; /** - * 复购新增金额(¥)(复购专区) + * 复购新增金额(复购专区) */ - @Excel(name = "复购专区(¥)", scale = 2) + @Excel(name = "复购专区", scale = 2) @BigDecimalFormat private BigDecimal mainRepurAmount = BigDecimal.ZERO; @@ -171,7 +171,7 @@ public class CuBonusStatisVO implements Serializable { @BigDecimalFormat private BigDecimal specialRepurchaseAmount = BigDecimal.ZERO; /** - * 特殊复购新增金额小计(¥)(复购专区) + * 特殊复购新增金额小计(复购专区) */ @BigDecimalFormat private BigDecimal specialRepurchaseAmountSum = BigDecimal.ZERO; @@ -184,44 +184,57 @@ public class CuBonusStatisVO implements Serializable { /** - * 海粉注册金额(¥) + * 海粉注册金额 */ @BigDecimalFormat private BigDecimal hifansRegAmount = BigDecimal.ZERO; /** - * 海粉升级(¥)(海粉升级订单) + * 海粉升级(海粉升级订单) */ @BigDecimalFormat private BigDecimal haiFunUpgradeAmount = BigDecimal.ZERO; /** * 复购总金额 复购订单+海粉订单+海粉复购订单 */ - @Excel(name = "复购金额(¥)", scale = 2) + @Excel(name = "复购金额", scale = 2) @BigDecimalFormat private BigDecimal repurchaseAllAmount = BigDecimal.ZERO; /** - * 复购级差收益(¥) + * 复购级差收益 */ - @Excel(name = "复购级差收益(¥)", scale = 2) + @Excel(name = "复购级差收益", scale = 2) @BigDecimalFormat private BigDecimal repurRangeBonus = BigDecimal.ZERO; /** - * 复购拓展收益(¥) + * 复购拓展收益 */ - @Excel(name = "复购拓展收益(¥)", scale = 2) + @Excel(name = "复购拓展收益", scale = 2) @BigDecimalFormat private BigDecimal repurOrgBonus = BigDecimal.ZERO; /** - * 复购辅导收益(¥) + * 复购辅导收益 */ - @Excel(name = "复购辅导收益(¥)", scale = 2) + @Excel(name = "复购辅导收益", scale = 2) @BigDecimalFormat private BigDecimal repurLeaderBonus = BigDecimal.ZERO; + /** + * 复购见点收益 + */ + @Excel(name = "复购见点收益", scale = 2) + @BigDecimalFormat + private BigDecimal globalPointsBonus = BigDecimal.ZERO; + /** + * 复购区域收益 + */ + @Excel(name = "复购区域收益", scale = 2) + @BigDecimalFormat + private BigDecimal storeIncomeBonus = BigDecimal.ZERO; + /** * (直推收益+拓展收益+辅导收益+分红收益+报单收益(服务补贴))*0.8+=实际拨出之和。 */ - @Excel(name = "首购拨出金额(¥)", scale = 2) + @Excel(name = "首购拨出金额", scale = 2) @BigDecimalFormat private BigDecimal mainBonus = BigDecimal.ZERO; /** @@ -236,7 +249,7 @@ public class CuBonusStatisVO implements Serializable { * (复购直推收益+复购级差收益+复购拓展收益)*80% +海粉直推 * (复购级差+复购拓展 ) *0.8 +海粉直推 */ - @Excel(name = "复购拨出金额(¥)", scale = 2) + @Excel(name = "复购拨出金额", scale = 2) @BigDecimalFormat private BigDecimal repurBonus = BigDecimal.ZERO; @@ -251,7 +264,7 @@ public class CuBonusStatisVO implements Serializable { /** * (直推收益+拓展收益+辅导收益+分红收益+报单服务费(服务补贴)+复购直推收益+复购级差收益+复购拓展收益)*0.8+海粉直推 */ - @Excel(name = "总拨出金额(¥)", scale = 2) + @Excel(name = "总拨出金额", scale = 2) @BigDecimalFormat private BigDecimal totalBonus = BigDecimal.ZERO; @@ -265,7 +278,7 @@ public class CuBonusStatisVO implements Serializable { private BigDecimal totalBonusRate = BigDecimal.ZERO; /** - * 三方订单业绩(¥)(礼包订单) + * 三方订单业绩(礼包订单) */ @BigDecimalFormat private BigDecimal thirdOrder = BigDecimal.ZERO; @@ -294,55 +307,55 @@ public class CuBonusStatisVO implements Serializable { private BigDecimal realIncomeTotal = BigDecimal.ZERO; /** - * 注册新增金额(¥)小计 + * 注册新增金额小计 */ @BigDecimalFormat private BigDecimal mainRegAmountSum = BigDecimal.ZERO; /** - * 升级新增金额(¥)小计 + * 升级新增金额小计 */ @BigDecimalFormat private BigDecimal mainUpAmountSum = BigDecimal.ZERO; /** - * 首购总金额(¥)小计 注册金额+升级金额+礼包订单(1万礼包) + * 首购总金额小计 注册金额+升级金额+礼包订单(1万礼包) */ @BigDecimalFormat private BigDecimal firstPurchaseAllSum = BigDecimal.ZERO; /** - * 直推收益(¥)小计 + * 直推收益小计 */ @BigDecimalFormat private BigDecimal introduceBonusSum = BigDecimal.ZERO; /** - * 拓展收益(¥)小计 + * 拓展收益小计 */ @BigDecimalFormat private BigDecimal orgBonusSum = BigDecimal.ZERO; /** - * 辅导收益(¥)小计 + * 辅导收益小计 */ @BigDecimalFormat private BigDecimal leaderBonusSum = BigDecimal.ZERO; /** - * 分红收益(¥)小计 + * 分红收益小计 */ @BigDecimalFormat private BigDecimal shareBonusSum = BigDecimal.ZERO; /** - * 服务补贴(¥)小计 + * 服务补贴小计 */ @BigDecimalFormat private BigDecimal serviceBonusSum = BigDecimal.ZERO; /** - * 复购新增金额小计(¥)(复购专区) + * 复购新增金额小计(复购专区) */ @BigDecimalFormat private BigDecimal mainRepurAmountSum = BigDecimal.ZERO; /** - * 嗨粉注册金额小计(¥) + * 嗨粉注册金额小计 */ @BigDecimalFormat private BigDecimal hifansRegAmountSum = BigDecimal.ZERO; @@ -352,12 +365,12 @@ public class CuBonusStatisVO implements Serializable { @BigDecimalFormat private BigDecimal repurchaseAllAmountSum = BigDecimal.ZERO; /** - * 复购级差收益(¥)小计 + * 复购级差收益小计 */ @BigDecimalFormat private BigDecimal repurRangeBonusSum = BigDecimal.ZERO; /** - * 复购拓展收益(¥)小计 + * 复购拓展收益小计 */ @BigDecimalFormat private BigDecimal repurOrgBonusSum = BigDecimal.ZERO; @@ -366,6 +379,16 @@ public class CuBonusStatisVO implements Serializable { */ @BigDecimalFormat private BigDecimal repurLeaderBonusSum = BigDecimal.ZERO; + /** + * 复购见点收益 + */ + @BigDecimalFormat + private BigDecimal globalPointsBonusSum = BigDecimal.ZERO; + /** + * 复购区域收益 + */ + @BigDecimalFormat + private BigDecimal storeIncomeBonusSum = BigDecimal.ZERO; /** * 首购拨出金额合计 @@ -414,7 +437,7 @@ public class CuBonusStatisVO implements Serializable { /** * 小计 - * 总拨出金额(¥)/(复购订单+海粉订单+海粉复购订单+注册+升级+1万礼包(礼包订单)=总金额) + * 总拨出金额/(复购订单+海粉订单+海粉复购订单+注册+升级+1万礼包(礼包订单)=总金额) */ @BigDecimalFormat private BigDecimal totalBonusRateSum = BigDecimal.ZERO; @@ -490,13 +513,13 @@ public class CuBonusStatisVO implements Serializable { private BigDecimal agentIntroduceBonusRate = BigDecimal.ZERO; /** - * 礼包金额(¥)(礼包订单) + * 礼包金额(礼包订单) */ @BigDecimalFormat private BigDecimal giftOrder = BigDecimal.ZERO; /** - * 实际综合实发金额(¥) + * 实际综合实发金额 */ @BigDecimalFormat private BigDecimal totalBonusReal = BigDecimal.ZERO; @@ -631,7 +654,7 @@ public class CuBonusStatisVO implements Serializable { private BigDecimal orderAmount = BigDecimal.ZERO; private List orderAchieveList; /** - * 国外奖金 + * 实发收益 */ @BigDecimalFormat private BigDecimal realIncome = BigDecimal.ZERO; @@ -646,11 +669,6 @@ public class CuBonusStatisVO implements Serializable { @BigDecimalFormat private BigDecimal dividendRatio = BigDecimal.ZERO; - /** - * 按照体系(中国)和国家分组合并订单 - */ - List mergeList; - List orderTypeList; /** @@ -662,5 +680,4 @@ public class CuBonusStatisVO implements Serializable { */ private BigDecimal calRepAchieve; - } diff --git a/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/vo/CuBonusVertexStaticTotalVO.java b/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/vo/CuBonusVertexStaticTotalVO.java index b36557fd..b532c5e9 100644 --- a/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/vo/CuBonusVertexStaticTotalVO.java +++ b/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/vo/CuBonusVertexStaticTotalVO.java @@ -38,9 +38,9 @@ public class CuBonusVertexStaticTotalVO implements Serializable { private String memberName; /** - * 首购总金额(¥) 注册金额+升级金额+礼包订单(1万礼包) + * 首购总金额 注册金额+升级金额+礼包订单(1万礼包) */ - @Excel(name = "首购金额(¥)", scale = 2) + @Excel(name = "首购金额", scale = 2) @BigDecimalFormat private BigDecimal firstPurchaseAll = BigDecimal.ZERO; @@ -56,7 +56,7 @@ public class CuBonusVertexStaticTotalVO implements Serializable { /** * (直推收益+拓展收益+辅导收益+分红收益+报单收益(服务补贴))*0.8=实际拨出之和。 */ - @Excel(name = "首购奖金(¥)", scale = 2) + @Excel(name = "首购奖金", scale = 2) @BigDecimalFormat private BigDecimal mainBonus = BigDecimal.ZERO; /** @@ -81,7 +81,7 @@ public class CuBonusVertexStaticTotalVO implements Serializable { @BigDecimalFormat private BigDecimal introduceBonusRate = BigDecimal.ZERO; /** - * 直推收益(¥) + * 直推收益 */ @BigDecimalFormat private BigDecimal introduceBonus = BigDecimal.ZERO; @@ -92,7 +92,7 @@ public class CuBonusVertexStaticTotalVO implements Serializable { @BigDecimalFormat private BigDecimal orgBonusRate = BigDecimal.ZERO; /** - * 拓展收益(¥) + * 拓展收益 */ @BigDecimalFormat private BigDecimal orgBonus = BigDecimal.ZERO; @@ -103,7 +103,7 @@ public class CuBonusVertexStaticTotalVO implements Serializable { @BigDecimalFormat private BigDecimal leaderBonusRate = BigDecimal.ZERO; /** - * 辅导收益(¥) + * 辅导收益 */ @BigDecimalFormat private BigDecimal leaderBonus = BigDecimal.ZERO; @@ -115,30 +115,30 @@ public class CuBonusVertexStaticTotalVO implements Serializable { private BigDecimal serviceBonusRate = BigDecimal.ZERO; /** - * 服务补贴(¥) + * 服务补贴 */ @BigDecimalFormat private BigDecimal serviceBonus = BigDecimal.ZERO; /** - * 复购总金额 复购订单+海粉订单+海粉复购订单 + * 复购总金额 复购订单 */ - @Excel(name = "复购金额(¥)", scale = 2) + @Excel(name = "复购金额", scale = 2) @BigDecimalFormat private BigDecimal repurchaseAllAmount = BigDecimal.ZERO; /** - * (复购直推收益+复购级差收益+复购拓展收益)*80% +海粉直推 - * (复购级差+复购拓展 ) *0.8 +海粉直推 + * (复购直推收益+复购级差收益+复购拓展收益)*80% + * (复购级差+复购拓展 ) *0.8 */ - @Excel(name = "复购拨出金额(¥)", scale = 2) + @Excel(name = "复购拨出金额", scale = 2) @BigDecimalFormat private BigDecimal repurBonus = BigDecimal.ZERO; /** - * (复购级差+复购拓展 ) *0.8 +海粉直推 - * 复购拨出比例(%) = (((复购直推收益+复购级差收益+复购拓展收益)*80%)+海粉直推)/复购总奖金(复购订单+海粉订单) + * (复购级差+复购拓展 ) *0.8 + * 复购拨出比例(%) = (((复购直推收益+复购级差收益+复购拓展收益)*80%))/复购总奖金(复购订单) */ @Excel(name = "复购拨出比例(%)", scale = 2) @BigDecimalFormat @@ -158,7 +158,7 @@ public class CuBonusVertexStaticTotalVO implements Serializable { @BigDecimalFormat private BigDecimal repurRangeBonusRate = BigDecimal.ZERO; /** - * 复购级差收益(¥) + * 复购级差收益 */ @BigDecimalFormat private BigDecimal repurRangeBonus = BigDecimal.ZERO; @@ -169,7 +169,7 @@ public class CuBonusVertexStaticTotalVO implements Serializable { @BigDecimalFormat private BigDecimal repurOrgBonusRate = BigDecimal.ZERO; /** - * 复购拓展收益(¥) + * 复购拓展收益 */ @BigDecimalFormat private BigDecimal repurOrgBonus = BigDecimal.ZERO; @@ -180,11 +180,35 @@ public class CuBonusVertexStaticTotalVO implements Serializable { @BigDecimalFormat private BigDecimal repurLeaderBonusRate = BigDecimal.ZERO; /** - * 复购辅导收益(¥) + * 复购辅导收益 */ @BigDecimalFormat private BigDecimal repurLeaderBonus = BigDecimal.ZERO; + /** + * 复购见点拨比(%) + */ + @Excel(name = "复购见点拨比(%)", scale = 2) + @BigDecimalFormat + private BigDecimal globalPointsBonusRate = BigDecimal.ZERO; + /** + * 复购见点收益 + */ + @BigDecimalFormat + private BigDecimal globalPointsBonus = BigDecimal.ZERO; + + /** + * 复购区域拨比(%) + */ + @Excel(name = "复购区域拨比(%)", scale = 2) + @BigDecimalFormat + private BigDecimal storeIncomeBonusRate = BigDecimal.ZERO; + /** + * 复购区域收益 + */ + @BigDecimalFormat + private BigDecimal storeIncomeBonus = BigDecimal.ZERO; + /** * 拓展平均碰次 */ @@ -330,9 +354,6 @@ public class CuBonusVertexStaticTotalVO implements Serializable { */ private Integer bonusType; - - private List orderAchieveList; - /** * 重复消费% */ @@ -344,11 +365,6 @@ public class CuBonusVertexStaticTotalVO implements Serializable { @BigDecimalFormat private BigDecimal dividendRatio = BigDecimal.ZERO; - /** - * 按照体系(中国)和国家分组合并订单 - */ - List mergeList; - List orderTypeList; /** diff --git a/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/vo/CuBonusVertexStatisVO.java b/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/vo/CuBonusVertexStatisVO.java index 4b22d489..ece2e6e3 100644 --- a/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/vo/CuBonusVertexStatisVO.java +++ b/bd-business/bd-business-member/src/main/java/com/hzs/member/statis/vo/CuBonusVertexStatisVO.java @@ -64,17 +64,17 @@ public class CuBonusVertexStatisVO implements Serializable { private BigDecimal repurBonusPvRate = BigDecimal.ZERO; /** - * 注册新增金额(¥) + * 注册新增金额 */ @BigDecimalFormat - @Excel(name = "注册专区(¥)", scale = 2) + @Excel(name = "注册专区", scale = 2) private BigDecimal mainRegAmount = BigDecimal.ZERO; /** - * 升级新增金额(¥) + * 升级新增金额 */ @BigDecimalFormat - @Excel(name = "升级专区(¥)", scale = 2) + @Excel(name = "升级专区", scale = 2) private BigDecimal mainUpAmount = BigDecimal.ZERO; /** @@ -94,7 +94,7 @@ public class CuBonusVertexStatisVO implements Serializable { private BigDecimal specialRepurchaseAmount = BigDecimal.ZERO; /** - * 虚拟订单金额(¥) + * 虚拟订单金额 */ @BigDecimalFormat private BigDecimal fictitiousAmount = BigDecimal.ZERO; @@ -112,47 +112,47 @@ public class CuBonusVertexStatisVO implements Serializable { private BigDecimal agentUpAmount = BigDecimal.ZERO; /** - * 首购总金额(¥) 注册金额+升级金额+礼包订单(1万礼包) + * 首购总金额 注册金额+升级金额+礼包订单(1万礼包) */ - @Excel(name = "首购金额(¥)", scale = 2) + @Excel(name = "首购金额", scale = 2) @BigDecimalFormat private BigDecimal firstPurchaseAll = BigDecimal.ZERO; /** - * 直推收益(¥) + * 直推收益 */ - @Excel(name = "直推收益(¥)", scale = 2) + @Excel(name = "直推收益", scale = 2) @BigDecimalFormat private BigDecimal introduceBonus = BigDecimal.ZERO; /** - * 拓展收益(¥) + * 拓展收益 */ - @Excel(name = "拓展收益(¥)", scale = 2) + @Excel(name = "拓展收益", scale = 2) @BigDecimalFormat private BigDecimal orgBonus = BigDecimal.ZERO; /** - * 辅导收益(¥) + * 辅导收益 */ - @Excel(name = "辅导收益(¥)", scale = 2) + @Excel(name = "辅导收益", scale = 2) @BigDecimalFormat private BigDecimal leaderBonus = BigDecimal.ZERO; /** - * 分红收益(¥) + * 分红收益 */ @BigDecimalFormat private BigDecimal shareBonus = BigDecimal.ZERO; /** - * 服务补贴(¥) + * 服务补贴 */ - @Excel(name = "服务补贴(¥)", scale = 2) + @Excel(name = "服务补贴", scale = 2) @BigDecimalFormat private BigDecimal serviceBonus = BigDecimal.ZERO; /** - * 复购新增金额(¥)(复购专区) + * 复购新增金额(复购专区) */ - @Excel(name = "复购专区(¥)", scale = 2) + @Excel(name = "复购专区", scale = 2) @BigDecimalFormat private BigDecimal mainRepurAmount = BigDecimal.ZERO; /** @@ -180,40 +180,53 @@ public class CuBonusVertexStatisVO implements Serializable { private BigDecimal welfareOrder = BigDecimal.ZERO; /** - * 海粉注册金额(¥) + * 海粉注册金额 */ @BigDecimalFormat private BigDecimal hifansRegAmount = BigDecimal.ZERO; /** - * 海粉升级(¥)(海粉升级订单) + * 海粉升级(海粉升级订单) */ @BigDecimalFormat private BigDecimal haiFunUpgradeAmount = BigDecimal.ZERO; /** * 复购总金额 复购订单+海粉订单+海粉复购订单 */ - @Excel(name = "复购金额(¥)", scale = 2) + @Excel(name = "复购金额", scale = 2) @BigDecimalFormat private BigDecimal repurchaseAllAmount = BigDecimal.ZERO; /** - * 复购级差收益(¥) + * 复购级差收益 */ - @Excel(name = "复购级差收益(¥)", scale = 2) + @Excel(name = "复购级差收益", scale = 2) @BigDecimalFormat private BigDecimal repurRangeBonus = BigDecimal.ZERO; /** - * 复购拓展收益(¥) + * 复购拓展收益 */ - @Excel(name = "复购拓展收益(¥)", scale = 2) + @Excel(name = "复购拓展收益", scale = 2) @BigDecimalFormat private BigDecimal repurOrgBonus = BigDecimal.ZERO; /** - * 复购辅导收益(¥) + * 复购辅导收益 */ - @Excel(name = "复购辅导收益(¥)", scale = 2) + @Excel(name = "复购辅导收益", scale = 2) @BigDecimalFormat private BigDecimal repurLeaderBonus = BigDecimal.ZERO; + /** + * 复购见点收益 + */ + @Excel(name = "复购见点收益", scale = 2) + @BigDecimalFormat + private BigDecimal globalPointsBonus = BigDecimal.ZERO; + /** + * 复购区域收益 + */ + @Excel(name = "复购区域收益", scale = 2) + @BigDecimalFormat + private BigDecimal storeIncomeBonus = BigDecimal.ZERO; + /** * 海粉直推收益(海粉推荐收益)(%) */ @@ -223,7 +236,7 @@ public class CuBonusVertexStatisVO implements Serializable { /** * (直推收益+拓展收益+辅导收益+分红收益+报单收益(服务补贴))*0.8=实际拨出之和。 */ - @Excel(name = "首购拨出金额(¥)", scale = 2) + @Excel(name = "首购拨出金额", scale = 2) @BigDecimalFormat private BigDecimal mainBonus = BigDecimal.ZERO; /** @@ -238,7 +251,7 @@ public class CuBonusVertexStatisVO implements Serializable { * (复购直推收益+复购级差收益+复购拓展收益)*80% +海粉直推 * (复购级差+复购拓展 ) *0.8 +海粉直推 */ - @Excel(name = "复购拨出金额(¥)", scale = 2) + @Excel(name = "复购拨出金额", scale = 2) @BigDecimalFormat private BigDecimal repurBonus = BigDecimal.ZERO; @@ -253,7 +266,7 @@ public class CuBonusVertexStatisVO implements Serializable { /** * (直推收益+拓展收益+辅导收益+分红收益+报单服务费(服务补贴)+复购直推收益+复购级差收益+复购拓展收益)*0.8+海粉直推 */ - @Excel(name = "总拨出金额(¥)", scale = 2) + @Excel(name = "总拨出金额", scale = 2) @BigDecimalFormat private BigDecimal totalBonus = BigDecimal.ZERO; @@ -267,7 +280,7 @@ public class CuBonusVertexStatisVO implements Serializable { private BigDecimal totalBonusRate = BigDecimal.ZERO; /** - * 三方订单业绩(¥)(礼包订单) + * 三方订单业绩(礼包订单) */ @BigDecimalFormat private BigDecimal thirdOrder = BigDecimal.ZERO; @@ -296,23 +309,23 @@ public class CuBonusVertexStatisVO implements Serializable { private BigDecimal realIncomeTotal = BigDecimal.ZERO; /** - * 注册新增金额(¥)小计 + * 注册新增金额小计 */ @BigDecimalFormat private BigDecimal mainRegAmountSum = BigDecimal.ZERO; /** - * 升级新增金额(¥)小计 + * 升级新增金额小计 */ @BigDecimalFormat private BigDecimal mainUpAmountSum = BigDecimal.ZERO; /** - * 特殊注册新增金额(¥)小计 + * 特殊注册新增金额小计 */ @BigDecimalFormat private BigDecimal specialRegisterAmountSum = BigDecimal.ZERO; /** - * 特殊升级新增金额(¥)小计 + * 特殊升级新增金额小计 */ @BigDecimalFormat private BigDecimal specialUpgradeAmountSum = BigDecimal.ZERO; @@ -330,49 +343,49 @@ public class CuBonusVertexStatisVO implements Serializable { private BigDecimal agentUpAmountSum = BigDecimal.ZERO; /** - * 首购总金额(¥)小计 注册金额+升级金额+礼包订单(1万礼包) + * 首购总金额小计 注册金额+升级金额+礼包订单(1万礼包) */ @BigDecimalFormat private BigDecimal firstPurchaseAllSum = BigDecimal.ZERO; /** - * 直推收益(¥)小计 + * 直推收益小计 */ @BigDecimalFormat private BigDecimal introduceBonusSum = BigDecimal.ZERO; /** - * 拓展收益(¥)小计 + * 拓展收益小计 */ @BigDecimalFormat private BigDecimal orgBonusSum = BigDecimal.ZERO; /** - * 辅导收益(¥)小计 + * 辅导收益小计 */ @BigDecimalFormat private BigDecimal leaderBonusSum = BigDecimal.ZERO; /** - * 分红收益(¥)小计 + * 分红收益小计 */ @BigDecimalFormat private BigDecimal shareBonusSum = BigDecimal.ZERO; /** - * 服务补贴(¥)小计 + * 服务补贴小计 */ @BigDecimalFormat private BigDecimal serviceBonusSum = BigDecimal.ZERO; /** - * 复购新增金额小计(¥)(复购专区) + * 复购新增金额小计(复购专区) */ @BigDecimalFormat private BigDecimal mainRepurAmountSum = BigDecimal.ZERO; /** - * 特殊复购新增金额小计(¥)(复购专区) + * 特殊复购新增金额小计(复购专区) */ @BigDecimalFormat private BigDecimal specialRepurchaseAmountSum = BigDecimal.ZERO; /** - * 嗨粉注册金额小计(¥) + * 嗨粉注册金额小计 */ @BigDecimalFormat private BigDecimal hifansRegAmountSum = BigDecimal.ZERO; @@ -382,20 +395,30 @@ public class CuBonusVertexStatisVO implements Serializable { @BigDecimalFormat private BigDecimal repurchaseAllAmountSum = BigDecimal.ZERO; /** - * 复购级差收益(¥)小计 + * 复购级差收益小计 */ @BigDecimalFormat private BigDecimal repurRangeBonusSum = BigDecimal.ZERO; /** - * 复购拓展收益(¥)小计 + * 复购拓展收益小计 */ @BigDecimalFormat private BigDecimal repurOrgBonusSum = BigDecimal.ZERO; /** - * 复购辅导收益(¥)小计 + * 复购辅导收益小计 */ @BigDecimalFormat private BigDecimal repurLeaderBonusSum = BigDecimal.ZERO; + /** + * 复购见点收益 + */ + @BigDecimalFormat + private BigDecimal globalPointsBonusSum = BigDecimal.ZERO; + /** + * 复购区域收益 + */ + @BigDecimalFormat + private BigDecimal storeIncomeBonusSum = BigDecimal.ZERO; /** * 首购拨出金额合计 @@ -443,19 +466,19 @@ public class CuBonusVertexStatisVO implements Serializable { /** * 小计 - * 总拨出金额(¥)/(复购订单+海粉订单+海粉复购订单+注册+升级+1万礼包(礼包订单)=总金额) + * 总拨出金额/(复购订单+海粉订单+海粉复购订单+注册+升级+1万礼包(礼包订单)=总金额) */ @BigDecimalFormat private BigDecimal totalBonusRateSum = BigDecimal.ZERO; /** - * 礼包金额(¥)(礼包订单) + * 礼包金额(礼包订单) */ @BigDecimalFormat private BigDecimal giftOrder = BigDecimal.ZERO; /** - * 实际综合实发金额(¥) + * 实际综合实发金额 */ @BigDecimalFormat private BigDecimal totalBonusReal = BigDecimal.ZERO; @@ -605,13 +628,6 @@ public class CuBonusVertexStatisVO implements Serializable { @BigDecimalFormat private BigDecimal dividendRatio = BigDecimal.ZERO; - /** - * 按照体系(中国)和国家分组合并订单 - */ - List mergeList; - - List orderTypeList; - /** * 本月会员网体表 */ diff --git a/bd-business/bd-business-member/src/main/resources/mapper/member/statis/CuBonusStatisMapper.xml b/bd-business/bd-business-member/src/main/resources/mapper/member/statis/CuBonusStatisMapper.xml index 238a1dff..26fa06ff 100644 --- a/bd-business/bd-business-member/src/main/resources/mapper/member/statis/CuBonusStatisMapper.xml +++ b/bd-business/bd-business-member/src/main/resources/mapper/member/statis/CuBonusStatisMapper.xml @@ -47,26 +47,26 @@ ELSE ROUND((#{perCent} * (cbs.INTRODUCE_BONUS + cbs.ORG_BONUS + cbs.LEADER_BONUS + cbs.SERVICE_BONUS)) / #{rate} / (cbs.MAIN_REG_PV + cbs.MAIN_UP_PV + cbs.SPECIAL_REGISTER_PV + cbs.SPECIAL_UPGRADE_PV + cbs.FICTITIOUS_PV), 4) end AS mainBonusPvRate, - - (cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS) + + (cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS + cbs.global_points_bonus + cbs.store_income_bonus) AS repurBonus, case WHEN (cbs.MAIN_REPUR_AMOUNT + cbs.MALL_AMOUNT + cbs.COOPERATE_AMOUNT + cbs.SPECIAL_REPURCHASE_AMOUNT + cbs.WELFARE_ORDER) = 0 THEN 0 - ELSE ROUND(#{perCent} * (cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS) + ELSE ROUND(#{perCent} * (cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS + cbs.global_points_bonus + cbs.store_income_bonus) / (cbs.MAIN_REPUR_AMOUNT + cbs.MALL_AMOUNT + cbs.COOPERATE_AMOUNT + cbs.SPECIAL_REPURCHASE_AMOUNT + cbs.WELFARE_ORDER), 4) end AS repurBonusRate, case WHEN (cbs.MAIN_REPUR_PV + cbs.MALL_PV + cbs.COOPERATE_PV + cbs.SPECIAL_REPURCHASE_PV + cbs.WELFARE_ORDER_PV) = 0 THEN 0 - ELSE ROUND(#{perCent} * (cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS) + ELSE ROUND(#{perCent} * (cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS + cbs.global_points_bonus + cbs.store_income_bonus) / #{rate} / (cbs.MAIN_REPUR_PV + cbs.MALL_PV +cbs.COOPERATE_PV + cbs.SPECIAL_REPURCHASE_PV + cbs.WELFARE_ORDER_PV), 4) end AS repurBonusPvRate, - + (cbs.INTRODUCE_BONUS + cbs.ORG_BONUS + cbs.LEADER_BONUS + cbs.SERVICE_BONUS - + cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS) + + cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS + cbs.global_points_bonus + cbs.store_income_bonus) AS totalBonus, CASE @@ -74,7 +74,7 @@ + cbs.MAIN_REPUR_AMOUNT + cbs.MALL_AMOUNT + cbs.COOPERATE_AMOUNT + cbs.SPECIAL_REPURCHASE_AMOUNT +cbs.WELFARE_ORDER) = 0 THEN 0 ELSE ROUND (#{perCent} * (cbs.INTRODUCE_BONUS + cbs.ORG_BONUS + cbs.LEADER_BONUS + cbs.SERVICE_BONUS - + cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS) + + cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS + cbs.global_points_bonus + cbs.store_income_bonus) / (cbs.MAIN_REG_AMOUNT + cbs.MAIN_UP_AMOUNT + cbs.SPECIAL_REGISTER_AMOUNT + cbs.SPECIAL_UPGRADE_AMOUNT + cbs.FICTITIOUS_AMOUNT + cbs.MAIN_REPUR_AMOUNT + cbs.MALL_AMOUNT + cbs.COOPERATE_AMOUNT + cbs.SPECIAL_REPURCHASE_AMOUNT + cbs.WELFARE_ORDER), 4) end AS totalBonusRate @@ -142,7 +142,9 @@ cbs.cal_rep_achieve / (cbs.cal_fir_achieve + cbs.cal_rep_achieve) * leader_bonus end repur_leader_bonus, - cbs.repur_push_income + cbs.repur_push_income, + cbs.global_points_bonus, + cbs.store_income_bonus FROM CU_BONUS_STATIS cbs left join bd_vertex ver on cbs.pk_bd_vertex = ver.pk_id LEFT JOIN cu_member_team ct ON ct.pk_id = cbs.pk_team_code @@ -223,6 +225,8 @@ sum (cbs.REPUR_RANGE_BONUS) repurRangeBonusSum, sum (cbs.REPUR_ORG_BONUS) repurOrgBonusSum, sum (cbs.REPUR_LEADER_BONUS) repurLeaderBonusSum, + sum (cbs.global_points_bonus) globalPointsBonusSum, + sum (cbs.store_income_bonus) storeIncomeBonusSum, sum (cbs.MAIN_REG_AMOUNT + cbs.MAIN_UP_AMOUNT + cbs.SPECIAL_REGISTER_AMOUNT + cbs.SPECIAL_UPGRADE_AMOUNT + cbs.FICTITIOUS_AMOUNT) AS firstPurchaseAllSum, sum (cbs.MAIN_REPUR_AMOUNT + cbs.MALL_AMOUNT + cbs.COOPERATE_AMOUNT + cbs.SPECIAL_REPURCHASE_AMOUNT + cbs.WELFARE_ORDER) @@ -241,28 +245,28 @@ ELSE ROUND(#{perCent} * sum(cbs.INTRODUCE_BONUS + cbs.ORG_BONUS + cbs.LEADER_BONUS + cbs.SERVICE_BONUS) / #{rate} / sum(cbs.MAIN_REG_PV + cbs.MAIN_UP_PV + cbs.SPECIAL_REGISTER_PV + cbs.SPECIAL_UPGRADE_PV + cbs.FICTITIOUS_PV), 4) end AS mainBonusPvRateSum, - sum(cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS) AS repurBonusSum, + sum(cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS + cbs.global_points_bonus + cbs.store_income_bonus) AS repurBonusSum, case WHEN sum(cbs.MAIN_REPUR_AMOUNT + cbs.MALL_AMOUNT + cbs.COOPERATE_AMOUNT + cbs.SPECIAL_REPURCHASE_AMOUNT + cbs.WELFARE_ORDER) = 0 THEN 0 - ELSE ROUND(#{perCent} * sum(cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS) + ELSE ROUND(#{perCent} * sum(cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS + cbs.global_points_bonus + cbs.store_income_bonus) / sum(cbs.MAIN_REPUR_AMOUNT + cbs.MALL_AMOUNT + cbs.COOPERATE_AMOUNT + cbs.SPECIAL_REPURCHASE_AMOUNT + cbs.WELFARE_ORDER), 4) end AS repurBonusRateSum, case WHEN sum(cbs.MAIN_REPUR_PV + cbs.MALL_PV + cbs.COOPERATE_PV + cbs.SPECIAL_REPURCHASE_PV + cbs.WELFARE_ORDER_PV) = 0 THEN 0 - ELSE ROUND(#{perCent} * sum(cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS) + ELSE ROUND(#{perCent} * sum(cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS + cbs.global_points_bonus + cbs.store_income_bonus) / #{rate} / sum(cbs.MAIN_REPUR_PV + cbs.MALL_PV +cbs.COOPERATE_PV + cbs.SPECIAL_REPURCHASE_PV + cbs.WELFARE_ORDER_PV), 4) end AS repurBonusPvRateSum, sum(cbs.INTRODUCE_BONUS + cbs.ORG_BONUS + cbs.LEADER_BONUS + cbs.SERVICE_BONUS - + cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS) + + cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS + cbs.global_points_bonus + cbs.store_income_bonus) AS totalBonusSum, CASE WHEN sum(cbs.MAIN_REG_AMOUNT + cbs.MAIN_UP_AMOUNT + cbs.SPECIAL_REGISTER_AMOUNT + cbs.SPECIAL_UPGRADE_AMOUNT + cbs.FICTITIOUS_AMOUNT + cbs.MAIN_REPUR_AMOUNT + cbs.MALL_AMOUNT + cbs.COOPERATE_AMOUNT + cbs.SPECIAL_REPURCHASE_AMOUNT +cbs.WELFARE_ORDER) = 0 THEN 0 ELSE ROUND (#{perCent} * sum(cbs.INTRODUCE_BONUS + cbs.ORG_BONUS + cbs.LEADER_BONUS + cbs.SERVICE_BONUS - + cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS) + + cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS + cbs.global_points_bonus + cbs.store_income_bonus) / sum(cbs.MAIN_REG_AMOUNT + cbs.MAIN_UP_AMOUNT + cbs.SPECIAL_REGISTER_AMOUNT + cbs.SPECIAL_UPGRADE_AMOUNT + cbs.FICTITIOUS_AMOUNT + cbs.MAIN_REPUR_AMOUNT + cbs.MALL_AMOUNT + cbs.COOPERATE_AMOUNT + cbs.SPECIAL_REPURCHASE_AMOUNT + cbs.WELFARE_ORDER), 4) end AS totalBonusRateSum @@ -329,7 +333,9 @@ cbs.cal_rep_achieve / (cbs.cal_fir_achieve + cbs.cal_rep_achieve) * leader_bonus end repur_leader_bonus, - cbs.repur_push_income + cbs.repur_push_income, + cbs.global_points_bonus, + cbs.store_income_bonus FROM CU_BONUS_STATIS cbs left join bd_vertex ver on cbs.pk_bd_vertex = ver.pk_id WHERE 1 = 1 @@ -676,7 +682,7 @@ so.MODIFIED_TIME modifiedTime from sa_order so inner JOIN CU_MEMBER cm on so.PK_MEMBER = cm.pk_id - where so.ORDER_TYPE in (1, 2, 3, 13, 20, 24, 25, 26) and cm.DEL_FLAG = 0 + where so.ORDER_TYPE in (1, 2, 3, 20, 24, 25, 26) and cm.DEL_FLAG = 0 and so.pk_country = #{pkCountry} @@ -1222,7 +1228,7 @@ and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0 where mbp.DEL_FLAG = 0 and mbp.INCOME_STATUS = 0 - and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25) + and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25, 26, 27) and so.PAY_TIME >= to_date(#{startDate}, 'yyyy-mm-dd') @@ -1251,7 +1257,7 @@ where mbe.DEL_FLAG = 0 and mbe.INCOME_STATUS in (0, 4) and mbe.pk_order != 0 - and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25) + and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25, 26, 27) and so.PAY_TIME >= to_date(#{startDate}, 'yyyy-mm-dd') @@ -1280,7 +1286,7 @@ where mbc.DEL_FLAG = 0 and mbc.INCOME_STATUS in (0, 4) and mbc.pk_order != 0 - and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25) + and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25, 26, 27) and so.PAY_TIME >= to_date(#{startDate}, 'yyyy-mm-dd') @@ -1308,7 +1314,7 @@ and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0 where mbr.DEL_FLAG = 0 and mbr.INCOME_STATUS = 0 - and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25) + and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25, 26, 27) and so.PAY_TIME >= to_date(#{startDate}, 'yyyy-mm-dd') @@ -1336,7 +1342,7 @@ and so.PK_COUNTRY = #{pkCountry} and so.del_flag = 0 where mbd.DEL_FLAG = 0 and mbd.INCOME_STATUS = 0 - and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25) + and bbi.BONUS_VALUE in (1, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 20, 21, 24, 25, 26, 27) and so.PAY_TIME >= to_date(#{startDate}, 'yyyy-mm-dd') diff --git a/bd-business/bd-business-member/src/main/resources/mapper/member/statis/CuBonusVertexStatisMapper.xml b/bd-business/bd-business-member/src/main/resources/mapper/member/statis/CuBonusVertexStatisMapper.xml index dbd398b4..447e6a8c 100644 --- a/bd-business/bd-business-member/src/main/resources/mapper/member/statis/CuBonusVertexStatisMapper.xml +++ b/bd-business/bd-business-member/src/main/resources/mapper/member/statis/CuBonusVertexStatisMapper.xml @@ -29,26 +29,26 @@ ELSE ROUND((#{perCent} * (cbs.INTRODUCE_BONUS + cbs.ORG_BONUS + cbs.LEADER_BONUS + cbs.SERVICE_BONUS)) / #{rate} / (cbs.MAIN_REG_PV + cbs.MAIN_UP_PV + cbs.SPECIAL_REGISTER_PV + cbs.SPECIAL_UPGRADE_PV + cbs.FICTITIOUS_PV), 4) end AS mainBonusPvRate, - - (cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS) + + (cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS + cbs.global_points_bonus + cbs.store_income_bonus) AS repurBonus, case WHEN (cbs.MAIN_REPUR_AMOUNT + cbs.MALL_AMOUNT + cbs.COOPERATE_AMOUNT + cbs.SPECIAL_REPURCHASE_AMOUNT + cbs.WELFARE_ORDER) = 0 THEN 0 - ELSE ROUND(#{perCent} * (cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS) + ELSE ROUND(#{perCent} * (cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS + cbs.global_points_bonus + cbs.store_income_bonus) / (cbs.MAIN_REPUR_AMOUNT + cbs.MALL_AMOUNT + cbs.COOPERATE_AMOUNT + cbs.SPECIAL_REPURCHASE_AMOUNT + cbs.WELFARE_ORDER), 4) end AS repurBonusRate, case WHEN (cbs.MAIN_REPUR_PV + cbs.MALL_PV + cbs.COOPERATE_PV + cbs.SPECIAL_REPURCHASE_PV + cbs.WELFARE_ORDER_PV) = 0 THEN 0 - ELSE ROUND(#{perCent} * (cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS) + ELSE ROUND(#{perCent} * (cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS + cbs.global_points_bonus + cbs.store_income_bonus) / #{rate} / (cbs.MAIN_REPUR_PV + cbs.MALL_PV +cbs.COOPERATE_PV + cbs.SPECIAL_REPURCHASE_PV + cbs.WELFARE_ORDER_PV), 4) end AS repurBonusPvRate, - + (cbs.INTRODUCE_BONUS + cbs.ORG_BONUS + cbs.LEADER_BONUS + cbs.SERVICE_BONUS - + cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS) + + cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS + cbs.global_points_bonus + cbs.store_income_bonus) AS totalBonus, CASE @@ -56,7 +56,7 @@ + cbs.MAIN_REPUR_AMOUNT + cbs.MALL_AMOUNT + cbs.COOPERATE_AMOUNT + cbs.SPECIAL_REPURCHASE_AMOUNT +cbs.WELFARE_ORDER) = 0 THEN 0 ELSE ROUND (#{perCent} * (cbs.INTRODUCE_BONUS + cbs.ORG_BONUS + cbs.LEADER_BONUS + cbs.SERVICE_BONUS - + cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS) + + cbs.REPUR_RANGE_BONUS + cbs.REPUR_ORG_BONUS + cbs.REPUR_PUSH_INCOME + cbs.REPUR_LEADER_BONUS + cbs.global_points_bonus + cbs.store_income_bonus) / (cbs.MAIN_REG_AMOUNT + cbs.MAIN_UP_AMOUNT + cbs.SPECIAL_REGISTER_AMOUNT + cbs.SPECIAL_UPGRADE_AMOUNT + cbs.FICTITIOUS_AMOUNT + cbs.MAIN_REPUR_AMOUNT + cbs.MALL_AMOUNT + cbs.COOPERATE_AMOUNT + cbs.SPECIAL_REPURCHASE_AMOUNT + cbs.WELFARE_ORDER), 4) end AS totalBonusRate @@ -124,7 +124,9 @@ cbs.cal_rep_achieve / (cbs.cal_fir_achieve + cbs.cal_rep_achieve) * leader_bonus end repur_leader_bonus, - cbs.repur_push_income + cbs.repur_push_income, + cbs.global_points_bonus, + cbs.store_income_bonus FROM CU_BONUS_VERTEX_STATIS cbs LEFT JOIN CU_MEMBER cm ON cm.PK_ID = cbs.PK_BD_VERTEX AND cm.DEL_FLAG = 0 WHERE 1 = 1 @@ -144,8 +146,7 @@ ) cbs - - + - + - + - + - select a.PK_ID, - b.PK_ID as pkId, - (a.BACK_RATIO+a.PLATFORM_RATIO)/100 backRatio - from BD_BONUS_ITEMS b - left JOIN BD_BONUS_DEDUCT a on a.PK_BONUS_ITEMS=b.PK_ID - where - b.DEL_FLAG =0 - and a.BACK_RATIO>0 - and a.PLATFORM_RATIO>0 - - AND b.PK_COUNTRY = #{pkCountry} - - ORDER BY a.BACK_RATIO,a.PLATFORM_RATIO DESC - - - - - - - -