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 e79893a0..26e3730e 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 @@ -458,14 +458,18 @@ public class CallItemServiceImpl extends ServiceImpl i String []size = blankingSize.split("×"); if (size != null && size.length >= 2) { - int sizeLength = size.length; - BigDecimal length = new BigDecimal(size[sizeLength-1]); - BigDecimal width = new BigDecimal(size[sizeLength-2]); - BigDecimal sizeReqQty = length.multiply(width).multiply(reqQty).divide(new BigDecimal(1000000)); - callItem.setSizeReqQty(sizeReqQty); - - //按物料汇总需求数量 - compQtyMap.put(component, (compQtyMap.get(component) != null ? compQtyMap.get(component).add(sizeReqQty) : sizeReqQty)); + try { + int sizeLength = size.length; + BigDecimal length = new BigDecimal(size[sizeLength-1]); + BigDecimal width = new BigDecimal(size[sizeLength-2]); + BigDecimal sizeReqQty = length.multiply(width).multiply(reqQty).divide(new BigDecimal(1000000)); + callItem.setSizeReqQty(sizeReqQty); + + //按物料汇总需求数量 + compQtyMap.put(component, (compQtyMap.get(component) != null ? compQtyMap.get(component).add(sizeReqQty) : sizeReqQty)); + }catch (Exception e){ + throw BusinessException.build("产品条码["+callItem.getSfc()+"]的下料尺寸不符合钢板的标准尺寸!"); + } } } else { String[] size = new String[1];