substring_index ( hph.project_address_name, '/', 1 ) AS province,
DATE_FORMAT(hogaa.grid_connection_time, '%Y-%m-%d %H:%i:%S') AS gridConnectionTime,
CASE WHEN hbga.acceptance_check_status = '15' THEN '待提交验收'
...
...
@@ -41,12 +42,23 @@
LEFT JOIN hygf_peasant_household hph ON hph.sequence_nbr = hbga.peasant_household_id
LEFT JOIN hygf_on_grid_and_acceptance hogaa ON hogaa.work_order_power_station_id = hbga.work_order_power_station_id
LEFT JOIN hygf_work_order ON hygf_work_order.sequence_nbr = hbga.work_order_id
left join
(select work_order_power_station_id, MIN( operation_time ) as firstSubmitDate from hygf_construction_acceptance_records where operation_content = '提交验收审核' GROUP BY work_order_power_station_id)
newHcar on newHcar.work_order_power_station_id = hbga.work_order_power_station_id
<where>
hbga.is_delete = 0
<iftest="map.amosDealerId!=null and map.amosDealerId!=''">
and hygf_work_order.amos_dealer_id = #{map.amosDealerId}
</if>
<iftest="map.startTime!=null and map.startTime!=''">
and newHcar.firstSubmitDate >= #{map.startTime}
</if>
<iftest="map.endTime!=null and map.endTime!=''">
and newHcar.firstSubmitDate <= #{map.endTime}
</if>
<iftest="map.developerName!=null and map.developerName!=''">
and hph.developer_name like concat('%',#{map.developerName},'%')
substring_index ( hph.project_address_name, '/', 1 ) AS province,
DATE_FORMAT(hogaa.grid_connection_time, '%Y-%m-%d %H:%i:%S') AS gridConnectionTime,
CASE WHEN hbga.grid_status = '1' THEN '待登记'
...
...
@@ -49,12 +50,21 @@
LEFT JOIN hygf_peasant_household hph ON hph.sequence_nbr = hbga.peasant_household_id
LEFT JOIN hygf_on_grid_and_acceptance hogaa ON hogaa.work_order_power_station_id = hbga.work_order_power_station_id
LEFT JOIN hygf_work_order ON hygf_work_order.sequence_nbr = hbga.work_order_id
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)
newHcgr on newHcgr.work_order_power_station_id = hbga.work_order_power_station_id
<where>
hbga.is_delete = 0
<iftest="map.amosDealerId!=null and map.amosDealerId!=''">
and hygf_work_order.amos_dealer_id = #{map.amosDealerId}
</if>
<iftest="map.startTime!=null and map.startTime!=''">
and newHcgr.firstSubmitDate >= #{map.startTime}
</if>
<iftest="map.endTime!=null and map.endTime!=''">
and newHcgr.firstSubmitDate <= #{map.endTime}
</if>
<iftest="map.regionCompanyId!=null and map.regionCompanyId!=''">
and hygf_work_order.region_company_id =#{map.regionCompanyId}