//package com.engine.salary.service.factory; // //import com.weaver.hrm.salary.exception.SalaryRunTimeException; //import com.weaver.hrm.salary.service.TaxPaymentService; //import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.stereotype.Component; // //import java.util.Map; //import java.util.concurrent.ConcurrentHashMap; // ///** // * @author chengliming // * @date 2022-12-08 19:05:16 // **/ // //public class TaxPaymentServiceFactory { // private final Map serviceMap = new ConcurrentHashMap<>(); // // // public TaxPaymentServiceFactory(Map map) { // for (Map.Entry entry : map.entrySet()) { // serviceMap.putIfAbsent(entry.getValue().getServiceType(), entry.getValue()); // } // } // // public TaxPaymentService get(Integer type) { // TaxPaymentService service = serviceMap.get(type); // if (service == null) { // throw new SalaryRunTimeException("TaxPaymentService is null"); // } // return service; // } //}