@@ -141,9 +141,9 @@ where ps.practitioner_type_id = 28
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 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
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
where
<choose>
<whentest="type.equalsIgnoreCase('B')">
...
...
@@ -289,11 +289,11 @@ where ps.practitioner_type_id = 28
FROM sal001 sales LEFT JOIN ins003 p_sales on sales.SAL_MST_ID = p_sales.FK_SAL_MST_ID
LEFT JOIN ins001 policy on policy.INS_MST_ID = p_sales.FK_INS_MST_ID