Commit 166d6fc3 authored by wujiang's avatar wujiang

提交代码

parent 4103e7f1
...@@ -58,14 +58,12 @@ ...@@ -58,14 +58,12 @@
<if test="map.amosDealerId!=null and map.amosDealerId!=''"> <if test="map.amosDealerId!=null and map.amosDealerId!=''">
and hygf_work_order.amos_dealer_id = #{map.amosDealerId} and hygf_work_order.amos_dealer_id = #{map.amosDealerId}
</if> </if>
<if test="map.startTime!=null and map.startTime!=''"> <if test="map.startTime!=null and map.startTime!=''">
and newHcar.firstSubmitDate &gt;= #{map.startTime} and newHcar.firstSubmitDate &gt;= #{map.startTime}
</if> </if>
<if test="map.endTime!=null and map.endTime!=''"> <if test="map.endTime!=null and map.endTime!=''">
and newHcar.firstSubmitDate &lt;= #{map.endTime} and newHcar.firstSubmitDate &lt;= #{map.endTime}
</if> </if>
<if test="map.developerName!=null and map.developerName!=''"> <if test="map.developerName!=null and map.developerName!=''">
and hph.developer_name like concat('%',#{map.developerName},'%') and hph.developer_name like concat('%',#{map.developerName},'%')
</if> </if>
......
...@@ -235,6 +235,12 @@ ...@@ -235,6 +235,12 @@
<if test="params.peasantHouseholdNo != null and params.peasantHouseholdNo !='' "> <if test="params.peasantHouseholdNo != null and params.peasantHouseholdNo !='' ">
and hph.peasant_household_no = #{params.peasantHouseholdNo} and hph.peasant_household_no = #{params.peasantHouseholdNo}
</if> </if>
<if test="params.startTime != null and params.startTime != ''">
AND info.tr_create_time &gt;= #{params.startTime}
</if>
<if test="params.endTime != null and params.endTime != ''">
AND info.tr_create_time &lt;= #{params.endTime}
</if>
</where> </where>
ORDER BY ORDER BY
info.rec_date DESC ,hph.sequence_nbr DESC ) as sta info.rec_date DESC ,hph.sequence_nbr DESC ) as sta
...@@ -251,10 +257,14 @@ ...@@ -251,10 +257,14 @@
<select id="getSgysStationId" resultType="java.lang.String"> <select id="getSgysStationId" resultType="java.lang.String">
select select
hygf_peasant_household.sequence_nbr sequenceNbr hygf_peasant_household.sequence_nbr sequenceNbr
from hygf_work_order_power_station LEFT join hygf_work_order from
on hygf_work_order.sequence_nbr=hygf_work_order_power_station.work_order_id 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 (
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
<where> <where>
<if test="dto.workOrderId!=null and dto.workOrderId!=''"> <if test="dto.workOrderId!=null and dto.workOrderId!=''">
and hygf_work_order.sequence_nbr = #{dto.workOrderId} and hygf_work_order.sequence_nbr = #{dto.workOrderId}
...@@ -300,6 +310,12 @@ ...@@ -300,6 +310,12 @@
<if test="dto.province != null and dto.province != ''"> <if test="dto.province != null and dto.province != ''">
and hygf_peasant_household.project_address like concat(concat('%',#{dto.province}),'%') and hygf_peasant_household.project_address like concat(concat('%',#{dto.province}),'%')
</if> </if>
<if test="dto.startTime!=null and dto.startTime!=''">
and newHcr.firstConstructionDate &gt;= #{dto.startTime}
</if>
<if test="dto.endTime!=null and dto.endTime!=''">
and newHcr.firstConstructionDate &lt;= #{dto.endTime}
</if>
</where> </where>
ORDER BY ORDER BY
hygf_work_order_power_station.sequence_nbr DESC hygf_work_order_power_station.sequence_nbr DESC
...@@ -314,6 +330,9 @@ ...@@ -314,6 +330,9 @@
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
LEFT JOIN hygf_on_grid_and_acceptance hogaa ON hogaa.work_order_power_station_id = hbga.work_order_power_station_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 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> <where>
hbga.is_delete = 0 hbga.is_delete = 0
...@@ -350,6 +369,12 @@ ...@@ -350,6 +369,12 @@
<if test="map.province != null and map.province != ''"> <if test="map.province != null and map.province != ''">
AND hph.project_address like concat(concat('%',#{map.province}),'%') AND hph.project_address like concat(concat('%',#{map.province}),'%')
</if> </if>
<if test="map.startTime!=null and map.startTime!=''">
and newHcgr.firstSubmitDate &gt;= #{map.startTime}
</if>
<if test="map.endTime!=null and map.endTime!=''">
and newHcgr.firstSubmitDate &lt;= #{map.endTime}
</if>
</where> </where>
ORDER BY hbga.sequence_nbr desc ORDER BY hbga.sequence_nbr desc
</select> </select>
...@@ -363,9 +388,11 @@ ...@@ -363,9 +388,11 @@
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
LEFT JOIN hygf_on_grid_and_acceptance hogaa ON hogaa.work_order_power_station_id = hbga.work_order_power_station_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 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> <where>
hbga.is_delete = 0 hbga.is_delete = 0
<if test="map.amosDealerId!=null and map.amosDealerId!=''"> <if test="map.amosDealerId!=null and map.amosDealerId!=''">
and hygf_work_order.amos_dealer_id = #{map.amosDealerId} and hygf_work_order.amos_dealer_id = #{map.amosDealerId}
</if> </if>
...@@ -402,6 +429,12 @@ ...@@ -402,6 +429,12 @@
<if test="map.province != null and map.province != ''"> <if test="map.province != null and map.province != ''">
AND hph.project_address like concat(concat('%',#{map.province}),'%') AND hph.project_address like concat(concat('%',#{map.province}),'%')
</if> </if>
<if test="map.startTime!=null and map.startTime!=''">
AND newHcar.firstSubmitDate &gt;= #{map.startTime}
</if>
<if test="map.endTime!=null and map.endTime!=''">
AND newHcar.firstSubmitDate &lt;= #{map.endTime}
</if>
</where> </where>
ORDER BY hbga.sequence_nbr desc ORDER BY hbga.sequence_nbr desc
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment