Commit 12b034c0 authored by tianbo's avatar tianbo

同步气瓶充装记录es接口sql修改

parent 6b9f1069
......@@ -173,13 +173,14 @@
af.inspection_date AS inspectionDateAfter,
af.check_results AS checkResult
FROM
( SELECT * FROM tz_cylinder_filling_record WHERE is_not_es IS NULL LIMIT 5000 ) r
( SELECT * FROM tz_cylinder_filling_record WHERE is_not_es IS NULL AND filling_before_id IS NOT NULL
AND filling_check_id IS NOT NULL LIMIT 5000 ) r
LEFT JOIN tz_cylinder_filling b ON b.filling_before_id = r.filling_before_id
AND r.filling_before_id IS NOT NULL and b.inspection_date NOT LIKE'16%'
AND date_format ( b.inspection_date, '%Y-%m-%d' ) = date_format ( r.filling_startTime, '%Y-%m-%d' )
AND date_format ( b.inspection_date, '%Y-%m-%d' ) = date_format ( r.filling_startTime, '%Y-%m-%d' ) and b.sequence_code is not null AND b.app_id is not null
LEFT JOIN tz_cylinder_filling_check af ON af.filling_check_id = r.filling_check_id
AND date_format ( af.inspection_date, '%Y-%m-%d' ) = date_format ( r.filling_startTime, '%Y-%m-%d' )
WHERE b.sequence_code is not null AND b.app_id is not null
# WHERE b.sequence_code is not null AND b.app_id is not null
</select>
<select id="getCylinderFillingRecordTotal" resultType="java.lang.Integer">
......
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