From 7661cf3c3725cd3a9057625ea4a5f1add9001f25 Mon Sep 17 00:00:00 2001 From: liyong <18434998025@163.com> Date: 星期五, 15 八月 2025 09:40:14 +0800 Subject: [PATCH] feat: 仓库货架修改 --- src/main/java/com/ruoyi/warehouse/controller/WarehouseGoodsShelvesRowcolController.java | 63 +++++++++++++++++-------------- 1 files changed, 34 insertions(+), 29 deletions(-) diff --git a/src/main/java/com/ruoyi/warehouse/controller/WarehouseGoodsShelvesRowcolController.java b/src/main/java/com/ruoyi/warehouse/controller/WarehouseGoodsShelvesRowcolController.java index a0c7479..c1914d8 100644 --- a/src/main/java/com/ruoyi/warehouse/controller/WarehouseGoodsShelvesRowcolController.java +++ b/src/main/java/com/ruoyi/warehouse/controller/WarehouseGoodsShelvesRowcolController.java @@ -1,5 +1,6 @@ package com.ruoyi.warehouse.controller; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -25,36 +26,40 @@ private WarehouseGoodsShelvesRowcolService warehouseGoodsShelvesRowcolService; @Autowired private WarehouseGoodsShelvesRowcolMapper warehouseGoodsShelvesRowcolMapper; - - @GetMapping("/listPage") - @ApiOperation("鍟嗗搧璐ф灦琛屽垪-鍒嗛〉鏌ヨ") - @Log(title = "鍟嗗搧璐ф灦琛屽垪-鍒嗛〉鏌ヨ", businessType = BusinessType.OTHER) - public AjaxResult listPage(Page page, WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol) { - IPage<WarehouseGoodsShelvesRowcol> listPage = warehouseGoodsShelvesRowcolService.listPage(page, warehouseGoodsShelvesRowcol); - return AjaxResult.success(listPage); + @GetMapping("/list") + @ApiOperation("鍟嗗搧璐ф灦琛屽垪-鏌ヨ") + @Log(title = "鍟嗗搧璐ф灦琛屽垪-鏌ヨ", businessType = BusinessType.OTHER) + public AjaxResult list(Long warehouseGoodsShelvesId) { + List<WarehouseGoodsShelvesRowcol> list = warehouseGoodsShelvesRowcolService.list(new QueryWrapper<WarehouseGoodsShelvesRowcol>().lambda() + .eq(WarehouseGoodsShelvesRowcol::getWarehouseGoodsShelvesId, warehouseGoodsShelvesId)); + return AjaxResult.success(list); } - @PostMapping("/add") - @ApiOperation("鍟嗗搧璐ф灦琛屽垪-娣诲姞") - @Log(title = "鍟嗗搧璐ф灦琛屽垪-娣诲姞", businessType = BusinessType.INSERT) - public AjaxResult add(@RequestBody WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol) { - boolean save = warehouseGoodsShelvesRowcolService.save(warehouseGoodsShelvesRowcol); - return save ? AjaxResult.success("娣诲姞鎴愬姛") : AjaxResult.error("娣诲姞澶辫触"); - } - @PostMapping("/update") - @ApiOperation("鍟嗗搧璐ф灦琛屽垪-鏇存柊") - @Log(title = "鍟嗗搧璐ф灦琛屽垪-鏇存柊", businessType = BusinessType.UPDATE) - public AjaxResult update(@RequestBody WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol) { - boolean up = warehouseGoodsShelvesRowcolService.updateById(warehouseGoodsShelvesRowcol); - return up ? AjaxResult.success("鏇存柊鎴愬姛") : AjaxResult.error("鏇存柊澶辫触"); - } - @PostMapping("/delete") - @ApiOperation("鍟嗗搧璐ф灦琛屽垪-鍒犻櫎") - @Log(title = "鍟嗗搧璐ф灦琛屽垪-鍒犻櫎", businessType = BusinessType.DELETE) - public AjaxResult delete(@RequestBody List<Long> ids) { - if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("璇蜂紶鍏ヨ鍒犻櫎鐨処D"); - boolean remove = warehouseGoodsShelvesRowcolService.deleteByIds(ids); - return remove ? AjaxResult.success("鍒犻櫎鎴愬姛") : AjaxResult.error("鍒犻櫎澶辫触"); - } +// @GetMapping("/listPage") +// @ApiOperation("鍟嗗搧璐ф灦琛屽垪-鍒嗛〉鏌ヨ") +// @Log(title = "鍟嗗搧璐ф灦琛屽垪-鍒嗛〉鏌ヨ", businessType = BusinessType.OTHER) +// public AjaxResult listPage(Page page, WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol) { +// IPage<WarehouseGoodsShelvesRowcol> listPage = warehouseGoodsShelvesRowcolService.listPage(page, warehouseGoodsShelvesRowcol); +// return AjaxResult.success(listPage); +// } +// @PostMapping("/add") +// @ApiOperation("鍟嗗搧璐ф灦琛屽垪-娣诲姞") +// @Log(title = "鍟嗗搧璐ф灦琛屽垪-娣诲姞", businessType = BusinessType.INSERT) +// public AjaxResult add(@RequestBody WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol) { +// return AjaxResult.success(warehouseGoodsShelvesRowcolService.save(warehouseGoodsShelvesRowcol)); +// } +// @PostMapping("/update") +// @ApiOperation("鍟嗗搧璐ф灦琛屽垪-鏇存柊") +// @Log(title = "鍟嗗搧璐ф灦琛屽垪-鏇存柊", businessType = BusinessType.UPDATE) +// public AjaxResult update(@RequestBody WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol) { +// return AjaxResult.success(warehouseGoodsShelvesRowcolService.updateById(warehouseGoodsShelvesRowcol)); +// } +// @PostMapping("/delete") +// @ApiOperation("鍟嗗搧璐ф灦琛屽垪-鍒犻櫎") +// @Log(title = "鍟嗗搧璐ф灦琛屽垪-鍒犻櫎", businessType = BusinessType.DELETE) +// public AjaxResult delete(@RequestBody List<Long> ids) { +// if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("璇蜂紶鍏ヨ鍒犻櫎鐨処D"); +// return AjaxResult.success(warehouseGoodsShelvesRowcolService.removeByIds(ids)); +// } } -- Gitblit v1.9.3