| | |
| | | throw new CoolException("收货失败!!"); |
| | | } |
| | | } |
| | | // if (!warehouseAreasItemService.saveBatch(allOrders)) { |
| | | // throw new CoolException("收货失败!!"); |
| | | // } |
| | | |
| | | AsnOrder order = asnOrderMapper.getOne(new LambdaQueryWrapper<AsnOrder>().eq(AsnOrder::getCode, asnCode)); |
| | | if (order.getQty().compareTo(order.getAnfme()) >= 0.00) { |
| | | order.setExceStatus(AsnExceStatus.ASN_EXCE_STATUS_TASK_DONE.val).setRleStatus(Short.valueOf("1")); |
| | | |
| | | order.setExceStatus(AsnExceStatus.ASN_EXCE_STATUS_RECEIPT_DONE.val).setRleStatus(Short.valueOf("1")); |
| | | if (!asnOrderMapper.updateById(order)) { |
| | | throw new CoolException("订单状态修改失败!!"); |
| | | } |
| | | } |
| | | |
| | | |
| | | //获取采购数量 |
| | | // double purQty = receipts.stream().mapToDouble(ReceiptDetlsDto::getPurQty).sum(); |
| | | |
| | | // BigDecimal subtract = BigDecimal.valueOf(receiptQty).subtract(BigDecimal.valueOf(purQty)); |
| | | // //判断已收货数量是否小于等于采购数量 |
| | | // if (subtract.compareTo(new BigDecimal("0.0")) <= 0) { |
| | | // asnOrder.setRleStatus(Short.valueOf("1")); |
| | | // //日志表操作 |
| | | // operateOrderLogs(asnOrder); |
| | | // } |
| | | return R.ok(asnOrder); |
| | | return R.ok("收货成功!!"); |
| | | } |
| | | |
| | | /** |