| | |
| | | officialInventory.setPendingId(pendingInventoryDto.getPId()); |
| | | officialInventory.setInventoryQuantity(quantity); |
| | | officialInventoryMapper.insert(officialInventory); |
| | | }else { |
| | | } else { |
| | | OfficialInventory officialInventory = officialInventoryMapper.selectById(pendingInventoryDto.getOfficialId()); |
| | | officialInventory.setInventoryQuantity(quantity.add(officialInventory.getInventoryQuantity())); |
| | | officialInventoryMapper.updateById(officialInventory); |
| | |
| | | } |
| | | return i; |
| | | } |
| | | |
| | | // 处理明细和库存数量 |
| | | private int handeInventoryQuantity(PendingInventoryDto pendingInventoryDto) { |
| | | inputInventoryRecordService.insertInputInventoryRecord(pendingInventoryDto, null, pendingInventoryDto.getInventoryQuantity()); |
| | | return inventorySummaryService.updateInventory(pendingInventoryDto, null); |
| | | }; |
| | | } |