(select count(distinct ibjui.record) from idx_biz_jg_use_info ibjui, idx_biz_jg_inspection_detection_info di where ibjui."RECORD" = di."RECORD" and ibjui.project_contraption_id=pc.sequence_nbr and di."INSPECT_TYPE" <![CDATA[<>]]> '') as inspectNum,
(select count(1) from idx_biz_jg_use_info ibjui where ibjui.project_contraption_id= pc.sequence_nbr) as totalNum
from
idx_biz_jg_project_contraption pc
where
1=1
...
...
@@ -206,7 +212,6 @@
<otherwise>
and pc.use_unit_credit_code=#{companyCode}
and pc.is_into_management = true
and exists (select 1 from idx_biz_jg_use_info ibjui, idx_biz_jg_inspection_detection_info di where ibjui."RECORD" = di."RECORD" and ibjui.project_contraption_id=pc.sequence_nbr and di."INSPECT_TYPE" <![CDATA[<>]]> '' )
</otherwise>
</choose>
</otherwise>
...
...
@@ -214,6 +219,14 @@
and not EXISTS (SELECt 1 FROM tz_jyjc_inspection_application a where a.status='6611' and a.application_unit_code=#{companyCode} and a.project_contraption_id = pc.sequence_nbr)
and (pc.project_contraption_parent_id is null or pc.project_contraption_parent_id = '')
and pc.equ_category = #{equCategory}
) s
<where>
<iftest="inspectionType == 'DQJY' and equCategory != '8300'">