liujie
2026-01-29 91694fdc2e2a0a0db9e9fff0cb98490142924bbb
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
package com.estate.expert.admin.controller.admin.option;
 
 
import com.estate.expert.admin.domain.business.device.DeviceType;
import com.estate.expert.admin.service.DeviceService;
import com.estate.expert.common.rpc.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
 
@Api(tags = "管理后台/选项/表单")
@Slf4j
@CrossOrigin
@RequestMapping("/admin/form")
@RestController
@Validated
public class OptionFormController {
 
    @Resource
    private DeviceService deviceService;
 
    @ApiOperation(value = "设备创建表单")
    @GetMapping("/deviceCreate")
    public Result deviceCreateForm(@RequestParam(value = "deviceType") DeviceType deviceType){
        return Result.success(deviceService.deviceCreateForm(deviceType));
    }
 
    @ApiOperation(value = "设备申请表单")
    @GetMapping("/deviceUsage")
    public Result deviceUsageForm(@RequestParam(value = "deviceType") DeviceType deviceType){
        return Result.success(deviceService.deviceUsageForm(deviceType));
    }
 
    @ApiOperation(value = "设备创建表单全部")
    @GetMapping("/deviceCreate/all")
    public Result deviceCreateFormAll(){
        return Result.success(deviceService.deviceCreateFormAll());
    }
 
    @ApiOperation(value = "设备申请表单全部")
    @GetMapping("/deviceUsage/all")
    public Result deviceUsageFormAll(){
        return Result.success(deviceService.deviceUsageFormAll());
    }
 
}