zss
2023-08-30 af9457d7ce94c7684a9439d46b0025bd6e66d8af
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 com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.yuanchu.mom.service.InspectUnacceptedService;
 
import java.util.HashMap;
import java.util.Map;
 
/**
 * 不合格品检验表(InspectUnaccepted)表控制层
 *
 * @author zss
 * @since 2023-08-07 10:04:01
 */
@Api(tags = "QMS管理-->不合格品")
@RestController
@RequestMapping("/inspectUnaccepted")
public class InspectUnacceptedController {
 
    @Autowired
    private InspectUnacceptedService inspectUnacceptedService;
 
 
    @ApiOperation(value = "查询成品不合格品检验单列表")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "pageSize",value = "页数",dataTypeClass  = Integer.class,required = true),
            @ApiImplicitParam(name = "countSize",value = "条数/页",dataTypeClass  = Integer.class,required = true),
            @ApiImplicitParam(name = "formTime",value = "来料日期",dataTypeClass  = String.class),
            @ApiImplicitParam(name = "dealState",value = "处理状态(为空=全部)",dataTypeClass  = Integer.class)
    })
    @GetMapping("/selectUnRawInspectsList")
    public Result selectUnRawInspectsList(int pageSize, int countSize, String formTime, Integer dealState){
        IPage<Map<String, Object>> inspectionPage = inspectUnacceptedService.selectUnRawInspectsList(new Page<Object>(pageSize, countSize), formTime,dealState);
        Map<String, Object> map = new HashMap<>();
        map.put("total", inspectionPage.getTotal());
        map.put("row", inspectionPage.getRecords());
        return Result.success(map);
    }
}