diff --git a/src/main/java/com/zzjee/wm/controller/WmOmNoticeHController.java b/src/main/java/com/zzjee/wm/controller/WmOmNoticeHController.java index 772ffe00..28baa745 100644 --- a/src/main/java/com/zzjee/wm/controller/WmOmNoticeHController.java +++ b/src/main/java/com/zzjee/wm/controller/WmOmNoticeHController.java @@ -285,6 +285,7 @@ public class WmOmNoticeHController extends BaseController { }catch ( Exception e){ } + tom.setBaseGoodscount(StringUtil.getdouble(tom.getBaseGoodscount())); wmOmQmIEntityListnew.add(tom); } }catch ( Exception e){ diff --git a/src/main/java/org/jeecgframework/core/util/StringUtil.java b/src/main/java/org/jeecgframework/core/util/StringUtil.java index 874f276f..94aaf863 100644 --- a/src/main/java/org/jeecgframework/core/util/StringUtil.java +++ b/src/main/java/org/jeecgframework/core/util/StringUtil.java @@ -478,7 +478,18 @@ 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); + } + + } + /** * 根据输入的多个解释和下标返回一个值 *