Commit 4565b116 authored by litengwei's avatar litengwei

代码提交

parent b8cc6658
......@@ -5979,33 +5979,13 @@
from
cb_water_resource
<where>
(resource_type = 'industryPool' or resource_type = 'pool')
<if test="bizOrgCode != null and bizOrgCode != ''">
biz_org_code like concat(#{bizOrgCode}, '%')
AND biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</where>
) AS total,
(select
count(sequence_nbr)
from
cb_water_resource
<where>
resource_type = 'hydrant'
<if test="bizOrgCode != null and bizOrgCode != ''">
AND biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</where>
) AS hydrant,
(select
count(sequence_nbr)
from
cb_water_resource
<where>
resource_type = 'crane'
<if test="bizOrgCode != null and bizOrgCode != ''">
AND biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</where>
) AS crane,
(select
count(sequence_nbr)
from
......@@ -6022,28 +6002,6 @@
from
cb_water_resource
<where>
resource_type = 'natural'
<if test="bizOrgCode != null and bizOrgCode != ''">
AND biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</where>
) AS `natural`,
(select
count(sequence_nbr)
from
cb_water_resource
<where>
resource_type = 'waterTank'
<if test="bizOrgCode != null and bizOrgCode != ''">
AND biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</where>
) AS waterTank,
(select
count(sequence_nbr)
from
cb_water_resource
<where>
resource_type = 'industryPool'
<if test="bizOrgCode != null and bizOrgCode != ''">
AND biz_org_code like concat(#{bizOrgCode}, '%')
......@@ -6068,7 +6026,7 @@
'red'
END AS statusCode
from
cb_water_resource
(select * from cb_water_resource where resource_type = 'industryPool' or resource_type = 'pool')
<where>
<if test="bizOrgCode != null and bizOrgCode != ''">
biz_org_code like concat(#{bizOrgCode}, '%')
......
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