package com.changhong.epc.count.service.system.func.set.aggregate; import com.changhong.epc.count.service.count.model.UnitInfo; import com.changhong.epc.count.service.system.func.set.AbsFuncSupper; import com.changhong.epc.count.service.tool.SystemFunTool; import com.googlecode.aviator.runtime.type.AviatorObject; import com.googlecode.aviator.runtime.type.AviatorString; import java.util.List; import java.util.Map; import java.util.Objects; /** * 获得第一个行程控件的值 * @Title: first * @param @param jList * @param @param mdCode * @param @return 设定文件 * @return String 返回类型 * @throws */ public class FirstUnitFuntion extends AbsFuncSupper{ @Override public AviatorObject call(Map env, AviatorObject arg1) { List jList = getJourneyList(env); if(Objects.isNull(jList)) return fun_empty; if(jList.size() > 0){ return new AviatorString(SystemFunTool.getStringVal(arg1, env, jList.get(0))); }else{ return fun_empty; } } @Override public String getName() { return FUNC_FIRST_UNIT_FUNTION; } }