Commit af972fd1 by jianan

【ydlife】-【客户管理】-线上录单投被保人customerId相同

parent ddc65be9
......@@ -963,18 +963,18 @@
c.mobile_no ,
(case c.gender when 1 then '男' when 2 then '女' else c.gender END) gender,
c.birth_date,
t.relation_type
c.relation_type
from
(select h.customer_id, group_concat(distinct h.relation_type ORDER BY h.relation_type) relation_type
(select h.name, h.id_type_id, h.id_no, max(h.id) id
from ag_acl_policyholder h
left join ag_po_order o on o.id = h.order_id
where h.type = 3
and o.status = 3
and h.order_id in
(select t1.order_id from ag_acl_policyholder t1 where t1.customer_id = #{customerId,jdbcType=BIGINT} and t1.type = 2)
GROUP BY h.customer_id
GROUP BY h.name, h.id_type_id, h.id_no
) t
left join ag_acl_customer c on t.customer_id = c.id
left join ag_acl_policyholder c on t.id = c.id
</select>
<sql id="customerPolicyInfoFields">
......
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