Commit 4103e7f1 authored by wujiang's avatar wujiang

提交代码

parent 871d405d
...@@ -7,6 +7,11 @@ ...@@ -7,6 +7,11 @@
hps.peasant_household_id hps.peasant_household_id
from hygf_power_station hps from hygf_power_station hps
left join hygf_peasant_household hph ON hph.sequence_nbr = hps.peasant_household_id left join hygf_peasant_household hph ON hph.sequence_nbr = hps.peasant_household_id
<if test="map.status != null and map.status != ''">
LEFT JOIN (
SELECT peasant_household_id, initiate_status, contract_lock_id, stamp_status, status FROM ( SELECT hhc.*, ROW_NUMBER() OVER (PARTITION BY peasant_household_id ORDER BY sequence_nbr DESC) AS rn FROM hygf_household_contract hhc ) subq WHERE subq.rn = 1 ) lc
ON lc.peasant_household_id = hps.peasant_household_id
</if>
where hps.is_delete=0 where hps.is_delete=0
<if test="map.powerStationCode!=null and map.powerStationCode!=''"> <if test="map.powerStationCode!=null and map.powerStationCode!=''">
and hps.power_station_code like concat(concat('%',#{map.powerStationCode}),'%') and hps.power_station_code like concat(concat('%',#{map.powerStationCode}),'%')
...@@ -29,6 +34,15 @@ ...@@ -29,6 +34,15 @@
<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.status != null and map.status != ''">
AND lc.status = #{map.status}
</if>
<if test="map.startTime != null and map.startTime != ''">
AND hps.kc_create_time &gt;= #{map.startTime}
</if>
<if test="map.endTime != null and map.endTime != ''">
AND hps.kc_create_time &lt;= #{map.endTime}
</if>
GROUP BY hps.peasant_household_id GROUP BY hps.peasant_household_id
ORDER BY hps.peasant_household_id desc ORDER BY hps.peasant_household_id desc
</select> </select>
......
...@@ -22,7 +22,10 @@ public class DzbtgServiceImpl implements IExportPageService { ...@@ -22,7 +22,10 @@ public class DzbtgServiceImpl implements IExportPageService {
if (Objects.nonNull(filters)) { if (Objects.nonNull(filters)) {
map.putAll(filters); map.putAll(filters);
} }
map.put("processStatus", PowerStationProcessStateEnum.不通过.getName()); if(!map.containsKey("processStatus"))
{
map.put("processStatus", PowerStationProcessStateEnum.不通过.getName());
}
return businessFieldMapper.getDzStationIdByProcessStatus(map); return businessFieldMapper.getDzStationIdByProcessStatus(map);
} }
} }
...@@ -18,7 +18,10 @@ public class DzjxzServiceImpl implements IExportPageService { ...@@ -18,7 +18,10 @@ public class DzjxzServiceImpl implements IExportPageService {
if (Objects.nonNull(filters)) { if (Objects.nonNull(filters)) {
map.putAll(filters); map.putAll(filters);
} }
map.put("processStatus", PowerStationProcessStateEnum.进行中.getName()); if(!map.containsKey("processStatus"))
{
map.put("processStatus", PowerStationProcessStateEnum.进行中.getName());
}
return businessFieldMapper.getDzStationIdByProcessStatus(map); return businessFieldMapper.getDzStationIdByProcessStatus(map);
} }
} }
...@@ -18,7 +18,10 @@ public class DzwcServiceImpl implements IExportPageService { ...@@ -18,7 +18,10 @@ public class DzwcServiceImpl implements IExportPageService {
if (Objects.nonNull(filters)) { if (Objects.nonNull(filters)) {
map.putAll(filters); map.putAll(filters);
} }
map.put("processStatus", PowerStationProcessStateEnum.完成.getName()); if(!map.containsKey("processStatus"))
{
map.put("processStatus", PowerStationProcessStateEnum.完成.getName());
}
return businessFieldMapper.getDzStationIdByProcessStatus(map); return businessFieldMapper.getDzStationIdByProcessStatus(map);
} }
} }
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