Commit 60898c49 authored by lisong's avatar lisong

气瓶大屏统计优化

parent b7692d5a
......@@ -361,8 +361,8 @@
tz_cylinder_inspection insp
LEFT JOIN tz_cylinder_unit unit ON insp.app_id = unit.app_id
WHERE
to_date( insp.next_inspection_date, 'yyyy-mm-dd' ) < now()
OR (( to_days ( to_date(( insp.next_inspection_date ), 'yyyy-mm-dd' ) ) - to_days ( now())) <= 30 )
(to_date( insp.next_inspection_date, 'yyyy-mm-dd' ) < now()
OR (( to_days ( to_date(( insp.next_inspection_date ), 'yyyy-mm-dd' ) ) - to_days ( now())) <= 30 ))
<if test="companyId != null and companyId != ''">
......@@ -412,8 +412,8 @@
tz_cylinder_inspection insp
LEFT JOIN tz_cylinder_unit unit ON insp.app_id = unit.app_id
WHERE
to_date( insp.next_inspection_date, 'yyyy-mm-dd' ) &lt; now()
OR (( to_days ( to_date(( insp.next_inspection_date ), 'yyyy-mm-dd' ) ) - to_days ( now())) &lt;= 30 )
(to_date( insp.next_inspection_date, 'yyyy-mm-dd' ) &lt; now()
OR (( to_days ( to_date(( insp.next_inspection_date ), 'yyyy-mm-dd' ) ) - to_days ( now())) &lt;= 30 ))
<if test="companyId != null and companyId != ''">
and unit.app_id = #{companyId}
</if>
......
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