Commit d2f1f5c3 by jianan

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

parent 2f514368
...@@ -280,25 +280,25 @@ ...@@ -280,25 +280,25 @@
<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 distinct pay.id payId, select pay.id payId,
pay.withdraw_id withdrawId, pay.withdraw_id withdrawId,
pb.payout_yearmonth payoutYearmonth, pb.payout_yearmonth payoutYearmonth,
cha.name channelName, cha.name channelName,
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,
pra.ID practitionerId, pra.ID practitionerId,
if(salary.taxout_amount is null,0,salary.taxout_amount) taxAmount, if(salary.taxout_amount is null,0,salary.taxout_amount) taxAmount,
if(salary.net_amount is null,0,salary.net_amount) afterTaxAmount, if(salary.net_amount is null,0,salary.net_amount) afterTaxAmount,
ib.id insurerBranchId, ib.id insurerBranchId,
salary.is_active isActive, salary.is_active isActive,
f.channel_type channelType f.channel_type channelType
from ag_acl_customer_fortune_pay pay 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 f on f.fortune_payed_id = pay.id
inner join ag_acl_customer_fortune_payout_batch pb on pb.id = f.payout_batch_id inner join ag_acl_customer_fortune_payout_batch pb on pb.id = f.payout_batch_id
...@@ -339,6 +339,7 @@ ...@@ -339,6 +339,7 @@
<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
order by pb.payout_yearmonth order by pb.payout_yearmonth
</select> </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