rentaiming
2024-07-30 e0edc66e548f3e084827194b60ed2b0f3dd159fa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
package com.ruoyi.management.controller;
 
 
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.utils.page.PageDTO;
import com.ruoyi.management.domain.SlGoodsMaterials;
import com.ruoyi.management.domain.SlGoodsShelf;
import com.ruoyi.management.domain.SlStoreManagement;
import com.ruoyi.management.domain.SlStoreManagementImg;
import com.ruoyi.management.domain.dto.*;
import com.ruoyi.management.domain.vo.SlGoodsShelfVO;
import com.ruoyi.management.service.SlGoodsShelfService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
import java.util.List;
 
/**
 * <p>
 * 货架表 前端控制器
 * </p>
 *
 * @author hjl
 * @since 2024-06-25
 */
@RestController
@RequestMapping("/sl-goods-shelf")
@Api(value = "货架管理", tags = "货架管理", description = "货架管理")
public class SlGoodsShelfController {
 
    @Resource
    private SlGoodsShelfService  slGoodsShelfService;
 
    @PostMapping("/getGoodsShelfList")
    @ApiOperation(value = "分页获货架表管理")
    public R<PageDTO<SlGoodsShelfVO>> getGoodsShelfList(@RequestBody SlGoodsShelfQuery slGoodsShelfQuery) {
        return R.ok(slGoodsShelfService.getGoodsShelfList(slGoodsShelfQuery));
    }
 
    @PostMapping("/getBGoodsShelfList")
    @ApiOperation(value = "分页不获货架表管理")
    public R<List<SlGoodsShelf>> getBGoodsShelfList(@RequestBody SlGoodsShelfQuery slGoodsShelfQuery) {
        return R.ok(slGoodsShelfService.getBGoodsShelfList(slGoodsShelfQuery));
    }
 
    @PostMapping("/addSlGoodsShelf")
    @ApiOperation(value = "添加/修改货架管理")
    public R addSlGoodsShelf(@RequestBody SlGoodsShelfDTO slGoodsShelfDTO) {
        slGoodsShelfService.addSlGoodsShelf(slGoodsShelfDTO);
        return R.ok();
    }
 
    @GetMapping("/SlGoodsShelf/{id}")
    @ApiOperation(value = "货架管理详情")
    public R<SlGoodsShelfVO> getSlGoodsShelfOne(@ApiParam(name = "id", value = "货架管理id", required = true) @PathVariable("id") Long id) {
        return R.ok(slGoodsShelfService.getSlGoodsShelfOne(id));
    }
 
    @ApiOperation("删除货架")
    @DeleteMapping("/{id}")
    public R<?> delStoreManagement(
            @ApiParam(name = "id", value = "货架管理id", required = true) @PathVariable("id") Long id) {
        SlGoodsShelf byId = slGoodsShelfService.getById(id);
        byId.setDelFlag("1");
        slGoodsShelfService.updateById(byId);
        return R.ok();
    }
 
    @PostMapping("/wfanzGoodsShelfList")
    @ApiOperation(value = "货架获放置")
    public R<List<SlGoodsShelf>> wfanzGoodsShelfList(@RequestBody GoodsShelfQuery goodsShelfQuery) {
        return R.ok(slGoodsShelfService.wfanzGoodsShelfList(goodsShelfQuery));
    }
 
    @PostMapping("/wfanzGoodsShelfListDel/{id}")
    @ApiOperation(value = "货架获放置删除")
    public R wfanzGoodsShelfListDel(
            @ApiParam(name = "id", value = "货架管理id", required = true) @PathVariable("id") Long id){
        SlGoodsShelf byId = slGoodsShelfService.getById(id);
        byId.setIsStoreManagement(1);
        slGoodsShelfService.updateById(byId);
        return R.ok();
    }
 
    @PostMapping("/fanzGoodsShelfList")
    @ApiOperation(value = "货架放置到图片")
    public R fanzGoodsShelfList(@RequestBody GoodsShelfDTO goodsShelfDTO) {
        slGoodsShelfService.fanzGoodsShelfList(goodsShelfDTO);
        return R.ok();
    }
 
    @PostMapping("/getStoreManagementimgSheif")
    @ApiOperation(value = "获取仓库管理平面圖的货架")
    public R<List<SlGoodsShelf>> getStoreManagementimgSheif(@RequestBody GoodsShelfDTO goodsShelfDTO) {
        return R.ok(slGoodsShelfService.getStoreManagementimgSheif(goodsShelfDTO));
    }
 
    @PostMapping("/getGoodsSheManagementlfList")
    @ApiOperation(value = "分页通过仓库和层数货架表管理")
    public R<List<SlGoodsShelf>> getGoodsSheManagementlfList(@RequestBody SlGoodsShelfQuery slGoodsShelfQuery) {
        return R.ok(slGoodsShelfService.getGoodsSheManagementlfList(slGoodsShelfQuery));
    }
 
}