| | |
| | | .eq(StockInRecord::getRecordType, recordType)); |
| | | if (ObjectUtils.isNotEmpty(one)) { |
| | | stockInRecordService.batchDelete(Collections.singletonList(one.getId())); |
| | | //将库存减回来 |
| | | StockInventoryDto stockInventoryDto = new StockInventoryDto(); |
| | | stockInventoryDto.setRecordId(recordId); |
| | | stockInventoryDto.setRecordType(recordType); |
| | | stockInventoryDto.setQualitity(one.getStockInNum()); |
| | | stockInventoryMapper.updateSubtractStockInventory((stockInventoryDto)); |
| | | } |
| | | //将库存减回来 |
| | | StockInventoryDto stockInventoryDto = new StockInventoryDto(); |
| | | stockInventoryDto.setRecordId(recordId); |
| | | stockInventoryDto.setRecordType(recordType); |
| | | stockInventoryDto.setQualitity(one.getStockInNum()); |
| | | stockInventoryMapper.updateSubtractStockInventory((stockInventoryDto)); |
| | | |
| | | } |
| | | public void deleteStockOutRecord(Long recordId, String recordType) { |
| | | StockOutRecord one = stockOutRecordService.getOne(new QueryWrapper<StockOutRecord>() |
| | |
| | | .eq(StockOutRecord::getRecordType, recordType)); |
| | | if (ObjectUtils.isNotEmpty(one)) { |
| | | stockOutRecordService.batchDelete(Collections.singletonList(one.getId())); |
| | | //将库存加回来 |
| | | StockInventoryDto stockInventoryDto = new StockInventoryDto(); |
| | | stockInventoryDto.setRecordId(recordId); |
| | | stockInventoryDto.setRecordType(recordType); |
| | | stockInventoryDto.setQualitity(one.getStockOutNum()); |
| | | stockInventoryMapper.updateAddStockInventory((stockInventoryDto)); |
| | | } |
| | | //将库存加回来 |
| | | StockInventoryDto stockInventoryDto = new StockInventoryDto(); |
| | | stockInventoryDto.setRecordId(recordId); |
| | | stockInventoryDto.setRecordType(recordType); |
| | | stockInventoryDto.setQualitity(one.getStockOutNum()); |
| | | stockInventoryMapper.updateAddStockInventory((stockInventoryDto)); |
| | | |
| | | } |
| | | } |