package com.yeejoin.amos.api.openapi.face.service;

import com.yeejoin.amos.api.openapi.face.model.UnitLicenceModel;
import com.yeejoin.amos.api.openapi.feign.TzsServiceFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ZhangYingBin
 */
@Service
public class UnitLicenceService {
    @Autowired
    TzsServiceFeignClient tzsServiceFeignClient;
    public List<UnitLicenceModel> getLicenceInfo (String unitCode){
        while (unitCode.contains(" ")) {
            unitCode = unitCode.replace(" ","");
        }
        return tzsServiceFeignClient.getLicenceByUnitCode(unitCode).getResult();
    }
}
