java.lang.Object
user.roles.Employee
user.roles.PayrollAdmin
Represents a Payroll Administrator in the system, responsible for managing payroll-related tasks.
Available methods:
getTempPayrollRecords_Batch()
Retrieves the temporary payroll records.getEmployeeIDList()
Retrieves a list of employee IDs.runBatchPayroll(String)
Runs payroll for the specified payroll period.generatePayrollReport(String)
Generates a payroll report for the specified period.submitBatchPayroll()
Submits the payroll records.
-
Constructor Summary
ConstructorsConstructorDescriptionPayrollAdmin
(FileDataService dataService, int employeeID) Constructs a PayrollAdmin object. -
Method Summary
Modifier and TypeMethodDescriptiongeneratePayrollReport
(String reportPeriod) Generates a payroll report for the specified period.Retrieves a list of employee IDs.getEmployeeRecord
(int employeeID) Retrieves an employee record.double
getHoursWorked
(int employeeID, String period) Retrieves the number of hours worked.double
getOvertimeHours
(int employeeID, String period) Retrieves the number of overtime hours.Retrieves the temporary payroll records from the batch process.void
runBatchPayroll
(String payrollPeriod) Runs batch payroll for the specified payroll period.runManualPayroll
(PayrollRecord tempPayrollRecord_Manual, String payrollPeriod) Runs batch payroll for the specified payroll period.void
Submits the batch processed payroll records.void
Submits the manual processed payroll records.Methods inherited from class user.roles.Employee
clockIn, clockOut, getAttendanceID, getEmployeeID, getLeaveBalance, getLeaveBalance_OfType, getLeaveID, getPayslip, getPersonalAttendanceRecordList, getPersonalLeaveRecordList, getPersonalRecord, submitLeaveRequest
-
Constructor Details
-
PayrollAdmin
Constructs a PayrollAdmin object.- Parameters:
dataService
- The data service used for data manipulation.employeeID
- The unique identifier of the Payroll Admin employee.
-
-
Method Details
-
getTempPayrollRecords_Batch
Retrieves the temporary payroll records from the batch process.- Returns:
- The temporary payroll records.
-
getEmployeeIDList
Retrieves a list of employee IDs.- Returns:
- A list of employee IDs.
-
getEmployeeRecord
Retrieves an employee record.- Parameters:
employeeID
- The employee ID.- Returns:
- The employee record.
-
getHoursWorked
Retrieves the number of hours worked.- Parameters:
employeeID
- The employee ID.period
- The period.- Returns:
- The number of hours worked.
-
getOvertimeHours
Retrieves the number of overtime hours.- Parameters:
employeeID
- The employee ID.period
- The period.- Returns:
- The number of overtime hours.
-
runBatchPayroll
Runs batch payroll for the specified payroll period.- Parameters:
payrollPeriod
- The period for which the payroll is to be run.- Throws:
EmployeeRecordsException
- If an error occurs while accessing employee records.PayrollException
- If an error occurs during the payroll process.
-
runManualPayroll
public PayrollRecord runManualPayroll(PayrollRecord tempPayrollRecord_Manual, String payrollPeriod) throws EmployeeRecordsException Runs batch payroll for the specified payroll period.- Parameters:
payrollPeriod
- The period for which the payroll is to be run.- Throws:
EmployeeRecordsException
-
generatePayrollReport
Generates a payroll report for the specified period.- Parameters:
reportPeriod
- The period for which the report is to be generated.- Returns:
- A list of string arrays representing the payroll report.
- Throws:
PayrollException
- If an error occurs while generating the payroll report.
-
submitBatchPayroll
Submits the batch processed payroll records.- Throws:
PayrollException
- If an error occurs while submitting the payroll records.
-
submitManualPayroll
public void submitManualPayroll()Submits the manual processed payroll records.
-