hph.regional_companies_name AS regionalCompaniesName,
IFNULL( info.`status`, '待推送' ) AS status,
(select count( hfro.sequence_nbr ) from hygf_financing_rectification_order hfro where hfro.peasant_household_id = hph.sequence_nbr )orderNum
(select count( hfro.sequence_nbr ) from hygf_financing_rectification_order hfro where hfro.peasant_household_id = hph.sequence_nbr )orderNum,
(select instance_id FROM hygf_financing_auditing WHERE hygf_financing_auditing.peasant_household_id = hph.sequence_nbr ORDER BY rec_date desc limit 1) instanceId,
hygf_unit_info.head_name responsibleUserName,
hygf_unit_info.head_phone responsibleUserPhone
FROM
`hygf_peasant_household` hph
LEFT JOIN hygf_financing_info info ON info.peasant_household_id = hph.sequence_nbr
LEFT JOIN hygf_unit_info on hph.developer_code = hygf_unit_info.amos_company_code
WHERE
hph.construction_state = '验收完成'
<iftest="params.ownersName != null and params.ownersName !=''">
...
...
@@ -60,4 +64,14 @@
where
PARENT_ID = (select SEQUENCE_NBR from privilege_company where COMPANY_NAME = '融资机构')