Commit 6c6a8bb7 authored by suhuiguang's avatar suhuiguang

fix(jg): 单位变更

1.管道单位变更选择装置慢 2.报废业务所有管道报废后,装置变为已报废3
parent 900f131f
......@@ -555,19 +555,17 @@
and (ibjpc.EQU_STATE <![CDATA[<>]]> '3' or ibjpc."EQU_STATE" is null)
and not exists
(
select 1 from tzs_jg_change_registration_reform a where (a.audit_status
<![CDATA[ <> ]]>
'使用单位待提交' and a.audit_status
<![CDATA[ <> ]]>
'一级受理已驳回' and a.audit_status
<![CDATA[ <> ]]>
'使用单位已撤回' and a.audit_status
<![CDATA[ <> ]]>
'已作废')
select 1 from tzs_jg_change_registration_reform a where (
a.audit_status <![CDATA[ <> ]]> '使用单位待提交'
and a.audit_status <![CDATA[ <> ]]> '一级受理已驳回'
and a.audit_status <![CDATA[ <> ]]> '使用单位已撤回'
and a.audit_status <![CDATA[ <> ]]> '已作废'
and a.audit_status <![CDATA[ <> ]]> '已完成'
)
and a.use_unit_credit_code = #{dto.originalUseUnitCreditCode}
and a.project_contraption_id = ibjpc.sequence_nbr
UNION
select b.project_contraption_id from tzs_jg_change_registration_unit a, tzs_jg_change_registration_unit_eq b where a.sequence_nbr = b.unit_change_registration_id and ((a.status
select b.project_contraption_id from tzs_jg_change_registration_unit a, tzs_jg_change_registration_unit_eq b where a.sequence_nbr = b.unit_change_registration_id and (a.status
<![CDATA[ <> ]]>
'使用单位待提交' and a.status
<![CDATA[ <> ]]>
......@@ -575,8 +573,9 @@
<![CDATA[ <> ]]>
'使用单位已撤回' and a.status
<![CDATA[ <> ]]>
'已作废')
or a.status = '已完成')
'已作废' and a.status
<![CDATA[ <> ]]>
'已完成')
and a.use_unit_credit_code =#{dto.originalUseUnitCreditCode}
and b.project_contraption_id = ibjpc.sequence_nbr
UNION select project_contraption_id from tzs_jg_enable_disable a where (a.audit_status
......@@ -587,7 +586,9 @@
<![CDATA[ <> ]]>
'待提交' and a.audit_status
<![CDATA[ <> ]]>
'已作废')
'已作废' and a.audit_status
<![CDATA[ <> ]]>
'已完成')
and a.use_unit_credit_code = #{dto.originalUseUnitCreditCode}
and a.project_contraption_id = ibjpc.sequence_nbr
UNION select project_contraption_id from tzs_jg_maintain_notice a where (a.notice_status
......@@ -598,7 +599,9 @@
<![CDATA[ <> ]]>
'6610' and a.notice_status
<![CDATA[ <> ]]>
'6617')
'6617' and a.notice_status
<![CDATA[ <> ]]>
'6616')
and a.use_unit_credit_code = #{dto.originalUseUnitCreditCode}
and a.project_contraption_id = ibjpc.sequence_nbr
UNION select project_contraption_id from tzs_jg_reform_notice a where (a.notice_status
......@@ -609,7 +612,9 @@
<![CDATA[ <> ]]>
'6610' and a.notice_status
<![CDATA[ <> ]]>
'6617')
'6617'and a.notice_status
<![CDATA[ <> ]]>
'6616')
and a.use_unit_credit_code = #{dto.originalUseUnitCreditCode}
and a.project_contraption_id = ibjpc.sequence_nbr
UNION
......@@ -621,7 +626,9 @@
<![CDATA[ <> ]]>
'使用单位待提交' and a.audit_status
<![CDATA[ <> ]]>
'已作废')
'已作废'and a.audit_status
<![CDATA[ <> ]]>
'已完成')
and a.use_unit_code = #{dto.originalUseUnitCreditCode}
and a.project_contraption_id = ibjpc.sequence_nbr
)
......@@ -659,7 +666,7 @@
<if test="sort != null">
ibjpc.${sort.field} ${sort.sortType},
</if>
ibjpc.rec_date DESC
ibjpc.sequence_nbr DESC
</select>
<select id="getLatestJgUseRegistrationManage"
......
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