| | |
| | | return R.fail("盘点单不存在"); |
| | | } |
| | | for (StockInventoryCheckItem item : stockInventoryCheckPlanDto.getCheckItems()) { |
| | | //更新库存锁定状态 |
| | | stockInventoryService.updateLocked(item.getProductModelId(),item.getBatchNo(), false); |
| | | if (item.getDifferenceQuantity() == null || item.getDifferenceQuantity().compareTo(BigDecimal.ZERO) == 0) { |
| | | continue; |
| | | } |
| | |
| | | //直接审核通过 |
| | | stockOutRecordService.batchApprove(Collections.singletonList(stock.getId()), 1); |
| | | } |
| | | //更新库存锁定状态 |
| | | stockInventoryService.updateLocked(stockInventoryDto.getProductModelId(),stockInventoryDto.getBatchNo(), false); |
| | | } |
| | | stockInventoryCheckItemMapper.updateById(stockInventoryCheckPlanDto.getCheckItems()); |
| | | plan.setStatus(2); |