Commit 7536eb34 authored by suhuiguang's avatar suhuiguang

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

1.已纳管设备调整
parent ace242fa
...@@ -318,6 +318,11 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> { ...@@ -318,6 +318,11 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> {
List<CountDto> countBizNumAfterUseRegBatchEquip(@Param("records") List<String> records); List<CountDto> countBizNumAfterUseRegBatchEquip(@Param("records") List<String> records);
/**
* 查询指定的装置集合是否发生过后续业务:使用登记流程中、其他后续业务非已作废、已完成
* @param projectContraptionIds 装置ids
* @return 是否发生后续业务
*/
List<CountDto> countBizNumAfterUseRegBatchProjectContraption(@Param("projectContraptionIds") List<Long> projectContraptionIds); List<CountDto> countBizNumAfterUseRegBatchProjectContraption(@Param("projectContraptionIds") List<Long> projectContraptionIds);
} }
......
...@@ -2858,7 +2858,7 @@ ...@@ -2858,7 +2858,7 @@
#{record} #{record}
</foreach> </foreach>
and a.is_delete = 0 and a.is_delete = 0
and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '一级受理已驳回' and a.status <![CDATA[ <> ]]> '使用单位已撤回' and a.status <![CDATA[ <> ]]> '已作废') and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '一级受理已驳回' and a.status <![CDATA[ <> ]]> '使用单位已撤回' and a.status <![CDATA[ <> ]]> '已作废' and a.status <![CDATA[ <> ]]> '已完成')
group by b.equ_id group by b.equ_id
UNION all UNION all
select select
...@@ -2924,6 +2924,22 @@ ...@@ -2924,6 +2924,22 @@
</foreach> </foreach>
and (a.audit_status <![CDATA[ <> ]]> '使用单位待提交' and a.audit_status <![CDATA[ <> ]]> '已作废') and (a.audit_status <![CDATA[ <> ]]> '使用单位待提交' and a.audit_status <![CDATA[ <> ]]> '已作废')
group by b.equ_id 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_eq b
where
a.sequence_nbr = b.enable_disable_apply_id
and a.is_delete = 0
and b.equ_id in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
and (a.audit_status <![CDATA[ <> ]]> '待提交' and a.audit_status <![CDATA[ <> ]]> '已作废')
group by b.equ_id
UNION all UNION all
select select
count(1) as inUseNumber, count(1) as inUseNumber,
...@@ -2963,7 +2979,7 @@ ...@@ -2963,7 +2979,7 @@
#{projectContraptionId} #{projectContraptionId}
</foreach> </foreach>
and a.is_delete = 0 and a.is_delete = 0
and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '一级受理已驳回' and a.status <![CDATA[ <> ]]> '使用单位已撤回' and a.status <![CDATA[ <> ]]> '已作废') and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '一级受理已驳回' and a.status <![CDATA[ <> ]]> '使用单位已撤回' and a.status <![CDATA[ <> ]]> '已作废' and a.status <![CDATA[ <> ]]> '已完成')
group by a.project_contraption_id group by a.project_contraption_id
union all union all
select select
...@@ -2973,7 +2989,7 @@ ...@@ -2973,7 +2989,7 @@
tzs_jg_maintain_notice a tzs_jg_maintain_notice a
where where
a.is_delete = 0 a.is_delete = 0
and (a.notice_status <![CDATA[ <> ]]> '6617' AND a.notice_status <![CDATA[ <> ]]> '6616') and (a.notice_status <![CDATA[ <> ]]> '6617' AND a.notice_status <![CDATA[ <> ]]> '6610')
and a.project_contraption_id in and a.project_contraption_id in
<foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")"> <foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")">
#{projectContraptionId} #{projectContraptionId}
...@@ -2987,7 +3003,7 @@ ...@@ -2987,7 +3003,7 @@
tzs_jg_reform_notice a tzs_jg_reform_notice a
where where
a.is_delete = 0 a.is_delete = 0
and (a.notice_status <![CDATA[ <> ]]> '6617' AND a.notice_status <![CDATA[ <> ]]> '6616') and (a.notice_status <![CDATA[ <> ]]> '6617' AND a.notice_status <![CDATA[ <> ]]> '6610')
and a.project_contraption_id in and a.project_contraption_id in
<foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")"> <foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")">
#{projectContraptionId} #{projectContraptionId}
...@@ -3001,7 +3017,7 @@ ...@@ -3001,7 +3017,7 @@
tzs_jg_change_registration_reform a tzs_jg_change_registration_reform a
where where
a.is_delete = 0 a.is_delete = 0
and ( a.audit_status <![CDATA[ <> ]]> '已作废' AND a.audit_status <![CDATA[ <> ]]> '已完成') and ( a.audit_status <![CDATA[ <> ]]> '已作废' AND a.audit_status <![CDATA[ <> ]]> '使用单位待提交')
and a.project_contraption_id in and a.project_contraption_id in
<foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")"> <foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")">
#{projectContraptionId} #{projectContraptionId}
...@@ -3016,7 +3032,7 @@ ...@@ -3016,7 +3032,7 @@
tzs_jg_change_registration_unit_eq b tzs_jg_change_registration_unit_eq b
where where
a.sequence_nbr = b.unit_change_registration_id a.sequence_nbr = b.unit_change_registration_id
and (a.status <![CDATA[ <> ]]> '已作废' AND a.status <![CDATA[ <> ]]> '已完成') and (a.status <![CDATA[ <> ]]> '已作废' AND a.status <![CDATA[ <> ]]> '使用单位待提交')
and a.is_delete = 0 and a.is_delete = 0
and b.project_contraption_id in and b.project_contraption_id in
<foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")"> <foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")">
......
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