and ((tzjia.application_unit_code = #{currentApplicationUnitCode} or tzjia.inspection_unit_code = #{currentInspectionUnitCode}) OR tzjia.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ))
<iftest="params.equList != null and params.equList != ''">
and pc.equ_list= #{params.equList}
</if>
<iftest="params.equCategory != null and params.equCategory != ''">
and pc.equ_category= #{params.equCategory}
</if>
<iftest="params.equDefine != null and params.equDefine != ''">
and pc.equ_define= #{params.equDefine}
</if>
<iftest="params.city != null and params.city != ''">
and pc.city= #{params.city}
</if>
<iftest="params.county != null and params.county != ''">
and pc.county= #{params.county}
</if>
<choose>
<whentest="inspectionType == 'AZJDJY'">
<whentest="params.inspectionType == 'AZJDJY'">
and pc.usc_unit_credit_code=#{companyCode}
and pc.is_into_management = true
and (pc.use_registration_code is null or pc.use_registration_code = '' )
</when>
<otherwise>
<choose>
<whentest="equCategory == '8300'">
<whentest="params.equCategory == '8300'">
and pc.use_unit_credit_code=#{companyCode}
and pc.is_into_management = true
and pc.use_registration_code <![CDATA[<>]]> ''
...
...
@@ -302,10 +317,9 @@
</choose>
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'">
<iftest="params.inspectionType == 'DQJY' and params.equCategory != '8300'">