From 0db51621b65e42ee1c16ab52af30d05f3f070031 Mon Sep 17 00:00:00 2001 From: e Date: Sat, 5 Jan 2019 22:04:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E6=95=B0=E4=BD=8D=E4=B8=BA=E9=9B=B6?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E8=BE=93=E5=87=BA=E6=95=B4=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zzjee/wm/controller/WmOmNoticeHController.java | 1 + .../org/jeecgframework/core/util/StringUtil.java | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) 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); + } + + } + /** * 根据输入的多个解释和下标返回一个值 *