package com.zt.plat.module.qms.core.qlexpress.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.ql.util.express.ExpressRunner;
import com.zt.plat.module.qms.core.qlexpress.function.RoundToScaleHalfEven;

@Configuration
public class QlExpressRuleEngineConfig {

	@Bean
	public ExpressRunner expressRunner() {
		//需要高精度计算支持
		ExpressRunner expressRunner = new ExpressRunner(true, false);
		expressRunner.addFunction("roundToScale", new RoundToScaleHalfEven());
		return expressRunner;
	}
}
