package cn.autoform.web.formula.info.impl.cpn;
|
|
import java.util.Objects;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import cn.autoform.bean.form.CpnType;
|
import cn.autoform.web.formula.prop.Attribute;
|
|
/**
|
* 数组控件
|
* @author WangYX
|
*
|
*/
|
public class NumberCpn extends AbstractBaseFormCpn{
|
|
@Override
|
public CpnType getCpnType() {
|
return CpnType.number;
|
}
|
|
@Override
|
public Object get(Object key) {
|
Object val = super.get(key);
|
if((MAPPING_KEY.get(key) == Attribute.value || key == Attribute.value) && StringUtils.isNotBlank(val.toString()))
|
return Double.parseDouble(Objects.toString(val, "0"));
|
return val;
|
}
|
|
}
|