Commit f259bdf1 authored by tianyiming's avatar tianyiming

11608

parent f4ea877c
...@@ -4538,7 +4538,6 @@ ...@@ -4538,7 +4538,6 @@
select * from ( select * from (
(SELECT (SELECT
r.`name`, r.`name`,
ou.`code`,
IFNULL( rp.min_water_level, 0 ) AS minLevel, IFNULL( rp.min_water_level, 0 ) AS minLevel,
IFNULL( rp.max_water_level, 0 ) AS maxLevel, IFNULL( rp.max_water_level, 0 ) AS maxLevel,
( (
...@@ -4585,12 +4584,9 @@ ...@@ -4585,12 +4584,9 @@
IFNULL( rp.volume, 0 ) AS volume, IFNULL( rp.volume, 0 ) AS volume,
ec.image, ec.image,
r.resource_type, r.resource_type,
r.sequence_nbr, r.sequence_nbr
fs.`code` AS systemCode
FROM FROM
cb_water_resource r cb_water_resource r
LEFT JOIN cb_org_usr ou ON ou.biz_org_code = r.biz_org_code
AND ou.is_delete = 0
LEFT JOIN cb_water_resource_pool rp ON rp.resource_id = r.sequence_nbr LEFT JOIN cb_water_resource_pool rp ON rp.resource_id = r.sequence_nbr
LEFT JOIN wl_equipment_specific_index ei ON ei.equipment_specific_id = rp.level_device_id LEFT JOIN wl_equipment_specific_index ei ON ei.equipment_specific_id = rp.level_device_id
LEFT JOIN wl_equipment_category ec ON ec.id = r.equip_category_id LEFT JOIN wl_equipment_category ec ON ec.id = r.equip_category_id
...@@ -4598,7 +4594,7 @@ ...@@ -4598,7 +4594,7 @@
WHERE WHERE
r.resource_type = 'industryPool' r.resource_type = 'industryPool'
AND r.is_delete = 1 AND r.is_delete = 1
AND ou.`code` IS NOT NULL AND r.`biz_org_code` IS NOT NULL
<if test="bizOrgCode!=null and bizOrgCode!=''"> <if test="bizOrgCode!=null and bizOrgCode!=''">
AND r.biz_org_code like concat(#{bizOrgCode}, '%') AND r.biz_org_code like concat(#{bizOrgCode}, '%')
</if> </if>
...@@ -4607,7 +4603,6 @@ ...@@ -4607,7 +4603,6 @@
( (
SELECT SELECT
a.`name`, a.`name`,
a.`code`,
a.minLevel, a.minLevel,
a.maxLevel, a.maxLevel,
( (
...@@ -4654,13 +4649,11 @@ ...@@ -4654,13 +4649,11 @@
a.volume, a.volume,
a.image, a.image,
a.resource_type, a.resource_type,
a.sequence_nbr, a.sequence_nbr
a.`code` AS systemCode
FROM FROM
( (
SELECT SELECT
r.`name`, r.`name`,
ou.`code`,
IFNULL( rp.min_water_level, 0 ) AS minLevel, IFNULL( rp.min_water_level, 0 ) AS minLevel,
IFNULL( rp.max_water_level, 0 ) AS maxLevel, IFNULL( rp.max_water_level, 0 ) AS maxLevel,
(select (select
...@@ -4674,19 +4667,16 @@ ...@@ -4674,19 +4667,16 @@
ec.image, ec.image,
r.resource_type, r.resource_type,
r.sequence_nbr, r.sequence_nbr,
rp.level_device_id, rp.level_device_id
fs.`code` AS systemCode
FROM FROM
cb_water_resource r cb_water_resource r
LEFT JOIN cb_org_usr ou ON ou.biz_org_code = r.biz_org_code
AND ou.is_delete = 0
LEFT JOIN cb_water_resource_pool rp ON rp.resource_id = r.sequence_nbr LEFT JOIN cb_water_resource_pool rp ON rp.resource_id = r.sequence_nbr
LEFT JOIN wl_equipment_category ec ON ec.id = r.equip_category_id LEFT JOIN wl_equipment_category ec ON ec.id = r.equip_category_id
LEFT JOIN f_fire_fighting_system fs ON fs.id = r.belong_fighting_system_id LEFT JOIN f_fire_fighting_system fs ON fs.id = r.belong_fighting_system_id
WHERE WHERE
r.resource_type = 'pool' r.resource_type = 'pool'
AND r.is_delete = 1 AND r.is_delete = 1
AND ou.`code` IS NOT NULL AND r.`biz_org_code` IS NOT NULL
<if test="bizOrgCode!=null and bizOrgCode!=''"> <if test="bizOrgCode!=null and bizOrgCode!=''">
AND r.biz_org_code like concat(#{bizOrgCode}, '%') AND r.biz_org_code like concat(#{bizOrgCode}, '%')
</if> </if>
...@@ -4893,7 +4883,9 @@ ...@@ -4893,7 +4883,9 @@
WHERE WHERE
ed.`code` LIKE '92011000%' ed.`code` LIKE '92011000%'
<!-- AND es.iot_code IS NOT NULL--> <!-- AND es.iot_code IS NOT NULL-->
AND es.biz_org_code like concat(#{bizOrgCode}, '%') <if test="bizOrgCode!=null and bizOrgCode!=''">
AND r.biz_org_code like concat(#{bizOrgCode}, '%')
</if>
GROUP BY GROUP BY
es.id es.id
) a ) a
......
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