|
|
@@ -92,12 +92,12 @@ public class DeptBalanceServiceImpl implements DeptBalanceService {
|
|
|
} else {
|
|
|
dateStr = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(createTime);
|
|
|
}
|
|
|
- HashMap<String, BigDecimal> orderAmount = deptBalanceMapper.getByDeptId(deptId, dateStr);
|
|
|
+ HashMap<String, BigDecimal> orderAmount = deptBalanceMapper.getByDeptId(deptId, dateStr,deptBalanceVo.getBeginDate(),deptBalanceVo.getEndDate());
|
|
|
if (orderAmount != null && !orderAmount.isEmpty()) {
|
|
|
BigDecimal totalIncome = orderAmount.get("totalIncome")==null ? BigDecimal.ZERO : orderAmount.get("totalIncome");
|
|
|
allTotalIncome = totalIncome.multiply(new BigDecimal(proportional))
|
|
|
.divide(new BigDecimal("100")).setScale(2, RoundingMode.DOWN);
|
|
|
- allDeptManagementFee = this.calculateTotal(orderAmount.get("deptManagementFee"), allDeptManagementFee, null);//机构管理费
|
|
|
+ allDeptManagementFee = this.calculateTotal(orderAmount.get("deptManagementFee"), allDeptManagementFee, null);
|
|
|
}
|
|
|
// 填充 已提现抽成费用和可提现抽成费用
|
|
|
List<SysAgencyFeeApproval> sysAgencyFeeApprovals = sysAgencyFeeApprovalMapper.selectList(new LambdaQueryWrapper<SysAgencyFeeApproval>()
|
|
|
@@ -162,19 +162,19 @@ public class DeptBalanceServiceImpl implements DeptBalanceService {
|
|
|
}else{
|
|
|
dateStr= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(createTime);
|
|
|
}
|
|
|
- HashMap<String, BigDecimal> orderAmount = deptBalanceMapper.getByDeptId(deptId,dateStr);
|
|
|
+ HashMap<String, BigDecimal> orderAmount = deptBalanceMapper.getByDeptId(deptId,dateStr,deptBalanceVo.getBeginDate(),deptBalanceVo.getEndDate());
|
|
|
|
|
|
if (orderAmount != null && !orderAmount.isEmpty()) {
|
|
|
BigDecimal totalIncome = orderAmount.get("totalIncome")==null ? BigDecimal.ZERO : orderAmount.get("totalIncome");
|
|
|
allTotalIncome = totalIncome.multiply(new BigDecimal(proportional))
|
|
|
.divide(new BigDecimal("100")).setScale(2, RoundingMode.DOWN);
|
|
|
- allDeptManagementFee = this.calculateTotal(orderAmount.get("deptManagementFee"), allDeptManagementFee, null);//机构管理费
|
|
|
+ allDeptManagementFee = this.calculateTotal(orderAmount.get("deptManagementFee"), allDeptManagementFee, null);
|
|
|
}
|
|
|
// 填充 已提现抽成费用和可提现抽成费用
|
|
|
List<SysAgencyFeeApproval> sysAgencyFeeApprovals = sysAgencyFeeApprovalMapper.selectList(new LambdaQueryWrapper<SysAgencyFeeApproval>()
|
|
|
.eq(SysAgencyFeeApproval::getUserId, item.getUserId())
|
|
|
.eq(SysAgencyFeeApproval::getStatus, 1));
|
|
|
- if (sysAgencyFeeApprovals.size() > 0) {
|
|
|
+ if (!sysAgencyFeeApprovals.isEmpty()) {
|
|
|
for (SysAgencyFeeApproval sysAgencyFeeApproval : sysAgencyFeeApprovals) {
|
|
|
allWithdrawn = allWithdrawn.add(sysAgencyFeeApproval.getHistoryFee());
|
|
|
}
|
|
|
@@ -282,19 +282,19 @@ public class DeptBalanceServiceImpl implements DeptBalanceService {
|
|
|
if (!records.isEmpty()) {
|
|
|
for (SysPartnerConsoleDto record : records) {
|
|
|
String userId = record.getUserId();
|
|
|
- HashMap<String, BigDecimal> orderAmount = deptBalanceMapper.getWalletAgentAmount(userId);
|
|
|
+ HashMap<String, BigDecimal> orderAmount = deptBalanceMapper.getWalletAgentAmount(userId,deptBalanceVo.getBeginDate(),deptBalanceVo.getEndDate());
|
|
|
// 总金额
|
|
|
if (orderAmount != null && !orderAmount.isEmpty()) {
|
|
|
record.setTotalIncome(orderAmount.get("totalIncome"));
|
|
|
}
|
|
|
// 已提现
|
|
|
- BigDecimal ysTXAmount= insFeeOrderNewService.findMyAmountYTXmount(record.getUserId(),"3");
|
|
|
+ BigDecimal ysTXAmount= insFeeOrderNewService.findMyAmountYTXmountByDate(record.getUserId(),"3",deptBalanceVo.getBeginDate(),deptBalanceVo.getEndDate());
|
|
|
// 未提现
|
|
|
MySumAmountQueryDto mySumAmountQueryDto = new MySumAmountQueryDto();
|
|
|
mySumAmountQueryDto.setAuditstatus("1");
|
|
|
SysUserAccount sysUserAccountEntity = sysUserAccountService.getById(record.getUserId());
|
|
|
BigDecimal ssKTAmount =BigDecimal.ZERO;
|
|
|
- BigDecimal txzTXAmount= insFeeOrderNewService.findMyAmountYTXmount(mySumAmountQueryDto.getUserId(),"2");
|
|
|
+ BigDecimal txzTXAmount= insFeeOrderNewService.findMyAmountYTXmountByDate(mySumAmountQueryDto.getUserId(),"2",deptBalanceVo.getBeginDate(),deptBalanceVo.getEndDate());
|
|
|
|
|
|
if(sysUserAccountEntity!=null){
|
|
|
ssKTAmount = sysUserAccountEntity.getSumAmount()==null?BigDecimal.ZERO: sysUserAccountEntity.getSumAmount();
|