“djh”
13 小时以前 c1628ae5526ffae9cb12e70778cac8195c405382
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
package com.gkhy.exam.admin.controller.web;
 
import com.gkhy.exam.common.api.CommonResult;
import com.gkhy.exam.system.domain.*;
import com.gkhy.exam.system.service.InspectionRecordService;
import com.gkhy.exam.system.service.InspectionSpecificationService;
import com.gkhy.exam.system.service.PurchaseApplyService;
import com.gkhy.exam.system.service.PurchaseContractService;
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.*;
 
@Api(tags = "采买管理")
@RestController
@RequestMapping("/purchase/audit")
public class PurchaseController {
    @Autowired
    private PurchaseApplyService applyService;
 
    @Autowired
    private PurchaseContractService contractService;
 
    @Autowired
    private InspectionSpecificationService specificationService;
 
    @Autowired
    private InspectionRecordService recordService;
 
 
 
    /**
     * 采购申请
     * @param purchaseApply
     * @return
     */
    @ApiOperation(value = "采购申请列表(分页)")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"),
            @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10"),
    })
    @GetMapping("/apply/list")
    public CommonResult listApply(PurchaseApply purchaseApply){
        return CommonResult.success(applyService.selectApplyList(purchaseApply));
    }
 
 
    /**
     *采购申请新增
     * @param purchaseApply
     * @return
     */
    @ApiOperation(value = "采购申请新增")
    @PostMapping("/apply/insert")
    public CommonResult insertApply(@RequestBody PurchaseApply purchaseApply){
        return applyService.insertApply(purchaseApply);
    }
 
    /**
     * 采购申请修改
     * @param purchaseApply
     * @return
     */
    @ApiOperation(value = "采购申请修改")
    @PostMapping("/apply/update")
    public CommonResult updateApply(@RequestBody PurchaseApply purchaseApply){
        return applyService.updateApply(purchaseApply);
    }
 
    /**
     * 采购申请删除
     * @param applyId
     * @return
     */
    @ApiOperation(value = "采购申请删除")
    @GetMapping("/apply/deleted")
    public CommonResult deletedApply(@RequestParam("applyId") Integer applyId){
        return applyService.deletedApply(applyId);
    }
 
 
    /**
     * 采购合同
     * @param purchaseContract
     * @return
     */
    @ApiOperation(value = "采购合同列表(分页)")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"),
            @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10"),
    })
    @GetMapping("/contract/list")
    public CommonResult listContract(PurchaseContract purchaseContract){
        return CommonResult.success(contractService.selectContractList(purchaseContract));
    }
 
 
    /**
     *采购合同新增
     * @param purchaseContract
     * @return
     */
    @ApiOperation(value = "采购合同新增")
    @PostMapping("/contract/insert")
    public CommonResult insertContract(@RequestBody PurchaseContract purchaseContract){
        return contractService.insertContract(purchaseContract);
    }
 
    /**
     * 采购合同修改
     * @param purchaseContract
     * @return
     */
    @ApiOperation(value = "采购合同修改")
    @PostMapping("/contract/update")
    public CommonResult updateContract(@RequestBody PurchaseContract purchaseContract){
        return contractService.updateContract(purchaseContract);
    }
 
    /**
     * 采购合同删除
     * @param contractId
     * @return
     */
    @ApiOperation(value = "采购合同删除")
    @GetMapping("/contract/deleted")
    public CommonResult deletedContract(@RequestParam("contractId") Integer contractId){
        return contractService.deletedContract(contractId);
    }
 
    /**
     * 检验规范
     * @param specification
     * @return
     */
    @ApiOperation(value = "检验规范列表(分页)")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"),
            @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10"),
    })
    @GetMapping("/specification/list")
    public CommonResult listSpecification(InspectionSpecification specification){
        return CommonResult.success(specificationService.selectSpecificationList(specification));
    }
 
 
    /**
     *检验规范新增
     * @param specification
     * @return
     */
    @ApiOperation(value = "检验规范新增")
    @PostMapping("/specification/insert")
    public CommonResult insertSpecification(@RequestBody InspectionSpecification specification){
        return specificationService.insertSpecification(specification);
    }
 
    /**
     * 检验规范修改
     * @param specification
     * @return
     */
    @ApiOperation(value = "检验规范修改")
    @PostMapping("/specification/update")
    public CommonResult updateSpecification(@RequestBody InspectionSpecification specification){
        return specificationService.updateSpecification(specification);
    }
 
    /**
     * 检验规范删除
     * @param specificationId
     * @return
     */
    @ApiOperation(value = "检验规范删除")
    @GetMapping("/specification/deleted")
    public CommonResult deletedSpecification(@RequestParam("specificationId") Integer specificationId){
        return specificationService.deletedSpecification(specificationId);
    }
 
    /**
     * 检验记录
     * @param record
     * @return
     */
    @ApiOperation(value = "检验记录列表(分页)")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"),
            @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10"),
    })
    @GetMapping("/record/list")
    public CommonResult listRecord(InspectionRecord record){
        return CommonResult.success(recordService.selectRecordList(record));
    }
 
 
    /**
     *检验记录新增
     * @param record
     * @return
     */
    @ApiOperation(value = "检验记录新增")
    @PostMapping("/record/insert")
    public CommonResult insertRecord(@RequestBody InspectionRecord record){
        return recordService.insertRecord(record);
    }
 
    /**
     * 检验记录修改
     * @param record
     * @return
     */
    @ApiOperation(value = "检验记录修改")
    @PostMapping("/record/update")
    public CommonResult updateRecord(@RequestBody InspectionRecord record){
        return recordService.updateRecord(record);
    }
 
    /**
     * 检验记录删除
     * @param recordId
     * @return
     */
    @ApiOperation(value = "检验记录删除")
    @GetMapping("/record/deleted")
    public CommonResult deletedRecord(@RequestParam("recordId") Integer recordId){
        return recordService.deletedRecord(recordId);
    }
 
 
}