物料模块BUG修改

master
Leon 3 years ago
parent e9a3a1e5c3
commit 617a56fde0

@ -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) {
}
}

@ -100,6 +100,7 @@ public class CallItemServiceImpl extends ServiceImpl<CallItemMapper, CallItem> 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<CallItemMapper, CallItem> 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<CallItemMapper, CallItem> 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]);

@ -85,10 +85,10 @@ public class SurplusReturnServiceImpl extends ServiceImpl<SurplusReturnMapper, S
if (StringUtil.isBlank(perMater) && StringUtil.isBlank(perSquareMeter)) {
throw BusinessException.build("物料【" +item+ "】的自定义字段【每米重量】和【每平米重量】都没维护!");
}
if (StringUtil.notBlank(perMater) && !NumberUtil.isNumber(perMater)) {
if (StringUtil.notBlank(perMater) && !NumberUtil.isDouble(perMater)) {
throw BusinessException.build("物料【" +item+ "】的自定义字段【每米重量】只能维护数值!");
}
if (StringUtil.notBlank(perSquareMeter) && !NumberUtil.isNumber(perSquareMeter)) {
if (StringUtil.notBlank(perSquareMeter) && !NumberUtil.isDouble(perSquareMeter)) {
throw BusinessException.build("物料【" +item+ "】的自定义字段【每平米重量】只能维护数值!");
}

Loading…
Cancel
Save