huminmin
14 小时以前 7486f6d6a93d98f96f45f0cc4846be9c8a2345df
src/main/java/com/ruoyi/stock/controller/StockUninventoryController.java
@@ -30,7 +30,22 @@
    @GetMapping("/pagestockUninventory")
    @Operation(summary = "分页查询库存")
    public R pagestockUninventory(Page page, StockUninventoryDto stockUninventoryDto) {
        stockUninventoryDto.setType("unqualified");
        IPage<StockUninventoryDto> stockUninventoryDtoIPage = stockUninventoryService.pageStockUninventory(page, stockUninventoryDto);
        return R.ok(stockUninventoryDtoIPage);
    }
    @GetMapping("/pageWasteQuery")
    @Operation(summary = "废品查询页面分页查询")
    public R pageWasteQuery(Page page, StockUninventoryDto stockUninventoryDto) {
        IPage<StockUninventoryDto> stockUninventoryDtoIPage = stockUninventoryService.pageWasteQuery(page, stockUninventoryDto);
        return R.ok(stockUninventoryDtoIPage);
    }
    @GetMapping("/getWasteBatchNoQty")
    @Operation(summary = "查询废品库存对应批号和数量")
    public R getWasteBatchNoQty(Page page, StockInventoryDto stockInventoryDto) {
        IPage<StockUninventoryDto> stockUninventoryDtoIPage = stockUninventoryService.getWasteBatchNoQty(page, stockInventoryDto);
        return R.ok(stockUninventoryDtoIPage);
    }
@@ -39,6 +54,9 @@
    public R addstockUninventory(@RequestBody StockUninventoryDto stockUninventoryDto) {
        stockUninventoryDto.setRecordType(String.valueOf(StockInQualifiedRecordTypeEnum.CUSTOMIZATION_UNSTOCK_IN.getCode()));
        stockUninventoryDto.setRecordId(0L);
        if (stockUninventoryDto.getType() == null || stockUninventoryDto.getType().trim().isEmpty()) {
            stockUninventoryDto.setType("unqualified");
        }
        return R.ok(stockUninventoryService.addStockUninventory(stockUninventoryDto));
    }
@@ -48,6 +66,9 @@
    public R subtractstockUninventory(@RequestBody StockUninventoryDto stockUninventoryDto) {
        stockUninventoryDto.setRecordType(String.valueOf(StockOutQualifiedRecordTypeEnum.CUSTOMIZATION_UNSTOCK_OUT.getCode()));
        stockUninventoryDto.setRecordId(0L);
        if (stockUninventoryDto.getType() == null || stockUninventoryDto.getType().trim().isEmpty()) {
            stockUninventoryDto.setType("unqualified");
        }
        return R.ok(stockUninventoryService.subtractStockUninventory(stockUninventoryDto));
    }
@@ -56,6 +77,9 @@
    public R addStockInRecordOnly(@RequestBody StockUninventoryDto stockUninventoryDto) {
        stockUninventoryDto.setRecordType(String.valueOf(StockInQualifiedRecordTypeEnum.CUSTOMIZATION_UNSTOCK_IN.getCode()));
        stockUninventoryDto.setRecordId(0L);
        if (stockUninventoryDto.getType() == null || stockUninventoryDto.getType().trim().isEmpty()) {
            stockUninventoryDto.setType("unqualified");
        }
        return R.ok(stockUninventoryService.addStockInRecordOnly(stockUninventoryDto));
    }
@@ -64,15 +88,25 @@
    public R addStockOutRecordOnly(@RequestBody StockUninventoryDto stockUninventoryDto) {
        stockUninventoryDto.setRecordType(String.valueOf(StockOutQualifiedRecordTypeEnum.CUSTOMIZATION_UNSTOCK_OUT.getCode()));
        stockUninventoryDto.setRecordId(0L);
        if (stockUninventoryDto.getType() == null || stockUninventoryDto.getType().trim().isEmpty()) {
            stockUninventoryDto.setType("unqualified");
        }
        return R.ok(stockUninventoryService.addStockOutRecordOnly(stockUninventoryDto));
    }
    @PostMapping("/exportStockUninventory")
    @Operation(summary = "导出库存")
    public void exportStockUninventory(HttpServletResponse response, StockUninventoryDto stockUninventoryDto) {
        stockUninventoryDto.setType("unqualified");
        stockUninventoryService.exportStockUninventory(response,stockUninventoryDto);
    }
    @PostMapping("/exportWasteQuery")
    @Operation(summary = "导出废品查询页面数据")
    public void exportWasteQuery(HttpServletResponse response, StockUninventoryDto stockUninventoryDto) {
        stockUninventoryService.exportWasteQuery(response, stockUninventoryDto);
    }
    @PostMapping("/frozenStock")
    @Operation(summary = "冻结库存")