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),
|
@ApiImplicitParam(name = "checkState", value = "检验状态(为空=全部)", dataTypeClass = Integer.class)
|
})
|
@GetMapping("/selectAllRepertory")
|
public Result selectAllRepertory(int pageSize, int countSize, String name, String specifications, String time, Integer type,Integer checkState) {
|
IPage<Map<String, Object>> repertoryPage = repertoryService.selectAllRepertory(new Page<Object>(pageSize, countSize), name, specifications, time, type,checkState);
|
Map<String, Object> map = new HashMap<>();
|
map.put("total", repertoryPage.getTotal());
|
map.put("row", repertoryPage.getRecords());
|
return Result.success(map);
|
}
|
|
}
|