2 Commits
r6 ... r8

Author SHA1 Message Date
admin
4625fbefed utils 2022-10-14 09:08:47 +08:00
admin
d7e971f32d add 2022-10-13 17:13:54 +08:00

View File

@@ -1088,7 +1088,8 @@ public class Utils {
DecimalFormat decimalFormat=new DecimalFormat(f);//构造方法的字符格式这里如果小数不足2位,会以0补足. DecimalFormat decimalFormat=new DecimalFormat(f);//构造方法的字符格式这里如果小数不足2位,会以0补足.
String p=decimalFormat.format(d);//format 返回的是字符串 String p=decimalFormat.format(d);//format 返回的是字符串
if(p.split("\\.")[0].length()<1) p="0"+p; if(p.split("\\.")[0].length()<1) p="0"+p;
String nn = p.split("\\.")[1]; String nn ="0";
if(p.split("\\.").length>1) nn = p.split("\\.")[1];
if(!x){ if(!x){
if(nn.replaceAll("0", "").length()<1) p=p.split("\\.")[0]; if(nn.replaceAll("0", "").length()<1) p=p.split("\\.")[0];
} }