Skip to content

Commit

Permalink
Update EmployeeService.java
Browse files Browse the repository at this point in the history
  • Loading branch information
kavi-egov committed Jun 4, 2024
1 parent f22dfeb commit 5d6ebf8
Showing 1 changed file with 6 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -335,32 +335,11 @@ public Long getPosition() {

/**
* Updates the details of employees provided in the EmployeeRequest.
*
* The method performs the following steps:
* 1. Extracts request information from the EmployeeRequest.
* 2. Retrieves tenantId from the first employee if available.
* 3. Collects UUIDs of the employees to be updated.
* 4. Searches for existing employee records based on the collected UUIDs and tenantId.
* 5. Iterates over each employee in the request to:
* a. Enrich the update request with additional information using existing employee details.
* b. Update user information for the employee.
* 6. Pushes the updated employee request to the HRMS topic for further processing.
* 7. Optionally sends reactivation notifications if needed.
* 8. Generates and returns the response containing the updated employee information.
*
* updateUser -
* 1. Fetches Individual record, it has user response as well
* 2. create individual update request and update the record
* 3. construct the userResponse from individual update responss
*/


/**
* Service method to update user. Performs the following:
* 1. Enriches the employee object with required parameters.
* 2. Updates user by making call to the user service.
*
*
* TODO FIXME
* This method searches and updates the USER, INDIVIDUAL manually
* instead of cascading the update call directly to other services,
* the flow has to be relooked
*
* @param employeeRequest
* @return
*/
Expand Down Expand Up @@ -636,4 +615,4 @@ public Map<String,Object> getEmployeeCountResponse(RequestInfo requestInfo, Stri
return response;
}

}
}

0 comments on commit 5d6ebf8

Please sign in to comment.