Explorar el Código

1.提现任务总比数添加驳回笔数

wuhp hace 1 año
padre
commit
29252951f8

+ 10 - 1
src/main/java/com/ydtech/modules/admin/service/impl/DeptBalanceServiceImpl.java

@@ -388,6 +388,15 @@ public class DeptBalanceServiceImpl implements DeptBalanceService {
                         mySumAmountQueryDto.setGroupFlag(true);
                     }
 
+                    deptBalanceVo.setUserId(record.getUserId());
+                    HashMap<String, BigDecimal> incomeIndication = deptBalanceMapper.getIncomeIndication(deptBalanceVo);
+
+                    if(incomeIndication!=null){
+                            record.setTotalIncome(incomeIndication.get("totalAmount"));
+                    }else {
+                        record.setTotalIncome(BigDecimal.ZERO);
+                    }
+
                     //如果是电销组长,将组员的数据算进来
                     mySumAmountQueryDto.setGroupFlag(true);
                     List<String> userList = sysUserService.getGroupByUserId(userId);
@@ -403,7 +412,7 @@ public class DeptBalanceServiceImpl implements DeptBalanceService {
                     sumAmount = wtxAmount.add(sxAmount).add(ytxAmount);
                     record.setWithdrawn(ytxAmount);
                     record.setNotWithdrawn(wtxAmount);
-                    record.setTotalIncome(sumAmount);
+//                    record.setTotalIncome(sumAmount);
                     record.setWithdrawingAmount(sxAmount);
                 }
             }

+ 1 - 1
src/main/resources/mapper/modules/console/WithdrawalTaskMapper.xml

@@ -55,7 +55,7 @@
     <select id="countWithdrawal" resultType="java.util.HashMap">
         select
               IFNULL(sum(a.amount),0) as "allWithdrawalAmount",
-              IFNULL(count(CASE WHEN a.auditing_status = 2 THEN  1  END),0)  +  IFNULL(count(CASE WHEN a.auditing_status = 3 THEN  1  END),0) as "allWithdrawalNumber",
+              IFNULL(count(a.id),0)  as "allWithdrawalNumber",
               IFNULL(sum( CASE WHEN a.auditing_status = 2 THEN  IFNULL(a.amount,0)  END ),0)  AS notWithdrawalAmount,
               IFNULL(sum( CASE WHEN a.auditing_status = 3 THEN  IFNULL(a.amount,0)  END ),0)  AS withdrawalAmount,
               IFNULL(count(CASE WHEN a.auditing_status = 2 THEN  1  END),0) as "notAllWithdrawalNumber",