| | |
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public boolean batchMergeOrders(BatchMergeOrdersParam ordersParam) {
|
| | | Loc locServiceOne = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getBarcode, ordersParam.getMergeNo()), false);
|
| | | Loc locServiceOne = locService.getOne(new LambdaQueryWrapper<Loc>()
|
| | | .eq(Loc::getLocStsId, 1)
|
| | | .eq(Loc::getBarcode, ordersParam.getMergeNo()), false);
|
| | | if (!Objects.isNull(locServiceOne)) {
|
| | | throw new CoolException("托盘已入库,不能再组托!!");
|
| | | }
|
| | |
| | | throw new CoolException("订单明细不存在!!");
|
| | | }
|
| | | } else { //部分拣货
|
| | | byId.setQty(order.getWorkQty() + byId.getQty());
|
| | | byId.setQty(Math.round((order.getWorkQty() + byId.getQty()) * 1000) / 1000.0);
|
| | | byId.setWorkQty(0.0);
|
| | | if (!orderDetlService.updateById(byId)) {
|
| | | throw new CoolException("部分拣料明细更新失败!!");
|