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
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.PQCRetestService;
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_retest_input")
public class PQCRetestController extends WebController {
    
    @Autowired
    private PQCRetestService pqcRetestService;
 
    @ApiOperation(value = "获取复测抽检数据源", notes = "获取复测抽检数据源")
    @RequestMapping(value = "/getRetestData", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult getRetestData(
            @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 pqcRetestService.getRetestData(factory, company, ftype, procno, modelno,keyword);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
    
    @ApiOperation(value = "获取送检单号详细信息", notes = "获取送检单号详细信息")
    @RequestMapping(value = "/getInspectionInfo", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult getInspectionInfo(
            @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 pqcRetestService.getInspectionInfo(factory, company, userNo, lineType, procNo, lotNO,classNO);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
    
    @ApiOperation(value = "执行操作", notes = "执行操作")
    @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 pqcRetestService.modifyPQCValue(factory, company,userNo,mid,tableName,changeName,changeValue);
        } 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 pqcRetestService.getBillReturn(billNo);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
    
    
}