## 奖金来源、奖金明细显示以及导出调整;
This commit is contained in:
parent
3a7a415c21
commit
7e8e515adf
|
@ -13,7 +13,6 @@ import com.hzs.common.core.annotation.Log;
|
|||
import com.hzs.common.core.constant.BonusFieldConstants;
|
||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||
import com.hzs.common.core.enums.*;
|
||||
import com.hzs.common.core.utils.CommonUtil;
|
||||
import com.hzs.common.core.utils.ComputeUtil;
|
||||
import com.hzs.common.core.utils.DateUtils;
|
||||
import com.hzs.common.core.utils.StringUtils;
|
||||
|
@ -40,36 +39,21 @@ import java.util.*;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 会员奖金-会员奖金汇总表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2022-11-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/manage/bonus")
|
||||
public class CuMemberBonusController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private ICuMemberBonusService cuMemberBonusService;
|
||||
|
||||
@Autowired
|
||||
private ITransactionCommonService transactionCommonService;
|
||||
|
||||
@DubboReference
|
||||
private IUserServiceApi userServiceApi;
|
||||
|
||||
IUserServiceApi iUserServiceApi;
|
||||
@DubboReference
|
||||
private IMenuColumnServiceApi menuColumnServiceApi;
|
||||
|
||||
@Autowired
|
||||
public void setTransactionCommonService(ITransactionCommonService transactionCommonService) {
|
||||
this.transactionCommonService = transactionCommonService;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setCuMemberBonusService(ICuMemberBonusService cuMemberBonusService) {
|
||||
this.cuMemberBonusService = cuMemberBonusService;
|
||||
}
|
||||
IMenuColumnServiceApi iMenuColumnServiceApi;
|
||||
|
||||
/**
|
||||
* 分页查询会员某个时间段内的奖金汇总
|
||||
|
@ -112,7 +96,7 @@ public class CuMemberBonusController extends BaseController {
|
|||
packageBonusParam(bonusParam);
|
||||
List<CuMemberBonusExt> cuMemberBonusList = cuMemberBonusService.queryBonusTotalVoByConditionForServer(bonusParam);
|
||||
List<BonusTotalVO> bonusTotalVoList = getBonusTotalVoS(cuMemberBonusList);
|
||||
Map<String, Integer> sourceBonusList = menuColumnServiceApi.queryMenuColumn("totalBonus", SecurityUtils.getUserId()).getData();
|
||||
Map<String, Integer> sourceBonusList = iMenuColumnServiceApi.queryMenuColumn("totalBonus", SecurityUtils.getUserId()).getData();
|
||||
ExcelUtil<BonusTotalVO> util = new ExcelUtil<>(BonusTotalVO.class, sourceBonusList);
|
||||
util.exportExcel(response, bonusTotalVoList, "奖金汇总导出");
|
||||
}
|
||||
|
@ -191,7 +175,7 @@ public class CuMemberBonusController extends BaseController {
|
|||
}
|
||||
cuMemberBonusExtList.add(cuMemberBonusExt);
|
||||
List<CuMemberBonusVO> cuMemberBonusVoList = getBonusDetail(cuMemberBonusExtList);
|
||||
Map<String, Integer> bonusDetail = menuColumnServiceApi.queryMenuColumn("BonusDetail", SecurityUtils.getUserId()).getData();
|
||||
Map<String, Integer> bonusDetail = iMenuColumnServiceApi.queryMenuColumn("BonusDetail", SecurityUtils.getUserId()).getData();
|
||||
ExcelUtil<CuMemberBonusVO> util = new ExcelUtil<>(CuMemberBonusVO.class, bonusDetail);
|
||||
util.exportExcel(response, cuMemberBonusVoList, "奖金明细导出");
|
||||
}
|
||||
|
@ -236,16 +220,13 @@ public class CuMemberBonusController extends BaseController {
|
|||
packageBonusParam(bonusParam);
|
||||
TableDataInfo tableDataInfo = cuMemberBonusService.queryMemberBonusDetailSerVoByCondition(bonusParam);
|
||||
List<MemberBonusDetailSerVO> memberBonusDetailSerVOList = (List<MemberBonusDetailSerVO>) tableDataInfo.getRows();
|
||||
|
||||
// 获取需要翻译的枚举翻译
|
||||
Map<String, String> transactionMap = transactionCommonService.exportEnumTransaction(EOrderType.values(), EBonusIncomeStatus.values());
|
||||
Map<Integer, String> transactionLongMap = transactionCommonService.exportEnumTransactionByDB(EnumsPrefixConstants.KEY_GRADE, EnumsPrefixConstants.KEY_AWARD);
|
||||
for (MemberBonusDetailSerVO memberBonusDetailSerVO : memberBonusDetailSerVOList) {
|
||||
if (transactionMap.containsKey(EnumsPrefixConstants.ORDER_TYPE + memberBonusDetailSerVO.getOrderType().toString())) {
|
||||
memberBonusDetailSerVO.setOrderTypeVal(transactionMap.get(EnumsPrefixConstants.ORDER_TYPE + memberBonusDetailSerVO.getOrderType()));
|
||||
}
|
||||
if (transactionMap.containsKey(EnumsPrefixConstants.BONUS_INCOME_STATUS + memberBonusDetailSerVO.getIncomeStatus())) {
|
||||
memberBonusDetailSerVO.setIncomeStatusVal(transactionMap.get(EnumsPrefixConstants.BONUS_INCOME_STATUS + memberBonusDetailSerVO.getIncomeStatus()));
|
||||
}
|
||||
memberBonusDetailSerVO.setOrderTypeVal(EOrderType.getEnumLabelByValue(memberBonusDetailSerVO.getOrderType()));
|
||||
memberBonusDetailSerVO.setIncomeStatusVal(EBonusIncomeStatus.getEnumLabelByValue(memberBonusDetailSerVO.getIncomeStatus()));
|
||||
|
||||
if (transactionLongMap.containsKey(memberBonusDetailSerVO.getPkSettleGrade())) {
|
||||
memberBonusDetailSerVO.setPkSettleGradeVal(transactionLongMap.get(memberBonusDetailSerVO.getPkSettleGrade()));
|
||||
}
|
||||
|
@ -253,12 +234,12 @@ public class CuMemberBonusController extends BaseController {
|
|||
memberBonusDetailSerVO.setPkAwardsVal(transactionLongMap.get(memberBonusDetailSerVO.getPkAwards()));
|
||||
}
|
||||
}
|
||||
ExcelUtil<MemberBonusDetailSerVO> util = new ExcelUtil<>(MemberBonusDetailSerVO.class, menuColumnServiceApi.queryMenuColumn("sourceBonus", SecurityUtils.getUserId()).getData());
|
||||
ExcelUtil<MemberBonusDetailSerVO> util = new ExcelUtil<>(MemberBonusDetailSerVO.class, iMenuColumnServiceApi.queryMenuColumn("sourceBonus", SecurityUtils.getUserId()).getData());
|
||||
util.exportExcel(response, memberBonusDetailSerVOList, "奖金来源导出");
|
||||
}
|
||||
|
||||
private void packageBonusParam(BonusParam bonusParam) {
|
||||
UserAuthorityDTO userAuthorityDto = userServiceApi.getUserAuthority(SecurityUtils.getUserId()).getData();
|
||||
UserAuthorityDTO userAuthorityDto = iUserServiceApi.getUserAuthority(SecurityUtils.getUserId()).getData();
|
||||
bonusParam.setVertexList(userAuthorityDto.getUserVertexList());
|
||||
bonusParam.setTeamList(userAuthorityDto.getUserTeamList());
|
||||
bonusParam.setSystemType(SecurityUtils.getSystemType());
|
||||
|
|
|
@ -261,20 +261,11 @@ public class CuMemberBonusServiceImpl extends ServiceImpl<CuMemberBonusMapper, C
|
|||
cuMemberBonusExt.setRepurRangeIncome(ComputeUtil.computeAdd(cuMemberBonusExt.getRepurRangeIncome(), memberBonusExt.getRepurRangeIncome()));
|
||||
cuMemberBonusExt.setRepurExpandIncome(ComputeUtil.computeAdd(cuMemberBonusExt.getRepurExpandIncome(), memberBonusExt.getRepurExpandIncome()));
|
||||
cuMemberBonusExt.setRepurRealSubtotal(ComputeUtil.computeAdd(cuMemberBonusExt.getRepurRealSubtotal(), memberBonusExt.getRepurRealSubtotal()));
|
||||
cuMemberBonusExt.setCloudDirectIncome(ComputeUtil.computeAdd(cuMemberBonusExt.getCloudDirectIncome(), memberBonusExt.getCloudDirectIncome()));
|
||||
cuMemberBonusExt.setCloudPurIncome(ComputeUtil.computeAdd(cuMemberBonusExt.getCloudPurIncome(), memberBonusExt.getCloudPurIncome()));
|
||||
cuMemberBonusExt.setCloudRepurIncome(ComputeUtil.computeAdd(cuMemberBonusExt.getCloudRepurIncome(), memberBonusExt.getCloudRepurIncome()));
|
||||
cuMemberBonusExt.setCloudRealSubtotal(ComputeUtil.computeAdd(cuMemberBonusExt.getCloudRealSubtotal(), memberBonusExt.getCloudRealSubtotal()));
|
||||
cuMemberBonusExt.setRepurCoupon(ComputeUtil.computeAdd(cuMemberBonusExt.getRepurCoupon(), memberBonusExt.getRepurCoupon()));
|
||||
cuMemberBonusExt.setRepurCouponShare(ComputeUtil.computeAdd(cuMemberBonusExt.getRepurCouponShare(), memberBonusExt.getRepurCouponShare()));
|
||||
cuMemberBonusExt.setRepurCouponSubtotal(ComputeUtil.computeAdd(cuMemberBonusExt.getRepurCouponSubtotal(), memberBonusExt.getRepurCouponSubtotal()));
|
||||
cuMemberBonusExt.setMakerDirectIncome(ComputeUtil.computeAdd(cuMemberBonusExt.getMakerDirectIncome(), memberBonusExt.getMakerDirectIncome()));
|
||||
cuMemberBonusExt.setMakerShareIncome(ComputeUtil.computeAdd(cuMemberBonusExt.getMakerShareIncome(), memberBonusExt.getMakerShareIncome()));
|
||||
cuMemberBonusExt.setMakerRealSubtotal(ComputeUtil.computeAdd(cuMemberBonusExt.getMakerRealSubtotal(), memberBonusExt.getMakerRealSubtotal()));
|
||||
cuMemberBonusExt.setGlobalPoints(ComputeUtil.computeAdd(cuMemberBonusExt.getGlobalPoints(), memberBonusExt.getGlobalPoints()));
|
||||
cuMemberBonusExt.setCarAwardPoints(ComputeUtil.computeAdd(cuMemberBonusExt.getCarAwardPoints(), memberBonusExt.getCarAwardPoints()));
|
||||
cuMemberBonusExt.setHiFunIncome(ComputeUtil.computeAdd(cuMemberBonusExt.getHiFunIncome(), memberBonusExt.getHiFunIncome()));
|
||||
cuMemberBonusExt.setHaiFunIncome(ComputeUtil.computeAdd(cuMemberBonusExt.getHaiFunIncome(), memberBonusExt.getHaiFunIncome()));
|
||||
cuMemberBonusExt.setRealIncomeTotal(ComputeUtil.computeAdd(cuMemberBonusExt.getRealIncomeTotal(), memberBonusExt.getRealIncomeTotal()));
|
||||
cuMemberBonusExt.setStoreIncome(ComputeUtil.computeAdd(cuMemberBonusExt.getStoreIncome(), memberBonusExt.getStoreIncome()));
|
||||
}
|
||||
|
@ -509,10 +500,10 @@ public class CuMemberBonusServiceImpl extends ServiceImpl<CuMemberBonusMapper, C
|
|||
if (bonusItemsMap.containsKey(memberBonusDetailSerVO.getPkBonusItems())) {
|
||||
memberBonusDetailSerVO.setBonusName(bonusItemsMap.get(memberBonusDetailSerVO.getPkBonusItems()).getBonusName());
|
||||
}
|
||||
memberBonusDetailSerVO.setOrderAmountDollar(ComputeUtil.computeDivide(memberBonusDetailSerVO.getOrderAmount(), memberBonusDetailSerVO.getOutExchangeRate()));
|
||||
memberBonusDetailSerVO.setOrderAchieveOri(ComputeUtil.computeMultiply(memberBonusDetailSerVO.getOrderAchieve(), memberBonusDetailSerVO.getOutExchangeRate()));
|
||||
memberBonusDetailSerVO.setPretaxIncomeOri(ComputeUtil.computeMultiply(memberBonusDetailSerVO.getPretaxIncome(), memberBonusDetailSerVO.getOutExchangeRate()));
|
||||
memberBonusDetailSerVO.setRealIncomeOri(ComputeUtil.computeMultiply(memberBonusDetailSerVO.getRealIncome(), memberBonusDetailSerVO.getOutExchangeRate()));
|
||||
memberBonusDetailSerVO.setOrderAmountDollar(memberBonusDetailSerVO.getOrderAmount());
|
||||
memberBonusDetailSerVO.setOrderAchieveOri(memberBonusDetailSerVO.getOrderAchieve());
|
||||
memberBonusDetailSerVO.setPretaxIncomeOri(memberBonusDetailSerVO.getPretaxIncome());
|
||||
memberBonusDetailSerVO.setRealIncomeOri(memberBonusDetailSerVO.getRealIncome());
|
||||
memberBonusDetailSerVO.setIncomeRatio(ComputeUtil.computeMultiply(memberBonusDetailSerVO.getIncomeRatio(), 100));
|
||||
memberBonusDetailSerVO.setIncomeDialRatio(ComputeUtil.computeMultiply(memberBonusDetailSerVO.getIncomeDialRatio(), 100));
|
||||
memberBonusDetailSerVO.setOrderDialRatio(ComputeUtil.computeMultiply(memberBonusDetailSerVO.getOrderDialRatio(), 100));
|
||||
|
@ -528,6 +519,8 @@ public class CuMemberBonusServiceImpl extends ServiceImpl<CuMemberBonusMapper, C
|
|||
memberBonusDetailSerVO.setCoachNormalHalfOri(ComputeUtil.computeMultiply(memberBonusDetailSerVO.getCoachNormalHalf(), memberBonusDetailSerVO.getOutExchangeRate()));
|
||||
memberBonusDetailSerVO.setCoachNormalRealOri(ComputeUtil.computeMultiply(memberBonusDetailSerVO.getCoachNormalReal(), memberBonusDetailSerVO.getOutExchangeRate()));
|
||||
}
|
||||
memberBonusDetailSerVO.setOrderTypeVal(EOrderType.getEnumLabelByValue(memberBonusDetailSerVO.getOrderType()));
|
||||
memberBonusDetailSerVO.setIncomeStatusVal(EBonusIncomeStatus.getEnumLabelByValue(memberBonusDetailSerVO.getIncomeStatus()));
|
||||
});
|
||||
dataTable.setRows(memberBonusDetailSerVoS);
|
||||
return dataTable;
|
||||
|
|
|
@ -26,21 +26,83 @@ public class BonusTotalVO implements Serializable {
|
|||
@Excel(name = "结算期数")
|
||||
private Integer period;
|
||||
|
||||
/**
|
||||
* 结算日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "结算时间", dateFormat = "yyyy-MM-dd")
|
||||
private Date settleDate;
|
||||
|
||||
/**
|
||||
* 国家
|
||||
*/
|
||||
private Integer pkCountry;
|
||||
|
||||
|
||||
/**
|
||||
* 新零售直推收益
|
||||
*/
|
||||
@Excel(name = "直推收益", scale = 2)
|
||||
private BigDecimal retailRangeIncome;
|
||||
|
||||
/**
|
||||
* 新零售平级收益
|
||||
*/
|
||||
@Excel(name = "平级收益", scale = 2)
|
||||
private BigDecimal retailSameLevelIncome;
|
||||
|
||||
/**
|
||||
* 新零售区域分红
|
||||
*/
|
||||
@Excel(name = "区域分红", scale = 2)
|
||||
private BigDecimal retailAreaIncome;
|
||||
|
||||
/**
|
||||
* 新零售福利级差收益
|
||||
*/
|
||||
@Excel(name = "福利级差收益", scale = 2)
|
||||
private BigDecimal retailBenefitRangeIncome;
|
||||
|
||||
/**
|
||||
* 新零售复购级差收益
|
||||
*/
|
||||
@Excel(name = "复购级差收益", scale = 2)
|
||||
private BigDecimal retailMonthRepurchaseIncome;
|
||||
|
||||
/**
|
||||
* 福利分红平均收益
|
||||
*/
|
||||
@Excel(name = "福利分红平均收益", scale = 2)
|
||||
private BigDecimal retailBenefitAvgIncome;
|
||||
|
||||
/**
|
||||
* 福利分红加权收益
|
||||
*/
|
||||
@Excel(name = "福利分红加权收益", scale = 2)
|
||||
private BigDecimal retailBenefitIncome;
|
||||
|
||||
/**
|
||||
* 重消收益
|
||||
*/
|
||||
@Excel(name = "重消收益", scale = 2)
|
||||
private BigDecimal backPointsOri;
|
||||
|
||||
/**
|
||||
* 实发收益总计
|
||||
*/
|
||||
@Excel(name = "实发收益总计", scale = 2)
|
||||
private BigDecimal realIncomeTotalOri;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 直推收益
|
||||
*/
|
||||
@Excel(name = "直推收益", scale = 2)
|
||||
private BigDecimal directIncomeOri;
|
||||
|
||||
/**
|
||||
* 拓展收益
|
||||
*/
|
||||
@Excel(name = "拓展收益", scale = 2)
|
||||
private BigDecimal expandIncomeOri;
|
||||
|
||||
/**
|
||||
|
@ -56,143 +118,109 @@ public class BonusTotalVO implements Serializable {
|
|||
/**
|
||||
* 辅导收益
|
||||
*/
|
||||
@Excel(name = "辅导收益", scale = 2)
|
||||
private BigDecimal coachIncomeOri;
|
||||
|
||||
/**
|
||||
* 分红收益
|
||||
*/
|
||||
@Excel(name = "分红收益", scale = 2)
|
||||
private BigDecimal shareIncomeOri;
|
||||
|
||||
/**
|
||||
* 报单收益
|
||||
*/
|
||||
@Excel(name = "报单收益", scale = 2)
|
||||
private BigDecimal serviceIncomeOri;
|
||||
|
||||
|
||||
/**
|
||||
* 云代直推收益
|
||||
*/
|
||||
@Excel(name = "云代直推收益", scale = 2)
|
||||
private BigDecimal cloudDirectIncomeOri;
|
||||
|
||||
/**
|
||||
* 云代首购收益
|
||||
*/
|
||||
@Excel(name = "云代首购收益", scale = 2)
|
||||
private BigDecimal cloudPurIncomeOri;
|
||||
|
||||
/**
|
||||
* 云代复购收益
|
||||
*/
|
||||
@Excel(name = "云代复购收益", scale = 2)
|
||||
private BigDecimal cloudRepurIncomeOri;
|
||||
|
||||
@Excel(name = "复购推荐收益", scale = 2)
|
||||
private BigDecimal repurPushIncomeOri;
|
||||
|
||||
/**
|
||||
* 复购级差收益
|
||||
*/
|
||||
@Excel(name = "复购级差收益", scale = 2)
|
||||
private BigDecimal repurRangeIncomeOri;
|
||||
|
||||
/**
|
||||
* 复购拓展收益
|
||||
*/
|
||||
@Excel(name = "复购拓展收益", scale = 2)
|
||||
private BigDecimal repurExpandIncomeOri;
|
||||
|
||||
/**
|
||||
* 复购券
|
||||
*/
|
||||
@Excel(name = "复购券", scale = 2)
|
||||
private BigDecimal repurCouponOri;
|
||||
|
||||
/**
|
||||
* 复购券均分收益
|
||||
*/
|
||||
@Excel(name = "复购券均分", scale = 2)
|
||||
private BigDecimal repurCouponShareOri;
|
||||
|
||||
/**
|
||||
* 商城重消
|
||||
*/
|
||||
@Excel(name = "商城重消", scale = 2)
|
||||
private BigDecimal backPointsOri;
|
||||
|
||||
/**
|
||||
* 平台服务费
|
||||
*/
|
||||
@Excel(name = "平台服务费", scale = 2)
|
||||
private BigDecimal serviceSpendOri;
|
||||
|
||||
/**
|
||||
* 环球积分
|
||||
*/
|
||||
@Excel(name = "直推极差", scale = 2)
|
||||
private BigDecimal globalPointsOri;
|
||||
|
||||
/**
|
||||
* 车奖积分
|
||||
*/
|
||||
@Excel(name = "车奖积分", scale = 2)
|
||||
private BigDecimal carAwardPointsOri;
|
||||
|
||||
/**
|
||||
* 店铺收益
|
||||
*/
|
||||
@Excel(name = "店铺收益", scale = 2)
|
||||
private BigDecimal storeIncomeOri;
|
||||
|
||||
/**
|
||||
* 嗨粉推荐收益
|
||||
*/
|
||||
@Excel(name = "嗨粉推荐收益", scale = 2)
|
||||
private BigDecimal hiFunIncomeOri;
|
||||
|
||||
/**
|
||||
* 首购实发小计
|
||||
*/
|
||||
@Excel(name = "首购实发小计", scale = 2)
|
||||
private BigDecimal purRealSubtotalOri;
|
||||
|
||||
/**
|
||||
* 云代实发小计
|
||||
*/
|
||||
@Excel(name = "云代实发小计", scale = 2)
|
||||
private BigDecimal cloudRealSubtotalOri;
|
||||
|
||||
/**
|
||||
* 复购实发小计
|
||||
*/
|
||||
@Excel(name = "复购实发小计", scale = 2)
|
||||
private BigDecimal repurRealSubtotalOri;
|
||||
|
||||
/**
|
||||
* 复购券小计
|
||||
*/
|
||||
@Excel(name = "复购券实发小计", scale = 2)
|
||||
private BigDecimal repurCouponSubtotalOri;
|
||||
|
||||
/**
|
||||
* 实发收益总计
|
||||
*/
|
||||
@Excel(name = "实发收益总计", scale = 2)
|
||||
private BigDecimal realIncomeTotalOri;
|
||||
|
||||
/**
|
||||
* 直推收益
|
||||
*/
|
||||
@Excel(name = "直推收益($)", scale = 2)
|
||||
private BigDecimal directIncome;
|
||||
|
||||
/**
|
||||
* 拓展收益
|
||||
*/
|
||||
@Excel(name = "拓展收益($)", scale = 2)
|
||||
private BigDecimal expandIncome;
|
||||
|
||||
/**
|
||||
|
@ -208,136 +236,109 @@ public class BonusTotalVO implements Serializable {
|
|||
/**
|
||||
* 辅导收益
|
||||
*/
|
||||
@Excel(name = "辅导收益($)", scale = 2)
|
||||
private BigDecimal coachIncome;
|
||||
|
||||
/**
|
||||
* 分红收益
|
||||
*/
|
||||
@Excel(name = "分红收益($)", scale = 2)
|
||||
private BigDecimal shareIncome;
|
||||
|
||||
/**
|
||||
* 报单收益
|
||||
*/
|
||||
@Excel(name = "报单收益($)", scale = 2)
|
||||
private BigDecimal serviceIncome;
|
||||
|
||||
/**
|
||||
* 云代直推收益
|
||||
*/
|
||||
@Excel(name = "云代直推收益($)", scale = 2)
|
||||
private BigDecimal cloudDirectIncome;
|
||||
|
||||
/**
|
||||
* 云代首购收益
|
||||
*/
|
||||
@Excel(name = "云代首购收益($)", scale = 2)
|
||||
private BigDecimal cloudPurIncome;
|
||||
|
||||
/**
|
||||
* 云代复购收益
|
||||
*/
|
||||
@Excel(name = "云代复购收益($)", scale = 2)
|
||||
private BigDecimal cloudRepurIncome;
|
||||
|
||||
@Excel(name = "复购推荐($)", scale = 2)
|
||||
private BigDecimal repurPushIncome;
|
||||
|
||||
/**
|
||||
* 复购级差收益
|
||||
*/
|
||||
@Excel(name = "复购级差收益($)", scale = 2)
|
||||
private BigDecimal repurRangeIncome;
|
||||
|
||||
/**
|
||||
* 复购拓展收益
|
||||
*/
|
||||
@Excel(name = "复购拓展收益($)", scale = 2)
|
||||
private BigDecimal repurExpandIncome;
|
||||
|
||||
/**
|
||||
* 复购券
|
||||
*/
|
||||
@Excel(name = "复购券($)", scale = 2)
|
||||
private BigDecimal repurCoupon;
|
||||
|
||||
/**
|
||||
* 复购券均分收益
|
||||
*/
|
||||
@Excel(name = "复购券均分($)", scale = 2)
|
||||
private BigDecimal repurCouponShare;
|
||||
|
||||
/**
|
||||
* 商城重消
|
||||
*/
|
||||
@Excel(name = "商城重消($)", scale = 2)
|
||||
private BigDecimal backPoints;
|
||||
|
||||
/**
|
||||
* 平台服务费
|
||||
*/
|
||||
@Excel(name = "平台服务费($)", scale = 2)
|
||||
private BigDecimal serviceSpend;
|
||||
|
||||
/**
|
||||
* 环球积分
|
||||
*/
|
||||
@Excel(name = "直推极差($)", scale = 2)
|
||||
private BigDecimal globalPoints;
|
||||
|
||||
/**
|
||||
* 车奖积分
|
||||
*/
|
||||
@Excel(name = "车奖积分($)", scale = 2)
|
||||
private BigDecimal carAwardPoints;
|
||||
|
||||
/**
|
||||
* 店铺收益
|
||||
*/
|
||||
@Excel(name = "店铺收益($)", scale = 2)
|
||||
private BigDecimal storeIncome;
|
||||
|
||||
/**
|
||||
* 嗨粉推荐收益
|
||||
*/
|
||||
@Excel(name = "嗨粉推荐收益($)", scale = 2)
|
||||
private BigDecimal hiFunIncome;
|
||||
|
||||
/**
|
||||
* 首购实发小计
|
||||
*/
|
||||
@Excel(name = "首购实发小计($)", scale = 2)
|
||||
private BigDecimal purRealSubtotal;
|
||||
|
||||
/**
|
||||
* 云代实发小计
|
||||
*/
|
||||
@Excel(name = "云代实发小计($)", scale = 2)
|
||||
private BigDecimal cloudRealSubtotal;
|
||||
|
||||
/**
|
||||
* 复购实发小计
|
||||
*/
|
||||
@Excel(name = "复购实发小计($)", scale = 2)
|
||||
private BigDecimal repurRealSubtotal;
|
||||
|
||||
/**
|
||||
* 复购券小计
|
||||
*/
|
||||
@Excel(name = "复购券实发小计($)", scale = 2)
|
||||
private BigDecimal repurCouponSubtotal;
|
||||
|
||||
/**
|
||||
* 实发收益总计
|
||||
*/
|
||||
@Excel(name = "实发收益总计($)", scale = 2)
|
||||
private BigDecimal realIncomeTotal;
|
||||
|
||||
/**
|
||||
* 结算日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "结算时间", dateFormat = "yyyy-MM-dd")
|
||||
private Date settleDate;
|
||||
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package com.hzs.bonus.bonus.vo;
|
|||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.hzs.common.core.annotation.BigDecimalFormat;
|
||||
import com.hzs.common.core.annotation.Excel;
|
||||
import com.hzs.common.core.annotation.Transaction;
|
||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||
|
@ -35,7 +34,7 @@ public class MemberBonusDetailSerVO implements Serializable {
|
|||
* 结算日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "结算时间", dateFormat = "yyyy-MM-dd")
|
||||
@Excel(name = "结算日期", dateFormat = "yyyy-MM-dd")
|
||||
private Date settleDate;
|
||||
/**
|
||||
* 订单主键
|
||||
|
@ -53,7 +52,6 @@ public class MemberBonusDetailSerVO implements Serializable {
|
|||
* 订单类型 来源于专区设置
|
||||
*/
|
||||
@JsonIgnore
|
||||
@Transaction(transactionKey = EnumsPrefixConstants.ORDER_TYPE)
|
||||
private Integer orderType;
|
||||
|
||||
@Excel(name = "订单类型")
|
||||
|
@ -62,7 +60,6 @@ public class MemberBonusDetailSerVO implements Serializable {
|
|||
/**
|
||||
* 来源国家名称
|
||||
*/
|
||||
@Excel(name = "来源国家")
|
||||
private String sourceCountryName;
|
||||
|
||||
/**
|
||||
|
@ -103,19 +100,16 @@ public class MemberBonusDetailSerVO implements Serializable {
|
|||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
@Excel(name = "来源金额($)", scale = 2)
|
||||
private BigDecimal orderAmountDollar;
|
||||
|
||||
/**
|
||||
* 订单业绩
|
||||
*/
|
||||
@Excel(name = "来源业绩($)", scale = 2)
|
||||
private BigDecimal orderAchieve;
|
||||
|
||||
/**
|
||||
* 结算国家
|
||||
*/
|
||||
@Excel(name = "结算国家")
|
||||
private String settleCountry;
|
||||
|
||||
/**
|
||||
|
@ -141,37 +135,33 @@ public class MemberBonusDetailSerVO implements Serializable {
|
|||
private String pkSettleGradeVal;
|
||||
|
||||
/**
|
||||
* 真实奖衔
|
||||
* 当月奖衔
|
||||
*/
|
||||
@Transaction(transactionKey = EnumsPrefixConstants.KEY_AWARD)
|
||||
@JsonIgnore
|
||||
private Integer pkAwards;
|
||||
|
||||
@Excel(name = "真实奖衔")
|
||||
@Excel(name = "当月奖衔")
|
||||
private String pkAwardsVal;
|
||||
|
||||
/**
|
||||
* 轮
|
||||
*/
|
||||
@Excel(name = "直推轮数")
|
||||
private Integer round;
|
||||
|
||||
/**
|
||||
* 次
|
||||
*/
|
||||
@Excel(name = "直推次数")
|
||||
private Integer second;
|
||||
|
||||
/**
|
||||
* 当前碰次
|
||||
*/
|
||||
@Excel(name = "当前碰次")
|
||||
private Integer currentTouch;
|
||||
|
||||
/**
|
||||
* 拓展碰次
|
||||
*/
|
||||
@Excel(name = "拓展碰次")
|
||||
private Integer expandTouch;
|
||||
|
||||
/**
|
||||
|
@ -186,16 +176,12 @@ public class MemberBonusDetailSerVO implements Serializable {
|
|||
@Excel(name = "辅导代数")
|
||||
private Integer coachGeneration;
|
||||
|
||||
@Excel(name = "拓展无封", scale = 2)
|
||||
private BigDecimal expandNoCappingOri;
|
||||
|
||||
@Excel(name = "拓展封顶", scale = 2)
|
||||
private BigDecimal expandCappingOri;
|
||||
|
||||
@Excel(name = "拓展正常减半", scale = 2)
|
||||
private BigDecimal expandNormalHalfOri;
|
||||
|
||||
@Excel(name = "拓展实际减半", scale = 2)
|
||||
private BigDecimal expandNormalRealOri;
|
||||
/**
|
||||
* 税前收益
|
||||
|
@ -212,34 +198,28 @@ public class MemberBonusDetailSerVO implements Serializable {
|
|||
/**
|
||||
* 拓展无封 (拓展收益按等级正常比例结算,拓展收益按等级正常比例结算 无封顶)
|
||||
*/
|
||||
@Excel(name = "拓展无封($)", scale = 2)
|
||||
private BigDecimal expandNoCapping;
|
||||
/**
|
||||
* 拓展封顶 (拓展收益按等级正常比例结算,不按4-N结算,根据配置的封顶值限制最大收益)
|
||||
*/
|
||||
@Excel(name = "拓展封顶($)", scale = 2)
|
||||
private BigDecimal expandCapping;
|
||||
/**
|
||||
* 拓展正常减半 (拓展收益按等级正常比例结算,不按4-N结算,根据配置的封顶值限制最大收益,拓展封顶(¥)/2)
|
||||
*/
|
||||
@Excel(name = "拓展正常减半($)", scale = 2)
|
||||
private BigDecimal expandNormalHalf;
|
||||
/**
|
||||
* 拓展实际减半 (拓展收益按4-结算,根据配置的封顶值限制最大收益,税前收益(¥)/2)
|
||||
*/
|
||||
@Excel(name = "拓展实际减半($)", scale = 2)
|
||||
private BigDecimal expandNormalReal;
|
||||
|
||||
/**
|
||||
* 税前收益
|
||||
*/
|
||||
@Excel(name = "税前收益($)", scale = 2)
|
||||
private BigDecimal pretaxIncome;
|
||||
|
||||
/**
|
||||
* 实际收益
|
||||
*/
|
||||
@Excel(name = "实际收益($)", scale = 2)
|
||||
private BigDecimal realIncome;
|
||||
|
||||
/**
|
||||
|
@ -262,7 +242,6 @@ public class MemberBonusDetailSerVO implements Serializable {
|
|||
/**
|
||||
* 收益状态
|
||||
*/
|
||||
@Transaction(transactionKey = EnumsPrefixConstants.BONUS_INCOME_STATUS)
|
||||
@JsonIgnore
|
||||
private Integer incomeStatus;
|
||||
|
||||
|
|
|
@ -257,14 +257,11 @@
|
|||
cu.member_code source_member_code,cu.member_name
|
||||
source_member_name,so.pk_rate,bc.out_exchange_rate,so.order_amount,
|
||||
so.order_achieve,b.pk_country,b.pk_bonus_items,b.pretax_income,b.income_tax,b.real_income,b.income_status,
|
||||
tar.member_code,tar.member_name,bg.pk_transaction pk_settle_grade,ba.pk_transaction
|
||||
tar.member_code,tar.member_name,
|
||||
bg.pk_transaction pk_settle_grade,ba.pk_transaction
|
||||
pk_awards,bv.vertex_name,ct.team_name,
|
||||
b.remark,b.income_ratio,b.income_dial_ratio,b.order_dial_ratio,bct.short_name settle_country from (
|
||||
select pk_id,pk_member,order_code,order_type,pk_rate,pk_country,order_amount,order_achieve from sa_order
|
||||
union
|
||||
select pk_id,pk_member,order_code,order_type,pk_rate,pk_country,order_amount,order_achieve from sa_t_order
|
||||
) so
|
||||
inner join (
|
||||
b.remark,b.income_ratio,b.income_dial_ratio,b.order_dial_ratio,bct.short_name settle_country
|
||||
from (
|
||||
select * from (
|
||||
select
|
||||
cb.pk_member,cd.pk_order,cb.period,cb.pk_country,cd.pk_bonus_items,cd.income_status,cd.CAL_ACHIEVE,cd.pretax_income,cd.income_tax,cd.real_income,
|
||||
|
@ -366,12 +363,13 @@
|
|||
)
|
||||
</if>
|
||||
) b
|
||||
left join sa_order so
|
||||
on so.pk_id = b.pk_order
|
||||
inner join cu_member tar
|
||||
left join cu_member tar
|
||||
on b.pk_member = tar.pk_id
|
||||
inner join cu_member cu
|
||||
left join cu_member cu
|
||||
on so.pk_member = cu.pk_id
|
||||
inner join cu_member_settle_period cp
|
||||
left join cu_member_settle_period cp
|
||||
on b.period = cp.pk_id
|
||||
left join bd_vertex bv
|
||||
on bv.pk_id = tar.pk_vertex
|
||||
|
@ -392,9 +390,6 @@
|
|||
<if test="bonusParam.pkCountry != null">
|
||||
and tar.pk_settle_country = #{bonusParam.pkCountry}
|
||||
</if>
|
||||
<if test="bonusParam.systemType != null">
|
||||
and cu.system_type = #{bonusParam.systemType}
|
||||
</if>
|
||||
<if test="bonusParam.orderType != null">
|
||||
and so.order_type = #{bonusParam.orderType}
|
||||
</if>
|
||||
|
@ -445,9 +440,12 @@
|
|||
<select id="queryMemberBonusDetailByBonusItemsForServer" resultMap="CuMemberBonusDetail">
|
||||
select b.period,cp.settle_date,so.order_code,so.order_type,bt.short_name source_country_name,
|
||||
cu.member_code source_member_code,cu.member_name source_member_name,nvl(so.pk_rate,b.pk_rate) pk_rate,
|
||||
nvl(bc.out_exchange_rate,0) out_exchange_rate,nvl(so.order_amount,0) order_amount,nvl(so.order_achieve,0) order_achieve,
|
||||
nvl(bc.out_exchange_rate,0) out_exchange_rate,
|
||||
nvl(so.order_amount,0) order_amount, nvl(so.order_achieve,0) order_achieve,
|
||||
b.pk_country,b.pk_bonus_items,b.pretax_income,b.income_tax,b.real_income,b.income_status,
|
||||
tar.member_code,tar.member_name,bg.pk_transaction pk_settle_grade,ba.pk_transaction pk_awards,bv.vertex_name,ct.team_name,
|
||||
tar.member_code,tar.member_name,
|
||||
bg.pk_transaction pk_settle_grade, ba.pk_transaction pk_awards,
|
||||
bv.vertex_name,ct.team_name,
|
||||
b.remark,b.income_ratio,b.income_dial_ratio,b.order_dial_ratio,bct.short_name settle_country
|
||||
from (
|
||||
select cb.pk_member,cd.pk_order,cb.period,cb.pk_country,cd.pk_bonus_items,cd.income_status,
|
||||
|
@ -488,11 +486,14 @@
|
|||
) b
|
||||
left join sa_order so
|
||||
on so.pk_id = b.pk_order
|
||||
<if test="bonusParam.orderType != null">
|
||||
and so.order_type = #{bonusParam.orderType}
|
||||
</if>
|
||||
left join cu_member tar
|
||||
on b.pk_member = tar.pk_id
|
||||
left join cu_member cu
|
||||
on so.pk_member = cu.pk_id
|
||||
inner join cu_member_settle_period cp
|
||||
left join cu_member_settle_period cp
|
||||
on b.period = cp.pk_id
|
||||
left join bd_vertex bv
|
||||
on bv.pk_id = tar.pk_vertex
|
||||
|
@ -516,9 +517,6 @@
|
|||
<if test="bonusParam.systemType != null">
|
||||
and cu.system_type = #{bonusParam.systemType}
|
||||
</if>
|
||||
<if test="bonusParam.orderType != null">
|
||||
and so.order_type = #{bonusParam.orderType}
|
||||
</if>
|
||||
<if test="bonusParam.pkVertex != null">
|
||||
and bv.pk_id = #{bonusParam.pkVertex}
|
||||
</if>
|
||||
|
|
|
@ -62,6 +62,9 @@
|
|||
<result column="SERVICE_CODE" property="serviceCode"/>
|
||||
<result column="NICK_NAME" property="nickName"/>
|
||||
|
||||
<result column="RETAIL_RANGE_INCOME" property="retailRangeIncome"/>
|
||||
<result column="RETAIL_SAME_LEVEL_INCOME" property="retailSameLevelIncome"/>
|
||||
<result column="RETAIL_AREA_INCOME" property="retailAreaIncome"/>
|
||||
<result column="RETAIL_BENEFIT_RANGE_INCOME" property="retailBenefitRangeIncome"/>
|
||||
<result column="RETAIL_MONTH_REPURCHASE_INCOME" property="retailMonthRepurchaseIncome"/>
|
||||
<result column="RETAIL_BENEFIT_AVG_INCOME" property="retailBenefitAvgIncome"/>
|
||||
|
@ -503,23 +506,28 @@
|
|||
</select>
|
||||
|
||||
<select id="queryBonusTotalVoByConditionForServer" resultMap="CuMemberBonus">
|
||||
select cb.period,cp.settle_date,nvl(min(bc.out_exchange_rate),1) out_exchange_rate,sum(cb.direct_income) direct_income,sum(cb.expand_income) expand_income,
|
||||
sum(cb.expand_no_capping) expand_no_capping,sum(cb.expand_capping) expand_capping,sum(cb.coach_income) coach_income,
|
||||
sum(cb.share_income) share_income,sum(cb.service_income) service_income,sum(cb.back_points) back_points,
|
||||
sum(cb.service_spend) service_spend,sum(cb.pur_real_subtotal) pur_real_subtotal,
|
||||
sum(cb.repur_push_income) repur_push_income,sum(cb.repur_range_income) repur_range_income,
|
||||
sum(cb.repur_expand_income) repur_expand_income,sum(cb.repur_real_subtotal) repur_real_subtotal,sum(cb.cloud_direct_income) cloud_direct_income,
|
||||
sum(cb.cloud_pur_income) cloud_pur_income,sum(cb.cloud_repur_income) cloud_repur_income,sum(cb.cloud_real_subtotal) cloud_real_subtotal,
|
||||
sum(cb.repur_coupon) repur_coupon,sum(repur_coupon_share) repur_coupon_share,
|
||||
sum(cb.repur_coupon_subtotal) repur_coupon_subtotal,sum(cb.global_points) global_points,
|
||||
sum(cb.car_award_points) car_award_points,sum(cb.hi_fun_income) hi_fun_income,
|
||||
sum(store_income) store_income,sum(cb.maker_direct_income) maker_direct_income,
|
||||
sum(cb.maker_share_income) maker_share_income,sum(cb.maker_real_subtotal) maker_real_subtotal,
|
||||
sum(cb.retail_range_income) retail_range_income,sum(cb.retail_same_level_income) retail_same_level_income,
|
||||
select cb.period,cp.settle_date,
|
||||
nvl(min(bc.out_exchange_rate),1) out_exchange_rate,sum(cb.direct_income) direct_income,
|
||||
sum(cb.expand_income) expand_income, sum(cb.expand_no_capping) expand_no_capping,
|
||||
sum(cb.expand_capping) expand_capping,sum(cb.coach_income) coach_income,
|
||||
sum(cb.share_income) share_income, sum(cb.service_spend) service_spend,
|
||||
sum(cb.service_income) service_income, sum(cb.back_points) back_points,
|
||||
sum(cb.pur_real_subtotal) pur_real_subtotal,
|
||||
sum(cb.repur_push_income) repur_push_income, sum(cb.repur_range_income) repur_range_income,
|
||||
sum(cb.repur_expand_income) repur_expand_income, sum(cb.repur_real_subtotal) repur_real_subtotal,
|
||||
sum(cb.repur_coupon) repur_coupon, sum(repur_coupon_share) repur_coupon_share,
|
||||
sum(cb.repur_coupon_subtotal) repur_coupon_subtotal,
|
||||
sum(cb.global_points) global_points, sum(cb.car_award_points) car_award_points,
|
||||
sum(cb.retail_range_income) retail_range_income,
|
||||
sum(cb.retail_same_level_income) retail_same_level_income,
|
||||
sum(cb.retail_area_income) retail_area_income,
|
||||
sum(cb.retail_benefit_range_income) retail_benefit_range_income,sum(cb.retail_benefit_avg_income) retail_benefit_avg_income,
|
||||
sum(cb.retail_benefit_income) retail_benefit_income,sum(cb.retail_real_subtotal) retail_real_subtotal,
|
||||
sum(cb.real_income_total) real_income_total from cu_member_bonus cb
|
||||
sum(cb.retail_benefit_range_income) retail_benefit_range_income,
|
||||
sum(cb.retail_month_repurchase_income) retail_month_repurchase_income,
|
||||
sum(cb.retail_benefit_avg_income) retail_benefit_avg_income,
|
||||
sum(cb.retail_benefit_income) retail_benefit_income,
|
||||
sum(cb.retail_real_subtotal) retail_real_subtotal,
|
||||
sum(cb.real_income_total) real_income_total
|
||||
from cu_member_bonus cb
|
||||
inner join cu_member_settle_period cp
|
||||
on cb.period = cp.pk_id
|
||||
left join bd_currency bc
|
||||
|
@ -572,6 +580,7 @@
|
|||
group by cb.period,cp.settle_date
|
||||
order by cb.period desc
|
||||
</select>
|
||||
|
||||
<select id="batchQueryCuMemberBonusSeq" resultType="java.lang.Long">
|
||||
select cu_member_bonus_seq.nextval
|
||||
from dual connect by rownum <= #{rowNum}
|
||||
|
|
|
@ -22,21 +22,6 @@ public class BonusFieldConstants {
|
|||
*/
|
||||
public static final String INCOME_RATIO= "incomeRatio";
|
||||
|
||||
/**
|
||||
* 首购实发小计
|
||||
*/
|
||||
public static final String PUR_REAL_SUBTOTAL= "purRealSubtotal";
|
||||
|
||||
/**
|
||||
* 复购实发小计
|
||||
*/
|
||||
public static final String REPUR_REAL_SUBTOTAL= "repurRealSubtotal";
|
||||
|
||||
/**
|
||||
* 云代实发小计
|
||||
*/
|
||||
public static final String CLOUD_REAL_SUBTOTAL= "cloudRealSubtotal";
|
||||
|
||||
/**
|
||||
* 实发收益总计
|
||||
*/
|
||||
|
@ -52,10 +37,6 @@ public class BonusFieldConstants {
|
|||
*/
|
||||
public static final String SETTLE_DATE = "SETTLE_DATE";
|
||||
|
||||
public static final String IS_SETTLE = "IS_SETTLE";
|
||||
|
||||
public static final String IS_PUBLISH = "IS_PUBLISH";
|
||||
|
||||
public static final String PUBLISH_DATE = "PUBLISH_DATE";
|
||||
|
||||
public static final String IS_GRANT = "IS_GRANT";
|
||||
|
@ -63,10 +44,6 @@ public class BonusFieldConstants {
|
|||
|
||||
public static final String IS_WITHDRAWAL = "IS_WITHDRAWAL";
|
||||
|
||||
public static final String WITHDRAWAL_DATE = "WITHDRAWAL_DATE";
|
||||
|
||||
public static final String IS_RETRY = "IS_RETRY";
|
||||
|
||||
/**
|
||||
* 人民币收益后缀
|
||||
*/
|
||||
|
|
|
@ -48,4 +48,17 @@ public enum EBonusIncomeStatus {
|
|||
* 国际化翻译key值
|
||||
*/
|
||||
private final String key;
|
||||
|
||||
public static String getEnumLabelByValue(Integer value) {
|
||||
if (null == value) {
|
||||
return "";
|
||||
}
|
||||
for (EBonusIncomeStatus enums : EBonusIncomeStatus.values()) {
|
||||
if (enums.getValue() == value) {
|
||||
return enums.getLabel();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -106,7 +106,10 @@ public enum EOrderType {
|
|||
* @param value
|
||||
* @return
|
||||
*/
|
||||
public static EOrderType getEnumByValue(int value) {
|
||||
public static EOrderType getEnumByValue(Integer value) {
|
||||
if (null == value) {
|
||||
return null;
|
||||
}
|
||||
for (EOrderType eOrderType : EOrderType.values()) {
|
||||
if (eOrderType.getValue() == value) {
|
||||
return eOrderType;
|
||||
|
@ -121,7 +124,10 @@ public enum EOrderType {
|
|||
* @param value
|
||||
* @return
|
||||
*/
|
||||
public static String getEnumLabelByValue(int value) {
|
||||
public static String getEnumLabelByValue(Integer value) {
|
||||
if (null == value) {
|
||||
return "";
|
||||
}
|
||||
for (EOrderType eOrderType : EOrderType.values()) {
|
||||
if (eOrderType.getValue() == value) {
|
||||
return eOrderType.getLabel();
|
||||
|
|
Loading…
Reference in New Issue