AND ovds.use_registration_code like concat('%',#{dto.useRegistrationCode},'%')
AND ovds.use_registration_code like concat('%',#{dto.useRegistrationCode},'%')
</if>
</if>
<iftest="dto.receiveOrgCode != null and dto.receiveOrgCode != ''">
<iftest="dto.receiveOrgCode != null and dto.receiveOrgCode != ''">
and (ovds.receive_company_code = #{dto.receiveOrgCode} or ovds.transfer_to_user_ids like concat('%',#{currentUserId},'%'))
and (ovds.receive_company_code = #{dto.receiveOrgCode} or ovds.transfer_to_user_ids like concat('%',#{dto.currentUserId},'%'))
</if>
</if>
<iftest="type == 'supervision'">
<iftest="dto.dataType == 'supervision' ">
AND (ovds.receive_company_code = #{dto.useUnitCreditCode} or ovds.transfer_to_user_ids like concat('%',#{currentUserId},'%'))
AND (ovds.receive_company_code = #{dto.unitCode} or ovds.transfer_to_user_ids like concat('%',#{dto.currentUserId},'%'))
AND ovds.instance_id <![CDATA[<>]]> ''
AND ovds.instance_id <![CDATA[<>]]> ''
</if>
</if>
<iftest="type == 'company'">
<iftest="dto.dataType == 'company' ">
AND ovds.use_unit_credit_code = #{dto.useUnitCreditCode}
AND ovds.use_unit_credit_code = #{dto.unitCode}
</if>
</if>
<iftest="dto.applyNo != null and dto.applyNo != ''">
<iftest="dto.applyNo != null and dto.applyNo != ''">
and ovds.apply_no like concat('%',#{dto.applyNo},'%')
and ovds.apply_no like concat('%',#{dto.applyNo},'%')
...
@@ -105,12 +105,16 @@
...
@@ -105,12 +105,16 @@
jfi.FACTORY_NUM,
jfi.FACTORY_NUM,
jui.ADDRESS as ADDRESS,
jui.ADDRESS as ADDRESS,
jui.RECORD record,
jui.RECORD record,
(SELECT name from tz_equipment_category where code = jri.EQU_DEFINE) as EQU_DEFINE,
jri.PRODUCT_NAME,
jri.PRODUCT_NAME,
jri.EQU_CODE,
jri.EQU_CODE,
jri.USE_ORG_CODE,
jri.USE_ORG_CODE,
(SELECT name from tz_equipment_category where code = jri.EQU_LIST) as EQU_LIST,
(SELECT name from tz_equipment_category where code = jri.EQU_LIST) as EQU_LIST,
(SELECT name from tz_equipment_category where code = jri.EQU_CATEGORY) as EQU_CATEGORY,
(SELECT name from tz_equipment_category where code = jri.EQU_CATEGORY) as EQU_CATEGORY,
(SELECT name from tz_equipment_category where code = jri.EQU_DEFINE) as EQU_DEFINE,
jri.EQU_LIST as EQU_LIST_CODE,
jri.EQU_CATEGORY as EQU_CATEGORY_CODE,
jri.EQU_DEFINE as EQU_DEFINE_CODE,
jfi.PRODUCE_DATE,
(select other.SUPERVISORY_CODE from idx_biz_jg_other_info other where other.RECORD = jui.RECORD) as SUPERVISORY_CODE,
(select other.SUPERVISORY_CODE from idx_biz_jg_other_info other where other.RECORD = jui.RECORD) as SUPERVISORY_CODE,
to_char((select NEXT_INSPECT_DATE from idx_biz_jg_inspection_detection_info where "RECORD" = jui."RECORD" ORDER BY INSPECT_DATE DESC limit 1), 'YYYY-MM-DD') as NEXT_INSPECT_DATE
to_char((select NEXT_INSPECT_DATE from idx_biz_jg_inspection_detection_info where "RECORD" = jui."RECORD" ORDER BY INSPECT_DATE DESC limit 1), 'YYYY-MM-DD') as NEXT_INSPECT_DATE