All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.wicp.tams.common.callback.impl.convertvalue.ConvertValueMoney Maven / Gradle / Ivy

There is a newer version: 6.1.0
Show newest version
package net.wicp.tams.common.callback.impl.convertvalue;

import java.math.BigDecimal;

import net.wicp.tams.common.apiext.NumberUtil;
import net.wicp.tams.common.callback.IConvertValue;

/***
 * 把钱转为字符
 * @author zhoujunhui
 *
 */
public class ConvertValueMoney implements IConvertValue {

	@Override
	public String getStr(String keyObj) {
		try {
			BigDecimal retObj = NumberUtil.handleScale(String.valueOf(keyObj),
					2);
			return String.valueOf(retObj);
		} catch (Exception e) {
			return keyObj;
		}
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy