diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectStaffDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectStaffDao.xml index 7532e29cc9..95cb4ad585 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectStaffDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectStaffDao.xml @@ -169,8 +169,10 @@ AND selfAction.OPERATION ]]> 'created' AND ABS(TIMESTAMPDIFF(SECOND,staff.UPDATED_TIME,selfAction.CREATED_TIME)) 5 AND staff.STAFF_ID = selfAction.STAFF_ID - AND staff.GRID_ID = selfAction.GRID_ID - AND staff.DEPARTMENT_ID = selfAction.DEPARTMENT_ID + AND CASE WHEN staff.GRID_ID IS NULL THEN (staff.GRID_ID IS NULL AND selfAction.GRID_ID IS NULL) + ELSE (staff.GRID_ID = selfAction.GRID_ID) END + AND CASE WHEN staff.DEPARTMENT_ID IS NULL THEN (staff.DEPARTMENT_ID IS NULL AND selfAction.DEPARTMENT_ID IS NULL) + ELSE (staff.DEPARTMENT_ID = selfAction.DEPARTMENT_ID) END AND staff.ORG_ID = selfAction.AGENCY_ID WHERE staff.DEL_FLAG = '0' AND project.CUSTOMER_ID = #{customerId}