liding
2026-03-16 3322c20909d2cc762b9a7a4a4c8b2bb728ebebd9
src/main/java/com/ruoyi/consumables/controller/ConsumablesInventoryController.java
@@ -35,37 +35,37 @@
public class ConsumablesInventoryController {
    @Autowired
    private ConsumablesInventoryService ConsumablesInventoryService;
    private ConsumablesInventoryService consumablesInventoryService;
    @GetMapping("/pageConsumablesInventory")
    @ApiOperation("分页查询库存")
    public R pageConsumablesInventory(Page page, ConsumablesInventoryDto ConsumablesInventoryDto) {
        IPage<ConsumablesInventoryDto> ConsumablesInventoryDtoIPage = ConsumablesInventoryService.pageConsumablesInventory(page, ConsumablesInventoryDto);
    public R pageConsumablesInventory(Page page, ConsumablesInventoryDto consumablesInventoryDto) {
        IPage<ConsumablesInventoryDto> ConsumablesInventoryDtoIPage = consumablesInventoryService.pageConsumablesInventory(page, consumablesInventoryDto);
        return R.ok(ConsumablesInventoryDtoIPage);
    }
    @PostMapping("/addConsumablesInventory")
    @ApiOperation("新增库存")
    public R addConsumablesInventory(@RequestBody ConsumablesInventoryDto ConsumablesInventoryDto) {
        ConsumablesInventoryDto.setRecordType(String.valueOf(StockInQualifiedRecordTypeEnum.CUSTOMIZATION_STOCK_IN.getCode()));
        ConsumablesInventoryDto.setRecordId(0L);
        return R.ok(ConsumablesInventoryService.addConsumablesInventory(ConsumablesInventoryDto));
    public R addConsumablesInventory(@RequestBody ConsumablesInventoryDto consumablesInventoryDto) {
        consumablesInventoryDto.setRecordType(String.valueOf(StockInQualifiedRecordTypeEnum.CUSTOMIZATION_STOCK_IN.getCode()));
        consumablesInventoryDto.setRecordId(0L);
        return R.ok(consumablesInventoryService.addConsumablesInventory(consumablesInventoryDto));
    }
    @PostMapping("/subtractConsumablesInventory")
    @ApiOperation("扣减库存")
    public R subtractConsumablesInventory(@RequestBody ConsumablesInventoryDto ConsumablesInventoryDto) {
        ConsumablesInventoryDto.setRecordType(String.valueOf(StockOutQualifiedRecordTypeEnum.CUSTOMIZATION_STOCK_OUT.getCode()));
        ConsumablesInventoryDto.setRecordId(0L);
        return R.ok(ConsumablesInventoryService.subtractConsumablesInventory(ConsumablesInventoryDto));
    public R subtractConsumablesInventory(@RequestBody ConsumablesInventoryDto consumablesInventoryDto) {
        consumablesInventoryDto.setRecordType(String.valueOf(StockOutQualifiedRecordTypeEnum.CUSTOMIZATION_STOCK_OUT.getCode()));
        consumablesInventoryDto.setRecordId(0L);
        return R.ok(consumablesInventoryService.subtractConsumablesInventory(consumablesInventoryDto));
    }
    @PostMapping("importConsumablesInventory")
    @ApiOperation("导入库存")
    public R importConsumablesInventory(MultipartFile file) {
        return ConsumablesInventoryService.importConsumablesInventory(file);
        return consumablesInventoryService.importConsumablesInventory(file);
    }
    @Log(title = "下载库存导入模板", businessType = BusinessType.EXPORT)
@@ -78,31 +78,31 @@
    @PostMapping("/exportConsumablesInventory")
    @ApiOperation("导出库存")
    public void exportConsumablesInventory(HttpServletResponse response, ConsumablesInventoryDto ConsumablesInventoryDto) {
        ConsumablesInventoryService.exportConsumablesInventory(response, ConsumablesInventoryDto);
    public void exportConsumablesInventory(HttpServletResponse response, ConsumablesInventoryDto consumablesInventoryDto) {
        consumablesInventoryService.exportConsumablesInventory(response, consumablesInventoryDto);
    }
    @GetMapping("ConsumablesInventoryPage")
    @ApiOperation("库存报表查询")
    public R ConsumablesInventoryPage(Page page, ConsumablesInventoryDto consumablesInventoryDto) {
        return R.ok(ConsumablesInventoryService.consumablesInventoryPage(consumablesInventoryDto,page));
        return R.ok(consumablesInventoryService.consumablesInventoryPage(consumablesInventoryDto,page));
    }
    @GetMapping("ConsumablesInAndOutRecord")
    @ApiOperation("统计各个产品的入库和出库记录")
    public R ConsumablesInAndOutRecord(ConsumablesInventoryDto consumablesInventoryDto, Page page) {
        return R.ok(ConsumablesInventoryService.consumablesInAndOutRecord(consumablesInventoryDto,page));
        return R.ok(consumablesInventoryService.consumablesInAndOutRecord(consumablesInventoryDto,page));
    }
    @PostMapping("/frozenConsumables")
    @ApiOperation("冻结库存")
    public R frozenConsumables(@RequestBody ConsumablesInventoryDto ConsumablesInventoryDto) {
        return R.ok(ConsumablesInventoryService.frozenConsumables(ConsumablesInventoryDto));
    public R frozenConsumables(@RequestBody ConsumablesInventoryDto consumablesInventoryDto) {
        return R.ok(consumablesInventoryService.frozenConsumables(consumablesInventoryDto));
    }
    @PostMapping("/thawConsumables")
    @ApiOperation("解冻库存")
    public R thawConsumables(@RequestBody ConsumablesInventoryDto ConsumablesInventoryDto) {
        return R.ok(ConsumablesInventoryService.thawConsumables(ConsumablesInventoryDto));
    public R thawConsumables(@RequestBody ConsumablesInventoryDto consumablesInventoryDto) {
        return R.ok(consumablesInventoryService.thawConsumables(consumablesInventoryDto));
    }
}