k94314517
2023-12-26 c1e829fcf97594aaa30ffb531f213b703e0eb21f
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
package com.doumee.api.web;
 
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.annotation.trace.Trace;
import com.doumee.core.model.ApiResponse;
import com.doumee.dao.system.model.SystemDictData;
import com.doumee.dao.web.reqeust.FinishAnswerDTO;
import com.doumee.dao.web.response.DeviceRoleVO;
import com.doumee.dao.web.response.ProblemsVO;
import com.doumee.service.business.DeviceRoleService;
import com.doumee.service.business.DeviceService;
import com.doumee.service.business.ProblemLogService;
import com.doumee.service.business.ProblemsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import java.util.List;
 
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2023/12/7 10:40
 */
 
@Api(tags = "99、其他")
@Trace(exclude = true)
@RestController
@RequestMapping("/web/unit")
@Slf4j
public class UnitController {
 
    @Autowired
    private SystemDictDataBiz systemDictDataBiz;
 
    @Autowired
    private DeviceRoleService deviceRoleService;
 
    @ApiOperation(value = "查询字典值数据", notes = "H5")
    @GetMapping("/getSystemDictData")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", dataType = "String", name = "label", value = "数据字典值", required = true),
            @ApiImplicitParam(paramType = "query", dataType = "String", name = "dictCode", value = "系统字典值", required = true)
    })
    public ApiResponse<SystemDictData> getSystemDictData(@RequestParam String dictCode, @RequestParam String label) {
        return ApiResponse.success("查询成功",systemDictDataBiz.queryByCode(dictCode,label));
    }
 
    @ApiOperation(value = "设备组列表", notes = "H5")
    @GetMapping("/deviceRoleList")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type", value = "类型 0劳务访客 1普通访客 2内部人员", required = true)
    })
    public ApiResponse<List<DeviceRoleVO>> deviceRoleList(@RequestParam Integer type) {
        return ApiResponse.success("查询成功",deviceRoleService.findListByType(type));
    }
 
}