Commit 2f4aef99 authored by suhuiguang's avatar suhuiguang

1.气瓶只统计在用的

parent b189ec76
...@@ -479,6 +479,7 @@ ...@@ -479,6 +479,7 @@
tz_cylinder_inspection b tz_cylinder_inspection b
where where
u.app_id = a.app_id u.app_id = a.app_id
and a.cylinder_status='3114'
and a.last_inspection_id = b.sequence_nbr and a.last_inspection_id = b.sequence_nbr
and date_gt(CURRENT_DATE, cast(b.next_inspection_date as date)) and date_gt(CURRENT_DATE, cast(b.next_inspection_date as date))
and not EXISTS (select 1 from tz_cylinder_question_info q where q.question_object_id = a.sequence_nbr and q.question_type = #{questionType}) and not EXISTS (select 1 from tz_cylinder_question_info q where q.question_object_id = a.sequence_nbr and q.question_type = #{questionType})
...@@ -497,6 +498,7 @@ ...@@ -497,6 +498,7 @@
tz_cylinder_unit u tz_cylinder_unit u
where where
a.sequence_code = b.sequence_code a.sequence_code = b.sequence_code
and a.cylinder_status='3114'
and u.app_id = a.app_id and u.app_id = a.app_id
and a.last_inspection_id = b.sequence_nbr and a.last_inspection_id = b.sequence_nbr
and b.inspection_result = '3124' and b.inspection_result = '3124'
......
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