buhuazhen
3 天以前 99c61e2e4c5aabe594ff8a463a45f3a6b5cb9add
src/main/java/com/ruoyi/stock/controller/StockInventoryController.java
@@ -44,11 +44,22 @@
        return R.ok(stockInventoryDtoIPage);
    }
    @GetMapping("/pageListCombinedStockInventory")
    @ApiOperation("分页查询联合库存列表")
    public R pageListCombinedStockInventory(Page page, StockInventoryDto stockInventoryDto) {
        IPage<StockInventoryDto> stockInventoryDtoIPage = stockInventoryService.pageListCombinedStockInventory(page, stockInventoryDto);
        return R.ok(stockInventoryDtoIPage);
    }
    @PostMapping("/addstockInventory")
    @ApiOperation("新增库存")
    public R addstockInventory(@RequestBody StockInventoryDto stockInventoryDto) {
        stockInventoryDto.setRecordType(String.valueOf(StockInQualifiedRecordTypeEnum.CUSTOMIZATION_STOCK_IN.getCode()));
        stockInventoryDto.setRecordId(0L);
        if (stockInventoryDto.getRecordType() == null || stockInventoryDto.getRecordType().trim().isEmpty()) {
            stockInventoryDto.setRecordType(String.valueOf(StockInQualifiedRecordTypeEnum.CUSTOMIZATION_STOCK_IN.getCode()));
        }
        if (stockInventoryDto.getRecordId() == null) {
            stockInventoryDto.setRecordId(0L);
        }
        return R.ok(stockInventoryService.addstockInventory(stockInventoryDto));
    }