AND dcr.operation_time <![CDATA[ >= ]]> #{query.changeStartTime}
AND dcr.operation_time <![CDATA[ <= ]]> #{query.changeEndTime}
<iftest="(query.two != null and query.two != '') or (query.three != null and query.three != '') or (query.four != null and query.four != '') or (query.wgCodes != null and query.wgCodes.size() > 0)">
AND EXISTS (
SELECT 1
FROM house_resource_business_entity_info_mapping m
INNER JOIN house_resource hr2 ON hr2.id = m.house_resource_id AND hr2.delete_flag = 0
WHERE m.business_entity_info_id = bei.id
AND m.delete_flag = 0
<iftest="query.two != null and query.two != ''">
AND hr2.two = #{query.two}
</if>
<iftest="query.three != null and query.three != ''">
AND hr2.three = #{query.three}
</if>
<iftest="query.four != null and query.four != ''">
AND hr2.four = #{query.four}
</if>
<iftest="query.wgCodes != null and query.wgCodes.size() > 0">
AND dcr.operation_time <![CDATA[ >= ]]> #{query.changeStartTime}
AND dcr.operation_time <![CDATA[ <= ]]> #{query.changeEndTime}
<iftest="(query.two != null and query.two != '') or (query.three != null and query.three != '') or (query.four != null and query.four != '') or (query.wgCodes != null and query.wgCodes.size() > 0)">
AND EXISTS (
SELECT 1
FROM house_resource_business_entity_info_mapping m
INNER JOIN house_resource hr2 ON hr2.id = m.house_resource_id
WHERE m.business_entity_info_id = bei.id
<iftest="query.two != null and query.two != ''">
AND hr2.two = #{query.two}
</if>
<iftest="query.three != null and query.three != ''">
AND hr2.three = #{query.three}
</if>
<iftest="query.four != null and query.four != ''">
AND hr2.four = #{query.four}
</if>
<iftest="query.wgCodes != null and query.wgCodes.size() > 0">