liding
2 天以前 40e4ce58f634598fafd205dfe54cb90e8b63b6f2
main-business/src/main/java/com/ruoyi/business/service/impl/PendingInventoryServiceImpl.java
@@ -168,6 +168,7 @@
                coalValue.setCoalValue(value);
                coalValue.setFields(key);
                coalValue.setFieldName(fieldName);
                coalValue.setType(String.valueOf(1));
                i = coalValueMapper.insert(coalValue);
            }
        }
@@ -192,7 +193,7 @@
                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);
@@ -200,10 +201,4 @@
        }
        return i;
    }
    // 处理明细和库存数量
    private int handeInventoryQuantity(PendingInventoryDto pendingInventoryDto) {
        inputInventoryRecordService.insertInputInventoryRecord(pendingInventoryDto, null, pendingInventoryDto.getInventoryQuantity());
        return inventorySummaryService.updateInventory(pendingInventoryDto, null);
    };
}