|
@ -591,7 +591,7 @@ |
|
|
t.PATROL_START_TIME latestPatrolTime, |
|
|
t.PATROL_START_TIME latestPatrolTime, |
|
|
t.STATUS latestPatrolStatus |
|
|
t.STATUS latestPatrolStatus |
|
|
FROM |
|
|
FROM |
|
|
( SELECT GRID, STAFF_ID, max( CREATED_TIME ) AS CREATED_TIME FROM staff_patrol_record GROUP BY GRID, STAFF_ID ) a |
|
|
( SELECT DEL_FLAG,CUSTOMER_ID,GRID, STAFF_ID, max( CREATED_TIME ) AS CREATED_TIME FROM staff_patrol_record GROUP BY GRID, STAFF_ID ) a |
|
|
LEFT JOIN staff_patrol_record t ON t.GRID = a.GRID |
|
|
LEFT JOIN staff_patrol_record t ON t.GRID = a.GRID |
|
|
AND t.STAFF_ID = a.STAFF_ID |
|
|
AND t.STAFF_ID = a.STAFF_ID |
|
|
AND t.CREATED_TIME = a.CREATED_TIME |
|
|
AND t.CREATED_TIME = a.CREATED_TIME |
|
|