tech.deepdreams.worker.services.benefit.HourlySalaryServicev2020Impl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of worker-civ-impl Show documentation
Show all versions of worker-civ-impl Show documentation
Payroll Worker API project for Spring Boot
package tech.deepdreams.worker.services.benefit;
import java.util.Map;
import tech.deepdreams.worker.api.services.HourlySalaryService;
import tech.deepdreams.worker.constants.CIVElementCode;
import tech.deepdreams.worker.constants.LocalConstantCode;
import tech.deepdreams.worker.api.enums.CountryCode;
public class HourlySalaryServicev2020Impl implements HourlySalaryService{
public Double calculate(Map params) {
Double requiredWorkingHours = (Double) params.get(LocalConstantCode.CODE_REQUIRED_WORKING_HOURS) ;
Double baseSalary = (Double) params.get(CIVElementCode.CODE_BASE_SALARY) ;
return baseSalary*1.0/requiredWorkingHours ;
}
public CountryCode country() {
return CountryCode.CIV ;
}
public int version() {
return 2020 ;
}
public String code() {
return LocalConstantCode.CODE_HOURLY_SALARY ;
}
// prime d'expatriation, prime d'ancienneté, prime de transport, prime de fin d'année
}