@Service @Transactional(readOnly=true) public class AssignmentService extends Object
| Constructor and Description |
|---|
AssignmentService(AssignmentRepository assignmentRepository,
HeadOfDepartmentsRepository employeeDepartmentRepository) |
| Modifier and Type | Method and Description |
|---|---|
void |
createAssignment(Assignment assignment) |
List<Assignment> |
findAllAssignmentsByDeptDesigAndDates(Long deptId,
Long desigId,
Date givenDate)
Get all assignments for department,designation and givendate
|
List<Assignment> |
findAllAssignmentsByHODDeptAndDates(Long deptId,
Date givenDate) |
List<Assignment> |
findAssignmentByDepartmentDesignationAndBoundary(Long deptId,
Long desigId,
Long boundaryId)
Gets all assignments for a particular department, designation and given boundary
|
List<Assignment> |
findAssignmentForDepartmentId(Long deptId) |
List<Assignment> |
findAssignmentForDesignationId(Long desigId) |
List<Assignment> |
findByDepartmentAndDesignation(Long deptId,
Long desigId) |
List<Assignment> |
findByDepartmentDesignationAndBoundary(Long deptId,
Long desigId,
Long boundaryId)
Gets all assignments for a particular department,designation and given boundary or all the employees who can operate under
this boundary
|
List<Assignment> |
findByDepartmentDesignationsAndGivenDate(Long deptId,
List<Long> desigIds,
Date givenDate) |
List<Assignment> |
findByDeptDesgnAndParentAndActiveChildBoundaries(Long deptId,
Long desigId,
Long boundaryId) |
List<Assignment> |
findByDesignationAndBoundary(Long desigId,
Long boundaryId) |
List<Assignment> |
findByEmployeeAndGivenDate(Long empId,
Date givenDate) |
List<org.egov.pims.commons.Position> |
findPositionsForEmployees(String name) |
List<Assignment> |
findPrimaryAssignmentForDesignationName(String name) |
List<Assignment> |
getAllActiveAssignments(Long designationId) |
List<Assignment> |
getAllActiveEmployeeAssignmentsByEmpId(Long empId)
Get all active assignments for an employee as of today
|
List<Assignment> |
getAllAssignmentForEmployeeNameLike(String empName) |
List<Assignment> |
getAllAssignmentsByEmpId(Long empId)
Get all assignments for an employee irrespective assignment dates
|
List<Assignment> |
getAllAssignmentsByPositionNameForGivenRange(String positionName) |
List<Assignment> |
getAllPositionsByDepartmentAndDesignationForGivenRange(Long departmentId,
Long designationId,
Date givenDate)
Get employee primary/temporary assignment for given department and designation
|
List<Assignment> |
getAllPositionsByDepartmentAndPositionNameForGivenRange(Long departmentId,
String positionName) |
Assignment |
getAssignmentById(Long Id)
Gets assignment by id
|
List<Assignment> |
getAssignmentByPositionAndUserAsOnDate(Long posId,
Long userId,
Date currDate) |
List<Assignment> |
getAssignmentList(EmployeePositionSearch employeePositionSearch) |
List<Assignment> |
getAssignmentsByDeptDesigAndDates(Long deptId,
Long desigId,
Date fromDate,
Date toDate)
Get list of primary assignments for deparment,designation,fromdate and todate
|
List<Assignment> |
getAssignmentsForPosition(Long posId)
Get employee primary assignment for given position id
|
List<Assignment> |
getAssignmentsForPosition(Long posId,
Date givenDate)
Get all assignments for position and given date as given date which is passed as parameter.
|
List<Assignment> |
getPositionsByDepartmentAndDesignationForGivenRange(Long departmentId,
Long designationId,
Date givenDate)
Get employee primary assignment for given department and designation
|
Assignment |
getPrimaryAssignmentForEmployee(Long empId)
Get employee primary assignment by employee id
|
Assignment |
getPrimaryAssignmentForEmployeeByToDate(Long empId,
Date toDate)
Get employee primary assignment for a given date
|
Assignment |
getPrimaryAssignmentForGivenRange(Long empId,
Date fromDate,
Date toDate)
Get employee primary assignment for a given date range
|
Assignment |
getPrimaryAssignmentForPositionAndDate(Long posId,
Date givenDate)
Get employee primary assignment for position and given date
|
List<Assignment> |
getPrimaryAssignmentForPositionAndDateRange(Long posId,
Date fromDate,
Date toDate) |
Assignment |
getPrimaryAssignmentForPositon(Long posId)
Get employee primary assignment as of today
|
Assignment |
getPrimaryAssignmentForUser(Long userId)
Get employee primary assignment for a given user
|
Set<Long> |
getRequiredBoundaries(Long boundaryId) |
Set<org.egov.infra.admin.master.entity.Role> |
getRolesForActiveAssignmentsByEmpId(Long empId) |
Set<org.egov.infra.admin.master.entity.Role> |
getRolesForExpiredAssignmentsByEmpId(Long empId) |
Set<org.egov.infra.admin.master.entity.User> |
getUsersByDesignations(String[] designationNames) |
Boolean |
isHod(Long assignId)
Returns true if the given employee is an HOD
|
Employee |
removeDeletedAssignments(Employee employee,
String removedAssignIds) |
List<Employee> |
searchEmployeeAssignments(EmployeeAssignmentSearch employeeAssignmentSearch) |
void |
updateAssignment(Assignment assignment) |
@Autowired public AssignmentService(AssignmentRepository assignmentRepository, HeadOfDepartmentsRepository employeeDepartmentRepository)
public Assignment getAssignmentById(Long Id)
Id - public List<Assignment> getAllAssignmentsByEmpId(Long empId)
empId - public List<Assignment> getAllActiveEmployeeAssignmentsByEmpId(Long empId)
empId - public List<Assignment> getAssignmentsForPosition(Long posId, Date givenDate)
posId - givenDate - public Assignment getPrimaryAssignmentForPositon(Long posId)
posId - @Transactional public void createAssignment(Assignment assignment)
@Transactional public void updateAssignment(Assignment assignment)
public Assignment getPrimaryAssignmentForUser(Long userId)
userId - public Assignment getPrimaryAssignmentForEmployee(Long empId)
empId - public Assignment getPrimaryAssignmentForEmployeeByToDate(Long empId, Date toDate)
empId - toDate - public List<Assignment> getAssignmentsForPosition(Long posId)
posId - public Boolean isHod(Long assignId)
assignId - public Assignment getPrimaryAssignmentForPositionAndDate(Long posId, Date givenDate)
posId - givenDate - public Assignment getPrimaryAssignmentForGivenRange(Long empId, Date fromDate, Date toDate)
empId - fromDate - toDate - public List<Assignment> getPositionsByDepartmentAndDesignationForGivenRange(Long departmentId, Long designationId, Date givenDate)
departmentId - designationId - givenDate - public List<Assignment> getAllPositionsByDepartmentAndDesignationForGivenRange(Long departmentId, Long designationId, Date givenDate)
departmentId - designationId - givenDate - public List<Assignment> getAllPositionsByDepartmentAndPositionNameForGivenRange(Long departmentId, String positionName)
public List<Assignment> getAssignmentsByDeptDesigAndDates(Long deptId, Long desigId, Date fromDate, Date toDate)
deptId - desigId - fromDate - toDate - public List<Assignment> findAllAssignmentsByDeptDesigAndDates(Long deptId, Long desigId, Date givenDate)
deptId - desigId - givenDate - public List<Assignment> findByEmployeeAndGivenDate(Long empId, Date givenDate)
public List<Assignment> findPrimaryAssignmentForDesignationName(String name)
public List<Assignment> findByDesignationAndBoundary(Long desigId, Long boundaryId)
public List<Assignment> findByDepartmentDesignationAndBoundary(Long deptId, Long desigId, Long boundaryId)
deptId - desigId - boundaryId - public List<Assignment> findByDeptDesgnAndParentAndActiveChildBoundaries(Long deptId, Long desigId, Long boundaryId)
public List<Assignment> findAssignmentByDepartmentDesignationAndBoundary(Long deptId, Long desigId, Long boundaryId)
deptId - desigId - boundaryId - public List<Assignment> getAllActiveAssignments(Long designationId)
@Transactional public Employee removeDeletedAssignments(Employee employee, String removedAssignIds)
public Set<org.egov.infra.admin.master.entity.User> getUsersByDesignations(String[] designationNames)
public Set<org.egov.infra.admin.master.entity.Role> getRolesForExpiredAssignmentsByEmpId(Long empId)
public Set<org.egov.infra.admin.master.entity.Role> getRolesForActiveAssignmentsByEmpId(Long empId)
public List<Assignment> findByDepartmentDesignationsAndGivenDate(Long deptId, List<Long> desigIds, Date givenDate)
public List<Assignment> getAllAssignmentsByPositionNameForGivenRange(String positionName)
public List<org.egov.pims.commons.Position> findPositionsForEmployees(String name)
public List<Employee> searchEmployeeAssignments(EmployeeAssignmentSearch employeeAssignmentSearch)
public List<Assignment> getAssignmentList(EmployeePositionSearch employeePositionSearch)
public List<Assignment> findAllAssignmentsByHODDeptAndDates(Long deptId, Date givenDate)
public List<Assignment> getAllAssignmentForEmployeeNameLike(String empName)
public List<Assignment> findAssignmentForDepartmentId(Long deptId)
public List<Assignment> findAssignmentForDesignationId(Long desigId)
public List<Assignment> findByDepartmentAndDesignation(Long deptId, Long desigId)
public List<Assignment> getPrimaryAssignmentForPositionAndDateRange(Long posId, Date fromDate, Date toDate)
public List<Assignment> getAssignmentByPositionAndUserAsOnDate(Long posId, Long userId, Date currDate)
Copyright © 2015–2017 eGovernments Foundation. All rights reserved.