Commit 733519a1 by Water Wang

optimize

parent 69c32d77
......@@ -140,7 +140,7 @@ where ps.practitioner_type_id = 28
concat(ifnull(sum(cf.order_price),0),'') as fyp,
concat(ifnull(sum(cf.fyc_amount),0),'') as fyc,
ifnull(count(cf.order_id),0) as pieces
from ag_acl_practitioner p inner join (select t.* from ag_acl_customer_fortune t and t.drop_option_code = "S01" group by t.order_id ) cf on p.customer_id = cf.customer_id
from ag_acl_practitioner p inner join (select t.* from ag_acl_customer_fortune t where t.drop_option_code = "S01" group by t.order_id ) cf on p.customer_id = cf.customer_id
inner join ag_po_order o on cf.order_id = o.id and o.status = 3
left join ag_acl_insurer_branch b on b.id = p.insurer_branch_id
left join ag_acl_practitioner_subordinate_system s on s.id = p.subordinate_system_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