|
@@ -269,9 +269,9 @@
|
|
SELECT d.*,d.axis_in_x AS axis_x, d.axis_in_y AS axis_y,d.sign_in_address address, d.sign_in_time sign_time,'IN' AS type FROM t_b_ding d UNION ALL
|
|
SELECT d.*,d.axis_in_x AS axis_x, d.axis_in_y AS axis_y,d.sign_in_address address, d.sign_in_time sign_time,'IN' AS type FROM t_b_ding d UNION ALL
|
|
SELECT d.*,d.axis_out_x AS axis_x, d.axis_out_y AS axis_y,d.sign_out_address address, d.sign_out_time sign_time,'OUT' AS type FROM t_b_ding d
|
|
SELECT d.*,d.axis_out_x AS axis_x, d.axis_out_y AS axis_y,d.sign_out_address address, d.sign_out_time sign_time,'OUT' AS type FROM t_b_ding d
|
|
where
|
|
where
|
|
- date_format(from_unixtime(d.create_time/1000),'%Y-%m-%d') != date_format(now(),'%Y-%m-%d') or
|
|
|
|
- (d.sign_out_time is not null and
|
|
|
|
- date_format(from_unixtime(d.create_time/1000),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d'))
|
|
|
|
|
|
+ d.sign_out_time is not null or
|
|
|
|
+ (d.sign_out_time is null and
|
|
|
|
+ date_format(from_unixtime(d.create_time/1000),'%Y-%m-%d') != date_format(now(),'%Y-%m-%d'))
|
|
) d
|
|
) d
|
|
LEFT JOIN t_b_user_archives ua ON ua.id = d.user_archives_id
|
|
LEFT JOIN t_b_user_archives ua ON ua.id = d.user_archives_id
|
|
LEFT JOIN t_b_user_archives_supplier us ON us.user_archives_id = ua.id
|
|
LEFT JOIN t_b_user_archives_supplier us ON us.user_archives_id = ua.id
|