小数位为零直接输出整数
parent
77c79f0fe2
commit
0db51621b6
|
@ -285,6 +285,7 @@ public class WmOmNoticeHController extends BaseController {
|
|||
}catch ( Exception e){
|
||||
|
||||
}
|
||||
tom.setBaseGoodscount(StringUtil.getdouble(tom.getBaseGoodscount()));
|
||||
wmOmQmIEntityListnew.add(tom);
|
||||
}
|
||||
}catch ( Exception e){
|
||||
|
|
|
@ -478,6 +478,17 @@ public class StringUtil {
|
|||
return sb.append(str).toString();
|
||||
}
|
||||
|
||||
public static String getdouble(String inDouble)
|
||||
{
|
||||
Double mainWastage = Double.parseDouble(inDouble);
|
||||
//主材损耗费取整
|
||||
if(mainWastage.intValue()-mainWastage==0){//判断是否符合取整条件
|
||||
return String.valueOf(mainWastage.intValue());
|
||||
}else{
|
||||
return String.valueOf(mainWastage);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据输入的多个解释和下标返回一个值
|
||||
|
|
Loading…
Reference in New Issue