zhuo
2025-05-26 fc543916cfac06f0cf16d018b9751417e3a119f7
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
package com.ruoyi.inspect.controller;
 
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.domain.Result;
import com.ruoyi.inspect.dto.IfsStockQueryDTO;
import com.ruoyi.inspect.dto.SpotCheckQuarterDto;
import com.ruoyi.inspect.dto.SpotCheckYearDto;
import com.ruoyi.inspect.service.FinishProductSpotCheckService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
 
import javax.servlet.http.HttpServletResponse;
import java.util.Map;
 
/**
 * @Author zhuo
 * @Date 2024/9/29
 */
@RequestMapping("/finishProductSpotCheck")
@RestController
@AllArgsConstructor
@Api(tags = "成品抽样")
public class FinishProductSpotCheckController {
 
    private FinishProductSpotCheckService finishProductSpotCheckService;
 
    /**
     * 查询ifs库存数量
     *
     * @param ifsStockQueryDTO
     * @return
     */
    @ApiOperation(value = "查询ifs成品库存")
    @PostMapping("/getIfsStock")
    public Result getIfsStock(@RequestBody IfsStockQueryDTO ifsStockQueryDTO) {
        return finishProductSpotCheckService.getIfsStockReport(ifsStockQueryDTO);
    }
 
    /********************************************************  季度抽样  ********************************************************/
 
    /**
     * 新增季度抽检
     *
     * @param spotCheckQuarterDto
     * @return
     */
    @ApiOperation(value = "新增季度抽检")
    @PostMapping("/addQuarter")
    public Result addQuarter(@RequestBody SpotCheckQuarterDto spotCheckQuarterDto) {
        return Result.success(finishProductSpotCheckService.addQuarter(spotCheckQuarterDto));
    }
 
    /**
     * 查询季度抽样详情
     *
     * @param quarterId
     * @return
     */
    @ApiOperation(value = "查询季度抽样详情")
    @GetMapping("/getQuarter")
    public Result getQuarter(Integer quarterId) {
        return Result.success(finishProductSpotCheckService.getQuarter(quarterId));
    }
 
    /**
     * 季度抽样列表
     * @return
     * @throws Exception
     */
    @ApiOperation(value = "季度抽样列表")
    @GetMapping("/getQuarterPage")
    public Result getQuarterPage(Page page, SpotCheckQuarterDto spotCheckQuarter) throws Exception {
        return Result.success(finishProductSpotCheckService.getQuarterPage(page, spotCheckQuarter));
    }
 
    /**
     * 新增季度抽检
     *
     * @param quarterId
     * @return
     */
    @ApiOperation(value = "删除季度检验")
    @DeleteMapping("/deleteQuarter")
    public Result deleteQuarter(Integer quarterId) {
        return Result.success(finishProductSpotCheckService.deleteQuarter(quarterId));
    }
 
    /**
     * 成品下单界面查询季度信息
     *
     * @return
     */
    @ApiOperation(value = "成品下单界面查询季度信息")
    @GetMapping("/getQuarterOnOrder")
    public Result getQuarterOnOrder() {
        return Result.success(finishProductSpotCheckService.getQuarterOnOrder());
    }
 
    /**
     * 成品下单界面查询季度信息
     *
     * @return
     */
    @ApiOperation(value = "修改季度检验")
    @PostMapping("/updateQuarterOnOrder")
    public Result updateQuarterOnOrder(@RequestBody SpotCheckQuarterDto spotCheckQuarterDto) {
        return Result.success(finishProductSpotCheckService.updateQuarterOnOrder(spotCheckQuarterDto));
    }
 
    /**
     * 成品下单界面查询季度信息
     *
     * @return
     */
    @ApiOperation(value = "提交最终季度报告")
    @GetMapping("/finalReportQuarter")
    public void finalReportQuarter(Integer quarterId, HttpServletResponse response) {
        finishProductSpotCheckService.finalReportQuarter(quarterId, response);
    }
 
 
 
 
 
    /********************************************************  年度抽样  ********************************************************/
 
    /**
     * 新增年度抽样
     *
     * @param spotCheckYearDto
     * @return
     */
    @ApiOperation(value = "新增年度抽样")
    @PostMapping("/addSpotCheckYear")
    public Result addSpotCheckYear(@RequestBody SpotCheckYearDto spotCheckYearDto) {
        return Result.success(finishProductSpotCheckService.addSpotCheckYear(spotCheckYearDto));
    }
 
    /**
     * 查询季度抽样详情
     *
     * @param yearId
     * @return
     */
    @ApiOperation(value = "查询年度抽样详情")
    @GetMapping("/getSpotCheckYear")
    public Result getSpotCheckYear(Integer yearId) {
        return Result.success(finishProductSpotCheckService.getSpotCheckYear(yearId));
    }
 
    /**
     * 季度抽样列表
     * @return
     * @throws Exception
     */
    @ApiOperation(value = "年度抽样列表列表")
    @GetMapping("/getSpotCheckYearPage")
    public Result getSpotCheckYearPage(Page page, SpotCheckYearDto spotCheckYear) throws Exception {
        return Result.success(finishProductSpotCheckService.getSpotCheckYearPage(page, spotCheckYear));
    }
 
    /**
     * 删除年度抽样
     *
     * @param yearId
     * @return
     */
    @ApiOperation(value = "删除年度抽样")
    @DeleteMapping("/deleteSpotCheckYear")
    public Result deleteSpotCheckYear(Integer yearId) {
        return Result.success(finishProductSpotCheckService.deleteSpotCheckYear(yearId));
    }
 
    /**
     * 成品下单界面查询季度信息
     *
     * @return
     */
    @ApiOperation(value = "修改年度检验")
    @PostMapping("/updateSpotCheckYear")
    public Result updateSpotCheckYear(@RequestBody SpotCheckYearDto spotCheckYearDto) {
        return Result.success(finishProductSpotCheckService.updateSpotCheckYear(spotCheckYearDto));
    }
 
    /**
     * 成品下单界面查询季度信息
     *
     * @return
     */
    @ApiOperation(value = "生成最终年度报告")
    @GetMapping("/finalReportSpotCheckYear")
    public Result finalReportSpotCheckYear(Integer yearId, HttpServletResponse response) {
        return Result.success(finishProductSpotCheckService.finalReportSpotCheckYear(yearId, response));
    }
 
}