SELECT * FROM hygf_peasant_household LEFT JOIN hygf_household_contract ON hygf_household_contract.peasant_household_id=hygf_peasant_household.sequence_nbr where
SELECT *,
hygf_peasant_household.sequence_nbr stationId
FROM hygf_peasant_household LEFT JOIN hygf_household_contract ON hygf_household_contract.peasant_household_id=hygf_peasant_household.sequence_nbr where
hygf_household_contract.`status`='双方已签署'
and hygf_peasant_household.developer_id=#{developerId}
and hygf_peasant_household.regional_companies_seq=#{regionalCompaniesSeq}
and hygf_peasant_household.review=2
<iftest="peasantHouseholdNo!=null and peasantHouseholdNo !=''">
and hygf_peasant_household.peasant_household_no like concat(concat("%",#{peasantHouseholdNo}),"%")
</if>
<iftest="ownersName!=null and ownersName !='' ">
and hygf_peasant_household.owners_name like concat(concat("%",#{ownersName}),"%")