/**


* double保留n位小数


* */


public static Double getSpecificDecimal(Double number,int n) {

BigDecimal c = new BigDecimal(number);

double c1 = c.setScale(n, BigDecimal.ROUND_HALF_UP).doubleValue();

return c1;
}


public static String getDecimalFormat(Object obj){
DecimalFormat df = new DecimalFormat("0.00");
String str=df.format(obj);
return str;
}