| | |
| | | throw new CoolException("托盘正在入库中"); |
| | | } |
| | | |
| | | OrderDetl orderDetl = orderDetlService.getById(waitPakin.getDetlId()); |
| | | if (orderDetl == null) { |
| | | throw new CoolException("订单明细不存在"); |
| | | } |
| | | |
| | | //可用数量 |
| | | Double count = orderDetl.getAnfme() - orderDetl.getQty() - orderDetl.getWorkQty() - orderDetl.getWaitQty(); |
| | | if (waitPakin.getAnfme() > count) { |
| | | throw new CoolException("组托数量超过剩余可用数量"); |
| | | } |
| | | |
| | | //查询是否存在相同明细和托盘码的组托通知档 |
| | | WaitPakin waitPakin1 = this.getOne(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getBarcode, waitPakin.getBarcode()).eq(WaitPakin::getDetlId, waitPakin.getDetlId())); |
| | | if (waitPakin1 == null) { |
| | |
| | | if (!this.updateById(waitPakin1)) { |
| | | throw new CoolException("添加失败"); |
| | | } |
| | | } |
| | | |
| | | OrderDetl orderDetl = orderDetlService.getById(waitPakin.getDetlId()); |
| | | if (orderDetl == null) { |
| | | throw new CoolException("订单明细不存在"); |
| | | } |
| | | |
| | | //获取订单 |