Merge remote-tracking branch 'origin/master'

master
赵嘉伟 3 years ago
commit a71801243b

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

Loading…
Cancel
Save