package com.sw.mes.sap.verify;

import org.springframework.stereotype.Component;

import com.sw.mes.base.system.entity.DictionaryItem;
import com.sw.mes.core.utils.SpringUtils;
import com.sw.mes.core.utils.StringUtils;

import lombok.extern.slf4j.Slf4j;

/**
 * 关单验证器工厂 
 * @author liru
 * @date 2024-04-17
 */
@Slf4j
@Component
public class VerifyWorkOrderStateFactory {
	
	public VerifyWorkOrderState getVerify(DictionaryItem dictionaryItem) {
		String verifyAddress = dictionaryItem.getExtendValue();
		if(StringUtils.isBlank(verifyAddress)) {
			return null;
		}
		return SpringUtils.getBean(verifyAddress);
	}

}
