Commit a457d015 authored by wujiang's avatar wujiang

修复人大金仓适配

parent 082e1098
......@@ -104,19 +104,23 @@
icbc.medium_id,
ph.rec_date
FROM
(SELECT amos_user_id, is_delete, developer_code,regional_companies_code, developer_user_id, MAX( sequence_nbr ), owners_name, telephone, id_card,regional_companies_name,project_address, rec_date FROM hygf_peasant_household GROUP BY amos_user_id) ph
(
SELECT
amos_user_id,
MAX(developer_code) AS developer_code,
MAX(regional_companies_code ) AS regional_companies_code ,
MAX(is_delete) AS is_delete,
MAX(owners_name) AS owners_name,
MAX(telephone) AS telephone,
MAX(id_card) AS id_card,
MAX(regional_companies_name) AS regional_companies_name,
MAX(project_address) AS project_address,
MAX(rec_date) AS rec_date
FROM hygf_peasant_household GROUP BY amos_user_id
) ph
LEFT JOIN hygf_icbc_record icbc ON ph.amos_user_id = icbc.amos_user_id
<where>
ph.is_delete = 0
<if test="param != null">
<if test="param.openAccountStatus != null and param.openAccountStatus != ''">
<if test="param.openAccountStatus != '00'">
AND icbc.open_account_status = #{param.openAccountStatus}
</if>
<if test="param.openAccountStatus == '00'">
AND (icbc.open_account_status = #{param.openAccountStatus} OR icbc.open_account_status is null)
</if>
</if>
<if test="param.custName != null and param.custName != ''">
AND (ph.owners_name LIKE CONCAT('%', #{param.custName}, '%') OR icbc.cust_name LIKE CONCAT('%', #{param.custName}, '%'))
</if>
......@@ -132,6 +136,16 @@
<if test="param.addressName != null and param.addressName != ''">
AND ph.project_address LIKE CONCAT('%', #{param.addressName}, '%')
</if>
<if test="param != null">
<if test="param.openAccountStatus != null and param.openAccountStatus != ''">
<if test="param.openAccountStatus != '00'">
AND icbc.open_account_status = #{param.openAccountStatus}
</if>
<if test="param.openAccountStatus == '00'">
AND (icbc.open_account_status = #{param.openAccountStatus} OR icbc.open_account_status is null)
</if>
</if>
</if>
</where>
<if test="param.offset != null and param.limit != 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