gaoluyang
2026-09-30 e1718dca22c88f2fa3db0ba7f55068e9e54ff159
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
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.DeviceExternalApply;
import com.ruoyi.device.service.DeviceExternalApplyService;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
 
import jakarta.servlet.http.HttpServletResponse;
import java.util.Map;
 
/**
 * <p>
 * 利用外部设备申请表 前端控制器
 * </p>
 *
 * @author 江苏鵷雏网络科技有限公司
 * @since 2024-12-17 10:28:43
 */
@Tag(name = "利用外部设备申请表")
@AllArgsConstructor
@RestController
@RequestMapping("/deviceExternalApply")
public class DeviceExternalApplyController {
 
    private DeviceExternalApplyService deviceExternalApplyService;
 
 
    /**
     * 利用外部设备申请列表
     * @return
     */
    @Operation(summary = "利用外部设备申请列表")
    @GetMapping("/pageDeviceExternalApply")
    public Result<IPage<DeviceExternalApply>> pageDeviceExternalApply(Page page, DeviceExternalApply deviceExternalApply) throws Exception {
        return Result.success(deviceExternalApplyService.pageDeviceExternalApply(page, deviceExternalApply));
    }
 
    /**
     * 查询利用外部设备申请
     * @return
     */
    @Operation(summary = "查询利用外部设备申请")
    @GetMapping("/getDeviceExternalApply")
    public Result getDeviceExternalApply(Integer externalApplyId){
        return Result.success(deviceExternalApplyService.getById(externalApplyId));
    }
 
    /**
     * 删除利用外部设备申请
     * @return
     */
    @Operation(summary = "删除利用外部设备申请")
    @DeleteMapping("/delDeviceExternalApply")
    public Result delDeviceExternalApply(Integer externalApplyId){
        return Result.success(deviceExternalApplyService.removeById(externalApplyId));
    }
 
    /**
     * 新增利用外部设备申请
     * @return
     */
    @Operation(summary = "新增利用外部设备申请")
    @PostMapping("/addDeviceExternalApply")
    public Result addDeviceExternalApply(@RequestBody DeviceExternalApply deviceExternalApply){
        return Result.success(deviceExternalApplyService.addDeviceExternalApply(deviceExternalApply));
    }
 
    /**
     * 导出利用外部设备申请
     * @param externalApplyId 外部设备申请id
     * @return
     */
    @Operation(summary = "导出利用外部设备申请")
    @GetMapping("/exportDeviceExternalApply")
    public Result exportDeviceExternalApply(Integer externalApplyId, HttpServletResponse response){
        deviceExternalApplyService.exportDeviceExternalApply(externalApplyId, response);
        return Result.success();
    }
}