李林
2023-10-07 658d4927d468c47208fd012d9128b09249c07eff
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
package com.chinaztt.mes.production.controller;
 
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.chinaztt.mes.common.wrapper.QueryWrapperUtil;
import com.chinaztt.mes.production.dto.ExaminerDTO;
import com.chinaztt.mes.production.dto.FeederCertificateSelectDTO;
import com.chinaztt.mes.production.entity.FeederCertificate;
import com.chinaztt.mes.production.service.FeederCertificateService;
import com.chinaztt.ztt.common.core.util.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
 
import java.util.List;
 
/**
 * 馈线合格证
 *
 * @author yy
 * @date 2022-11-17 09:11:25
 */
@RestController
@AllArgsConstructor
@RequestMapping("/feederCertificate")
@Api(value = "feederCertificate", tags = "馈线合格证")
public class FeederCertificateController {
 
    private final FeederCertificateService feederCertificateService;
 
    /**
     * 通过sn查询
     *
     * @param sn
     * @return R
     */
    @ApiOperation(value = "通过sn查询", notes = "通过sn查询")
    @GetMapping("/getBySn")
    public R getFeederCertificateBySn(@RequestParam("sn") String sn,String commonSn) {
        return R.ok(feederCertificateService.getFeederCertificateBySn(sn,commonSn));
    }
 
 
    /**
     * 检验员变更
     *
     *@param partNo
     * @return R
     */
    @ApiOperation(value = "检验员变更", notes = "检验员变更")
    @GetMapping("/changeExaminer")
    public R changeExaminer(@RequestParam("partNo") String partNo) {
        return R.ok(feederCertificateService.changeExaminer(partNo));
    }
 
 
 
    /**
     * 批量新增
     *
     * @param feederCertificateList
     * @return R
     */
    @ApiOperation(value = "批量新增", notes = "批量新增")
    @PostMapping
    public R saveSnBatch(@RequestBody List<FeederCertificate> feederCertificateList) {
        return R.ok(feederCertificateService.saveSnBatch(feederCertificateList));
    }
 
 
 
    /**
     * 分页查询
     *
     * @param page    分页对象
     * @param  feederCertificateSelectDTO
     * @return
     */
    @ApiOperation(value = "分页查询", notes = "分页查询")
    @GetMapping("/page")
    public R getPage(Page page, FeederCertificateSelectDTO feederCertificateSelectDTO){
        return R.ok(feederCertificateService.getPage(page, QueryWrapperUtil.gen(feederCertificateSelectDTO)));
    }
 
 
    /**
     * 删除
     *
     * @param  id
     * @return
     */
    @ApiOperation(value = "删除馈线合格证", notes = "删除馈线合格证")
    @DeleteMapping("/{id}")
    public R delete(@PathVariable Long id){
        return R.ok(feederCertificateService.removeById(id));
    }
 
    /**
     * 根据零件号查降级配置表
     *
     * @param  partNo
     * @return
     */
    @ApiOperation(value = "根据零件号查降级配置表", notes = "根据零件号查降级配置表")
    @GetMapping("/getExaminer")
    public R getExaminer(@RequestParam("partNo") String partNo){
        return R.ok(feederCertificateService.getExaminer(partNo));
    }
 
 
 
 
 
    /**
     * 更新打印次数
     *
     * @param  ids
     * @param  copies
     * @return
     */
    @ApiOperation(value = "更新打印次数", notes = "更新打印次数")
    @GetMapping("/updatePrintNum")
    public R updatePrintNum(@RequestParam List<Long> ids,@RequestParam Long copies){
        return R.ok(feederCertificateService.updatePrintNum(ids,copies));
    }
 
 
 
    /**
     * 重复打印标签密码校验
     *
     * @param  password
     * @return
     */
    @ApiOperation(value = "重复打印标签密码校验", notes = "重复打印标签密码校验")
    @GetMapping("/checkPrintNumPassword")
    public R checkPrintNumPassword(String password){
        return R.ok(feederCertificateService.checkPrintNumPassword(password));
    }
 
}