Commit 156caacf by yao.xiao

Merge branch 'dev_20210203_xxy' into dev

parents 9d4d63cd 8f90f414
...@@ -683,14 +683,14 @@ public class AgmsFortuneServiceImpl implements AgmsFortuneService { ...@@ -683,14 +683,14 @@ public class AgmsFortuneServiceImpl implements AgmsFortuneService {
continue; continue;
} }
for (AclCustomerFortuneWithdraw withdraw: withdraws) { for (AclCustomerFortuneWithdraw withdraw: withdraws) {
if (CommonUtil.isNullOrZero(withdraw.getIsPaid())){ // if (CommonUtil.isNullOrZero(withdraw.getIsPaid())){
BigDecimal drawnFortune = statistic.getDrawnFortune(); BigDecimal drawnFortune = statistic.getDrawnFortune();
if (CommonUtil.isNullOrZero(drawnFortune)){ if (CommonUtil.isNullOrZero(drawnFortune)){
drawnFortune = BigDecimal.ZERO; drawnFortune = BigDecimal.ZERO;
} }
drawnFortune = drawnFortune.add(withdraw.getWithdrawAmount()); drawnFortune = drawnFortune.add(withdraw.getWithdrawAmount());
statistic.setDrawnFortune(drawnFortune); statistic.setDrawnFortune(drawnFortune);
} // }
} }
} }
customerFortuneStatisticDalService.updateAll(customerFortuneStatistics); customerFortuneStatisticDalService.updateAll(customerFortuneStatistics);
......
...@@ -150,31 +150,30 @@ ...@@ -150,31 +150,30 @@
<select id="transformForWithdrawLabel" <select id="transformForWithdrawLabel"
parameterType="com.yd.dal.entity.agms.fortune.WithdrawQueryInfo" parameterType="com.yd.dal.entity.agms.fortune.WithdrawQueryInfo"
resultMap="WithdrawLabelInfo"> resultMap="WithdrawLabelInfo">
select pay.id payId, select distinct pay.id payId,
pb.payout_yearmonth payoutYearmonth, pb.payout_yearmonth payoutYearmonth,
pra.name practitionerName, pra.name practitionerName,
pay.withdraw_amount referralAmount, pay.withdraw_amount referralAmount,
pra.mobile_no mobileNo, pra.mobile_no mobileNo,
opt.drop_option_name practitionerLevel, opt.drop_option_name practitionerLevel,
ib.branch_name insurerBranchName, ib.branch_name insurerBranchName,
dept.name insurerBranchDeptName, dept.name insurerBranchDeptName,
sub.name subordinateSystemName, sub.name subordinateSystemName,
if(pay.pay_status = 0, 2, 4) commissionPayoutStatus, if(pay.pay_status = 0, 2, 4) commissionPayoutStatus,
date_format(pay.pay_date, '%Y-%m-%d %H:%i:%s') payDate date_format(pay.pay_date, '%Y-%m-%d %H:%i:%s') payDate
from ag_acl_customer_fortune_pay pay from ag_acl_customer_fortune_pay pay
left join ag_acl_customer_fortune f LEFT join ag_acl_customer_fortune f on f.fortune_payed_id = pay.id
left join ag_acl_customer_fortune_payout_batch pb on pb.id = f.payout_batch_id LEFT JOIN ag_po_order o on o.id = f.order_id
on f.fortune_payed_id = pay.id, left join ag_acl_customer_fortune_payout_batch pb on pb.id = f.payout_batch_id
ag_acl_practitioner pra LEFT JOIN ag_acl_practitioner pra on pay.customer_id = pra.customer_id
LEFT JOIN ag_acl_insurer_branch ib on ib.id = pra.insurer_branch_id LEFT JOIN ag_acl_insurer_branch ib on ib.id = pra.insurer_branch_id
LEFT JOIN ag_acl_insurer_branch_dept dept ON pra.dept_id = dept.id LEFT JOIN ag_acl_insurer_branch_dept dept ON pra.dept_id = dept.id
LEFT JOIN ag_acl_practitioner_subordinate_system sub ON sub.id = pra.subordinate_system_id LEFT JOIN ag_acl_practitioner_subordinate_system sub ON sub.id = pra.subordinate_system_id
left join ag_acl_practitioner_setting setting left join ag_acl_practitioner_setting setting
left join ag_md_drop_options opt on opt.id = setting.practitioner_level left join ag_md_drop_options opt on opt.id = setting.practitioner_level
on pra.id = setting.practitioner_id on pra.id = setting.practitioner_id
where pay.customer_id = pra.customer_id where
and pra.is_active = 1 setting.practitioner_type_id = 28
and setting.practitioner_type_id = 28
and pay.withdraw_amount != 0 and pay.withdraw_amount != 0
<if test="item.payoutYearmonth != null"> <if test="item.payoutYearmonth != null">
and pb.payout_yearmonth = #{item.payoutYearmonth,jdbcType=VARCHAR} and pb.payout_yearmonth = #{item.payoutYearmonth,jdbcType=VARCHAR}
...@@ -194,7 +193,5 @@ ...@@ -194,7 +193,5 @@
<if test="item.commissionPayoutStatus != null"> <if test="item.commissionPayoutStatus != null">
and f.commission_payout_status = #{item.commissionPayoutStatus,jdbcType=BIGINT} and f.commission_payout_status = #{item.commissionPayoutStatus,jdbcType=BIGINT}
</if> </if>
group by pay.id
</select> </select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment