(select CONCAT_WS(',',instance_id,node_routing) instanceId 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,
CONCAT(info.disbursement_money,'') as disbursementMoney,
substring_index ( hygf_peasant_household.project_address_name, '/', 1 ) AS province,
b.stamp_status,
b.status
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
...
...
@@ -32,6 +33,9 @@
<iftest="processStatus != null and processStatus != ''">
and hygf_power_station.process_status = #{processStatus}
</if>
<iftest="province != null and province != ''">
and hygf_peasant_household.project_address like concat(concat('%',#{province}),'%')
</if>
<!-- GROUP BY hygf_peasant_household.sequence_nbr-->
hygf_document_station.preparation_money_id as preparationMoneyId,
...
...
@@ -80,6 +81,9 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan
<iftest=" preparationMoneyState == 1 ">
and hygf_peasant_household.preparation_money_state not in ('待发货','待补货','暂存发货') and preparation_money_state is not null and preparation_money_state != ''
</if>
<iftest="province != null and province != ''">
and hygf_peasant_household.project_address like concat(concat('%',#{province}),'%')
</if>
</where>
<!-- GROUP BY hygf_peasant_household.sequence_nbr-->
@Select("select SEQUENCE_NBR as sequenceNbr,ORG_CODE as orgCode,COMPANY_NAME as companyName ,`LEVEL` from privilege_company where COMPANY_TYPE = 'region' and IS_DELETED = 0 ")
@Select("select SEQUENCE_NBR as sequenceNbr,ORG_CODE as orgCode,COMPANY_NAME as companyName ,`LEVEL` ,CONCAT_WS('_',COMPANY_NAME,SEQUENCE_NBR) as text from privilege_company where COMPANY_TYPE = 'region' and IS_DELETED = 0 ")