|
|
@@ -388,35 +388,22 @@ public class DeptBalanceServiceImpl implements DeptBalanceService {
|
|
|
mySumAmountQueryDto.setGroupFlag(true);
|
|
|
}
|
|
|
|
|
|
- deptBalanceVo.setUserId(record.getUserId());
|
|
|
- HashMap<String, BigDecimal> incomeIndication = deptBalanceMapper.getIncomeIndication(deptBalanceVo);
|
|
|
-
|
|
|
- if(incomeIndication!=null){
|
|
|
- if(deptBalanceVo.getManagementSource().equals("2")){
|
|
|
- record.setTotalIncome(incomeIndication.get("totalAmount"));
|
|
|
- }else {
|
|
|
- record.setTotalIncome(BigDecimalUtils.nullToZero(incomeIndication.get("totalAmount")).divide(new BigDecimal(10)));
|
|
|
- }
|
|
|
- }else {
|
|
|
- record.setTotalIncome(BigDecimal.ZERO);
|
|
|
- }
|
|
|
-
|
|
|
//如果是电销组长,将组员的数据算进来
|
|
|
- mySumAmountQueryDto.setGroupFlag(true);
|
|
|
- List<String> userList = sysUserService.getGroupByUserId(userId);
|
|
|
- //sumAmount= deptBalanceMapper.getDxWalletAgentAmount(userList,deptBalanceVo.getBeginDate(),deptBalanceVo.getEndDate());
|
|
|
- SysUserAccount sysUserAccountEntity = sysUserAccountService.getById(record.getUserId());
|
|
|
- // 已提现金额 查询历史表中的审核状态为3的数据
|
|
|
- ytxAmount = insFeeOrderNewService.findMyAmountYTXmountByDates(record.getUserId(), "3",true,deptBalanceVo.getBeginDate(),deptBalanceVo.getEndDate());
|
|
|
- // 提现中
|
|
|
- sxAmount = insFeeOrderNewService.findMyAmountYTXmountByDates(record.getUserId(), "2",true,deptBalanceVo.getBeginDate(),deptBalanceVo.getEndDate());
|
|
|
- // 可提现
|
|
|
- wtxAmount= (sysUserAccountEntity==null || sysUserAccountEntity.getSumAmount()==null)?BigDecimal.ZERO:sysUserAccountEntity.getSumAmount();
|
|
|
- //总的 = 已提现金额+ 可提现金额 + 提现中
|
|
|
- sumAmount = wtxAmount.add(sxAmount).add(ytxAmount);
|
|
|
+ mySumAmountQueryDto.setGroupFlag(true);
|
|
|
+ List<String> userList = sysUserService.getGroupByUserId(userId);
|
|
|
+ //sumAmount= deptBalanceMapper.getDxWalletAgentAmount(userList,deptBalanceVo.getBeginDate(),deptBalanceVo.getEndDate());
|
|
|
+ SysUserAccount sysUserAccountEntity = sysUserAccountService.getById(record.getUserId());
|
|
|
+ // 已提现金额 查询历史表中的审核状态为3的数据
|
|
|
+ ytxAmount = insFeeOrderNewService.findMyAmountYTXmountByDates(record.getUserId(), "3",true,deptBalanceVo.getBeginDate(),deptBalanceVo.getEndDate());
|
|
|
+ // 提现中
|
|
|
+ sxAmount = insFeeOrderNewService.findMyAmountYTXmountByDates(record.getUserId(), "2",true,deptBalanceVo.getBeginDate(),deptBalanceVo.getEndDate());
|
|
|
+ // 可提现
|
|
|
+ wtxAmount= (sysUserAccountEntity==null || sysUserAccountEntity.getSumAmount()==null)?BigDecimal.ZERO:sysUserAccountEntity.getSumAmount();
|
|
|
+ //总的 = 已提现金额+ 可提现金额 + 提现中
|
|
|
+ sumAmount = wtxAmount.add(sxAmount).add(ytxAmount);
|
|
|
record.setWithdrawn(ytxAmount);
|
|
|
record.setNotWithdrawn(wtxAmount);
|
|
|
-// record.setTotalIncome(sumAmount);
|
|
|
+ record.setTotalIncome(sumAmount);
|
|
|
record.setWithdrawingAmount(sxAmount);
|
|
|
}
|
|
|
}
|
|
|
@@ -448,12 +435,12 @@ public class DeptBalanceServiceImpl implements DeptBalanceService {
|
|
|
record.setWithdrawn(ysTXAmount);
|
|
|
record.setNotWithdrawn(ssKTAmount);
|
|
|
if(incomeIndication!=null){
|
|
|
- if(deptBalanceVo.getManagementSource().equals("2")){
|
|
|
record.setTotalIncome(incomeIndication.get("totalAmount"));
|
|
|
- }else {
|
|
|
- record.setTotalIncome(BigDecimalUtils.nullToZero(incomeIndication.get("totalAmount")).divide(new BigDecimal(10)));
|
|
|
-
|
|
|
- }
|
|
|
+// if(deptBalanceVo.getManagementSource().equals("2")){
|
|
|
+// record.setTotalIncome(incomeIndication.get("totalAmount"));
|
|
|
+// }else {
|
|
|
+// record.setTotalIncome(BigDecimalUtils.nullToZero(incomeIndication.get("totalAmount")).divide(new BigDecimal(10)));
|
|
|
+// }
|
|
|
}else {
|
|
|
record.setTotalIncome(BigDecimal.ZERO);
|
|
|
}
|