4
hao
2025-04-16 c5fb1fbcbb2bf4d511773d348f9ef625855c61fc
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
package com.web.pda.lyt.lytPda.controller;
 
import com.app.base.control.WebController;
import com.app.base.data.ApiResponseResult;
import com.web.pda.lyt.lytPda.service.PQCInputService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
 
@Api(description = "PQC首检录入")
@CrossOrigin
@ControllerAdvice
//@RestController
@Controller
@RequestMapping(value = "pqc_first_input")
public class PQCInputController extends WebController {
 
    @Autowired
    private PQCInputService pqcInputService;
    
    @ApiOperation(value = "获取批号下拉数据源", notes = "获取批号下拉数据源")
    @RequestMapping(value = "/getBatchNum", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult getBatchNum(
            @RequestParam(value = "factory") String factory,
            @RequestParam(value = "company") String company,
            @RequestParam(value = "ftype") String ftype,
            @RequestParam(value = "procno") String procno,
            @RequestParam(value = "modelno") String modelno,
            @RequestParam(value = "keyword") String keyword) {
        try {
            return pqcInputService.getBatchNum(factory, company,ftype,procno,modelno,keyword);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
    
    @ApiOperation(value = "获取批号详细信息", notes = "获取批号详细信息")
    @RequestMapping(value = "/getBatchNumInfo", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult getBatchNumInfo(
            @RequestParam(value = "factory") String factory,
            @RequestParam(value = "company") String company,
            @RequestParam(value = "userNo") String userNo,
            @RequestParam(value = "lineType") String lineType,
            @RequestParam(value = "procNo") String procNo,
            @RequestParam(value = "lotNo") String lotNo,
            @RequestParam(value = "classNo") String classNo) {
        try {
            return pqcInputService.getBatchNumInfo(factory, company,userNo,lineType,procNo,lotNo,classNo);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
    
    @ApiOperation(value = "一键合格操作", notes = "一键合格操作")
    @RequestMapping(value = "/setOK", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult setOK(
            @RequestParam(value = "factory") String factory,
            @RequestParam(value = "company") String company,
            @RequestParam(value = "userNo") String userNo,
            @RequestParam(value = "checkId") String checkId) {
        try {
            return pqcInputService.setOK(factory, company,userNo,checkId);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
    
    @ApiOperation(value = "提交/撤回提交/删除", notes = "提交/撤回提交/删除")
    @RequestMapping(value = "/submitInfo", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult submitInfo(
            @RequestParam(value = "factory") String factory,
            @RequestParam(value = "company") String company,
            @RequestParam(value = "userNo") String userNo,
            @RequestParam(value = "checkId") String checkId,
            @RequestParam(value = "operaType") String operaType,
            @RequestParam(value = "remarks") String remarks) {
        try {
            return pqcInputService.submitInfo(factory, company,userNo,checkId,operaType,remarks);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
 
    @ApiOperation(value = "获取checker", notes = "获取checker")
    @RequestMapping(value = "/getChecker", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult getChecker(
            @RequestParam(value = "checkTask") String checkTask) {
        try {
            return pqcInputService.getChecker(checkTask);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
 
    @ApiOperation(value = "更新选择检验人状态", notes = "更新选择检验人状态")
    @RequestMapping(value = "/updataChecker", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult updataChecker(
            @RequestParam(value = "id") String id,
            @RequestParam(value = "status") String status,
            @RequestParam(value = "billNo") String billNo) {
        try {
            return pqcInputService.updataChecker(id, status, billNo);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
    
    @ApiOperation(value = "获取从表检验项目明细及丛丛表检验值明细", notes = "获取从表检验项目明细及丛丛表检验值明细")
    @RequestMapping(value = "/getItemInfo", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult getItemInfo(
            @RequestParam(value = "factory") String factory,
            @RequestParam(value = "company") String company,
            @RequestParam(value = "checkId") String checkId,
            @RequestParam(value = "checkItemId") String checkItemId) {
        try {
            return pqcInputService.getItemInfo(factory, company,checkId,checkItemId);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
    
    @ApiOperation(value = "检验值录入", notes = "检验值录入")
    @RequestMapping(value = "/checkValueInput", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult checkValueInput(
            @RequestParam(value = "factory") String factory,
            @RequestParam(value = "company") String company,
            @RequestParam(value = "userNo") String userNo,
            @RequestParam(value = "checkId") String checkId,
            @RequestParam(value = "checkItemId") String checkItemId,
            @RequestParam(value = "testValue") String testValue,
            @RequestParam(value = "ptype") String ptype,
            @RequestParam(value = "checkValueId") String checkValueId) {
        try {
            return pqcInputService.checkValueInput(factory, company,userNo,checkId,checkItemId,testValue,ptype,checkValueId);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
    
    @ApiOperation(value = "检验值修改", notes = "检验值修改")
    @RequestMapping(value = "/checkValueFieldInput", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult checkValueFieldInput(
            @RequestParam(value = "factory") String factory,
            @RequestParam(value = "company") String company,
            @RequestParam(value = "userNo") String userNo,
            @RequestParam(value = "checkId") String checkId,
            @RequestParam(value = "tableName") String tableName,
            @RequestParam(value = "changeName") String changeName,
            @RequestParam(value = "changeValue") String changeValue){
        try {
            return pqcInputService.checkValueFieldInput(factory,company,userNo,checkId,tableName,
                    changeName,changeValue);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
    
    @ApiOperation(value = "非量化项目的检验值", notes = "非量化项目的检验值")
    @RequestMapping(value = "/nonQulCheckVal", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult nonQulCheckVal(
            @RequestParam(value = "factory") String factory,
            @RequestParam(value = "company") String company,
            @RequestParam(value = "proc") String proc,
            @RequestParam(value = "prodNo") String prodNo,
            @RequestParam(value = "prodType") String prodType,
            @RequestParam(value = "checkItem") String checkItem) {
        try {
            return pqcInputService.nonQulCheckVal(factory,company,proc,prodNo,prodType,checkItem);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
    
    @ApiOperation(value = "PQC值修改", notes = "PQC值修改")
    @RequestMapping(value = "/modifyPQCValue", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult modifyPQCValue(
            @RequestParam(value = "factory") String factory,
            @RequestParam(value = "company") String company,
            @RequestParam(value = "userNo") String userNo,
            @RequestParam(value = "mid") String mid,
            @RequestParam(value = "tableName") String tableName,
            @RequestParam(value = "changeName") String changeName,
            @RequestParam(value = "changeValue") String changeValue){
        try {
            return pqcInputService.modifyPQCValue(factory,company,userNo,mid,tableName,
                    changeName,changeValue);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
    
    @ApiOperation(value = "PQC值修改-有返回值", notes = "PQC值修改-有返回值")
    @RequestMapping(value = "/modifyPQCValue1", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult modifyPQCValue1(
            @RequestParam(value = "factory") String factory,
            @RequestParam(value = "company") String company,
            @RequestParam(value = "userNo") String userNo,
            @RequestParam(value = "mid") String mid,
            @RequestParam(value = "tableName") String tableName,
            @RequestParam(value = "changeName") String changeName,
            @RequestParam(value = "changeValue") String changeValue){
        try {
            return pqcInputService.modifyPQCValue1(factory,company,userNo,mid,tableName,
                    changeName,changeValue);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
    
    @ApiOperation(value = "信息查看权限设置", notes = "信息查看权限设置")
    @RequestMapping(value = "/getAuthority", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult getAuthority(
            @RequestParam(value = "factory") String factory,
            @RequestParam(value = "company") String company,
            @RequestParam(value = "procNo") String procNo){
        try {
            return pqcInputService.getAuthority(factory,company,procNo);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
    
    @ApiOperation(value = "PQC检验项目录入 —— 一键斜杠", notes = "PQC检验项目录入 —— 一键斜杠")
    @RequestMapping(value = "/setXieGang", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult setXieGang(
            @RequestParam(value = "factory") String factory,
            @RequestParam(value = "company") String company,
            @RequestParam(value = "userNo") String userNo,
            @RequestParam(value = "pid") String pid){
        try {
            return pqcInputService.setXieGang(factory,company,userNo,pid);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
    
    @ApiOperation(value = "获取检验值明细的【上一项】和【下一项】", notes = "获取检验值明细的【上一项】和【下一项】")
    @RequestMapping(value = "/goNextItem", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult goNextItem(
            @RequestParam(value = "factory") String factory,
            @RequestParam(value = "company") String company,
            @RequestParam(value = "ftype") String ftype,
            @RequestParam(value = "mid") String mid,
            @RequestParam(value = "pid") String pid) {
        try {
            return pqcInputService.goNextItem(factory, company,ftype,mid,pid);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
    
    @ApiOperation(value = "PQC首检项目-列表", notes = "PQC首检项目-列表")
    @RequestMapping(value = "/getPQCItemList", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult getPQCItemList(
            @RequestParam(value = "factory") String factory,
            @RequestParam(value = "company") String company,
            @RequestParam(value = "userNo") String userNo,
            @RequestParam(value = "keyword") String keyword,
            @RequestParam(value = "page") int page,
            @RequestParam(value = "size") int size){
        try {
            return pqcInputService.getPQCItemList(factory,company,userNo,keyword,page,size);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
    
    @ApiOperation(value = "修改PQC首检项目-列表", notes = "修改PQC首检项目-列表")
    @RequestMapping(value = "/sumbitPQCItem", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult sumbitPQCItem(
            @RequestParam(value = "factory") String factory,
            @RequestParam(value = "company") String company,
            @RequestParam(value = "mid") String mid,
            @RequestParam(value = "userNo") String userNo,
            @RequestParam(value = "operaType") String operaType){
        try {
            return pqcInputService.sumbitPQCItem(factory,company,mid,userNo,operaType);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
    
    @ApiOperation(value = "获取合格结果", notes = "获取合格结果")
    @RequestMapping(value = "/getOkResult", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult getOkResult(
            @RequestParam(value = "factory") String factory,
            @RequestParam(value = "company") String company,
            @RequestParam(value = "userNo") String userNo,
            @RequestParam(value = "mid") String mid){
        try {
            return pqcInputService.getOkResult(factory,company,userNo,mid);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
    
    @ApiOperation(value = "获取首检操作记录", notes = "获取首检操作记录")
    @RequestMapping(value = "/getRecordList", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult getRecordList(
            @RequestParam(value = "factory") String factory,
            @RequestParam(value = "company") String company,
            @RequestParam(value = "user") String user,
            @RequestParam(value = "ftype") String ftype,
            @RequestParam(value = "mid") String mid,
            @RequestParam(value = "keyword") String keyword,
            @RequestParam(value = "size") int size,
            @RequestParam(value = "page") int page){
        try {
            return pqcInputService.getRecordList(factory,company,user,ftype,mid,keyword,size,page);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
    
    @ApiOperation(value = "一键符合要求", notes = "一键要求操作")
    @RequestMapping(value = "/updateRequisito", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult updateRequisito(
            @RequestParam(value = "factory") String factory,
            @RequestParam(value = "company") String company,
            @RequestParam(value = "userNo") String userNo,
            @RequestParam(value = "checkId") String checkId) {
        try {
            return pqcInputService.updateRequisito(factory, company,userNo,checkId);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
 
    @ApiOperation(value = "根据检验单号返回数据", notes = "根据检验单号返回数据")
    @RequestMapping(value = "/getBillReturn", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult getBillReturn(
            @RequestParam(value = "billNo") String billNo) {
        try {
            return pqcInputService.getBillReturn(billNo);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
    
}