电压树状图查询修改

dev
liuguijing 1 year ago
parent ab389fe55e
commit c045fc36f6

@ -207,23 +207,28 @@
left join terminals d on c.id = d.tower_id )
left join terminal_status e on e.term_id = d.id)
where b.status = #{status} and a.status = #{status} and c.status = #{status} and d.status = #{status}
<if test="dyid != null and dyid.size > 0">
and a.id in
<foreach collection="dyid" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</if>
<if test="lineid != null and lineid.size > 0">
and b.id in
<foreach collection="lineid" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</if>
<if test="towerid != null and towerid.size > 0">
and c.id in
<foreach collection="towerid" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
<if test="dyid != null and dyid.size > 0 and lineid != null and lineid.size > 0 and towerid != null and towerid.size > 0">
and (
false
<if test="dyid != null and dyid.size > 0">
or a.id in
<foreach collection="dyid" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</if>
<if test="lineid != null and lineid.size > 0">
or b.id in
<foreach collection="lineid" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</if>
<if test="towerid != null and towerid.size > 0">
or c.id in
<foreach collection="towerid" item="id" index="index" separator="," open="(" close=")">
#{id}
</foreach>
</if>
)
</if>
</select>

Loading…
Cancel
Save