|
@@ -103,7 +103,7 @@ public class BaseUtils {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /*最小分割片*/
|
|
|
+ /**最小分割片*/
|
|
|
public static int sliceNumber(Integer len,Integer capacity){
|
|
|
return (int)Math.ceil(len/(double)capacity);
|
|
|
}
|
|
@@ -159,6 +159,10 @@ public class BaseUtils {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public static String bigDecimalScale(Object s,int scale){
|
|
|
+ return str2BigDecimal(s).setScale(scale,RoundingMode.HALF_UP).stripTrailingZeros().toPlainString();
|
|
|
+ }
|
|
|
+
|
|
|
/*默认返回零*/
|
|
|
public static Double obj2DoubleZero(Object obj) {
|
|
|
if(obj instanceof Double){
|