liding
昨天 16d1c46ce0c5469d2e3e2cfa247dc595af320d58
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
package com.ruoyi.device.controller;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.domain.Result;
import com.ruoyi.device.pojo.DeviceScrapped;
import com.ruoyi.device.service.DeviceScrappedService;
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;
 
/**
 * <p>
 * 设备报废申请表 前端控制器
 * </p>
 *
 * @author 江苏鵷雏网络科技有限公司
 * @since 2024-12-17 01:53:47
 */
@Api(tags = "设备报废申请表")
@AllArgsConstructor
@RestController
@RequestMapping("/deviceScrapped")
public class DeviceScrappedController {
 
    private DeviceScrappedService deviceScrappedService;
 
 
    /**
     * 设备报废申请列表
     * @return
     */
    @ApiOperation(value = "设备报废申请列表")
    @GetMapping("/pageDeviceScrapped")
    public Result<IPage<DeviceScrapped>> pageDeviceScrapped(Page page, DeviceScrapped deviceScrapped) {
        return Result.success(deviceScrappedService.pageDeviceScrapped(page, deviceScrapped));
    }
 
    /**
     * 查询设备报废申请
     * @return
     */
    @ApiOperation(value = "查询设备报废申请")
    @GetMapping("/getDeviceScrapped")
    public Result getDeviceScrapped(Integer scrappedId){
        return Result.success(deviceScrappedService.getById(scrappedId));
    }
 
    /**
     * 删除设备核查计划详情
     * @return
     */
    @ApiOperation(value = "删除设备报废申请")
    @DeleteMapping("/delDeviceScrapped")
    public Result delDeviceScrapped(Integer scrappedId){
        return Result.success(deviceScrappedService.removeById(scrappedId));
    }
 
    /**
     * 新增设备报废申请
     * @return
     */
    @ApiOperation(value = "新增设备报废申请")
    @PostMapping("/addDeviceScrapped")
    public Result addDeviceScrapped(@RequestBody DeviceScrapped deviceScrapped){
        return Result.success(deviceScrappedService.addDeviceScrapped(deviceScrapped));
    }
 
    /**
     * 导出设备报废申请
     */
    @ApiOperation("导出设备报废申请")
    @GetMapping("/exportDeviceScrapped")
    public Result exportDeviceScrapped(Integer scrappedId, HttpServletResponse response) {
        return deviceScrappedService.exportDeviceScrapped(scrappedId, response);
    }
 
}