@@ -68,11 +68,19 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan
hygf_document_station.preparation_money_id as preparationMoneyId,
hygf_preparation_money.delivery_time as deliveryTime,
hygf_preparation_money.arrival_time as arrivalTime,
(select instance_id from hygf_preparation_money_auditing where hygf_document_station.preparation_money_id = hygf_preparation_money_auditing.preparation_money_id limit 1) as instanceId from
hygf_commercial.scale,
hygf_power_station_engineering_info.real_scale as realScale,
m.instance_id AS instanceId
from
hygf_peasant_household
LEFT JOIN hygf_document_station on hygf_peasant_household.sequence_nbr = hygf_document_station.station_id
LEFT JOIN hygf_power_station on hygf_peasant_household.sequence_nbr = hygf_power_station.peasant_household_id
LEFT JOIN hygf_preparation_money on hygf_preparation_money.sequence_nbr = hygf_document_station.preparation_money_id
LEFT JOIN hygf_commercial on hygf_commercial.survey_information_id =hygf_peasant_household.survey_information_id
LEFT JOIN hygf_work_order_power_station on hygf_work_order_power_station.peasant_household_id =hygf_peasant_household.sequence_nbr
LEFT JOIN hygf_power_station_engineering_info on hygf_power_station_engineering_info.work_order_power_station_id=hygf_work_order_power_station.sequence_nbr
LEFT JOIN (select instance_id,preparation_money_id AS preparation_money_id from hygf_preparation_money_auditing group by instance_id,preparation_money_id) m on m.preparation_money_id=hygf_document_station.preparation_money_id
<where>
<iftest="routhPathId != null and routhPathId != ''">
and hygf_preparation_money.sequence_nbr = #{routhPathId}