| | |
| | | throw new CoolException("订单明细不存在"); |
| | | } |
| | | |
| | | Long detlId = null; |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | | Mat mat = orderDetl.getMat$(); |
| | | OrderDetl orderDetl = null; |
| | | for (OrderDetl detl : orderDetls) { |
| | | Mat mat = detl.getMat$(); |
| | | if (mat.getMatnr().equals(waitPakinTemplate.getMatnr())) { |
| | | detlId = orderDetl.getId(); |
| | | orderDetl = detl; |
| | | } |
| | | } |
| | | |
| | | if (detlId == null) { |
| | | if (orderDetl == null) { |
| | | throw new CoolException("订单明细不存在"); |
| | | } |
| | | |
| | |
| | | waitPakin.setOrderNo(order.getOrderNo()); |
| | | waitPakin.setAnfme(waitPakinTemplate.getAnfme()); |
| | | waitPakin.setBarcode(waitPakinTemplate.getBarcode()); |
| | | waitPakin.setDetlId(detlId); |
| | | waitPakin.setDetlId(orderDetl.getId()); |
| | | waitPakin.setMatnr(orderDetl.getMat$().getMatnr()); |
| | | waitPakin.setBatch(orderDetl.getBatch()); |
| | | waitPakinService.comb(waitPakin); |
| | | } |
| | | return R.ok(); |