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
package com.web.pda.lyt.lytPda.controller;
 
 
import com.app.base.data.ApiResponseResult;
import com.web.pda.lyt.lytPda.service.internal.SJPatrolServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
@RequestMapping("SJPatrol")
@RestController
public class SJPatrolController {
 
    @Autowired
    private SJPatrolServiceImpl SJPatrolService;
 
 
/*    @PostMapping("getAll")*/
    @RequestMapping(value ="/getAll", method = RequestMethod.POST)
    public ApiResponseResult getAll(@RequestParam(value = "userNo") String userNo,
                                    @RequestParam(value = "taskNo") String taskNo) throws Exception {
        return SJPatrolService.getBillSelect(userNo, taskNo);
    }
 
    @PostMapping("getDetails")
    public ApiResponseResult getDetails(
            @RequestParam(value = "userNo") String userNo,
            @RequestParam(value = "checkNo") String checkNo,
            @RequestParam(value = "pid") int pid
 
    ) {
        try {
            return SJPatrolService.getDetails(userNo, checkNo, pid);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
 
    @PostMapping("checkSave")
    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,
            @RequestParam(value = "checkNum") String checkNum
    ) {
        try {
            return SJPatrolService.checkDetailSave(userNo, checkNo, pid, checkResult, checkDemo, checkNum);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
 
 
    @PostMapping("submit")
    public ApiResponseResult submit(
            @RequestParam(value = "userNo") String userNo,
            @RequestParam(value = "checkNo") String checkNo,
            @RequestParam(value = "type") int type
    ) {
        try {
            return SJPatrolService.submitData(userNo, checkNo, type);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
 
 
    @PostMapping("getSJAll")
    public ApiResponseResult getSJAll(@RequestParam(value = "userNo") String userNo,
                                       @RequestParam(value = "taskNo") String taskNo) throws Exception {
        return SJPatrolService.getSJBillSelect(userNo, taskNo);
    }
 
    @PostMapping("getSJDetails")
    public ApiResponseResult getSJDetails(
            @RequestParam(value = "userNo") String userNo,
            @RequestParam(value = "checkNo") String checkNo,
            @RequestParam(value = "pid") int pid
 
    ) {
        try {
            return SJPatrolService.getSJDetails(userNo, checkNo, pid);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
 
    @PostMapping("SJCheckSave")
    public ApiResponseResult SJCheckSave(
            @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 = "checkNum") String checkNum
    ) {
        try {
            return SJPatrolService.checkDetailSaveSJ(userNo, checkNo, pid, checkResult, checkDemo, checkNum);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
 
    @PostMapping("submitSJ")
    public ApiResponseResult submitSJ(
            @RequestParam(value = "userNo") String userNo,
            @RequestParam(value = "checkNo") String checkNo,
            @RequestParam(value = "type") int type,
            @RequestParam(value = "conformity") String conformity
    ) {
        try {
            return SJPatrolService.submitDataSJ(userNo, checkNo, type, conformity);
        } catch (Exception e) {
            e.printStackTrace();
            return ApiResponseResult.failure(e.toString());
        }
    }
 
 
}