Commit 704e1404 authored by hezhuozhi's avatar hezhuozhi

人大金仓适配

parent 08062d08
......@@ -13,8 +13,7 @@
hygf_peasant_household.project_address_detail,
b.stamp_status,
b.status
from hygf_power_station LEFT JOIN ( select peasant_household_id,initiate_status, contract_lock_id,stamp_status,status from hygf_household_contract
) b on b.peasant_household_id=hygf_power_station.peasant_household_id
from hygf_power_station LEFT JOIN ( SELECT bb.peasant_household_id, initiate_status, contract_lock_id, stamp_status, status FROM (SELECT peasant_household_id,MAX(sequence_nbr) AS sequence_nbr from hygf_household_contract GROUP BY peasant_household_id ) aa LEFT JOIN hygf_household_contract bb ON aa.sequence_nbr=bb.sequence_nbr) b on b.peasant_household_id=hygf_power_station.peasant_household_id
LEFT JOIN hygf_peasant_household on hygf_peasant_household.sequence_nbr=hygf_power_station.peasant_household_id
where hygf_power_station.is_delete=0
......
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