From 617a56fde0560ae51d89814ec8721cc6a12611ba Mon Sep 17 00:00:00 2001 From: Leon <3066758958@qq.com> Date: Wed, 11 Aug 2021 14:51:43 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=96=99=E6=A8=A1=E5=9D=97BUG?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../foreverwin/mesnac/common/util/NumberUtil.java | 12 ++++++++++-- .../dispatch/service/impl/CallItemServiceImpl.java | 5 +++-- .../service/impl/SurplusReturnServiceImpl.java | 4 ++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/common/src/main/java/com/foreverwin/mesnac/common/util/NumberUtil.java b/common/src/main/java/com/foreverwin/mesnac/common/util/NumberUtil.java index cca8eb45..27751eec 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/util/NumberUtil.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/util/NumberUtil.java @@ -316,6 +316,15 @@ public class NumberUtil } return false; } + + public static boolean isDouble(String str) + { + if (!StringUtil.toString(str).equals("")) + { + return str.matches("^[0-9]+(.?[0-9]+)?$"); + } + return false; + } public static String toPlainString(Object number) { @@ -410,8 +419,7 @@ public class NumberUtil return matcher.matches(); } - public static void main(String[] args) - { + public static void main(String[] args) { } } \ No newline at end of file diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/CallItemServiceImpl.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/CallItemServiceImpl.java index e9ad3806..6f7a510d 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/CallItemServiceImpl.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/CallItemServiceImpl.java @@ -100,6 +100,7 @@ public class CallItemServiceImpl extends ServiceImpl i callItem.setHandle(HandleEnum.CALL_ITEM.getHandle(site, callItemNo)); callItem.setCallType(Constants.CALL_TYPE_MATERIAL); callItem.setStatus(Constants.CALL_ITEM_STATUS_NEW); + callItem.setIssueQty(BigDecimal.ZERO); callItem.setCreateUser(user); callItem.setCreatedDateTime(nowDate); callItem.setModifyUser(user); @@ -309,7 +310,7 @@ public class CallItemServiceImpl extends ServiceImpl i } if ("GB".equals(itemGroup) && blankingSize.contains("*")) { - String []size = blankingSize.split("/*"); + String []size = blankingSize.split("\\*"); if (size != null && size.length >= 2) { int sizeLength = size.length; BigDecimal length = new BigDecimal(size[sizeLength-1]); @@ -321,7 +322,7 @@ public class CallItemServiceImpl extends ServiceImpl i compQtyMap.put(component, (compQtyMap.get(component) != null ? compQtyMap.get(component).add(sizeReqQty) : sizeReqQty)); } } else { - String []size = blankingSize.split("/*"); + String []size = blankingSize.split("\\*"); if (size != null && size.length >= 1) { int sizeLength = size.length; BigDecimal length = new BigDecimal(size[sizeLength-1]); diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SurplusReturnServiceImpl.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SurplusReturnServiceImpl.java index ce92e030..f476f625 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SurplusReturnServiceImpl.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SurplusReturnServiceImpl.java @@ -85,10 +85,10 @@ public class SurplusReturnServiceImpl extends ServiceImpl