zss
2023-09-25 44a9b4729e058e75dfba2892803038ee91963d77
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
package com.yuanchu.mom.controller;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.HashMap;
import com.yuanchu.mom.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuanchu.mom.service.RepertoryService;
import java.util.Map;
 
/**
 * 库存表(Repertory)表控制层
 *
 * @author zss
 * @since 2023-08-07 16:33:01
 */
@Api(tags = "WMS管理-->库存")
@RestController
@RequestMapping("/repertory")
public class RepertoryController {
 
    @Autowired
    private RepertoryService repertoryService;
 
    @ApiOperation("查询所有库存列表")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "pageSize", value = "页数", dataTypeClass = Integer.class, required = true),
            @ApiImplicitParam(name = "countSize", value = "条数/页", dataTypeClass = Integer.class, required = true),
            @ApiImplicitParam(name = "name", value = "产品名称", dataTypeClass = String.class),
            @ApiImplicitParam(name = "specifications", value = "产品型号", dataTypeClass = String.class),
            @ApiImplicitParam(name = "time", value = "入库日期", dataTypeClass = String.class),
            @ApiImplicitParam(name = "type", value = "类型(为空=全部)", dataTypeClass = Integer.class)
    })
    @GetMapping("/selectAllRepertory")
    public Result selectAllRepertory(int pageSize, int countSize, String name, String specifications, String time, Integer type) {
        IPage<Map<String, Object>> repertoryPage = repertoryService.selectAllRepertory(new Page<Object>(pageSize, countSize), name, specifications, time, type);
        Map<String, Object> map = new HashMap<>();
        map.put("total", repertoryPage.getTotal());
        map.put("row", repertoryPage.getRecords());
        return Result.success(map);
    }
 
}