feiyu02
2025-11-14 c03e1d823eb86c856ecbe40d8d2180ffce7c7b0f
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
package cn.flightfeather.supervision.lightshare.web
 
import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Domainitem
import cn.flightfeather.supervision.lightshare.service.DomainitemService
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import io.swagger.annotations.ApiParam
import org.springframework.web.bind.annotation.*
 
@Api(tags = ["DomainitemController"], description = "值域信息API接口")
@RestController
@RequestMapping("/domainitem")
class DomainitemController (val domainitemService: DomainitemService) {
 
    @IgnoreResponseAdvice
    @GetMapping
    fun getAll() = domainitemService.findAll()
 
    @IgnoreResponseAdvice
    @PutMapping
    fun add(@RequestBody domainitem: Domainitem) = domainitemService.save(domainitem)
 
    @IgnoreResponseAdvice
    @PostMapping
    fun update(@RequestBody domainitem: Domainitem) = domainitemService.update(domainitem)
 
    @IgnoreResponseAdvice
    @GetMapping("/{id}")
    fun getById(@PathVariable id:String) = domainitemService.findOne(id)
 
    @IgnoreResponseAdvice
    @DeleteMapping("/{id}")
    fun delete (@PathVariable id: String) = domainitemService.delete(id)
 
    @IgnoreResponseAdvice
    @ApiOperation("获取某类场景的问题位置选项")
    @GetMapping("/location")
    fun getLocation(
        @ApiParam("场景类型id") @RequestParam("sceneType") sceneType:Int
    ) = domainitemService.getLocation(sceneType)
 
    @IgnoreResponseAdvice
    @ApiOperation("获取巡查任务的类型选项")
    @GetMapping("/taskType")
    fun getTaskType() = domainitemService.getTaskType()
 
    @IgnoreResponseAdvice
    @ApiOperation("获取巡查任务的期限类型选项")
    @GetMapping("/deadlineType")
    fun getDeadlineType() = domainitemService.getDeadlineType()
 
    @IgnoreResponseAdvice
    @ApiOperation("获取巡查任务层次类型选项")
    @GetMapping("/level")
    fun getLevelType() = domainitemService.getLevelType()
 
    @IgnoreResponseAdvice
    @ApiOperation("根据场景类型获取任意拍的类型")
    @GetMapping("/mediaFileType")
    fun getMediaFileType(
        @ApiParam("场景类型id") @RequestParam("sceneType") sceneType:Int
    ) = domainitemService.getMediaFileType(sceneType)
 
    @ApiOperation("根据值域类别名称,获取具体的选项")
    @GetMapping("/name")
    fun getItemByName(
        @ApiParam("值域名称") @RequestParam("name") name:String
    ) = domainitemService.findByLogName(name)
 
    @ApiOperation("根据值域类别guid,获取具体的选项")
    @GetMapping("/catalogId")
    fun getItemByCatalogId(
        @ApiParam("值域类别guid") @RequestParam("catalogId") catalogId:String
    ) = domainitemService.findByLogID(catalogId)
}