Commit ddbfe8f9 by jianan

来佣比对查询, 已审核的数据

parent af1102c6
......@@ -48,7 +48,7 @@
o.broker_customer_id,
o.cover_term_type coverageTerm,
CONCAT(o.payment_term, (case o.payment_term_unit when 'Y' then '年' when 'M' then '月' else '' END)) payTerm
CONCAT(o.payment_term, (case o.payment_term_unit when 'Y' then '年' when 'M' then '月' else '' END)) payTerm
from ag_po_order_commission oc
left join
(SELECT id, order_price, product_id,
......@@ -56,7 +56,7 @@
payment_term, payment_term_unit,broker_customer_id,
cover_term_type
from ag_po_order t
where t.status in (3,4) and t.policy_no is not null
where t.status=3 and t.payment_status=3 and t.policy_no is not null
and (t.plan_id not in (424,453,464) or t.plan_id is null)
) o ON o.id = oc.order_id
left join ag_product_life_commission_base b on oc.commission_base_id = b.id
......
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