李林
2023-08-18 741c74084d213655e7d77260f14c295dcf099690
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
package com.yuanchu.mom.controller;
 
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuanchu.mom.pojo.ImportRepertory;
import com.yuanchu.mom.pojo.dto.ImportRepertoryDto;
import com.yuanchu.mom.utils.JackSonUtil;
import com.yuanchu.mom.utils.Jwt;
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.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import com.yuanchu.mom.service.ImportRepertoryService;
 
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 
 
/**
 * 成品入库表(ImportRepertory)表控制层
 *
 * @author zss
 * @since 2023-08-10 10:27:01
 */
@Api(tags = "WMS管理-->成品入库")
@RestController
@RequestMapping("/importRepertory")
public class ImportRepertoryController {
 
    @Autowired
    private ImportRepertoryService importRepertoryService;
 
 
    @ApiOperation("查询所有入库列表")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "pageSize", value = "页数", dataTypeClass = Integer.class, required = true),
            @ApiImplicitParam(name = "countSize", value = "条数/页", dataTypeClass = Integer.class, required = true),
            @ApiImplicitParam(name = "orderCode", value = "订单编号", dataTypeClass = String.class),
            @ApiImplicitParam(name = "name", value = "材料名称", dataTypeClass = String.class),
            @ApiImplicitParam(name = "time", value = "入库日期", dataTypeClass = String.class)
    })
    @GetMapping("/selectAllImpRep")
    public Result selectAllImpRep(int pageSize, int countSize, String orderCode, String name, String time) {
        IPage<Map<String, Object>> importRepertoryPage = importRepertoryService.selectAllImpRep(new Page<Object>(pageSize, countSize), orderCode, name, time);
        Map<String, Object> map = new HashMap<>();
        map.put("total", importRepertoryPage.getTotal());
        map.put("row", importRepertoryPage.getRecords());
        return Result.success(map);
    }
 
    @ApiOperation("根据id查看入库详情")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "id", value = "入库id", dataTypeClass = Integer.class, required = true)
    })
    @GetMapping("/selectImpRepById")
    public Result selectImpRepById(Integer id) {
        return Result.success(importRepertoryService.getById(id));
    }
 
 
}