| | |
| | | throw new CoolException("单据明细数量修改失败!!"); |
| | | } |
| | | |
| | | WarehouseAreasItem orderItem = warehouseAreasItemService.getById(item.getRcptId()); |
| | | if (Objects.isNull(orderItem)) { |
| | | throw new CoolException("收货单据不存在!!"); |
| | | } |
| | | // WarehouseAreasItem orderItem = warehouseAreasItemService.getById(item.getRcptId()); |
| | | // if (Objects.isNull(orderItem)) { |
| | | // throw new CoolException("收货单据不存在!!"); |
| | | // } |
| | | |
| | | Double disQty = Objects.isNull(item.getDisQty()) ? 0 : item.getDisQty(); |
| | | Double safeQty = Objects.isNull(item.getSafeQty()) ? 0 : item.getSafeQty(); |
| | | |
| | | Double sum = disQty + safeQty; |
| | | orderItem.setIsptQty(sum); |
| | | |
| | | if (sum.compareTo(0.0) > 0) { |
| | | if (!warehouseAreasItemService.updateById(orderItem)) { |
| | | throw new CoolException("收货区库存信息更新失败!!"); |
| | | } |
| | | |
| | | //新建质检单,质检结果不会有质检结果 |
| | | if (Objects.isNull(orderItem.getIsptResult())) { |
| | | operateReceipt(item, orderItem); |
| | | } |
| | | } |
| | | // Double disQty = Objects.isNull(item.getDisQty()) ? 0 : item.getDisQty(); |
| | | // Double safeQty = Objects.isNull(item.getSafeQty()) ? 0 : item.getSafeQty(); |
| | | // |
| | | // Double sum = disQty + safeQty; |
| | | // orderItem.setIsptQty(sum); |
| | | // |
| | | // if (sum.compareTo(0.0) > 0) { |
| | | // if (!warehouseAreasItemService.updateById(orderItem)) { |
| | | // throw new CoolException("收货区库存信息更新失败!!"); |
| | | // } |
| | | // //新建质检单,不会有质检结果 |
| | | // confirmReceipt(item, orderItem); |
| | | // |
| | | //// if (Objects.isNull(orderItem.getIsptResult())) { |
| | | //// operateReceipt(item, orderItem); |
| | | //// } |
| | | // } |
| | | } |
| | | |
| | | Set<Long> isptIds = isptItem.stream().map(QlyIsptItem::getIspectId).collect(Collectors.toSet()); |
| | |
| | | * @description: 质检后修改收货区存信息 |
| | | * @version 1.0 |
| | | */ |
| | | private void operateReceipt(QlyIsptItem item, WarehouseAreasItem orderItem) { |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void confirmReceipt(QlyIsptItem item, WarehouseAreasItem orderItem) { |
| | | Double disQty = Objects.isNull(item.getDisQty()) ? 0 : item.getDisQty(); |
| | | Double safeQty = Objects.isNull(item.getSafeQty()) ? 0 : item.getSafeQty(); |
| | | Double sum = disQty + safeQty; |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<QlyIsptItem> selectIsptResult(LambdaQueryWrapper<QlyIsptItem> eq) { |
| | | return this.baseMapper.selectIsptResult(eq); |
| | | } |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @date 2025/5/12 |