//package com.cku.oa.components.rule;
//
//import com.ql.util.express.ExpressRunner;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.BeansException;
//import org.springframework.context.ApplicationContext;
//import org.springframework.context.ApplicationContextAware;
//
///**
// * Created by laiguanglong on 2017/4/19.
// */
//public abstract class BaseRuleService implements ApplicationContextAware {
//    protected final Logger logger = LoggerFactory.getLogger(getClass());
//    protected static ApplicationContext applicationContext;// spring上下文
//
//    public void setApplicationContext(ApplicationContext applicationContext)
//            throws BeansException {
//        this.applicationContext = applicationContext;
//        //注入applicationContext后再调用子类的runner初始化方法
//        initRunner();
//    }
//
//    protected abstract void initRunner();
//
//    /**
//     * 在此处把一些中文符号替换成英文符号
//     *
//     * @param statement
//     * @return
//     */
//    public static String initStatement(String statement) {
//        return statement.replace("（", "(").replace("）", ")").replace("；", ";")
//                .replace("，", ",").replace("“", "\"").replace("”", "\"");
//    }
//
//    protected abstract void initRunner(ExpressRunner runner);
//}