package com.changhong.epc.count.service.system.func.set.norm;
|
|
import com.changhong.epc.count.service.system.func.set.AbsFuncSupper;
|
import com.changhong.epc.bean.count.MeInfo;
|
import com.changhong.epc.count.service.system.overwrite.AviatorMeInfo;
|
import com.changhong.epc.count.service.tool.SystemFunTool;
|
import com.googlecode.aviator.runtime.type.AviatorObject;
|
|
import java.util.Map;
|
import java.util.Objects;
|
|
/**
|
* 参数为主数据类型的
|
*/
|
public class MasterParam extends AbsFuncSupper {
|
|
@Override
|
public AviatorObject call(Map<String, Object> env, AviatorObject arg1, AviatorObject arg2) {
|
MeInfo leftInfo = SystemFunTool.getMeInfoVal(arg1, env);
|
String stringVal = SystemFunTool.getStringVal(arg2, env);
|
MeInfo meInfo = new MeInfo(leftInfo.getMdCode(), leftInfo.getMeCode());
|
meInfo.setMeName(leftInfo.getMeName());
|
meInfo.setMdName(leftInfo.getMdName());
|
meInfo.setMeValue(Objects.equals(arg2.stringValue(env), stringVal)? "": Objects.toString(stringVal, ""));
|
return new AviatorMeInfo(meInfo);
|
}
|
|
@Override
|
public String getName() {
|
return FUNC_GET_VAL_PARAM_MASTER;
|
}
|
}
|