Commit d2f1f5c3 by jianan

渠道发佣报表14-发佣检核,发佣关账,数据不同

parent 2f514368
......@@ -280,25 +280,25 @@
<select id="transformForWithdrawLabel"
parameterType="com.yd.dal.entity.agms.fortune.WithdrawQueryInfo"
resultMap="WithdrawLabelInfo">
select distinct pay.id payId,
pay.withdraw_id withdrawId,
pb.payout_yearmonth payoutYearmonth,
cha.name channelName,
pra.name practitionerName,
pay.withdraw_amount referralAmount,
pra.mobile_no mobileNo,
opt.drop_option_name practitionerLevel,
ib.branch_name insurerBranchName,
dept.name insurerBranchDeptName,
sub.name subordinateSystemName,
if(pay.pay_status = 0, 2, 4) commissionPayoutStatus,
date_format(pay.pay_date, '%Y-%m-%d %H:%i:%s') payDate,
pra.ID practitionerId,
if(salary.taxout_amount is null,0,salary.taxout_amount) taxAmount,
if(salary.net_amount is null,0,salary.net_amount) afterTaxAmount,
ib.id insurerBranchId,
salary.is_active isActive,
f.channel_type channelType
select pay.id payId,
pay.withdraw_id withdrawId,
pb.payout_yearmonth payoutYearmonth,
cha.name channelName,
pra.name practitionerName,
pay.withdraw_amount referralAmount,
pra.mobile_no mobileNo,
opt.drop_option_name practitionerLevel,
ib.branch_name insurerBranchName,
dept.name insurerBranchDeptName,
sub.name subordinateSystemName,
if(pay.pay_status = 0, 2, 4) commissionPayoutStatus,
date_format(pay.pay_date, '%Y-%m-%d %H:%i:%s') payDate,
pra.ID practitionerId,
if(salary.taxout_amount is null,0,salary.taxout_amount) taxAmount,
if(salary.net_amount is null,0,salary.net_amount) afterTaxAmount,
ib.id insurerBranchId,
salary.is_active isActive,
f.channel_type channelType
from ag_acl_customer_fortune_pay pay
inner join ag_acl_customer_fortune f on f.fortune_payed_id = pay.id
inner join ag_acl_customer_fortune_payout_batch pb on pb.id = f.payout_batch_id
......@@ -339,6 +339,7 @@
<if test="item.commissionPayoutStatus != null">
and f.commission_payout_status = #{item.commissionPayoutStatus,jdbcType=BIGINT}
</if>
GROUP BY pay.id
order by pb.payout_yearmonth
</select>
......
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