huminmin
7 小时以前 fe01e3b188e24a20b539f92e436d967aaf77ee1a
src/main/java/com/ruoyi/stock/service/impl/StockUninventoryServiceImpl.java
@@ -90,6 +90,11 @@
    }
    @Override
    public List<StockUninventoryDto> getWasteByModelId(Long productModelId) {
        return stockUninventoryMapper.getWasteByModelId(productModelId);
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public Integer addStockUninventory(StockUninventoryDto stockUninventoryDto) {
        String inventoryType = resolveInventoryType(stockUninventoryDto);
@@ -151,7 +156,8 @@
    @Override
    @Transactional(rollbackFor = Exception.class)
    public Integer addStockInRecordOnly(StockUninventoryDto stockUninventoryDto) {
        stockUninventoryDto.setType(resolveInventoryType(stockUninventoryDto));
        String inventoryType = resolveInventoryType(stockUninventoryDto);
        stockUninventoryDto.setType(inventoryType);
        StockInRecordDto stockInRecordDto = new StockInRecordDto();
        stockInRecordDto.setRecordId(stockUninventoryDto.getRecordId());
        stockInRecordDto.setRecordType(stockUninventoryDto.getRecordType());
@@ -162,8 +168,13 @@
        }
        stockInRecordDto.setBatchNo(batchNo);
        stockInRecordDto.setProductModelId(stockUninventoryDto.getProductModelId());
        stockInRecordDto.setType("1");
        if (UNQUALIFIED_TYPE.equals(inventoryType)) {
            stockInRecordDto.setType("1");
        } else {
            stockInRecordDto.setType("2");
        }
        stockInRecordDto.setRemark(stockUninventoryDto.getRemark());
        stockInRecordDto.setSource(stockUninventoryDto.getSource());
        stockInRecordService.add(stockInRecordDto);
        return 1;
    }