Commit 9799d748 authored by 韩桐桐's avatar 韩桐桐

fix(jg):车用气瓶查询设备接口

parent 38a9ce77
......@@ -499,13 +499,18 @@
ri."EQU_DEFINE" = '23T0'
and ui."DATA_SOURCE" = 'jg'
and ri.whether_vehicle_cylinder = 1
<if test="jsonObject.useUnitCreditCode != null and jsonObject.useUnitCreditCode != ''">
-- 保证使用单位选择设备时(record为null) 能选择到本单位的设备 并且 监管单位在查看时(record 不为null)可以匹配到所有的设备
<if test="jsonObject.useUnitCreditCode != null and jsonObject.useUnitCreditCode != '' and jsonObject.record = null">
and ui."USE_UNIT_CREDIT_CODE" = #{jsonObject.useUnitCreditCode}
</if>
<if test="jsonObject.record != null and jsonObject.record != ''" >
and ui."RECORD" = #{jsonObject.record}
<if test="jsonObject.record != null and jsonObject.record != ''">
and ui."RECORD" = #{jsonObject.record}
</if>
<if test="jsonObject.record = null">
and not exists(SELECT 1 FROM tzs_jg_vehicle_information v, tzs_jg_vehicle_information_eq ve WHERE
v.sequence_nbr = ve.vehicle_id AND ve.equ_id = ui."RECORD" and v.status !='使用单位待提交' and v.status
!='一级受理已驳回' and v.status !='使用单位已撤回' and v.status !='已作废' )
</if>
and not exists(SELECT 1 FROM tzs_jg_vehicle_information v, tzs_jg_vehicle_information_eq ve WHERE v.sequence_nbr = ve.vehicle_id AND ve.equ_id = ui."RECORD" and v.status !='使用单位待提交' and v.status !='一级受理已驳回' and v.status !='使用单位已撤回' and v.status !='已作废' )
ORDER BY ui.REC_DATE DESC
</select>
......
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