Commit 08badf5d by wenyang Committed by jianan

渠道规则开发4(渠道查询条件优化,支持对公对私)

parent 094ba2bd
...@@ -60,7 +60,8 @@ ...@@ -60,7 +60,8 @@
LEFT JOIN ag_md_drop_master mas ON mas.id = op.drop_master_id LEFT JOIN ag_md_drop_master mas ON mas.id = op.drop_master_id
LEFT JOIN ag_md_drop_options op1 ON op1.id = setting.practitioner_level LEFT JOIN ag_md_drop_options op1 ON op1.id = setting.practitioner_level
LEFT JOIN ag_md_drop_master mas1 ON mas1.id = op1.drop_master_id LEFT JOIN ag_md_drop_master mas1 ON mas1.id = op1.drop_master_id
LEFT JOIN ag_acl_channel_new cha ON cha.customer_id = t.customer_id <!-- LEFT JOIN ag_acl_channel_new cha ON cha.customer_id = t.customer_id -->
LEFT JOIN ag_acl_channel_new cha ON cha.id = t.channel_id
LEFT JOIN (select distinct poc.order_id,poc.commission_period,c.* FROM ag_po_order_commission poc,ag_po_order_commission_check c LEFT JOIN (select distinct poc.order_id,poc.commission_period,c.* FROM ag_po_order_commission poc,ag_po_order_commission_check c
WHERE poc.commission_check_id=c.id AND poc.commission_status='2' AND poc.commission_type='1' WHERE poc.commission_check_id=c.id AND poc.commission_status='2' AND poc.commission_type='1'
<if test="item.commissionPayoutYearmonth == null"> <if test="item.commissionPayoutYearmonth == null">
...@@ -149,7 +150,8 @@ ...@@ -149,7 +150,8 @@
LEFT JOIN ag_md_drop_master mas ON mas.id = op.drop_master_id LEFT JOIN ag_md_drop_master mas ON mas.id = op.drop_master_id
LEFT JOIN ag_md_drop_options op1 ON op1.id = setting.practitioner_level LEFT JOIN ag_md_drop_options op1 ON op1.id = setting.practitioner_level
LEFT JOIN ag_md_drop_master mas1 ON mas1.id = op1.drop_master_id LEFT JOIN ag_md_drop_master mas1 ON mas1.id = op1.drop_master_id
LEFT JOIN ag_acl_channel_new cha ON cha.customer_id = t.customer_id <!-- LEFT JOIN ag_acl_channel_new cha ON cha.customer_id = t.customer_id -->
LEFT JOIN ag_acl_channel_new cha ON cha.id = t.channel_id
WHERE ((t.settlement_type='2' and mas1.scenario_code='practitioner_level' and setting.practitioner_type_id=28) or t.settlement_type='3') WHERE ((t.settlement_type='2' and mas1.scenario_code='practitioner_level' and setting.practitioner_type_id=28) or t.settlement_type='3')
AND mas.drop_code = 'Fortune_Payout_Status' AND mas.drop_code = 'Fortune_Payout_Status'
<if test="item.insurerBranchId != null"> <if test="item.insurerBranchId != null">
...@@ -307,7 +309,7 @@ ...@@ -307,7 +309,7 @@
left join ag_acl_practitioner_setting setting on pra.id = setting.practitioner_id left join ag_acl_practitioner_setting setting on pra.id = setting.practitioner_id
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
left join ag_acl_life_practitioner_salary salary on salary.practitioner_id=pra.id and salary.`year_month`=REPLACE (pb.payout_yearmonth, '-', '') left join ag_acl_life_practitioner_salary salary on salary.practitioner_id=pra.id and salary.`year_month`=REPLACE (pb.payout_yearmonth, '-', '')
left join ag_acl_channel_new cha ON cha.customer_id = f.customer_id left join ag_acl_channel_new cha ON cha.id = f.channel_id
where where
(setting.practitioner_type_id=28 or f.settlement_type='3') (setting.practitioner_type_id=28 or f.settlement_type='3')
<if test="item.channelId != null"> <if test="item.channelId != null">
......
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