hygf_power_station_engineering_info.real_scale as realScale
FROM
FROM
hygf_basic_grid_record hbga
hygf_basic_grid_record hbga
LEFT JOIN hygf_peasant_household hph ON hph.sequence_nbr = hbga.peasant_household_id
LEFT JOIN hygf_peasant_household hph ON hph.sequence_nbr = hbga.peasant_household_id
...
@@ -53,6 +55,9 @@
...
@@ -53,6 +55,9 @@
left join
left join
(select work_order_power_station_id, MIN( operation_time ) as firstSubmitDate from hygf_construction_gird_records hcgr where operation_content = '提交并网资料' GROUP BY work_order_power_station_id)
(select work_order_power_station_id, MIN( operation_time ) as firstSubmitDate from hygf_construction_gird_records hcgr where operation_content = '提交并网资料' GROUP BY work_order_power_station_id)
newHcgr on newHcgr.work_order_power_station_id = hbga.work_order_power_station_id
newHcgr on newHcgr.work_order_power_station_id = hbga.work_order_power_station_id
LEFT JOIN hygf_commercial on hygf_commercial.survey_information_id =hph.survey_information_id
LEFT JOIN hygf_work_order_power_station on hygf_work_order_power_station.peasant_household_id =hph.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
<where>
<where>
hbga.is_delete = 0
hbga.is_delete = 0
<iftest="map.routhPathId != null and map.routhPathId != ''">
<iftest="map.routhPathId != null and map.routhPathId != ''">
hygf_power_station_engineering_info.real_scale as realScale
FROM
FROM
`hygf_peasant_household` hph
`hygf_peasant_household` hph
LEFT JOIN hygf_financing_info info ON info.peasant_household_id = hph.sequence_nbr
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
LEFT JOIN hygf_unit_info on hph.developer_code = hygf_unit_info.amos_company_code
left join hygf_financing_info hfi on hfi.peasant_household_id = hph.sequence_nbr
left join hygf_financing_info hfi on hfi.peasant_household_id = hph.sequence_nbr
LEFT JOIN hygf_commercial on hygf_commercial.survey_information_id =hph.survey_information_id
LEFT JOIN hygf_work_order_power_station on hygf_work_order_power_station.peasant_household_id =hph.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
<where>
<where>
hph.construction_state = '验收完成'
hph.construction_state = '验收完成'
<iftest="params.routhPathId != null and params.routhPathId != ''">
<iftest="params.routhPathId != null and params.routhPathId != ''">
and hygf_rectification_order.rectification_status = '已作废' and hygf_rectification_order.rectification_source = hygf_work_order_power_station.work_order_power_station_node and hygf_rectification_order.rectification_source in ('area','engineering','design')order by rec_date desc limit 1) as rollbackOrderId,
and hygf_rectification_order.rectification_status = '已作废' and hygf_rectification_order.rectification_source = hygf_work_order_power_station.work_order_power_station_node and hygf_rectification_order.rectification_source in ('area','engineering','design')order by rec_date desc limit 1) as rollbackOrderId,
(select hygf_rectification_order.sequence_nbr from hygf_rectification_order
(select hygf_rectification_order.sequence_nbr from hygf_rectification_order
where hygf_rectification_order.peasant_househole_id = hygf_work_order_power_station.peasant_household_id
where hygf_rectification_order.peasant_househole_id = hygf_work_order_power_station.peasant_household_id
and hygf_rectification_order.rectification_status in ('待整改','待提交','整改中','整改待审核','待审核') and hygf_rectification_order.rectification_source in ('area','engineering','design') LIMIT 1) as rectificationNum
and hygf_rectification_order.rectification_status in ('待整改','待提交','整改中','整改待审核','待审核') and hygf_rectification_order.rectification_source in ('area','engineering','design') LIMIT 1) as rectificationNum,
from hygf_work_order_power_station LEFT join hygf_work_order
hygf_commercial.scale,
on hygf_work_order.sequence_nbr=hygf_work_order_power_station.work_order_id
hygf_power_station_engineering_info.real_scale as realScale
from hygf_work_order_power_station
LEFT join hygf_work_order on hygf_work_order.sequence_nbr=hygf_work_order_power_station.work_order_id
LEFT JOIN hygf_peasant_household on hygf_peasant_household.sequence_nbr=hygf_work_order_power_station.peasant_household_id
LEFT JOIN hygf_peasant_household on hygf_peasant_household.sequence_nbr=hygf_work_order_power_station.peasant_household_id
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 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 (
LEFT JOIN (
SELECT work_order_power_station_id, MIN( operation_time ) as firstConstructionDate FROM hygf_construction_records WHERE operation_content = '编辑施工资料' GROUP BY work_order_power_station_id
SELECT work_order_power_station_id, MIN( operation_time ) as firstConstructionDate FROM hygf_construction_records WHERE operation_content = '编辑施工资料' GROUP BY work_order_power_station_id
) newHcr ON newHcr.work_order_power_station_id = hygf_work_order_power_station.sequence_nbr
) newHcr ON newHcr.work_order_power_station_id = hygf_work_order_power_station.sequence_nbr
LEFT JOIN hygf_commercial on hygf_commercial.survey_information_id =hygf_peasant_household.survey_information_id
<where>
<where>
<iftest="dto.routhPathId != null and dto.routhPathId != ''">
<iftest="dto.routhPathId != null and dto.routhPathId != ''">
and hygf_work_order_power_station.sequence_nbr = #{dto.routhPathId}
and hygf_work_order_power_station.sequence_nbr = #{dto.routhPathId}