Commit 6017e703 authored by suhuiguang's avatar suhuiguang

feat(已纳管设备无证时可编辑):已纳管设备调整

1.已纳管设备调整,历史设备流程中,增加车用气瓶
parent c5359a95
...@@ -2929,6 +2929,22 @@ ...@@ -2929,6 +2929,22 @@
count(1) as inUseNumber, count(1) as inUseNumber,
b.equ_id as record b.equ_id as record
from from
tzs_jg_equip_transfer a,
tzs_jg_equip_transfer_eq b
where
a.sequence_nbr = b.equip_transfer_id
and b.equ_id in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
and a.is_delete = 0
and (a.apply_status <![CDATA[ <> ]]> '6617' AND a.apply_status <![CDATA[ <> ]]> '6610')
group by b.equ_id
UNION all
select
count(1) as inUseNumber,
b.equ_id as record
from
tzs_jg_enable_disable a, tzs_jg_enable_disable a,
tzs_jg_enable_disable_eq b tzs_jg_enable_disable_eq b
where where
...@@ -2943,6 +2959,36 @@ ...@@ -2943,6 +2959,36 @@
UNION all UNION all
select select
count(1) as inUseNumber, count(1) as inUseNumber,
b.equ_id as record
from
tzs_jg_vehicle_information a,
tzs_jg_vehicle_information_eq b
where
a.sequence_nbr = b.vehicle_id
and a.is_delete = 0
and b.equ_id in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '已作废')
UNION all
select
count(1) as inUseNumber,
b.equ_id as record
from
tzs_jg_change_vehicle_registration_unit a,
tzs_jg_change_vehicle_registration_unit_eq b
where
a.sequence_nbr = b.unit_change_id
and a.is_delete = 0
and b.equ_id in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '已作废')
UNION all
select
count(1) as inUseNumber,
ne.record ne.record
from from
(SELECT (SELECT
...@@ -3024,6 +3070,20 @@ ...@@ -3024,6 +3070,20 @@
</foreach> </foreach>
group by a.project_contraption_id group by a.project_contraption_id
union all union all
select
count(1) as inUseNumber,
a.project_contraption_seq as projectContraptionId
from
tzs_jg_equip_transfer a
where
and a.project_contraption_seq in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
and a.is_delete = 0
and (a.apply_status <![CDATA[ <> ]]> '6617' AND a.apply_status <![CDATA[ <> ]]> '6610')
group by a.project_contraption_seq
union all
SELECT SELECT
count(1) as inUseNumber, count(1) as inUseNumber,
b.project_contraption_id as projectContraptionId b.project_contraption_id as projectContraptionId
......
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