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
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.HoPatrolCheckService;
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 = "ho_patrol")
public class HoPatrolCheckController extends WebController {
    @Autowired
    private HoPatrolCheckService hoPatrolCheckService;
 
    @ApiOperation(value = "获取产线数据", notes = "获取产线数据")
    @RequestMapping(value = "/getLineInfo", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult getLineInfo(
            @RequestParam(value = "userNo") String userNo) {
        try {
            return hoPatrolCheckService.getLineNo(userNo);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
 
    @ApiOperation(value = "获取工序数据", notes = "获取工序数据")
    @RequestMapping(value = "/getProccInfo", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult getProccInfo(
            @RequestParam(value = "userNo") String userNo) {
        try {
            return hoPatrolCheckService.getProccInfoT(userNo);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
 
    @ApiOperation(value = "获取产线下拉选择检验单号", notes = "获取产线下拉选择检验单号")
    @RequestMapping(value = "/getSelect", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult getSelect(
            @RequestParam(value = "userNo") String userNo,
            @RequestParam(value = "lineNo") String lineNo,
            @RequestParam(value = "taskNo") String taskNo
 
    ) {
        try {
            return hoPatrolCheckService.getLineSelect(userNo,lineNo,taskNo);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
 
    @ApiOperation(value = "获取检验单号下拉数据", notes = "获取检验单号下拉数据")
    @RequestMapping(value = "/getprocessT", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult getprocessT(
            @RequestParam(value = "userNo") String userNo,
            @RequestParam(value = "lineNo") String lineNo,
            @RequestParam(value = "taskNo") String taskNo
    ) {
        try {
            return hoPatrolCheckService.getprocessBillSelect(userNo,lineNo,taskNo);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
 
 
 
    @ApiOperation(value = "获取检验单号下拉选择数据", notes = "获取检验单号下拉选择数据")
    @RequestMapping(value = "/getBill", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult getBill(
            @RequestParam(value = "userNo") String userNo,
            @RequestParam(value = "lineNo") String lineNo,
            @RequestParam(value = "taskNo") String taskNo
    ) {
        try {
            return hoPatrolCheckService.getBillSelect(userNo,lineNo,taskNo);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
 
    @ApiOperation(value = "检验项目保存", notes = "检验项目保存")
    @RequestMapping(value = "/checkSave", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult
 
    checkSave(
            @RequestParam(value = "userNo") String userNo,
            @RequestParam(value = "checkNo") String checkNo,
            @RequestParam(value = "pid") int pid,
            @RequestParam(value = "checkResult") String checkResult,
            @RequestParam(value = "checkDemo") String checkDemo
 
    ) {
        try {
            return hoPatrolCheckService.checkDetailSave(userNo,checkNo,pid,checkResult,checkDemo);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
 
    @ApiOperation(value = "检验项目删除", notes = "检验项目删除")
    @RequestMapping(value = "/checkDel", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult checkDel(
            @RequestParam(value = "userNo") String userNo,
            @RequestParam(value = "checkNo") String checkNo,
            @RequestParam(value = "pid") int pid,
            @RequestParam(value = "checkResult") String checkResult,
            @RequestParam(value = "checkDemo") String checkDemo,
            @RequestParam(value = "type") String type  // 增加检验类型参数
    ) {
        try {
            return hoPatrolCheckService.checkDetailDel(userNo, checkNo, pid, checkResult, checkDemo, type);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
 
 
    @ApiOperation(value = "根据id获取详情", notes = "根据id获取详情")
    @RequestMapping(value = "/getDetails", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult getDetails(
            @RequestParam(value = "userNo") String userNo,
            @RequestParam(value = "checkNo") String checkNo,
            @RequestParam(value = "pid") int pid
 
    ) {
        try {
            return hoPatrolCheckService.getDetails(userNo,checkNo,pid);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
 
    @ApiOperation(value = "一键合格", notes = "一键合格")
    @RequestMapping(value = "/pass", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult pass(
            @RequestParam(value = "userNo") String userNo,
            @RequestParam(value = "checkNo") String checkNo
 
    ) {
        try {
            return hoPatrolCheckService.checkDetailPass(userNo,checkNo);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
 
    @ApiOperation(value = "提交数据", notes = "提交数据")
    @RequestMapping(value = "/submit", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ApiResponseResult submit(
            @RequestParam(value = "userNo") String userNo,
            @RequestParam(value = "checkNo") String checkNo,
            @RequestParam(value = "type")  int type
 
    ) {
        try {
            return hoPatrolCheckService.submitData(userNo,checkNo,type);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
}